- Revision
- 201476
- Author
- [email protected]
- Date
- 2016-05-27 17:07:35 -0700 (Fri, 27 May 2016)
Log Message
EventHandler finds incorrect scrollable container.
https://bugs.webkit.org/show_bug.cgi?id=158132
<rdar://problem/26423126>
Reviewed by Brent Fulgham.
Fix the logic that checks whether we are at the beginning or at the end of the container (horizontally).
While scrolling to the right, deltaX has negative values. So in case of deltaX < 0, we need to check if
the container is not scrolled all the way to the right.
Source/WebCore:
Test: fast/scrolling/scroll-container-horizontally.html
* page/mac/EventHandlerMac.mm:
(WebCore::findEnclosingScrollableContainer):
LayoutTests:
* fast/scrolling/scroll-container-horizontally-expected.txt: Added.
* fast/scrolling/scroll-container-horizontally.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac-wk1/TestExpectations:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (201475 => 201476)
--- trunk/LayoutTests/ChangeLog 2016-05-28 00:06:01 UTC (rev 201475)
+++ trunk/LayoutTests/ChangeLog 2016-05-28 00:07:35 UTC (rev 201476)
@@ -1,3 +1,20 @@
+2016-05-27 Zalan Bujtas <[email protected]>
+
+ EventHandler finds incorrect scrollable container.
+ https://bugs.webkit.org/show_bug.cgi?id=158132
+ <rdar://problem/26423126>
+
+ Reviewed by Brent Fulgham.
+
+ Fix the logic that checks whether we are at the beginning or at the end of the container (horizontally).
+ While scrolling to the right, deltaX has negative values. So in case of deltaX < 0, we need to check if
+ the container is not scrolled all the way to the right.
+
+ * fast/scrolling/scroll-container-horizontally-expected.txt: Added.
+ * fast/scrolling/scroll-container-horizontally.html: Added.
+ * platform/ios-simulator/TestExpectations:
+ * platform/mac-wk1/TestExpectations:
+
2016-05-27 Saam barati <[email protected]>
DebuggerCallFrame crashes when updated with the globalExec because neither ShadowChicken's algorithm nor StackVisitor's algorithm reasons about the globalExec
Added: trunk/LayoutTests/fast/scrolling/scroll-container-horizontally-expected.txt (0 => 201476)
--- trunk/LayoutTests/fast/scrolling/scroll-container-horizontally-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/scrolling/scroll-container-horizontally-expected.txt 2016-05-28 00:07:35 UTC (rev 201476)
@@ -0,0 +1 @@
+PASS
Added: trunk/LayoutTests/fast/scrolling/scroll-container-horizontally.html (0 => 201476)
--- trunk/LayoutTests/fast/scrolling/scroll-container-horizontally.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/scroll-container-horizontally.html 2016-05-28 00:07:35 UTC (rev 201476)
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we scroll the correct(second) container horizontally.</title>
+<style>
+ .slider{
+ overflow-x: scroll;
+ }
+
+ .scrollable {
+ width: 2000px;
+ height: 500px;
+ border: 1px solid green;
+ }
+</style>
+</head>
+<body>
+<div class=slider id=firstcontainer>
+ <div class=scrollable>This should not scroll while the bottom green box is being hovered.</div>
+</div>
+<div class=slider id=secondcontainer>
+ <div class=scrollable></div>
+</div>
+<script>
+ if (window.eventSender && window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ eventSender.monitorWheelEvents();
+ // Scroll vertically to reach the bottom scrollable container.
+ eventSender.mouseMoveTo(10, 499);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+
+ eventSender.callAfterScrollingCompletes(function() {
+ // Scroll horizontally to check if we scroll the bottom scrollable container.
+ eventSender.monitorWheelEvents();
+ eventSender.mouseMoveTo(10, 510);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(-1, 0, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+
+ eventSender.callAfterScrollingCompletes(function() {
+ var firstOffset = document.getElementById("firstcontainer").scrollLeft;
+ var secondOffset = document.getElementById("secondcontainer").scrollLeft;
+ document.body.innerText = !firstOffset && secondOffset ? "PASS" : "FAIL";
+ testRunner.notifyDone();
+ });
+ });
+ }
+</script>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (201475 => 201476)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2016-05-28 00:06:01 UTC (rev 201475)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2016-05-28 00:07:35 UTC (rev 201476)
@@ -62,6 +62,7 @@
fast/events/wheel-event-destroys-frame.html [ Skip ]
fast/events/wheel-event-destroys-overflow.html [ Skip ]
fast/events/wheel-event-outside-body.html [ Skip ]
+fast/scrolling/scroll-container-horizontally.html [ Failure ]
# Not supported on iOS
batterystatus
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (201475 => 201476)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-05-28 00:06:01 UTC (rev 201475)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-05-28 00:07:35 UTC (rev 201476)
@@ -127,6 +127,7 @@
fast/scrolling/iframe-scrollable-after-back.html [ Skip ]
fast/scrolling/overflow-scrollable-after-back.html [ Skip ]
+fast/scrolling/scroll-container-horizontally.html [ Failure ]
compositing/rtl/rtl-fixed-overflow-scrolled.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (201475 => 201476)
--- trunk/Source/WebCore/ChangeLog 2016-05-28 00:06:01 UTC (rev 201475)
+++ trunk/Source/WebCore/ChangeLog 2016-05-28 00:07:35 UTC (rev 201476)
@@ -1,3 +1,20 @@
+2016-05-27 Zalan Bujtas <[email protected]>
+
+ EventHandler finds incorrect scrollable container.
+ https://bugs.webkit.org/show_bug.cgi?id=158132
+ <rdar://problem/26423126>
+
+ Reviewed by Brent Fulgham.
+
+ Fix the logic that checks whether we are at the beginning or at the end of the container (horizontally).
+ While scrolling to the right, deltaX has negative values. So in case of deltaX < 0, we need to check if
+ the container is not scrolled all the way to the right.
+
+ Test: fast/scrolling/scroll-container-horizontally.html
+
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::findEnclosingScrollableContainer):
+
2016-05-27 Jeremy Jones <[email protected]>
Decrease flicker when changing video presentation mode.
Modified: trunk/Source/WebCore/page/mac/EventHandlerMac.mm (201475 => 201476)
--- trunk/Source/WebCore/page/mac/EventHandlerMac.mm 2016-05-28 00:06:01 UTC (rev 201475)
+++ trunk/Source/WebCore/page/mac/EventHandlerMac.mm 2016-05-28 00:07:35 UTC (rev 201476)
@@ -817,7 +817,7 @@
if (box && box->canBeScrolledAndHasScrollableArea()) {
if (ScrollableArea* scrollableArea = scrollableAreaForBox(*box)) {
if (((deltaY > 0) && !scrollableArea->scrolledToTop()) || ((deltaY < 0) && !scrollableArea->scrolledToBottom())
- || ((deltaX > 0) && !scrollableArea->scrolledToRight()) || ((deltaX < 0) && !scrollableArea->scrolledToLeft())) {
+ || ((deltaX > 0) && !scrollableArea->scrolledToLeft()) || ((deltaX < 0) && !scrollableArea->scrolledToRight())) {
return candidate;
}
}