Chromium Code Reviews| 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 1731bfdc8fb11f2106df08cf8099ecb01905d4c0..b3b7ca8190e4d48a47442fa5ee67b84ea5b0479b 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -1606,6 +1606,21 @@ LayoutUnit LayoutBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStar |
| return width; |
| } |
| +LayoutUnit LayoutBox::containingBlockLogicalWidthForGetComputedStyle() const |
| +{ |
| + if (hasOverrideContainingBlockLogicalWidth()) |
| + return overrideContainingBlockContentLogicalWidth(); |
| + |
| + if (!isPositioned()) |
| + return containingBlockLogicalWidthForContent(); |
| + |
| + LayoutBoxModelObject* cb = toLayoutBoxModelObject(container()); |
|
esprehn
2016/04/14 18:43:09
why is container correct vs containingBlock?
Deokjin Kim
2016/04/20 13:42:09
I think this issue is caused by the difference bet
|
| + LayoutUnit width = containingBlockLogicalWidthForPositioned(cb); |
| + if (styleRef().position() != AbsolutePosition) |
| + width -= cb->paddingLogicalWidth(); |
| + return width; |
| +} |
| + |
| LayoutUnit LayoutBox::containingBlockLogicalHeightForGetComputedStyle() const |
| { |
| if (hasOverrideContainingBlockLogicalHeight()) |