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

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

Issue 10272008: Merge 113497 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 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
« no previous file with comments | « Source/WebCore/rendering/RenderBlock.h ('k') | Source/WebCore/rendering/RenderBox.h » ('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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 683
684 RenderObject* RenderBlock::splitAnonymousBlocksAroundChild(RenderObject* beforeC hild) 684 RenderObject* RenderBlock::splitAnonymousBlocksAroundChild(RenderObject* beforeC hild)
685 { 685 {
686 if (beforeChild->isTablePart()) 686 if (beforeChild->isTablePart())
687 beforeChild = splitTablePartsAroundChild(beforeChild); 687 beforeChild = splitTablePartsAroundChild(beforeChild);
688 688
689 while (beforeChild->parent() != this) { 689 while (beforeChild->parent() != this) {
690 RenderBlock* blockToSplit = toRenderBlock(beforeChild->parent()); 690 RenderBlock* blockToSplit = toRenderBlock(beforeChild->parent());
691 if (blockToSplit->firstChild() != beforeChild) { 691 if (blockToSplit->firstChild() != beforeChild) {
692 // We have to split the parentBlock into two blocks. 692 // We have to split the parentBlock into two blocks.
693 RenderBlock* post = createAnonymousBlockWithSameTypeAs(blockToSplit) ; 693 RenderBlock* post = toRenderBlock(blockToSplit->createAnonymousBoxWi thSameTypeAs(this));
694 post->setChildrenInline(blockToSplit->childrenInline()); 694 post->setChildrenInline(blockToSplit->childrenInline());
695 RenderBlock* parentBlock = toRenderBlock(blockToSplit->parent()); 695 RenderBlock* parentBlock = toRenderBlock(blockToSplit->parent());
696 parentBlock->children()->insertChildNode(parentBlock, post, blockToS plit->nextSibling()); 696 parentBlock->children()->insertChildNode(parentBlock, post, blockToS plit->nextSibling());
697 blockToSplit->moveChildrenTo(post, beforeChild, 0, blockToSplit->has Layer()); 697 blockToSplit->moveChildrenTo(post, beforeChild, 0, blockToSplit->has Layer());
698 post->setNeedsLayoutAndPrefWidthsRecalc(); 698 post->setNeedsLayoutAndPrefWidthsRecalc();
699 blockToSplit->setNeedsLayoutAndPrefWidthsRecalc(); 699 blockToSplit->setNeedsLayoutAndPrefWidthsRecalc();
700 beforeChild = post; 700 beforeChild = post;
701 } else 701 } else
702 beforeChild = blockToSplit; 702 beforeChild = blockToSplit;
703 } 703 }
(...skipping 5933 matching lines...) Expand 10 before | Expand all | Expand 10 after
6637 pos = FloatPoint(additionalOffset.x() + box->x(), additional Offset.y() + box->y()); 6637 pos = FloatPoint(additionalOffset.x() + box->x(), additional Offset.y() + box->y());
6638 box->addFocusRingRects(rects, flooredLayoutPoint(pos)); 6638 box->addFocusRingRects(rects, flooredLayoutPoint(pos));
6639 } 6639 }
6640 } 6640 }
6641 } 6641 }
6642 6642
6643 if (inlineElementContinuation()) 6643 if (inlineElementContinuation())
6644 inlineElementContinuation()->addFocusRingRects(rects, flooredLayoutPoint (additionalOffset + inlineElementContinuation()->containingBlock()->location() - location())); 6644 inlineElementContinuation()->addFocusRingRects(rects, flooredLayoutPoint (additionalOffset + inlineElementContinuation()->containingBlock()->location() - location()));
6645 } 6645 }
6646 6646
6647 RenderBlock* RenderBlock::createAnonymousBlockWithSameTypeAs(RenderBlock* otherA nonymousBlock) const 6647 RenderBox* RenderBlock::createAnonymousBoxWithSameTypeAs(const RenderObject* par ent) const
6648 { 6648 {
6649 if (otherAnonymousBlock->isAnonymousColumnsBlock()) 6649 if (isAnonymousColumnsBlock())
6650 return createAnonymousColumnsBlock(); 6650 return createAnonymousColumnsWithParentRenderer(parent);
6651 if (otherAnonymousBlock->isAnonymousColumnSpanBlock()) 6651 if (isAnonymousColumnSpanBlock())
6652 return createAnonymousColumnSpanBlock(); 6652 return createAnonymousColumnSpanWithParentRenderer(parent);
6653 return createAnonymousBlock(otherAnonymousBlock->style()->display()); 6653 return createAnonymousWithParentRendererAndDisplay(parent, style()->display( ));
6654 } 6654 }
6655 6655
6656 bool RenderBlock::hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule pageBou ndaryRule) const 6656 bool RenderBlock::hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule pageBou ndaryRule) const
6657 { 6657 {
6658 ASSERT(view()->layoutState() && view()->layoutState()->isPaginated()); 6658 ASSERT(view()->layoutState() && view()->layoutState()->isPaginated());
6659 6659
6660 if (!inRenderFlowThread()) 6660 if (!inRenderFlowThread())
6661 return true; // Printing and multi-column both make new pages to accommo date content. 6661 return true; // Printing and multi-column both make new pages to accommo date content.
6662 6662
6663 // See if we're in the last region. 6663 // See if we're in the last region.
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
7440 } 7440 }
7441 7441
7442 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject) 7442 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl oatingObject* floatingObject)
7443 { 7443 {
7444 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); 7444 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x( ), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY());
7445 } 7445 }
7446 7446
7447 #endif 7447 #endif
7448 7448
7449 } // namespace WebCore 7449 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderBlock.h ('k') | Source/WebCore/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698