OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |