| Index: Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| diff --git a/Source/core/css/ComputedStyleCSSValueMapping.cpp b/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| index 38f202ca7886e52498ddb9b05324a60635b9ef18..044a6767250cb4e22de7971e8477c05c892d8926 100644
|
| --- a/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| +++ b/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| @@ -170,10 +170,10 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForPositionOffset(const ComputedSty
|
| return nullptr;
|
| }
|
|
|
| - if (offset.isPercent() && renderer && renderer->isBox()) {
|
| + if (offset.isPercent() && renderer && renderer->isBox() && renderer->isPositioned()) {
|
| LayoutUnit containingBlockSize = (propertyID == CSSPropertyLeft || propertyID == CSSPropertyRight) ?
|
| toLayoutBox(renderer)->containingBlockLogicalWidthForContent() :
|
| - toLayoutBox(renderer)->containingBlockLogicalHeightForContent(ExcludeMarginBorderPadding);
|
| + toLayoutBox(renderer)->containingBlockLogicalHeightForComputedStyle();
|
| return zoomAdjustedPixelValue(valueForLength(offset, containingBlockSize), style);
|
| }
|
| if (offset.isAuto()) {
|
|
|