| Summary: | Release assert in Document::updateStyleIfNeeded() via ScrollableArea::updateScrollSnapState | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||
| Component: | Layout and Rendering | Assignee: | Martin Robinson <mrobinson> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bfulgham, cgarcia, ews-feeder, fred.wang, gpoo, mrobinson, product-security, rbuis, simon.fraser, svillar, webkit-bug-importer, wenson_hsieh, zalan | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Ryosuke Niwa
2021-05-18 18:13:39 PDT
The issue here is that ScrollableArea::updateScrollSnapState which gets called by RenderLayerModelObject::styleDidChange is immediately trying to schedule a scroll. That's just wrong. This appears to be a regression from https://trac.webkit.org/changeset/185762. I can reproduce this issue with ASAN release build of WebKitTestRunner at r277641. (In reply to Ryosuke Niwa from comment #1) > The issue here is that ScrollableArea::updateScrollSnapState which gets > called by RenderLayerModelObject::styleDidChange is immediately trying to > schedule a scroll. That's just wrong. > This appears to be a regression from > https://trac.webkit.org/changeset/185762. I'm not sure it's a regression of r185762, the problem is the call to scrollToPositionWithoutAnimation() that was there before r185762. Could it be that the problem is updating snap state from styleDidChange? Should we ensure it's done after style change/layout? That was introduced in r190330. I have been investigating this a bit. I think there are two straight-forward options here: 1. Changes to scroll-snap style could just trigger a relayout. This would be very easy to implement and I think it fixes a WPT test. 2. We could add a new StyleDifference for when it is necessary to recalculate the scroll position. Ryosuke and Simon, do you have a preference here? Let's not introduce a new StyleDifference just to fix this. A relayout seems fine. Created attachment 429752 [details]
Patch
Committed r278193 (238236@main): <https://commits.webkit.org/238236@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429752 [details]. |