Bug 146957 - Scroll snapping to elements is broken for main frame scrolling
Summary: Scroll snapping to elements is broken for main frame scrolling
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-07-14 21:26 PDT by Wenson Hsieh
Modified: 2020-04-14 10:11 PDT (History)
8 users (show)

See Also:


Attachments
Patch (8.13 KB, patch)
2015-07-15 12:26 PDT, Wenson Hsieh
simon.fraser: review+
Details | Formatted Diff | Diff
Patch (8.13 KB, patch)
2015-07-15 13:54 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.