Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1309)

Unified Diff: Source/core/rendering/RenderTable.cpp

Issue 287193013: Revert of Strip anonymous blocks when change in style removes need for them (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTable.cpp
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index 91c2c7b7a7bfee055a70d3826dfb0f506b80b391..cb7d532431be16b1e7da0bc6d5cd9064c295c337 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -302,10 +302,20 @@
}
// Finally, with our true width determined, compute our margins for real.
- 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);
+ 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));
+ }
// 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.
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698