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

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

Issue 9562027: Merge 108194 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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 | « LayoutTests/fast/table/table-split-inside-table-expected.txt ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 markTableForSectionAndCellRecalculation(fromTablePart); 652 markTableForSectionAndCellRecalculation(fromTablePart);
653 653
654 // startChild is now part of toTable. This marks toTable for section and cel l recalculation. 654 // startChild is now part of toTable. This marks toTable for section and cel l recalculation.
655 markTableForSectionAndCellRecalculation(startChild); 655 markTableForSectionAndCellRecalculation(startChild);
656 } 656 }
657 657
658 RenderObject* RenderBlock::splitTablePartsAroundChild(RenderObject* beforeChild) 658 RenderObject* RenderBlock::splitTablePartsAroundChild(RenderObject* beforeChild)
659 { 659 {
660 ASSERT(beforeChild->isTablePart()); 660 ASSERT(beforeChild->isTablePart());
661 661
662 while (beforeChild->parent() != this && !beforeChild->isTable()) { 662 while (beforeChild->parent() != this) {
663 RenderObject* tablePartToSplit = beforeChild->parent(); 663 RenderObject* tablePartToSplit = beforeChild->parent();
664 if (!tablePartToSplit->isTablePart() && !tablePartToSplit->isTable())
665 break;
664 if (tablePartToSplit->firstChild() != beforeChild) { 666 if (tablePartToSplit->firstChild() != beforeChild) {
665 // Get our table container. 667 // Get our table container.
666 RenderObject* curr = tablePartToSplit; 668 RenderObject* curr = tablePartToSplit;
667 while (!curr->isTable()) 669 while (!curr->isTable())
668 curr = curr->parent(); 670 curr = curr->parent();
669 RenderTable* table = toRenderTable(curr); 671 RenderTable* table = toRenderTable(curr);
670 672
671 // Create an anonymous table container next to our table container. 673 // Create an anonymous table container next to our table container.
672 RenderBlock* parentBlock = toRenderBlock(table->parent()); 674 RenderBlock* parentBlock = toRenderBlock(table->parent());
673 RenderTable* postTable = parentBlock->createAnonymousTable(); 675 RenderTable* postTable = parentBlock->createAnonymousTable();
674 parentBlock->children()->insertChildNode(parentBlock, postTable, tab le->nextSibling()); 676 parentBlock->children()->insertChildNode(parentBlock, postTable, tab le->nextSibling());
675 677
676 // Move all the children from beforeChild to the newly created anony mous table container. 678 // Move all the children from beforeChild to the newly created anony mous table container.
677 moveAllTableChildrenTo(tablePartToSplit, postTable, beforeChild); 679 moveAllTableChildrenTo(tablePartToSplit, postTable, beforeChild);
678 680
679 beforeChild = postTable; 681 beforeChild = postTable;
680 } else 682 } else
681 beforeChild = tablePartToSplit; 683 beforeChild = tablePartToSplit;
(...skipping 6510 matching lines...) Expand 10 before | Expand all | Expand 10 after
7192 } 7194 }
7193 7195
7194 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7196 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7195 { 7197 {
7196 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); 7198 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY());
7197 } 7199 }
7198 7200
7199 #endif 7201 #endif
7200 7202
7201 } // namespace WebCore 7203 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/table/table-split-inside-table-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698