Bug 118429

Summary: [wk2] Add API to lock the scroll position at the top or bottom of the page
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bdakin, cmarcelo, commit-queue, jamesr, jeffm, luiz, sam, simon.fraser, tonikitoo
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
preliminary
none
patch andersca: review+

Description Tim Horton 2013-07-05 10:57:43 PDT
Some clients might have a need to keep the page scrolled to the top or bottom, regardless of scrolls that occur via JS/user interaction/page loading.

<rdar://problem/14120323>
Comment 1 Tim Horton 2013-07-05 12:56:59 PDT
Created attachment 206167 [details]
preliminary

changelog+test coming right up
Comment 2 Tim Horton 2013-07-05 12:58:21 PDT
Comment on attachment 206167 [details]
preliminary

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

> Source/WebKit2/UIProcess/API/C/WKPage.cpp:886
> +    switch (pinning) {

I know about APICast but it seemed like there weren't private things in there. Maybe I'm wrong?
Comment 3 WebKit Commit Bot 2013-07-05 12:59:10 PDT
Attachment 206167 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/page/FrameView.cpp', u'Source/WebCore/page/FrameView.h', u'Source/WebCore/page/scrolling/ScrollingCoordinator.h', u'Source/WebCore/page/scrolling/ScrollingTree.cpp', u'Source/WebCore/page/scrolling/ScrollingTree.h', u'Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h', u'Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm', u'Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm', u'Source/WebCore/platform/ScrollTypes.h', u'Source/WebKit2/Shared/WebPageCreationParameters.cpp', u'Source/WebKit2/Shared/WebPageCreationParameters.h', u'Source/WebKit2/UIProcess/API/C/WKPage.cpp', u'Source/WebKit2/UIProcess/API/C/WKPagePrivate.h', u'Source/WebKit2/UIProcess/WebPageProxy.cpp', u'Source/WebKit2/UIProcess/WebPageProxy.h', u'Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.h', u'Source/WebKit2/WebProcess/WebPage/WebPage.messages.in']" exit_code: 1
Source/WebCore/page/FrameView.h:438:  The parameter name "pinning" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h:81:  The parameter name "pinning" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/page/scrolling/ScrollingTree.h:105:  The parameter name "pinning" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit2/UIProcess/WebPageProxy.h:777:  The parameter name "pinning" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit2/WebProcess/WebPage/WebPage.h:665:  The parameter name "pinning" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 5 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Tim Horton 2013-07-05 14:22:30 PDT
Created attachment 206169 [details]
patch
Comment 5 WebKit Commit Bot 2013-07-05 14:24:38 PDT
Attachment 206169 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/page/FrameView.cpp', u'Source/WebCore/page/FrameView.h', u'Source/WebCore/page/scrolling/ScrollingCoordinator.h', u'Source/WebCore/page/scrolling/ScrollingTree.cpp', u'Source/WebCore/page/scrolling/ScrollingTree.h', u'Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h', u'Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm', u'Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm', u'Source/WebCore/platform/ScrollTypes.h', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/WebPageCreationParameters.cpp', u'Source/WebKit2/Shared/WebPageCreationParameters.h', u'Source/WebKit2/UIProcess/API/C/WKPage.cpp', u'Source/WebKit2/UIProcess/API/C/WKPagePrivate.h', u'Source/WebKit2/UIProcess/WebPageProxy.cpp', u'Source/WebKit2/UIProcess/WebPageProxy.h', u'Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.h', u'Source/WebKit2/WebProcess/WebPage/WebPage.messages.in', u'Tools/ChangeLog', u'Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj', u'Tools/TestWebKitAPI/Tests/WebKit2/ScrollPinningBehaviors.cpp']" exit_code: 1
Source/WebKit2/WebProcess/WebPage/WebPage.h:665:  The parameter name "pinning" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 25 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Tim Horton 2013-07-05 14:34:48 PDT
http://trac.webkit.org/changeset/152425
Comment 7 Simon Fraser (smfr) 2013-07-05 21:18:32 PDT
100 crashes on the build bot after this one.
Comment 8 Tim Horton 2013-07-05 21:25:43 PDT
(In reply to comment #7)
> 100 crashes on the build bot after this one.

Uhhhh, I'll take a look.
Comment 9 Tim Horton 2013-07-05 21:27:26 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > 100 crashes on the build bot after this one.
> 
> Uhhhh, I'll take a look.

Hmm, indeed. In console it looks like it's the revision before, but it's definitely mine. I'll post a patch in a second.
Comment 10 Tim Horton 2013-07-05 21:53:33 PDT
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > 100 crashes on the build bot after this one.
> > 
> > Uhhhh, I'll take a look.
> 
> Hmm, indeed. In console it looks like it's the revision before, but it's definitely mine. I'll post a patch in a second.

Patch at https://bugs.webkit.org/show_bug.cgi?id=118440