Index: Source/core/layout/LayoutBox.cpp |
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp |
index a24c390b55c02b4bb0875bc2132b7c71861930ea..4a01ca9f14d6ad0093bb4b41921200820118549e 100644 |
--- a/Source/core/layout/LayoutBox.cpp |
+++ b/Source/core/layout/LayoutBox.cpp |
@@ -1521,6 +1521,24 @@ LayoutUnit LayoutBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStar |
return width; |
} |
+LayoutUnit LayoutBox::containingBlockLogicalHeightForComputedStyle() const |
+{ |
+ if (hasOverrideContainingBlockLogicalHeight()) |
+ return overrideContainingBlockContentLogicalHeight(); |
+ |
+ LayoutUnit height; |
+ if (isPositioned()) { |
+ LayoutBoxModelObject* cb = toLayoutBoxModelObject(container()); |
+ height = containingBlockLogicalHeightForPositioned(cb); |
+ if (styleRef().position() != AbsolutePosition) |
+ height -= cb->paddingLogicalHeight(); |
+ } else { |
+ height = containingBlockLogicalHeightForContent(ExcludeMarginBorderPadding); |
mstensho (USE GERRIT)
2015/04/13 21:40:04
Blink coding style prefers early returns. You coul
changseok
2015/04/14 06:27:21
Done.
|
+ } |
+ |
+ return height; |
+} |
+ |
LayoutUnit LayoutBox::containingBlockLogicalWidthForContent() const |
{ |
if (hasOverrideContainingBlockLogicalWidth()) |