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

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

Issue 2325953002: LayoutTable: gracefully degrade in the presence of collspan > 1. (Closed)
Patch Set: CL for src perf tryjob to run blink_perf.layout benchmark on linux platform(s) Created 4 years, 3 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/LayoutTable.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 24012785ab7202fb72a7c57e078ce350cf801243..3c82b36e11aeea371d7277de86e9acffc1d438bf 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -61,7 +61,7 @@ LayoutTable::LayoutTable(Element* element)
, m_needsSectionRecalc(false)
, m_columnLogicalWidthChanged(false)
, m_columnLayoutObjectsValid(false)
- , m_hasCellColspanThatDeterminesTableWidth(false)
+ , m_noCellColspanAtLeast(0)
, m_hSpacing(0)
, m_vSpacing(0)
, m_borderStart(0)
@@ -797,7 +797,9 @@ void LayoutTable::appendEffectiveColumn(unsigned span)
// Unless the table has cell(s) with colspan that exceed the number of columns afforded
// by the other rows in the table we can use the fast path when mapping columns to effective columns.
- m_hasCellColspanThatDeterminesTableWidth = m_hasCellColspanThatDeterminesTableWidth || span > 1;
+ if (span == 1 && m_noCellColspanAtLeast + 1 == numEffectiveColumns()) {
+ m_noCellColspanAtLeast++;
+ }
// Propagate the change in our columns representation to the sections that don't need
// cell recalc. If they do, they will be synced up directly with m_columns later.
@@ -885,7 +887,7 @@ void LayoutTable::recalcSections() const
m_foot = nullptr;
m_firstBody = nullptr;
m_hasColElements = false;
- m_hasCellColspanThatDeterminesTableWidth = hasCellColspanThatDeterminesTableWidth();
+ m_noCellColspanAtLeast = calcNoCellColspanAtLeast();
// We need to get valid pointers to caption, head, foot and first body again
LayoutObject* nextSibling;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698