Index: Source/core/rendering/RenderBlock.cpp |
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
index 67bb4641622faa68fe56127a72f93b7174e017a9..310b51a653d2283715c02ff992274f38868f24f1 100644 |
--- a/Source/core/rendering/RenderBlock.cpp |
+++ b/Source/core/rendering/RenderBlock.cpp |
@@ -1952,6 +1952,21 @@ void RenderBlock::markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, |
} |
} |
+LayoutUnit RenderBlock::marginIntrinsicLogicalWidthForChild(RenderBox* child) const |
+{ |
+ // A margin has three types: fixed, percentage, and auto (variable). |
+ // Auto and percentage margins become 0 when computing min/max width. |
+ // Fixed margins can be added in as is. |
+ Length marginLeft = child->style()->marginStartUsing(style()); |
+ Length marginRight = child->style()->marginEndUsing(style()); |
+ LayoutUnit margin = 0; |
+ if (marginLeft.isFixed()) |
+ margin += marginLeft.value(); |
+ if (marginRight.isFixed()) |
+ margin += marginRight.value(); |
+ return margin; |
+} |
+ |
void RenderBlock::layoutPositionedObjects(bool relayoutChildren, bool fixedPositionObjectsOnly) |
{ |
TrackedRendererListHashSet* positionedDescendants = positionedObjects(); |