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

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

Issue 264283002: Table with fixed layout behaves like auto layout when its width is set by js instead of css. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified the API name in RenderStyle.h and other modifications as per review comments. 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
Index: Source/core/rendering/RenderTable.cpp
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index b1dfd7ee6304aad949a29421810b0daa77db4f10..58cdc1cee6fce17730ccdb81d2938b88f81ef06e 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -83,20 +83,20 @@ void RenderTable::styleDidChange(StyleDifference diff, const RenderStyle* oldSty
RenderBlock::styleDidChange(diff, oldStyle);
propagateStyleToAnonymousChildren();
- ETableLayout oldTableLayout = oldStyle ? oldStyle->tableLayout() : TAUTO;
+ bool fixedTableLayout = oldStyle ? oldStyle->isFixedTableLayout() : false;
mstensho (USE GERRIT) 2014/05/07 19:12:28 Nit: I'd just say "oldStyle && oldStyle->isFixedTa
// In the collapsed border model, there is no cell spacing.
m_hSpacing = collapseBorders() ? 0 : style()->horizontalBorderSpacing();
m_vSpacing = collapseBorders() ? 0 : style()->verticalBorderSpacing();
m_columnPos[0] = m_hSpacing;
- if (!m_tableLayout || style()->tableLayout() != oldTableLayout) {
+ if (!m_tableLayout || style()->isFixedTableLayout() != fixedTableLayout) {
if (m_tableLayout)
m_tableLayout->willChangeTableLayout();
// According to the CSS2 spec, you only use fixed table layout if an
// explicit width is specified on the table. Auto width implies auto table layout.
- if (style()->tableLayout() == TFIXED && !style()->logicalWidth().isAuto())
+ if (style()->isFixedTableLayout())
m_tableLayout = adoptPtr(new FixedTableLayout(this));
else
m_tableLayout = adoptPtr(new AutoTableLayout(this));

Powered by Google App Engine
This is Rietveld 408576698