Index: Source/core/css/LayoutStyleCSSValueMapping.cpp |
diff --git a/Source/core/css/LayoutStyleCSSValueMapping.cpp b/Source/core/css/LayoutStyleCSSValueMapping.cpp |
index c47287c7fdc23ba411d88908a809859cb0015e4c..09abddc679738167e31bc08d8642498a0801b616 100644 |
--- a/Source/core/css/LayoutStyleCSSValueMapping.cpp |
+++ b/Source/core/css/LayoutStyleCSSValueMapping.cpp |
@@ -170,10 +170,10 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForPositionOffset(const LayoutStyle |
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)->containingBlockLogicalHeight(); |
return zoomAdjustedPixelValue(valueForLength(offset, containingBlockSize), style); |
} |
if (offset.isAuto()) { |