Bug 227803 - RenderLayerScrollableArea::updateScrollPosition assumes that it can scroll to the targeted scroll position
Summary: RenderLayerScrollableArea::updateScrollPosition assumes that it can scroll to...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-08 10:32 PDT by Martin Robinson
Modified: 2021-07-13 01:18 PDT (History)
9 users (show)

See Also:


Attachments
Patch (4.16 KB, patch)
2021-07-08 10:35 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch (6.53 KB, patch)
2021-07-12 01:52 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2021-07-08 10:32:07 PDT
RenderLayerScrollableArea::updateScrollPosition calculates a target scroll offset and tries to scroll there before returning an adjusted rectangle. The adjusted rectangle is based on the target scroll offset, rather than the area's true new scroll offset. The target offset may not be equal to the area's true offset due to scroll snapping.
Comment 1 Martin Robinson 2021-07-08 10:35:13 PDT
Created attachment 433138 [details]
Patch
Comment 2 Martin Robinson 2021-07-12 01:52:46 PDT
Created attachment 433303 [details]
Patch
Comment 3 Martin Robinson 2021-07-12 08:29:53 PDT
Looks like my original change did not take into account the in-progress smooth scrolling API. I've modified this patch so that instead of using `scrollOffset()` to adjust the output rectangle, `scrollToOffset()` now returns the snapped scroll offset.
Comment 4 EWS 2021-07-13 01:17:36 PDT
Committed r279869 (239622@main): <https://commits.webkit.org/239622@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 433303 [details].
Comment 5 Radar WebKit Bug Importer 2021-07-13 01:18:28 PDT
<rdar://problem/80505941>