diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/rendering/RenderBlock.cpp | 6 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderObject.h | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp index 42d68a0..5cef4cf 100644 --- a/Source/WebCore/rendering/RenderBlock.cpp +++ b/Source/WebCore/rendering/RenderBlock.cpp @@ -443,6 +443,8 @@ RenderBlock* RenderBlock::clone() const else { cloneBlock = new (renderArena()) RenderBlock(node()); cloneBlock->setStyle(style()); + if (!childrenInline() && cloneBlock->firstChild() && cloneBlock->firstChild()->isInline()) + cloneBlock->makeChildrenNonInline(); } cloneBlock->setChildrenInline(childrenInline()); return cloneBlock; @@ -657,8 +659,8 @@ RenderBlock* RenderBlock::columnsBlockForSpanningElement(RenderObject* newChild) // cross the streams and have to cope with both types of continuations mixed together). // This function currently supports (1) and (2). RenderBlock* columnsBlockAncestor = 0; - if (!newChild->isText() && newChild->style()->columnSpan() && !newChild->isFloatingOrPositioned() - && !newChild->isInline() && !isAnonymousColumnSpanBlock()) { + if (!newChild->isText() && newChild->style()->columnSpan() && !newChild->isBeforeOrAfterContent() + && !newChild->isFloatingOrPositioned() && !newChild->isInline() && !isAnonymousColumnSpanBlock()) { if (style()->specifiesColumns()) columnsBlockAncestor = this; else if (parent() && parent()->isRenderBlock()) diff --git a/Source/WebCore/rendering/RenderObject.h b/Source/WebCore/rendering/RenderObject.h index 005c453..f5fe562 100644 --- a/Source/WebCore/rendering/RenderObject.h +++ b/Source/WebCore/rendering/RenderObject.h @@ -312,6 +312,7 @@ public: inline bool isBeforeContent() const; inline bool isAfterContent() const; + inline bool isBeforeOrAfterContent() const; static inline bool isBeforeContent(const RenderObject* obj) { return obj && obj->isBeforeContent(); } static inline bool isAfterContent(const RenderObject* obj) { return obj && obj->isAfterContent(); } @@ -917,6 +918,11 @@ inline bool RenderObject::isAfterContent() const return true; } +inline bool RenderObject::isBeforeOrAfterContent() const +{ + return isBeforeContent() || isAfterContent(); +} + inline void RenderObject::setNeedsLayout(bool b, bool markParents) { bool alreadyNeededLayout = m_needsLayout; |