| 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 } | 439 } |
| 440 | 440 |
| 441 RenderBlock* RenderBlock::clone() const | 441 RenderBlock* RenderBlock::clone() const |
| 442 { | 442 { |
| 443 RenderBlock* cloneBlock; | 443 RenderBlock* cloneBlock; |
| 444 if (isAnonymousBlock()) | 444 if (isAnonymousBlock()) |
| 445 cloneBlock = createAnonymousBlock(); | 445 cloneBlock = createAnonymousBlock(); |
| 446 else { | 446 else { |
| 447 cloneBlock = new (renderArena()) RenderBlock(node()); | 447 cloneBlock = new (renderArena()) RenderBlock(node()); |
| 448 cloneBlock->setStyle(style()); | 448 cloneBlock->setStyle(style()); |
| 449 if (!childrenInline() && cloneBlock->firstChild() && cloneBlock->firstCh
ild()->isInline()) |
| 450 cloneBlock->makeChildrenNonInline(); |
| 449 } | 451 } |
| 450 cloneBlock->setChildrenInline(childrenInline()); | 452 cloneBlock->setChildrenInline(childrenInline()); |
| 451 return cloneBlock; | 453 return cloneBlock; |
| 452 } | 454 } |
| 453 | 455 |
| 454 void RenderBlock::splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock, | 456 void RenderBlock::splitBlocks(RenderBlock* fromBlock, RenderBlock* toBlock, |
| 455 RenderBlock* middleBlock, | 457 RenderBlock* middleBlock, |
| 456 RenderObject* beforeChild, RenderBoxModelObject* o
ldCont) | 458 RenderObject* beforeChild, RenderBoxModelObject* o
ldCont) |
| 457 { | 459 { |
| 458 // Create a clone of this inline. | 460 // Create a clone of this inline. |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 RenderBlock* RenderBlock::columnsBlockForSpanningElement(RenderObject* newChild) | 654 RenderBlock* RenderBlock::columnsBlockForSpanningElement(RenderObject* newChild) |
| 653 { | 655 { |
| 654 // FIXME: This function is the gateway for the addition of column-span suppo
rt. It will | 656 // FIXME: This function is the gateway for the addition of column-span suppo
rt. It will |
| 655 // be added to in three stages: | 657 // be added to in three stages: |
| 656 // (1) Immediate children of a multi-column block can span. | 658 // (1) Immediate children of a multi-column block can span. |
| 657 // (2) Nested block-level children with only block-level ancestors between t
hem and the multi-column block can span. | 659 // (2) Nested block-level children with only block-level ancestors between t
hem and the multi-column block can span. |
| 658 // (3) Nested children with block or inline ancestors between them and the m
ulti-column block can span (this is when we | 660 // (3) Nested children with block or inline ancestors between them and the m
ulti-column block can span (this is when we |
| 659 // cross the streams and have to cope with both types of continuations mixed
together). | 661 // cross the streams and have to cope with both types of continuations mixed
together). |
| 660 // This function currently supports (1) and (2). | 662 // This function currently supports (1) and (2). |
| 661 RenderBlock* columnsBlockAncestor = 0; | 663 RenderBlock* columnsBlockAncestor = 0; |
| 662 if (!newChild->isText() && newChild->style()->columnSpan() && !newChild->isF
loatingOrPositioned() | 664 if (!newChild->isText() && newChild->style()->columnSpan() && !newChild->isB
eforeOrAfterContent() |
| 663 && !newChild->isInline() && !isAnonymousColumnSpanBlock()) { | 665 && !newChild->isFloatingOrPositioned() && !newChild->isInline() && !isAn
onymousColumnSpanBlock()) { |
| 664 if (style()->specifiesColumns()) | 666 if (style()->specifiesColumns()) |
| 665 columnsBlockAncestor = this; | 667 columnsBlockAncestor = this; |
| 666 else if (!isInline() && parent() && parent()->isRenderBlock()) { | 668 else if (!isInline() && parent() && parent()->isRenderBlock()) { |
| 667 columnsBlockAncestor = toRenderBlock(parent())->containingColumnsBlo
ck(false); | 669 columnsBlockAncestor = toRenderBlock(parent())->containingColumnsBlo
ck(false); |
| 668 | 670 |
| 669 if (columnsBlockAncestor) { | 671 if (columnsBlockAncestor) { |
| 670 // Make sure that none of the parent ancestors have a continuati
on. | 672 // Make sure that none of the parent ancestors have a continuati
on. |
| 671 // If yes, we do not want split the block into continuations. | 673 // If yes, we do not want split the block into continuations. |
| 672 RenderObject* curr = this; | 674 RenderObject* curr = this; |
| 673 while (curr && curr != columnsBlockAncestor) { | 675 while (curr && curr != columnsBlockAncestor) { |
| (...skipping 6370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7044 } | 7046 } |
| 7045 | 7047 |
| 7046 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 7048 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
| 7047 { | 7049 { |
| 7048 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); | 7050 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); |
| 7049 } | 7051 } |
| 7050 | 7052 |
| 7051 #endif | 7053 #endif |
| 7052 | 7054 |
| 7053 } // namespace WebCore | 7055 } // namespace WebCore |
| OLD | NEW |