Bug 146957

Summary: Scroll snapping to elements is broken for main frame scrolling
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=210503
Attachments:
Description Flags
Patch
simon.fraser: review+
Patch none

Description Wenson Hsieh 2015-07-14 21:26:41 PDT
Setting the mainframe to have scroll snap type mandatory and some of its children to have scroll snap coordinates does not result in scroll snapping behavior (even on a toy example).
Comment 1 Wenson Hsieh 2015-07-14 21:28:18 PDT
<rdar://problem/21823835>
Comment 2 Wenson Hsieh 2015-07-15 12:26:24 PDT
Created attachment 256849 [details]
Patch
Comment 3 Simon Fraser (smfr) 2015-07-15 13:28:18 PDT
Comment on attachment 256849 [details]
Patch

r+ but please fix the broken builds.
Comment 4 Wenson Hsieh 2015-07-15 13:54:07 PDT
Created attachment 256858 [details]
Patch
Comment 5 Brent Fulgham 2015-07-15 14:31:11 PDT
Comment on attachment 256858 [details]
Patch

r=me, based on Simon's review and the fact that this is building properly.
Comment 6 WebKit Commit Bot 2015-07-15 15:34:58 PDT
Comment on attachment 256858 [details]
Patch

Clearing flags on attachment: 256858

Committed r186865: <http://trac.webkit.org/changeset/186865>
Comment 7 Simon Fraser (smfr) 2020-04-14 10:11:33 PDT
Comment on attachment 256858 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256858&action=review

> Source/WebCore/rendering/RenderBox.cpp:5008
> +    if (document().body() && frame().mainFrame().view() && frame().mainFrame().view()->isScrollable())

This was wrong to consult the main frame.