Bug 227803

Summary: RenderLayerScrollableArea::updateScrollPosition assumes that it can scroll to the targeted scroll position
Product: WebKit Reporter: Martin Robinson <mrobinson>
Component: ScrollingAssignee: Martin Robinson <mrobinson>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, esprehn+autocc, ews-watchlist, fred.wang, glenn, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>