Bug 81457

Summary: [chromium] Make pixel-accurate wheel scrolling be unanimated
Product: WebKit Reporter: Robert Kroeger <rjkroege>
Component: Layout and RenderingAssignee: Robert Kroeger <rjkroege>
Status: RESOLVED FIXED    
Severity: Normal CC: danakj, davemoore, jamesr, scottbyer, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 81458    
Attachments:
Description Flags
Patch
none
Patch none

Description Robert Kroeger 2012-03-17 12:55:38 PDT
Make pixel-accurate wheel scrolling not be animated in ScrollAnimatorNone
Comment 1 Robert Kroeger 2012-03-17 12:58:25 PDT
Created attachment 132469 [details]
Patch
Comment 2 Robert Kroeger 2012-03-17 12:59:40 PDT
I think we need this if we're keeping ScrollAnimatorNone in the code path for handling animated wheels.

jamesr@: care to review?
Comment 3 Scott Byer 2012-03-17 13:01:35 PDT
Comment on attachment 132469 [details]
Patch

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

> Source/WebCore/platform/ScrollAnimatorNone.cpp:421
> +        return ScrollAnimator::scroll(orientation, granularity, step, multiplier);

I haven't been able to confirm on Windows yet, but on Linux, mouse wheels seem to be coming through here, so we'd lose smooth scrolling in that case. It's still behind a flag there, so for the short term that might be OK, but this might also affect the GTK WebKit builds as well.
Comment 4 Robert Kroeger 2012-03-17 13:10:17 PDT
(In reply to comment #3)
> (From update of attachment 132469 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=132469&action=review
> 
> > Source/WebCore/platform/ScrollAnimatorNone.cpp:421
> > +        return ScrollAnimator::scroll(orientation, granularity, step, multiplier);
> 
> I haven't been able to confirm on Windows yet, but on Linux, mouse wheels seem to be coming through here, so we'd lose smooth scrolling in that case. It's still behind a flag there, so for the short term that might be OK, but this might also affect the GTK WebKit builds as well.

change could be chromium platform only? trivial to do. smooth-scrolling can be temporarily disabled on Linux chrome.
Comment 5 Robert Kroeger 2012-03-17 13:16:13 PDT
Created attachment 132471 [details]
Patch
Comment 6 Scott Byer 2012-03-17 13:22:25 PDT
Comment on attachment 132471 [details]
Patch

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

> Source/WebCore/platform/ScrollAnimatorNone.cpp:421
> +#if PLATFORM(CHROMIUM)

Yes, I think this is sufficient until we can get the differentiation between the touch and wheel events down into here.
Comment 7 James Robinson 2012-03-17 15:17:01 PDT
Comment on attachment 132471 [details]
Patch

This is the  WebMouseWheelEvent::hasPreciseScrollingDeltas bool, right?  I think this is fine for now.
Comment 8 Robert Kroeger 2012-03-17 16:10:08 PDT
(In reply to comment #7)
> (From update of attachment 132471 [details])
> This is the  WebMouseWheelEvent::hasPreciseScrollingDeltas bool, right?  I think this is fine for now.

yes
Comment 9 WebKit Review Bot 2012-03-17 16:57:41 PDT
Comment on attachment 132471 [details]
Patch

Clearing flags on attachment: 132471

Committed r111128: <http://trac.webkit.org/changeset/111128>
Comment 10 WebKit Review Bot 2012-03-17 16:57:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Dana Jansens 2012-03-18 14:34:27 PDT
Think this broke a unit test.


[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from ScrollAnimatorEnabled
[ RUN      ] ScrollAnimatorEnabled.Enabled
../../third_party/WebKit/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp:128: Failure
Expected: (100) != (scrollAnimatorNone.currentX()), actual: 100 vs 100
[  FAILED  ] ScrollAnimatorEnabled.Enabled (0 ms)
[----------] 1 test from ScrollAnimatorEnabled (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] ScrollAnimatorEnabled.Enabled
Comment 12 Dana Jansens 2012-03-19 16:31:30 PDT
Working now!