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

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

Issue 10274004: Merge 113759 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 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
« no previous file with comments | « LayoutTests/fast/table/table-caption-not-removed-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderTable.cpp
===================================================================
--- Source/WebCore/rendering/RenderTable.cpp (revision 115612)
+++ Source/WebCore/rendering/RenderTable.cpp (working copy)
@@ -118,7 +118,6 @@
if (child->isTableCaption()) {
m_captions.append(toRenderTableCaption(child));
- setNeedsSectionRecalc();
wrapInAnonymousSection = false;
} else if (child->isTableCol()) {
m_hasColElements = true;
@@ -795,46 +794,51 @@
m_foot = 0;
m_firstBody = 0;
m_hasColElements = false;
+ m_captions.clear();
// We need to get valid pointers to caption, head, foot and first body again
RenderObject* nextSibling;
for (RenderObject* child = firstChild(); child; child = nextSibling) {
nextSibling = child->nextSibling();
switch (child->style()->display()) {
- case TABLE_COLUMN:
- case TABLE_COLUMN_GROUP:
- m_hasColElements = true;
- break;
- case TABLE_HEADER_GROUP:
- if (child->isTableSection()) {
- RenderTableSection* section = toRenderTableSection(child);
- if (!m_head)
- m_head = section;
- else if (!m_firstBody)
- m_firstBody = section;
- section->recalcCellsIfNeeded();
- }
- break;
- case TABLE_FOOTER_GROUP:
- if (child->isTableSection()) {
- RenderTableSection* section = toRenderTableSection(child);
- if (!m_foot)
- m_foot = section;
- else if (!m_firstBody)
- m_firstBody = section;
- section->recalcCellsIfNeeded();
- }
- break;
- case TABLE_ROW_GROUP:
- if (child->isTableSection()) {
- RenderTableSection* section = toRenderTableSection(child);
- if (!m_firstBody)
- m_firstBody = section;
- section->recalcCellsIfNeeded();
- }
- break;
- default:
- break;
+ case TABLE_CAPTION:
+ if (child->isTableCaption())
+ m_captions.append(toRenderTableCaption(child));
+ break;
+ case TABLE_COLUMN:
+ case TABLE_COLUMN_GROUP:
+ m_hasColElements = true;
+ break;
+ case TABLE_HEADER_GROUP:
+ if (child->isTableSection()) {
+ RenderTableSection* section = toRenderTableSection(child);
+ if (!m_head)
+ m_head = section;
+ else if (!m_firstBody)
+ m_firstBody = section;
+ section->recalcCellsIfNeeded();
+ }
+ break;
+ case TABLE_FOOTER_GROUP:
+ if (child->isTableSection()) {
+ RenderTableSection* section = toRenderTableSection(child);
+ if (!m_foot)
+ m_foot = section;
+ else if (!m_firstBody)
+ m_firstBody = section;
+ section->recalcCellsIfNeeded();
+ }
+ break;
+ case TABLE_ROW_GROUP:
+ if (child->isTableSection()) {
+ RenderTableSection* section = toRenderTableSection(child);
+ if (!m_firstBody)
+ m_firstBody = section;
+ section->recalcCellsIfNeeded();
+ }
+ break;
+ default:
+ break;
}
}
« no previous file with comments | « LayoutTests/fast/table/table-caption-not-removed-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698