Adjust out-of-flow position for rtl container with left-hand scrollbar (see https://crbug.com/832569)

This commit is contained in:
Marshall Greenblatt 2018-07-19 13:39:39 -04:00
parent a27bbfaa0e
commit d3e36d052c
2 changed files with 22 additions and 0 deletions

View File

@ -372,4 +372,9 @@ patches = [
# https://bitbucket.org/chromiumembedded/cef/issues/2466
'name': 'linux_poll_2466',
},
{
# Adjust out-of-flow position for rtl container with left-hand scrollbar.
# https://bugs.chromium.org/p/chromium/issues/detail?id=832569
'name': 'blink_rtl_832569',
},
]

View File

@ -0,0 +1,17 @@
diff --git third_party/blink/renderer/core/layout/layout_box.cc third_party/blink/renderer/core/layout/layout_box.cc
index 4f724b594484..3bb15ddacdd1 100644
--- third_party/blink/renderer/core/layout/layout_box.cc
+++ third_party/blink/renderer/core/layout/layout_box.cc
@@ -3998,6 +3998,12 @@ void LayoutBox::ComputeInlineStaticDistance(
LayoutUnit static_position = child->Layer()->StaticInlinePosition() +
container_logical_width +
container_block->BorderLogicalLeft();
+ if (container_block->IsBox() &&
+ ToLayoutBox(container_block)
+ ->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft()) {
+ static_position +=
+ ToLayoutBox(container_block)->OriginAdjustmentForScrollbars().Width();
+ }
for (LayoutObject* curr = child->Parent(); curr; curr = curr->Container()) {
if (curr->IsBox()) {
if (curr == enclosing_box)