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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTable.cpp

Issue 2740063003: Revert of [table] Stretching tables when needed due to self-alignment properties (Closed)
Patch Set: Created 3 years, 9 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 | « third_party/WebKit/Source/core/layout/LayoutFullScreen.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutTable.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
index c2ce30f510acdbb0de60eb043a694a9d8921ddd7..ea658b4d04d0874bae590dd6f353218885e48aeb 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -297,21 +297,17 @@
availableContentLogicalWidth = shrinkLogicalWidthToAvoidFloats(
marginStart, marginEnd, toLayoutBlockFlow(cb));
- if (hasStretchedLogicalWidth()) {
- setLogicalWidth(availableContentLogicalWidth);
- } else {
- // Ensure we aren't bigger than our available width.
- LayoutUnit maxWidth = maxPreferredLogicalWidth();
- // scaledWidthFromPercentColumns depends on m_layoutStruct in
- // TableLayoutAlgorithmAuto, which maxPreferredLogicalWidth fills in. So
- // scaledWidthFromPercentColumns has to be called after
- // maxPreferredLogicalWidth.
- LayoutUnit scaledWidth = m_tableLayout->scaledWidthFromPercentColumns() +
- bordersPaddingAndSpacingInRowDirection();
- maxWidth = std::max(scaledWidth, maxWidth);
- setLogicalWidth(
- LayoutUnit(std::min(availableContentLogicalWidth, maxWidth).floor()));
- }
+ // Ensure we aren't bigger than our available width.
+ LayoutUnit maxWidth = maxPreferredLogicalWidth();
+ // scaledWidthFromPercentColumns depends on m_layoutStruct in
+ // TableLayoutAlgorithmAuto, which maxPreferredLogicalWidth fills in. So
+ // scaledWidthFromPercentColumns has to be called after
+ // maxPreferredLogicalWidth.
+ LayoutUnit scaledWidth = m_tableLayout->scaledWidthFromPercentColumns() +
+ bordersPaddingAndSpacingInRowDirection();
+ maxWidth = std::max(scaledWidth, maxWidth);
+ setLogicalWidth(
+ LayoutUnit(std::min(availableContentLogicalWidth, maxWidth).floor()));
}
// Ensure we aren't bigger than our max-width style.
@@ -469,16 +465,11 @@
LayoutUnit LayoutTable::logicalHeightFromStyle() const {
LayoutUnit computedLogicalHeight;
- if (hasOverrideLogicalContentHeight()) {
- computedLogicalHeight = overrideLogicalContentHeight();
- } else {
- Length logicalHeightLength = style()->logicalHeight();
- if (logicalHeightLength.isIntrinsic() ||
- (logicalHeightLength.isSpecified() &&
- logicalHeightLength.isPositive())) {
- computedLogicalHeight =
- convertStyleLogicalHeightToComputedHeight(logicalHeightLength);
- }
+ Length logicalHeightLength = style()->logicalHeight();
+ if (logicalHeightLength.isIntrinsic() ||
+ (logicalHeightLength.isSpecified() && logicalHeightLength.isPositive())) {
+ computedLogicalHeight =
+ convertStyleLogicalHeightToComputedHeight(logicalHeightLength);
}
Length logicalMaxHeightLength = style()->logicalMaxHeight();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFullScreen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698