Title: [200847] releases/WebKitGTK/webkit-2.12
- Revision
- 200847
- Author
- [email protected]
- Date
- 2016-05-13 05:26:17 -0700 (Fri, 13 May 2016)
Log Message
Merge r200282 - REGRESSION(194502): overflow: scroll; direction: rtl; divs jump horizontally when scrolled vertically
https://bugs.webkit.org/show_bug.cgi?id=157201
Reviewed by Simon Fraser.
Source/WebCore:
ScrollableArea::scrollToOffsetWithoutAnimation() was mistakenly conflating scroll offsets with
scroll positions.
Test: fast/scrolling/rtl-drag-vertical-scroller.html
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
LayoutTests:
* fast/scrolling/rtl-drag-vertical-scroller-expected.txt: Added.
* fast/scrolling/rtl-drag-vertical-scroller.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (200846 => 200847)
--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog 2016-05-13 12:18:51 UTC (rev 200846)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog 2016-05-13 12:26:17 UTC (rev 200847)
@@ -1,3 +1,13 @@
+2016-04-29 Myles C. Maxfield <[email protected]>
+
+ REGRESSION(194502): overflow: scroll; direction: rtl; divs jump horizontally when scrolled vertically
+ https://bugs.webkit.org/show_bug.cgi?id=157201
+
+ Reviewed by Simon Fraser.
+
+ * fast/scrolling/rtl-drag-vertical-scroller-expected.txt: Added.
+ * fast/scrolling/rtl-drag-vertical-scroller.html: Added.
+
2016-04-29 Simon Fraser <[email protected]>
Wheel Event Not Fired For `body,html { height:100% }`
Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller-expected.txt (0 => 200847)
--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller-expected.txt 2016-05-13 12:26:17 UTC (rev 200847)
@@ -0,0 +1,11 @@
+This test makes sure that dragging the vertical scrollbar of an RTL scrollable div doesn't cause a horizontal scroll.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS scrollMe.scrollLeft is 0
+PASS scrollMe.scrollTop is not 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Hello
Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller.html (0 => 200847)
--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller.html (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller.html 2016-05-13 12:26:17 UTC (rev 200847)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body style="margin: 0px;">
+<div id="scrollMe" style="direction: rtl; width: 100px; height: 100px; position: absolute; left: 0px; top: 0px; overflow: scroll;">
+<div style="position: absolute; right: 300px; top: 300px;">Hello</div>
+<div id="probe" style="position: absolute; right: 0px; top: 0px; width: 1px; height: 1px;"></div>
+</div>
+<script>
+description("This test makes sure that dragging the vertical scrollbar of an RTL scrollable div doesn't cause a horizontal scroll.");
+function detectRTLScrollbar() {
+ var probe = document.getElementById("probe");
+ return probe.getBoundingClientRect().left >= 91;
+}
+
+var rtl = detectRTLScrollbar();
+
+var x;
+if (rtl)
+ x = 4;
+else
+ x = 96;
+
+if (window.eventSender) {
+ eventSender.mouseMoveTo(x, 2);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(x, 102);
+ eventSender.mouseUp();
+}
+var scrollMe = document.getElementById("scrollMe");
+shouldBe("scrollMe.scrollLeft", "0");
+shouldNotBe("scrollMe.scrollTop", "0");
+</script>
+<script src=""
+</body>
+</html>
\ No newline at end of file
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (200846 => 200847)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-05-13 12:18:51 UTC (rev 200846)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-05-13 12:26:17 UTC (rev 200847)
@@ -1,3 +1,18 @@
+2016-04-29 Myles C. Maxfield <[email protected]>
+
+ REGRESSION(194502): overflow: scroll; direction: rtl; divs jump horizontally when scrolled vertically
+ https://bugs.webkit.org/show_bug.cgi?id=157201
+
+ Reviewed by Simon Fraser.
+
+ ScrollableArea::scrollToOffsetWithoutAnimation() was mistakenly conflating scroll offsets with
+ scroll positions.
+
+ Test: fast/scrolling/rtl-drag-vertical-scroller.html
+
+ * platform/ScrollableArea.cpp:
+ (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
+
2016-04-29 Simon Fraser <[email protected]>
Wheel Event Not Fired For `body,html { height:100% }`
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/ScrollableArea.cpp (200846 => 200847)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/ScrollableArea.cpp 2016-05-13 12:18:51 UTC (rev 200846)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/ScrollableArea.cpp 2016-05-13 12:26:17 UTC (rev 200847)
@@ -149,10 +149,11 @@
void ScrollableArea::scrollToOffsetWithoutAnimation(ScrollbarOrientation orientation, float offset)
{
+ auto currentOffset = scrollOffsetFromPosition(IntPoint(scrollAnimator().currentPosition()));
if (orientation == HorizontalScrollbar)
- scrollToOffsetWithoutAnimation(FloatPoint(offset, scrollAnimator().currentPosition().y()));
+ scrollToOffsetWithoutAnimation(FloatPoint(offset, currentOffset.y()));
else
- scrollToOffsetWithoutAnimation(FloatPoint(scrollAnimator().currentPosition().x(), offset));
+ scrollToOffsetWithoutAnimation(FloatPoint(currentOffset.x(), offset));
}
void ScrollableArea::notifyScrollPositionChanged(const ScrollPosition& position)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes