Title: [199377] trunk
Revision
199377
Author
[email protected]
Date
2016-04-12 11:40:19 -0700 (Tue, 12 Apr 2016)

Log Message

[RTL Scrollbars] Overlay scrollbars push contents inwards
https://bugs.webkit.org/show_bug.cgi?id=156225
<rdar://problem/25137040>

Reviewed by Darin Adler.

Source/WebCore:

The contents should be pushed in by the occupied width of the
scrollbar, which is 0 for overlay scrollbars.

Test: fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::computeScrollDimensions):

LayoutTests:

* fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html: Added.
* fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (199376 => 199377)


--- trunk/LayoutTests/ChangeLog	2016-04-12 18:38:16 UTC (rev 199376)
+++ trunk/LayoutTests/ChangeLog	2016-04-12 18:40:19 UTC (rev 199377)
@@ -1,5 +1,16 @@
 2016-04-12  Myles C. Maxfield  <[email protected]>
 
+        [RTL Scrollbars] Overlay scrollbars push contents inwards
+        https://bugs.webkit.org/show_bug.cgi?id=156225
+        <rdar://problem/25137040>
+
+        Reviewed by Darin Adler.
+
+        * fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html: Added.
+        * fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html: Added.
+
+2016-04-12  Myles C. Maxfield  <[email protected]>
+
         [OS X] Flakey crash after ScrollAnimatorMac destruction
         https://bugs.webkit.org/show_bug.cgi?id=156372
 

Added: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html (0 => 199377)


--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents-expected.html	2016-04-12 18:40:19 UTC (rev 199377)
@@ -0,0 +1,17 @@
+<!DOCTYPE html><!-- webkit-test-runner [ rtlScrollbars=true ] -->
+<html>
+<head>
+<script>
+if (window.internals)
+    internals.setUsesOverlayScrollbars(true);
+</script>
+</head>
+<body style="margin: 0px;">
+This test makes sure that overlay scrollbars don't push contents over.
+<div style="width: 370px; height: 400px; overflow: hidden">
+<div style="width: 400px; height: 400px; overflow-x: hidden; overflow-y: auto; position: relative; left: -15px; background: blue;">
+<div style="background: green;">This is some text and each pixel should match exactly.</div>
+</div>
+</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html (0 => 199377)


--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html	2016-04-12 18:40:19 UTC (rev 199377)
@@ -0,0 +1,18 @@
+<!DOCTYPE html><!-- webkit-test-runner [ rtlScrollbars=true ] -->
+<html>
+<head>
+<script>
+if (window.internals)
+    internals.setUsesOverlayScrollbars(true);
+</script>
+</head>
+<body style="margin: 0px;">
+This test makes sure that overlay scrollbars don't push contents over.
+<div style="width: 370px; height: 400px; overflow: hidden">
+<div style="width: 400px; height: 400px; overflow-x: hidden; overflow-y: auto; position: relative; left: -15px; background: blue;">
+<div style="background: green;">This is some text and each pixel should match exactly.</div>
+<div style="position: absolute; left: 0px; top: 0px; width: 1px; height: 2000px;"></div>
+</div>
+</div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (199376 => 199377)


--- trunk/Source/WebCore/ChangeLog	2016-04-12 18:38:16 UTC (rev 199376)
+++ trunk/Source/WebCore/ChangeLog	2016-04-12 18:40:19 UTC (rev 199377)
@@ -1,5 +1,21 @@
 2016-04-12  Myles C. Maxfield  <[email protected]>
 
+        [RTL Scrollbars] Overlay scrollbars push contents inwards
+        https://bugs.webkit.org/show_bug.cgi?id=156225
+        <rdar://problem/25137040>
+
+        Reviewed by Darin Adler.
+
+        The contents should be pushed in by the occupied width of the
+        scrollbar, which is 0 for overlay scrollbars.
+
+        Test: fast/scrolling/rtl-scrollbars-overlay-no-push-contents.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::computeScrollDimensions):
+
+2016-04-12  Myles C. Maxfield  <[email protected]>
+
         [OS X] Flakey crash after ScrollAnimatorMac destruction
         https://bugs.webkit.org/show_bug.cgi?id=156372
 

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (199376 => 199377)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2016-04-12 18:38:16 UTC (rev 199376)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2016-04-12 18:40:19 UTC (rev 199377)
@@ -3377,7 +3377,7 @@
 
     int scrollableLeftOverflow = overflowLeft() - box->borderLeft();
     if (box->style().isLeftToRightDirection() && box->style().shouldPlaceBlockDirectionScrollbarOnLeft() && m_vBar)
-        scrollableLeftOverflow -= m_vBar->width();
+        scrollableLeftOverflow -= m_vBar->occupiedWidth();
     int scrollableTopOverflow = overflowTop() - box->borderTop();
     setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to