Bug 189907

Summary: Make Element.scrollIntoView properly work with nested scroll boxes and smooth behavior
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://drafts.csswg.org/cssom-view/#scroll-an-element-into-view
See Also: https://github.com/w3c/csswg-drafts/issues/3127
Bug Depends on: 188043    
Bug Blocks:    

Description Frédéric Wang (:fredw) 2018-09-23 21:40:30 PDT
Follow-up of bug 188043. This might need a bit more work so I'm moving that part out of the main bug.

Basically, the patch in bug 188043 naively follows https://drafts.csswg.org/cssom-view/#scroll-an-element-into-view but does not wait for smooth scroll of step 12 to complete, possibly resulting in wrong final positions. It's not clear we actually want to align on the current spec anyway, Gecko and Chromium use different algorithm. For details, see https://github.com/w3c/csswg-drafts/issues/3127

The WPT test for this is http://w3c-test.org/css/cssom-view/scroll-behavior-scrollintoview-nested.html