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

Side by Side Diff: Source/core/rendering/RenderTable.cpp

Issue 295513003: add 'slow' prefix to RenderObject's firstChild() / lastChild() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderRuby.cpp ('k') | Source/core/rendering/RenderTableRow.cpp » ('j') | 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, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 section->addChild(child); 190 section->addChild(child);
191 return; 191 return;
192 } 192 }
193 } 193 }
194 194
195 RenderObject* lastBox = beforeChild; 195 RenderObject* lastBox = beforeChild;
196 while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableSecti on() && needsTableSection(lastBox)) 196 while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableSecti on() && needsTableSection(lastBox))
197 lastBox = lastBox->parent(); 197 lastBox = lastBox->parent();
198 if (lastBox && lastBox->isAnonymous() && !isAfterContent(lastBox)) { 198 if (lastBox && lastBox->isAnonymous() && !isAfterContent(lastBox)) {
199 if (beforeChild == lastBox) 199 if (beforeChild == lastBox)
200 beforeChild = lastBox->firstChild(); 200 beforeChild = lastBox->slowFirstChild();
201 lastBox->addChild(child, beforeChild); 201 lastBox->addChild(child, beforeChild);
202 return; 202 return;
203 } 203 }
204 204
205 if (beforeChild && !beforeChild->isTableSection() && needsTableSection(befor eChild)) 205 if (beforeChild && !beforeChild->isTableSection() && needsTableSection(befor eChild))
206 beforeChild = 0; 206 beforeChild = 0;
207 207
208 RenderTableSection* section = RenderTableSection::createAnonymousWithParentR enderer(this); 208 RenderTableSection* section = RenderTableSection::createAnonymousWithParentR enderer(this);
209 addChild(section, beforeChild); 209 addChild(section, beforeChild);
210 section->addChild(child); 210 section->addChild(child);
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 // Collect all the unique border values that we want to paint in a sorted list. 595 // Collect all the unique border values that we want to paint in a sorted list.
596 void RenderTable::recalcCollapsedBorders() 596 void RenderTable::recalcCollapsedBorders()
597 { 597 {
598 if (m_collapsedBordersValid) 598 if (m_collapsedBordersValid)
599 return; 599 return;
600 m_collapsedBordersValid = true; 600 m_collapsedBordersValid = true;
601 m_collapsedBorders.clear(); 601 m_collapsedBorders.clear();
602 for (RenderObject* section = firstChild(); section; section = section->nextS ibling()) { 602 for (RenderObject* section = firstChild(); section; section = section->nextS ibling()) {
603 if (!section->isTableSection()) 603 if (!section->isTableSection())
604 continue; 604 continue;
605 for (RenderObject* row = section->firstChild(); row; row = row->nextSibl ing()) { 605 for (RenderObject* row = toRenderTableSection(section)->firstChild(); ro w; row = row->nextSibling()) {
606 if (!row->isTableRow()) 606 if (!row->isTableRow())
607 continue; 607 continue;
608 for (RenderObject* cell = row->firstChild(); cell; cell = cell->next Sibling()) { 608 for (RenderObject* cell = toRenderTableRow(row)->firstChild(); cell; cell = cell->nextSibling()) {
609 if (!cell->isTableCell()) 609 if (!cell->isTableCell())
610 continue; 610 continue;
611 ASSERT(toRenderTableCell(cell)->table() == this); 611 ASSERT(toRenderTableCell(cell)->table() == this);
612 toRenderTableCell(cell)->collectBorderValues(m_collapsedBorders) ; 612 toRenderTableCell(cell)->collectBorderValues(m_collapsedBorders) ;
613 } 613 }
614 } 614 }
615 } 615 }
616 RenderTableCell::sortBorderValues(m_collapsedBorders); 616 RenderTableCell::sortBorderValues(m_collapsedBorders);
617 } 617 }
618 618
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const 1457 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const
1458 { 1458 {
1459 ASSERT(cell->isFirstOrLastCellInRow()); 1459 ASSERT(cell->isFirstOrLastCellInRow());
1460 if (hasSameDirectionAs(cell->row())) 1460 if (hasSameDirectionAs(cell->row()))
1461 return style()->borderEnd(); 1461 return style()->borderEnd();
1462 1462
1463 return style()->borderStart(); 1463 return style()->borderStart();
1464 } 1464 }
1465 1465
1466 } 1466 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderRuby.cpp ('k') | Source/core/rendering/RenderTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698