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

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

Issue 9568037: Merge 108194 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 markTableForSectionAndCellRecalculation(fromTablePart); 646 markTableForSectionAndCellRecalculation(fromTablePart);
647 647
648 // startChild is now part of toTable. This marks toTable for section and cel l recalculation. 648 // startChild is now part of toTable. This marks toTable for section and cel l recalculation.
649 markTableForSectionAndCellRecalculation(startChild); 649 markTableForSectionAndCellRecalculation(startChild);
650 } 650 }
651 651
652 RenderObject* RenderBlock::splitTablePartsAroundChild(RenderObject* beforeChild) 652 RenderObject* RenderBlock::splitTablePartsAroundChild(RenderObject* beforeChild)
653 { 653 {
654 ASSERT(beforeChild->isTablePart()); 654 ASSERT(beforeChild->isTablePart());
655 655
656 while (beforeChild->parent() != this && !beforeChild->isTable()) { 656 while (beforeChild->parent() != this) {
657 RenderObject* tablePartToSplit = beforeChild->parent(); 657 RenderObject* tablePartToSplit = beforeChild->parent();
658 if (!tablePartToSplit->isTablePart() && !tablePartToSplit->isTable())
659 break;
658 if (tablePartToSplit->firstChild() != beforeChild) { 660 if (tablePartToSplit->firstChild() != beforeChild) {
659 // Get our table container. 661 // Get our table container.
660 RenderObject* curr = tablePartToSplit; 662 RenderObject* curr = tablePartToSplit;
661 while (!curr->isTable()) 663 while (!curr->isTable())
662 curr = curr->parent(); 664 curr = curr->parent();
663 RenderTable* table = toRenderTable(curr); 665 RenderTable* table = toRenderTable(curr);
664 666
665 // Create an anonymous table container next to our table container. 667 // Create an anonymous table container next to our table container.
666 RenderBlock* parentBlock = toRenderBlock(table->parent()); 668 RenderBlock* parentBlock = toRenderBlock(table->parent());
667 RenderTable* postTable = parentBlock->createAnonymousTable(); 669 RenderTable* postTable = parentBlock->createAnonymousTable();
668 parentBlock->children()->insertChildNode(parentBlock, postTable, tab le->nextSibling()); 670 parentBlock->children()->insertChildNode(parentBlock, postTable, tab le->nextSibling());
669 671
670 // Move all the children from beforeChild to the newly created anony mous table container. 672 // Move all the children from beforeChild to the newly created anony mous table container.
671 moveAllTableChildrenTo(tablePartToSplit, postTable, beforeChild); 673 moveAllTableChildrenTo(tablePartToSplit, postTable, beforeChild);
672 674
673 beforeChild = postTable; 675 beforeChild = postTable;
674 } else 676 } else
675 beforeChild = tablePartToSplit; 677 beforeChild = tablePartToSplit;
(...skipping 6485 matching lines...) Expand 10 before | Expand all | Expand 10 after
7161 } 7163 }
7162 7164
7163 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7165 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7164 { 7166 {
7165 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); 7167 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY());
7166 } 7168 }
7167 7169
7168 #endif 7170 #endif
7169 7171
7170 } // namespace WebCore 7172 } // 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