Index: Source/core/rendering/RenderBox.h |
diff --git a/Source/core/rendering/RenderBox.h b/Source/core/rendering/RenderBox.h |
index 11c8a8ca98572323354087b3710408db331d22b9..86b43daf954f01c89133ec5e02e6ab5f1ba3cb0b 100644 |
--- a/Source/core/rendering/RenderBox.h |
+++ b/Source/core/rendering/RenderBox.h |
@@ -36,6 +36,7 @@ struct PaintInfo; |
enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; |
enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorderPadding }; |
enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayScrollbarSize }; |
+enum MarginDirection { BlockDirection, InlineDirection }; |
enum ShouldComputePreferred { ComputeActual, ComputePreferred }; |
@@ -385,12 +386,11 @@ public: |
LayoutUnit m_position; |
ComputedMarginValues m_margins; |
}; |
- // Resolve auto margins in the inline direction of the containing block so that objects can be pushed to the start, middle or end |
+ // Resolve auto margins in the chosen direction of the containing block so that objects can be pushed to the start, middle or end |
// of the containing block. |
- void computeInlineDirectionMargins(RenderBlock* containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit& marginStart, LayoutUnit& marginEnd) const; |
+ void computeMarginsForDirection(MarginDirection forDirection, const RenderBlock* containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit& marginStart, LayoutUnit& marginEnd, Length marginStartLength, Length marginStartEnd) const; |
// Used to resolve margins in the containing block's block-flow direction. |
- void computeBlockDirectionMargins(const RenderBlock* containingBlock, LayoutUnit& marginBefore, LayoutUnit& marginAfter) const; |
void computeAndSetBlockDirectionMargins(const RenderBlock* containingBlock); |
virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const; |