Index: Source/core/rendering/RenderTable.cpp |
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp |
index ed3892362d30ddeb5e3e9d87e7bcf9755b5f2edc..4cda7a0e2ceb97def940500bd2b13a2d2cec026c 100644 |
--- a/Source/core/rendering/RenderTable.cpp |
+++ b/Source/core/rendering/RenderTable.cpp |
@@ -302,20 +302,10 @@ void RenderTable::updateLogicalWidth() |
} |
// Finally, with our true width determined, compute our margins for real. |
- setMarginStart(0); |
- setMarginEnd(0); |
- if (!hasPerpendicularContainingBlock) { |
- ComputedMarginValues marginValues; |
- bool hasInvertedDirection = cb->style()->isLeftToRightDirection() == style()->isLeftToRightDirection(); |
- computeInlineDirectionMargins(cb, availableLogicalWidth, logicalWidth(), |
- hasInvertedDirection ? marginValues.m_start : marginValues.m_end, |
- hasInvertedDirection ? marginValues.m_end : marginValues.m_start); |
- setMarginStart(marginValues.m_start); |
- setMarginEnd(marginValues.m_end); |
- } else { |
- setMarginStart(minimumValueForLength(style()->marginStart(), availableLogicalWidth)); |
- setMarginEnd(minimumValueForLength(style()->marginEnd(), availableLogicalWidth)); |
- } |
+ ComputedMarginValues marginValues; |
+ computeMarginsForDirection(InlineDirection, cb, availableLogicalWidth, logicalWidth(), marginValues.m_start, marginValues.m_end, style()->marginStart(), style()->marginEnd()); |
+ setMarginStart(marginValues.m_start); |
+ setMarginEnd(marginValues.m_end); |
// We should NEVER shrink the table below the min-content logical width, or else the table can't accomodate |
// its own content which doesn't match CSS nor what authors expect. |