Title: [200282] trunk
- Revision
- 200282
- Author
- [email protected]
- Date
- 2016-04-29 20:54:41 -0700 (Fri, 29 Apr 2016)
Log Message
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: trunk/LayoutTests/ChangeLog (200281 => 200282)
--- trunk/LayoutTests/ChangeLog 2016-04-30 03:36:48 UTC (rev 200281)
+++ trunk/LayoutTests/ChangeLog 2016-04-30 03:54:41 UTC (rev 200282)
@@ -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 Mark Lam <[email protected]>
Make RegExp.prototype.test spec compliant.
Added: trunk/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller-expected.txt (0 => 200282)
--- trunk/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller-expected.txt 2016-04-30 03:54:41 UTC (rev 200282)
@@ -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: trunk/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller.html (0 => 200282)
--- trunk/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/rtl-drag-vertical-scroller.html 2016-04-30 03:54:41 UTC (rev 200282)
@@ -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: trunk/LayoutTests/platform/ios-simulator/TestExpectations (200281 => 200282)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2016-04-30 03:36:48 UTC (rev 200281)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2016-04-30 03:54:41 UTC (rev 200282)
@@ -3013,3 +3013,6 @@
fast/images/image-map-outline-with-scale-transform.html [ Pass ImageOnlyFailure ]
webkit.org/b/156812 compositing/webgl/webgl-reflection.html [ Failure ]
+
+# iOS does not allow you to scroll by dragging the scrollbar thumb.
+webkit.org/b/157201 fast/scrolling/rtl-drag-vertical-scroller.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (200281 => 200282)
--- trunk/Source/WebCore/ChangeLog 2016-04-30 03:36:48 UTC (rev 200281)
+++ trunk/Source/WebCore/ChangeLog 2016-04-30 03:54:41 UTC (rev 200282)
@@ -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]>
Clean up GraphicsContext use in RenderLayer::paintLayerContents()
Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (200281 => 200282)
--- trunk/Source/WebCore/platform/ScrollableArea.cpp 2016-04-30 03:36:48 UTC (rev 200281)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp 2016-04-30 03:54:41 UTC (rev 200282)
@@ -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