Index: Source/core/css/ComputedStyleCSSValueMapping.cpp |
diff --git a/Source/core/css/ComputedStyleCSSValueMapping.cpp b/Source/core/css/ComputedStyleCSSValueMapping.cpp |
index 38f202ca7886e52498ddb9b05324a60635b9ef18..00dd034597ae67f7a1855dc7fa9d2efbf16236f6 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)->containingBlockLogicalHeightForGetComputedStyle(); |
return zoomAdjustedPixelValue(valueForLength(offset, containingBlockSize), style); |
} |
if (offset.isAuto()) { |