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

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

Issue 10764007: Merge 121001 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 cloneBlock->setContinuation(oldCont); 560 cloneBlock->setContinuation(oldCont);
561 561
562 if (!beforeChild && isAfterContent(lastChild())) 562 if (!beforeChild && isAfterContent(lastChild()))
563 beforeChild = lastChild(); 563 beforeChild = lastChild();
564 564
565 // If we are moving inline children from |this| to cloneBlock, then we need 565 // If we are moving inline children from |this| to cloneBlock, then we need
566 // to clear our line box tree. 566 // to clear our line box tree.
567 if (beforeChild && childrenInline()) 567 if (beforeChild && childrenInline())
568 deleteLineBoxTree(); 568 deleteLineBoxTree();
569 569
570 // We have to remove the descendant child from our positioned objects list
571 // before we do the split and move some of the children to cloneBlock. Since
572 // we are doing layout anyway, it is easier to blow away the entire list, th an
573 // traversing down the subtree looking for positioned childs and then remove them
574 // from our positioned objects list.
575 if (beforeChild)
576 removePositionedObjects(0);
577
578 // Now take all of the children from beforeChild to the end and remove 570 // Now take all of the children from beforeChild to the end and remove
579 // them from |this| and place them in the clone. 571 // them from |this| and place them in the clone.
580 moveChildrenTo(cloneBlock, beforeChild, 0, true); 572 moveChildrenTo(cloneBlock, beforeChild, 0, true);
581 573
582 // Hook |clone| up as the continuation of the middle block. 574 // Hook |clone| up as the continuation of the middle block.
583 if (!cloneBlock->isAnonymousBlock()) 575 if (!cloneBlock->isAnonymousBlock())
584 middleBlock->setContinuation(cloneBlock); 576 middleBlock->setContinuation(cloneBlock);
585 577
586 // We have been reparented and are now under the fromBlock. We need 578 // We have been reparented and are now under the fromBlock. We need
587 // to walk up our block parent chain until we hit the containing anonymous c olumns block. 579 // 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
621 // Someone may have indirectly caused a <q> to split. When this happens , the :after content 613 // Someone may have indirectly caused a <q> to split. When this happens , the :after content
622 // has to move into the inline continuation. Call updateBeforeAfterCont ent to ensure that the inline's :after 614 // has to move into the inline continuation. Call updateBeforeAfterCont ent to ensure that the inline's :after
623 // content gets properly destroyed. 615 // content gets properly destroyed.
624 bool isLastChild = (currChildNextSibling == blockCurr->lastChild()); 616 bool isLastChild = (currChildNextSibling == blockCurr->lastChild());
625 if (documentUsesBeforeAfterRules) 617 if (documentUsesBeforeAfterRules)
626 blockCurr->children()->updateBeforeAfterContent(blockCurr, AFTER); 618 blockCurr->children()->updateBeforeAfterContent(blockCurr, AFTER);
627 if (isLastChild && currChildNextSibling != blockCurr->lastChild()) 619 if (isLastChild && currChildNextSibling != blockCurr->lastChild())
628 currChildNextSibling = 0; // We destroyed the last child, so now we need to update 620 currChildNextSibling = 0; // We destroyed the last child, so now we need to update
629 // the value of currChildNextSibling. 621 // the value of currChildNextSibling.
630 622
631 // It is possible that positioned objects under blockCurr are going to b e moved to cloneBlock.
632 // Since we are doing layout anyway, it is easier to blow away the entir e list, than
633 // traversing down the subtree looking for positioned children and then remove them
634 // from our positioned objects list.
635 blockCurr->removePositionedObjects(0);
636
637 // Now we need to take all of the children starting from the first child 623 // Now we need to take all of the children starting from the first child
638 // *after* currChild and append them all to the clone. 624 // *after* currChild and append them all to the clone.
639 blockCurr->moveChildrenTo(cloneBlock, currChildNextSibling, 0, true); 625 blockCurr->moveChildrenTo(cloneBlock, currChildNextSibling, 0, true);
640 626
641 // Keep walking up the chain. 627 // Keep walking up the chain.
642 currChild = curr; 628 currChild = curr;
643 currChildNextSibling = currChild->nextSibling(); 629 currChildNextSibling = currChild->nextSibling();
644 curr = toRenderBoxModelObject(curr->parent()); 630 curr = toRenderBoxModelObject(curr->parent());
645 } 631 }
646 632
(...skipping 6767 matching lines...) Expand 10 before | Expand all | Expand 10 after
7414 } 7400 }
7415 7401
7416 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7402 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7417 { 7403 {
7418 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX (), floatingObject->pixelSnappedMaxY()); 7404 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->pi xelSnappedX(), floatingObject->pixelSnappedY(), floatingObject->pixelSnappedMaxX (), floatingObject->pixelSnappedMaxY());
7419 } 7405 }
7420 7406
7421 #endif 7407 #endif
7422 7408
7423 } // namespace WebCore 7409 } // 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