WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
107611
Fix rubber-band effect on non-scrollable pages
https://bugs.webkit.org/show_bug.cgi?id=107611
Summary
Fix rubber-band effect on non-scrollable pages
Christopher Cameron
Reported
2013-01-22 18:18:38 PST
[chromium] Fix rubber-band effect on non-scrollable pages
Attachments
Patch
(1.60 KB, patch)
2013-01-22 18:23 PST
,
Christopher Cameron
no flags
Details
Formatted Diff
Diff
Patch
(1.61 KB, patch)
2013-01-23 11:11 PST
,
Christopher Cameron
no flags
Details
Formatted Diff
Diff
Patch
(1.65 KB, patch)
2013-01-23 12:38 PST
,
Christopher Cameron
no flags
Details
Formatted Diff
Diff
Patch
(29.75 KB, patch)
2013-01-28 11:18 PST
,
Christopher Cameron
no flags
Details
Formatted Diff
Diff
Patch
(158.99 KB, patch)
2013-01-28 17:32 PST
,
Christopher Cameron
no flags
Details
Formatted Diff
Diff
Patch
(159.05 KB, patch)
2013-01-31 11:05 PST
,
Christopher Cameron
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Christopher Cameron
Comment 1
2013-01-22 18:23:25 PST
Created
attachment 184098
[details]
Patch
Christopher Cameron
Comment 2
2013-01-22 18:30:02 PST
This reverts a part of
https://bugs.webkit.org/show_bug.cgi?id=105632
in order to fix rubber-band over-scrolling in Chrome.
Antonio Gomes
Comment 3
2013-01-22 20:59:38 PST
Comment on
attachment 184098
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=184098&action=review
> Source/WebCore/page/FrameView.cpp:-3777 > - if (!isScrollable())
can not isScrollable get relaxed instead? so it could take overscroll/rubber-band into account. enum ScrollabilityStrategy { ConsiderRubberBand, IgnoreRubberBand }; bool isScrollable(ScrollabilityStrategy strategy) { // Even non overflown views are scrollable if rubber-band is enforced if (strategy == ConsiderRubberBand) return true; (...) }
James Robinson
Comment 4
2013-01-22 22:08:48 PST
Comment on
attachment 184098
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=184098&action=review
> Source/WebCore/ChangeLog:3 > + [chromium] Fix rubber-band effect on non-scrollable pages
don't mark a patch [chromium] if it touches cross-platform code
Christopher Cameron
Comment 5
2013-01-23 11:11:02 PST
Created
attachment 184267
[details]
Patch
Christopher Cameron
Comment 6
2013-01-23 11:12:15 PST
(In reply to
comment #3
)
> (From update of
attachment 184098
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=184098&action=review
> > > Source/WebCore/page/FrameView.cpp:-3777 > > - if (!isScrollable()) > > can not isScrollable get relaxed instead? so it could take overscroll/rubber-band into account.
Maybe it would be best to add this comment to the original site of the removed isScrollable. I've updated the patch to say explicitly that // Note that even non-scrollable views should handle wheel events, to allow for rubber-band // over-scroll behavior This way, it avoids hanging the other call to isScrollable in updateScrollableAreaSet. Does this look good to you? (In reply to
comment #4
)
> don't mark a patch [chromium] if it touches cross-platform code
Sorry, fixed.
Christopher Cameron
Comment 7
2013-01-23 12:08:43 PST
(In reply to
comment #6
)
> This way, it avoids hanging the other call to
This should read "changing the other call", not "hanging the other call"
Antonio Gomes
Comment 8
2013-01-23 12:21:30 PST
Comment on
attachment 184267
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=184267&action=review
> Source/WebCore/page/FrameView.cpp:3778 > - if (!isScrollable()) > - return false; > + // Note that even non-scrollable views should handle wheel events, to allow for rubber-band > + // over-scroll behavior.
That would work, but what about wrapping the if statement with #if !ENABLE(RUBBER_BANDING) ?
Christopher Cameron
Comment 9
2013-01-23 12:38:55 PST
Created
attachment 184284
[details]
Patch
Christopher Cameron
Comment 10
2013-01-23 12:41:32 PST
(In reply to
comment #8
)
> (From update of
attachment 184267
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=184267&action=review
> > > Source/WebCore/page/FrameView.cpp:3778 > > - if (!isScrollable()) > > - return false; > > + // Note that even non-scrollable views should handle wheel events, to allow for rubber-band > > + // over-scroll behavior. > > That would work, but what about wrapping the if statement with #if !ENABLE(RUBBER_BANDING) ?
Sure -- updated.
Antonio Gomes
Comment 11
2013-01-23 12:57:25 PST
Btw, it should be USE instead of ENABLE
Christopher Cameron
Comment 12
2013-01-23 13:18:48 PST
Thanks! (In reply to
comment #11
)
> Btw, it should be USE instead of ENABLE
Good point -- "optional OS service" does match the conditions for its use (particular OS version) more than "turn on a specific feature" (but ENABLE_RUBBER_BANDING is fairly embedded).
Nico Weber
Comment 13
2013-01-23 14:57:43 PST
I hate to be that guy, but is there some way this could be tested? I remember Alexei added overflow paint tests somewhere. Is that not enough testing infrastructure to cover this?
Nico Weber
Comment 14
2013-01-23 14:59:37 PST
This added the tests we have:
http://trac.webkit.org/changeset/107711
Christopher Cameron
Comment 15
2013-01-23 15:20:12 PST
(In reply to
comment #13
)
> is there some way this could be tested?
I should be able to add a WebCore::Internals::wheelEvent (similar to Internals::setScrollViewPosition) to hook into the FrameView at a higher level. Should't be too complicated, unless I run into platform-specific idiosyncrasies along the line.
James Robinson
Comment 16
2013-01-23 15:24:44 PST
Take a look at the eventSender interface (exposed only to DumpRenderTree) - can it generate the mousewheel events you want?
Christopher Cameron
Comment 17
2013-01-24 00:49:17 PST
(In reply to
comment #16
)
> Take a look at the eventSender interface (exposed only to DumpRenderTree) - can it generate the mousewheel events you want?
Thanks -- it looks like they can be added in there. Do you want me to hold off on committing this until I add the tests?
Antonio Gomes
Comment 18
2013-01-24 05:57:42 PST
(In reply to
comment #17
)
> (In reply to
comment #16
) > > Take a look at the eventSender interface (exposed only to DumpRenderTree) - can it generate the mousewheel events you want? > > Thanks -- it looks like they can be added in there. Do you want me to hold off on committing this until I add the tests?
Yes. It should be less than some hours to come up with a test.
Antonio Gomes
Comment 19
2013-01-24 05:58:24 PST
Comment on
attachment 184284
[details]
Patch Lets add a test. :%s/r+/r-/g
Christopher Cameron
Comment 20
2013-01-28 11:18:02 PST
Created
attachment 185019
[details]
Patch
Christopher Cameron
Comment 21
2013-01-28 11:22:32 PST
(In reply to
comment #20
)
> Created an attachment (id=185019) [details] > Patch
I've added a single test (testing over-scroll in one direction). I'll add the other directions, but please verify that you like the structure of the test first. I added a beginMouseWheel function to EventSender (since this needs to bracket the scroll events). I did not add an endMouseWheel because it won't be used in this test. LMK if you'd like it for completeness). Also, LMK if you'd prefer that any part of beginMouseWheel be parameterized (e.g, hasPreciseScrollingDeltas).
Nico Weber
Comment 22
2013-01-28 12:14:26 PST
Comment on
attachment 185019
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=185019&action=review
Nice! Looks good to me (but I'm not a reviewer); one question about the naming though:
> Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:1048 > +void EventSender::mouseWheelBegin(const CppArgumentList& arguments, CppVariant* result)
Should this be called mouseDragBegin() as it's not really a wheel event?
Build Bot
Comment 23
2013-01-28 16:35:30 PST
Comment on
attachment 185019
[details]
Patch
Attachment 185019
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/16160773
New failing tests: fast/workers/worker-close-more.html
Christopher Cameron
Comment 24
2013-01-28 17:32:46 PST
Created
attachment 185116
[details]
Patch
Christopher Cameron
Comment 25
2013-01-28 17:39:06 PST
(In reply to
comment #22
)
> (From update of
attachment 185019
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=185019&action=review
> > > Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:1048 > > +void EventSender::mouseWheelBegin(const CppArgumentList& arguments, CppVariant* result) > > Should this be called mouseDragBegin() as it's not really a wheel event?
I've renamed this (though I'm entirely flexible on the name). I've also added the remaining cardinal directions to the tests.
Christopher Cameron
Comment 26
2013-01-29 12:51:22 PST
Review ping.
Antonio Gomes
Comment 27
2013-01-29 13:24:24 PST
(In reply to
comment #26
)
> Review ping.
James, could you sign-off the chromium specific bits?
Christopher Cameron
Comment 28
2013-01-31 10:18:09 PST
(In reply to
comment #27
)
> (In reply to
comment #26
) > > Review ping. > > James, could you sign-off the chromium specific bits?
Ping.
James Robinson
Comment 29
2013-01-31 10:48:38 PST
Comment on
attachment 185116
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=185116&action=review
chromium parts seem fine
> LayoutTests/platform/chromium/rubberbanding/event-overhang-e.html:1 > +<html>
<!DOCTYPE html> on this and all other new html files
Christopher Cameron
Comment 30
2013-01-31 11:05:44 PST
Created
attachment 185817
[details]
Patch
WebKit Review Bot
Comment 31
2013-01-31 17:33:44 PST
Comment on
attachment 185817
[details]
Patch Clearing flags on attachment: 185817 Committed
r141514
: <
http://trac.webkit.org/changeset/141514
>
WebKit Review Bot
Comment 32
2013-01-31 17:33:51 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug