Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1719)

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 25373006: Correction to layoutOverflowRect in case of direction:rtl (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added expected result file Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 84f11e672d2eb3c9686e9e5df2477c6fd974017a..638ccafd37b20eaf99cb247b1db075036a7f9c5d 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -4580,7 +4580,7 @@ LayoutRect RenderBox::noOverflowRect() const
// writing modes, x in vertical writing modes), which is always "logical top". Apart from the
// flipping, this method does the same as clientBoxRect().
- LayoutUnit left = borderLeft();
+ LayoutUnit left = borderLeft() + (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0);
LayoutUnit top = borderTop();
LayoutUnit right = borderRight();
LayoutUnit bottom = borderBottom();
@@ -4595,7 +4595,10 @@ LayoutRect RenderBox::noOverflowRect() const
// FIXME: when the above mentioned bug is fixed, it should hopefully be possible to call
// clientBoxRect() or paddingBoxRect() in this method, rather than fiddling with the edges on
// our own.
- rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight());
+ if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
+ rect.contract(0, horizontalScrollbarHeight());
+ else
+ rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight());
return rect;
}

Powered by Google App Engine
This is Rietveld 408576698