Title: [186644] trunk
- Revision
- 186644
- Author
- commit-qu...@webkit.org
- Date
- 2015-07-09 16:02:41 -0700 (Thu, 09 Jul 2015)
Log Message
Rubber banding is broken when using a Mighty Mouse
https://bugs.webkit.org/show_bug.cgi?id=146693
Patch by Wenson Hsieh <whs...@berkeley.edu> on 2015-07-09
Reviewed by Tim Horton.
Source/WebCore:
Sets the "constrain content edge scrolling" flag to true by default, causing scrolling
with a Mighty Mouse to not extend beyond the container's edges.
Test: platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html
* rendering/RenderLayer.cpp: Remove code that defaulted the flag to false.
(WebCore::RenderLayer::RenderLayer): Deleted.
* rendering/RenderMarquee.cpp: Added special case for marquees that allows content to scroll.
(WebCore::RenderMarquee::RenderMarquee): See above.
LayoutTests:
* platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (186643 => 186644)
--- trunk/LayoutTests/ChangeLog 2015-07-09 22:58:05 UTC (rev 186643)
+++ trunk/LayoutTests/ChangeLog 2015-07-09 23:02:41 UTC (rev 186644)
@@ -1,3 +1,13 @@
+2015-07-09 Wenson Hsieh <whs...@berkeley.edu>
+
+ Rubber banding is broken when using a Mighty Mouse
+ https://bugs.webkit.org/show_bug.cgi?id=146693
+
+ Reviewed by Tim Horton.
+
+ * platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band-expected.txt: Added.
+ * platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html: Added.
+
2015-07-09 Devin Rousso <drou...@apple.com>
Web Inspector: Fix shape-highlight layout tests
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band-expected.txt (0 => 186644)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band-expected.txt 2015-07-09 23:02:41 UTC (rev 186644)
@@ -0,0 +1,9 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+scrollTop: 0
+scrollLeft: 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html (0 => 186644)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html 2015-07-09 23:02:41 UTC (rev 186644)
@@ -0,0 +1,65 @@
+<html>
+ <head>
+ <style>
+ #container {
+ width: 410px;
+ height: 400px;
+ overflow-y: scroll;
+ }
+
+ .cell {
+ width: 400px;
+ height: 400px;
+ }
+
+ #cell0 { background-color: #DD0000; }
+ #cell1 { background-color: #FF6666; }
+ #cell2 { background-color: #00DD00; }
+ #cell3 { background-color: #66FF66; }
+ #cell4 { background-color: #0000DD; }
+ #cell5 { background-color: #6666FF; }
+ </style>
+ <script src=""
+ <script>
+
+ function checkScrollOffsets()
+ {
+ var container = document.getElementById("container");
+ debug("scrollTop: " + container.scrollTop);
+ debug("scrollLeft: " + container.scrollLeft);
+ finishJSTest();
+ testRunner.notifyDone();
+ }
+
+ function testStatelessScrollingAgainstEdge()
+ {
+ eventSender.mouseMoveTo(100, 100);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(10, 10, "none", "none", true);
+ setTimeout(checkScrollOffsets, 0);
+ }
+
+ function setup()
+ {
+ if (window.eventSender) {
+ window.jsTestIsAsync = true;
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ eventSender.monitorWheelEvents();
+ setTimeout(testStatelessScrollingAgainstEdge, 0);
+ }
+ }
+ </script>
+ </head>
+
+ <body _onload_="setup();">
+ <div id="container">
+ <div class="cell" id="cell0"></div>
+ <div class="cell" id="cell1"></div>
+ <div class="cell" id="cell2"></div>
+ <div class="cell" id="cell3"></div>
+ <div class="cell" id="cell4"></div>
+ <div class="cell" id="cell5"></div>
+ </div>
+ </body>
+ <script src=""
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (186643 => 186644)
--- trunk/Source/WebCore/ChangeLog 2015-07-09 22:58:05 UTC (rev 186643)
+++ trunk/Source/WebCore/ChangeLog 2015-07-09 23:02:41 UTC (rev 186644)
@@ -1,3 +1,20 @@
+2015-07-09 Wenson Hsieh <whs...@berkeley.edu>
+
+ Rubber banding is broken when using a Mighty Mouse
+ https://bugs.webkit.org/show_bug.cgi?id=146693
+
+ Reviewed by Tim Horton.
+
+ Sets the "constrain content edge scrolling" flag to true by default, causing scrolling
+ with a Mighty Mouse to not extend beyond the container's edges.
+
+ Test: platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html
+
+ * rendering/RenderLayer.cpp: Remove code that defaulted the flag to false.
+ (WebCore::RenderLayer::RenderLayer): Deleted.
+ * rendering/RenderMarquee.cpp: Added special case for marquees that allows content to scroll.
+ (WebCore::RenderMarquee::RenderMarquee): See above.
+
2015-07-09 Brady Eidson <beid...@apple.com>
DocumentLoader::detachFromFrame() is being called with no current Frame set.
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (186643 => 186644)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-07-09 22:58:05 UTC (rev 186643)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-07-09 23:02:41 UTC (rev 186644)
@@ -325,8 +325,6 @@
// there is no need to dirty / recompute these lists.
m_zOrderListsDirty = isStackingContainer();
- ScrollableArea::setConstrainsScrollingToContentEdge(false);
-
if (!renderer().firstChild()) {
m_visibleContentStatusDirty = false;
m_hasVisibleContent = renderer().style().visibility() == VISIBLE;
Modified: trunk/Source/WebCore/rendering/RenderMarquee.cpp (186643 => 186644)
--- trunk/Source/WebCore/rendering/RenderMarquee.cpp 2015-07-09 22:58:05 UTC (rev 186643)
+++ trunk/Source/WebCore/rendering/RenderMarquee.cpp 2015-07-09 23:02:41 UTC (rev 186644)
@@ -63,6 +63,7 @@
, m_start(0), m_end(0), m_speed(0), m_reset(false)
, m_suspended(false), m_stopped(false), m_direction(MAUTO)
{
+ l->setConstrainsScrollingToContentEdge(false);
}
RenderMarquee::~RenderMarquee()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes