| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| index 4319671d0ac7e4a7120fca3ef59d05e0d5e5f3df..78cd0d7b2b193b1f671509af4405168dbec7d1ff 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -2852,7 +2852,11 @@ LayoutUnit LayoutBox::containingBlockLogicalWidthForPositioned(const LayoutBoxMo
|
| if (hasOverrideContainingBlockLogicalWidth())
|
| return overrideContainingBlockContentLogicalWidth();
|
|
|
| - if (containingBlock->isBox())
|
| + // Ensure we compute our width based on the width of our rel-pos inline container rather than any anonymous block
|
| + // created to manage a block-flow ancestor of ours in the rel-pos inline's inline flow.
|
| + if (containingBlock->isAnonymousBlock() && containingBlock->isRelPositioned())
|
| + containingBlock = toLayoutBox(containingBlock)->continuation();
|
| + else if (containingBlock->isBox())
|
| return std::max(LayoutUnit(), toLayoutBox(containingBlock)->clientLogicalWidth());
|
|
|
| ASSERT(containingBlock->isLayoutInline() && containingBlock->isInFlowPositioned());
|
|
|