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

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

Issue 1682453004: Treat <table> widths of 0 as auto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just check in shouldScaleColumns Created 4 years, 10 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/TableLayoutAlgorithmAuto.cpp
diff --git a/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp b/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp
index 60b753b6118edc888be4cf82274c34f1ea90b36c..b5b8528a0df32f86342fa85e7f23272559e6fb26 100644
--- a/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp
+++ b/third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp
@@ -195,7 +195,8 @@ static bool shouldScaleColumns(LayoutTable* table)
if (cb && cb->isTableCell()
&& (cb->style()->width().isAuto() || cb->style()->width().hasPercent())) {
LayoutTableCell* cell = toLayoutTableCell(cb);
- if (cell->colSpan() > 1 || cell->table()->style()->width().isAuto())
+ Length tableWidth = cell->table()->style()->width();
+ if (cell->colSpan() > 1 || tableWidth.isAuto() || (tableWidth.isSpecified() && tableWidth.isZero()))
mstensho (USE GERRIT) 2016/02/10 10:04:09 I think this is the behavior we want. The reason
dgrogan 2016/02/10 18:38:26 Done.
scale = false;
else
table = cell->table();

Powered by Google App Engine
This is Rietveld 408576698