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

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

Issue 10729003: Merge 121001 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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/RenderBlock.h ('k') | Source/WebCore/rendering/RenderBox.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) 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 cloneBlock->setContinuation(oldCont); 561 cloneBlock->setContinuation(oldCont);
562 562
563 if (!beforeChild && isAfterContent(lastChild())) 563 if (!beforeChild && isAfterContent(lastChild()))
564 beforeChild = lastChild(); 564 beforeChild = lastChild();
565 565
566 // If we are moving inline children from |this| to cloneBlock, then we need 566 // If we are moving inline children from |this| to cloneBlock, then we need
567 // to clear our line box tree. 567 // to clear our line box tree.
568 if (beforeChild && childrenInline()) 568 if (beforeChild && childrenInline())
569 deleteLineBoxTree(); 569 deleteLineBoxTree();
570 570
571 // We have to remove the descendant child from our positioned objects list
572 // before we do the split and move some of the children to cloneBlock. Since
573 // we are doing layout anyway, it is easier to blow away the entire list, th an
574 // traversing down the subtree looking for positioned childs and then remove them
575 // from our positioned objects list.
576 if (beforeChild)
577 removePositionedObjects(0);
578
579 // Now take all of the children from beforeChild to the end and remove 571 // Now take all of the children from beforeChild to the end and remove
580 // them from |this| and place them in the clone. 572 // them from |this| and place them in the clone.
581 moveChildrenTo(cloneBlock, beforeChild, 0, true); 573 moveChildrenTo(cloneBlock, beforeChild, 0, true);
582 574
583 // Hook |clone| up as the continuation of the middle block. 575 // Hook |clone| up as the continuation of the middle block.
584 if (!cloneBlock->isAnonymousBlock()) 576 if (!cloneBlock->isAnonymousBlock())
585 middleBlock->setContinuation(cloneBlock); 577 middleBlock->setContinuation(cloneBlock);
586 578
587 // We have been reparented and are now under the fromBlock. We need 579 // We have been reparented and are now under the fromBlock. We need
588 // to walk up our block parent chain until we hit the containing anonymous c olumns block. 580 // to walk up our block parent chain until we hit the containing anonymous c olumns block.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 // Someone may have indirectly caused a <q> to split. When this happens , the :after content 614 // Someone may have indirectly caused a <q> to split. When this happens , the :after content
623 // has to move into the inline continuation. Call updateBeforeAfterCont ent to ensure that the inline's :after 615 // has to move into the inline continuation. Call updateBeforeAfterCont ent to ensure that the inline's :after
624 // content gets properly destroyed. 616 // content gets properly destroyed.
625 bool isLastChild = (currChildNextSibling == blockCurr->lastChild()); 617 bool isLastChild = (currChildNextSibling == blockCurr->lastChild());
626 if (documentUsesBeforeAfterRules) 618 if (documentUsesBeforeAfterRules)
627 blockCurr->children()->updateBeforeAfterContent(blockCurr, AFTER); 619 blockCurr->children()->updateBeforeAfterContent(blockCurr, AFTER);
628 if (isLastChild && currChildNextSibling != blockCurr->lastChild()) 620 if (isLastChild && currChildNextSibling != blockCurr->lastChild())
629 currChildNextSibling = 0; // We destroyed the last child, so now we need to update 621 currChildNextSibling = 0; // We destroyed the last child, so now we need to update
630 // the value of currChildNextSibling. 622 // the value of currChildNextSibling.
631 623
632 // It is possible that positioned objects under blockCurr are going to b e moved to cloneBlock.
633 // Since we are doing layout anyway, it is easier to blow away the entir e list, than
634 // traversing down the subtree looking for positioned children and then remove them
635 // from our positioned objects list.
636 blockCurr->removePositionedObjects(0);
637
638 // Now we need to take all of the children starting from the first child 624 // Now we need to take all of the children starting from the first child
639 // *after* currChild and append them all to the clone. 625 // *after* currChild and append them all to the clone.
640 blockCurr->moveChildrenTo(cloneBlock, currChildNextSibling, 0, true); 626 blockCurr->moveChildrenTo(cloneBlock, currChildNextSibling, 0, true);
641 627
642 // Keep walking up the chain. 628 // Keep walking up the chain.
643 currChild = curr; 629 currChild = curr;
644 currChildNextSibling = currChild->nextSibling(); 630 currChildNextSibling = currChild->nextSibling();
645 curr = toRenderBoxModelObject(curr->parent()); 631 curr = toRenderBoxModelObject(curr->parent());
646 } 632 }
647 633
(...skipping 6636 matching lines...) Expand 10 before | Expand all | Expand 10 after
7284 } 7270 }
7285 7271
7286 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7272 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7287 { 7273 {
7288 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped MaxY()); 7274 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped MaxY());
7289 } 7275 }
7290 7276
7291 #endif 7277 #endif
7292 7278
7293 } // namespace WebCore 7279 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderBlock.h ('k') | Source/WebCore/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698