Bug 96158

Summary: Need API to suppress scrollbar animations
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: WebKit APIAssignee: Beth Dakin <bdakin>
Status: NEW ---    
Severity: Normal CC: bdakin, eric, mifenton, tkent, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch sam: review+, buildbot: commit-queue-

Description Beth Dakin 2012-09-07 16:52:12 PDT
We need WK2 API to suppress overlay scrollbar animations.

<rdar://problem/12210972>
Comment 1 Beth Dakin 2012-09-07 17:08:44 PDT
Created attachment 162913 [details]
Patch
Comment 2 WebKit Review Bot 2012-09-07 17:13:10 PDT
Attachment 162913 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/page/FrameView.cpp:2759:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Beth Dakin 2012-09-07 17:16:02 PDT
Created attachment 162916 [details]
Patch
Comment 4 Darin Adler 2012-09-07 19:04:51 PDT
Comment on attachment 162916 [details]
Patch

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

> Source/WebCore/page/FrameView.cpp:2747
> +    if (Page* page = m_frame->page()) {
> +        if (page->shouldSuppressScrollbarAnimations())
> +            return false;
> +    }

Adding this code to the function makes it no longer “is on active page”, so I think you need to either rename the function or move this additional check elsewhere.
Comment 5 Beth Dakin 2012-09-10 16:00:33 PDT
Created attachment 163239 [details]
Patch

You're right. I really think that the function should change it's name rather than separating the two concepts. All of the callers of isOnActivePage() use that function to learn whether scrollbar painting and animating should proceed, so the function should just be re-named to reflect that. Here's a patch with a go at a new name.
Comment 6 Build Bot 2012-09-10 17:05:37 PDT
Comment on attachment 163239 [details]
Patch

Attachment 163239 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/13806545
Comment 7 Beth Dakin 2012-09-10 17:37:52 PDT
Thanks Sam! Committed change with http://trac.webkit.org/changeset/128134

I think I got all the build-fixing done in there.