summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-04-13 07:48:16 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-13 07:48:16 -0700
commit3dad91f1d1975439d8c7972f0269dba2d236284c (patch)
treefd05ee8e0e2ef41a158c281b5c06fb64d25de9e1
parent1ba7eb1b35cf60d5f7fdd1e8eb7a55807bcf8f2a (diff)
parentb52229f8ad5e8b3632305005e437104c11eba942 (diff)
downloadexternal_webkit-3dad91f1d1975439d8c7972f0269dba2d236284c.zip
external_webkit-3dad91f1d1975439d8c7972f0269dba2d236284c.tar.gz
external_webkit-3dad91f1d1975439d8c7972f0269dba2d236284c.tar.bz2
Merge changes Ia48c7e50,I02da7a9f
* changes: Cherry-pick WebKit change r105769 to fix a LayoutTest crash Add RenderObject::isBeforeOrAfterContent() from r94543 as a prerequisite for r105769
-rw-r--r--Source/WebCore/rendering/RenderBlock.cpp6
-rw-r--r--Source/WebCore/rendering/RenderObject.h6
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;