Index: Source/core/rendering/RenderBoxModelObject.cpp |
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp |
index 4137a965a92118d896305488b3af7c227c1b900b..d272789bea1d8575c005135fcc956ef265c3b6d1 100644 |
--- a/Source/core/rendering/RenderBoxModelObject.cpp |
+++ b/Source/core/rendering/RenderBoxModelObject.cpp |
@@ -310,11 +310,11 @@ int RenderBoxModelObject::pixelSnappedOffsetHeight() const |
return snapSizeToPixel(offsetHeight(), offsetTop()); |
} |
-LayoutUnit RenderBoxModelObject::computedCSSPadding(const Length& padding) const |
+LayoutUnit RenderBoxModelObject::computedCSSPadding(const Length& padding, bool isTopOrBottomOrAfterOrBeforePadding) const |
{ |
LayoutUnit w = 0; |
if (padding.isPercent()) |
- w = containingBlockLogicalWidthForContent(); |
+ w = (containingBlock()->isFlexibleBox() && isTopOrBottomOrAfterOrBeforePadding)?containingBlockLogicalHeightForContent():containingBlockLogicalWidthForContent(); |
tony
2014/07/10 17:10:06
There should be spaces around the ? and :.
harpreet.sk
2014/07/14 08:38:07
Done.
|
return minimumValueForLength(padding, w); |
} |
@@ -2507,6 +2507,11 @@ LayoutUnit RenderBoxModelObject::containingBlockLogicalWidthForContent() const |
return containingBlock()->availableLogicalWidth(); |
} |
+LayoutUnit RenderBoxModelObject::containingBlockLogicalHeightForContent() const |
+{ |
+ return containingBlock()->logicalHeight() - containingBlock()->borderAndPaddingLogicalHeight(); |
tony
2014/07/10 17:10:06
Does this always work? We might not have computed
harpreet.sk
2014/07/14 08:38:07
This will not work always. Uploaded new solution.
|
+} |
+ |
RenderBoxModelObject* RenderBoxModelObject::continuation() const |
{ |
if (!continuationMap) |