Index: Source/core/rendering/RenderTable.cpp |
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp |
index 973d32e0b4a62815cabfb40cfff43efc55893554..6b47e5def3d004dd8b6bbacf7d16746f9c61c8ad 100644 |
--- a/Source/core/rendering/RenderTable.cpp |
+++ b/Source/core/rendering/RenderTable.cpp |
@@ -62,6 +62,7 @@ RenderTable::RenderTable(Element* element) |
, m_needsSectionRecalc(false) |
, m_columnLogicalWidthChanged(false) |
, m_columnRenderersValid(false) |
+ , m_hasCellColspanThatDeterminesTableWidth(false) |
, m_hSpacing(0) |
, m_vSpacing(0) |
, m_borderStart(0) |
@@ -835,6 +836,10 @@ void RenderTable::appendColumn(unsigned span) |
unsigned newColumnIndex = m_columns.size(); |
m_columns.append(ColumnStruct(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; |
+ |
// 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. |
for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { |
@@ -909,6 +914,7 @@ void RenderTable::recalcSections() const |
m_foot = 0; |
m_firstBody = 0; |
m_hasColElements = false; |
+ m_hasCellColspanThatDeterminesTableWidth = hasCellColspanThatDeterminesTableWidth(); |
// We need to get valid pointers to caption, head, foot and first body again |
RenderObject* nextSibling; |