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

Side by Side Diff: Source/WebCore/rendering/RenderTableSection.cpp

Issue 10909089: Merge 126251 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderTableSection.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 { 107 {
108 RenderBox::styleDidChange(diff, oldStyle); 108 RenderBox::styleDidChange(diff, oldStyle);
109 propagateStyleToAnonymousChildren(); 109 propagateStyleToAnonymousChildren();
110 110
111 // If border was changed, notify table. 111 // If border was changed, notify table.
112 RenderTable* table = this->table(); 112 RenderTable* table = this->table();
113 if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() & & oldStyle && oldStyle->border() != style()->border()) 113 if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() & & oldStyle && oldStyle->border() != style()->border())
114 table->invalidateCollapsedBorders(); 114 table->invalidateCollapsedBorders();
115 } 115 }
116 116
117 void RenderTableSection::willBeDestroyed() 117 void RenderTableSection::willBeRemovedFromTree()
118 { 118 {
119 RenderTable* recalcTable = table(); 119 RenderBox::willBeRemovedFromTree();
120 120
121 RenderBox::willBeDestroyed(); 121 // Preventively invalidate our cells as we may be re-inserted into
122 122 // a new table which would require us to rebuild our structure.
123 // recalc cell info because RenderTable has unguarded pointers 123 setNeedsCellRecalc();
124 // stored that point to this RenderTableSection.
125 if (recalcTable)
126 recalcTable->setNeedsSectionRecalc();
127 } 124 }
128 125
129 void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild ) 126 void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild )
130 { 127 {
131 // Make sure we don't append things after :after-generated content if we hav e it. 128 // Make sure we don't append things after :after-generated content if we hav e it.
132 if (!beforeChild) 129 if (!beforeChild)
133 beforeChild = afterPseudoElementRenderer(); 130 beforeChild = afterPseudoElementRenderer();
134 131
135 if (!child->isTableRow()) { 132 if (!child->isTableRow()) {
136 RenderObject* last = beforeChild; 133 RenderObject* last = beforeChild;
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 if (!cell->styleForCellFlow()->isLeftToRightDirection()) 1473 if (!cell->styleForCellFlow()->isLeftToRightDirection())
1477 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); 1474 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing);
1478 else 1475 else
1479 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); 1476 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing);
1480 1477
1481 cell->setLogicalLocation(cellLocation); 1478 cell->setLogicalLocation(cellLocation);
1482 view()->addLayoutDelta(oldCellLocation - cell->location()); 1479 view()->addLayoutDelta(oldCellLocation - cell->location());
1483 } 1480 }
1484 1481
1485 } // namespace WebCore 1482 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderTableSection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698