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

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

Issue 1921973005: [css tables] Don't pass table width increase due to % columns to parents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move variables around Created 4 years, 8 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
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 c792917d29ab20c6786f14e074ef0461765cda50..c852e53bf8dcbdff4d0517b193c6d08e65c8d1a0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -292,7 +292,13 @@ void LayoutTable::updateLogicalWidth()
availableContentLogicalWidth = shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, toLayoutBlockFlow(cb));
// Ensure we aren't bigger than our available width.
- setLogicalWidth(LayoutUnit(std::min(availableContentLogicalWidth, maxPreferredLogicalWidth()).floor()));
+ 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();
dgrogan 2016/04/27 03:14:05 fast/table/border-collapsing/cached-change-row-bor
+ maxWidth = std::max(scaledWidth, maxWidth);
+ setLogicalWidth(LayoutUnit(std::min(availableContentLogicalWidth, maxWidth).floor()));
}
// Ensure we aren't bigger than our max-width style.

Powered by Google App Engine
This is Rietveld 408576698