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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights 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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 // (1) Immediate children of a multi-column block can span. | 649 // (1) Immediate children of a multi-column block can span. |
650 // (2) Nested block-level children with only block-level ancestors between t
hem and the multi-column block can span. | 650 // (2) Nested block-level children with only block-level ancestors between t
hem and the multi-column block can span. |
651 // (3) Nested children with block or inline ancestors between them and the m
ulti-column block can span (this is when we | 651 // (3) Nested children with block or inline ancestors between them and the m
ulti-column block can span (this is when we |
652 // cross the streams and have to cope with both types of continuations mixed
together). | 652 // cross the streams and have to cope with both types of continuations mixed
together). |
653 // This function currently supports (1) and (2). | 653 // This function currently supports (1) and (2). |
654 RenderBlock* columnsBlockAncestor = 0; | 654 RenderBlock* columnsBlockAncestor = 0; |
655 if (!newChild->isText() && newChild->style()->columnSpan() && !newChild->isF
loatingOrPositioned() | 655 if (!newChild->isText() && newChild->style()->columnSpan() && !newChild->isF
loatingOrPositioned() |
656 && !newChild->isInline() && !isAnonymousColumnSpanBlock()) { | 656 && !newChild->isInline() && !isAnonymousColumnSpanBlock()) { |
657 if (style()->specifiesColumns()) | 657 if (style()->specifiesColumns()) |
658 columnsBlockAncestor = this; | 658 columnsBlockAncestor = this; |
659 else if (!isInline() && parent() && parent()->isRenderBlock()) | 659 else if (!isInline() && parent() && parent()->isRenderBlock()) { |
660 columnsBlockAncestor = toRenderBlock(parent())->containingColumnsBlo
ck(false); | 660 columnsBlockAncestor = toRenderBlock(parent())->containingColumnsBlo
ck(false); |
| 661 |
| 662 if (columnsBlockAncestor) { |
| 663 // Make sure that none of the parent ancestors have a continuati
on. |
| 664 // If yes, we do not want split the block into continuations. |
| 665 RenderObject* curr = this; |
| 666 while (curr && curr != columnsBlockAncestor) { |
| 667 if (curr->isRenderBlock() && toRenderBlock(curr)->continuati
on()) { |
| 668 columnsBlockAncestor = 0; |
| 669 break; |
| 670 } |
| 671 curr = curr->parent(); |
| 672 } |
| 673 } |
| 674 } |
661 } | 675 } |
662 return columnsBlockAncestor; | 676 return columnsBlockAncestor; |
663 } | 677 } |
664 | 678 |
665 void RenderBlock::addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild,
RenderObject* beforeChild) | 679 void RenderBlock::addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild,
RenderObject* beforeChild) |
666 { | 680 { |
667 // Make sure we don't append things after :after-generated content if we hav
e it. | 681 // Make sure we don't append things after :after-generated content if we hav
e it. |
668 if (!beforeChild) { | 682 if (!beforeChild) { |
669 RenderObject* lastRenderer = lastChild(); | 683 RenderObject* lastRenderer = lastChild(); |
670 while (lastRenderer && lastRenderer->isAnonymous() && !isAfterContent(la
stRenderer)) | 684 while (lastRenderer && lastRenderer->isAnonymous() && !isAfterContent(la
stRenderer)) |
(...skipping 5731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6402 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 6416 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
6403 { | 6417 { |
6404 showRenderObject(); | 6418 showRenderObject(); |
6405 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 6419 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
6406 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 6420 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
6407 } | 6421 } |
6408 | 6422 |
6409 #endif | 6423 #endif |
6410 | 6424 |
6411 } // namespace WebCore | 6425 } // namespace WebCore |
OLD | NEW |