Index: Source/core/layout/LayoutMultiColumnFlowThread.cpp |
diff --git a/Source/core/layout/LayoutMultiColumnFlowThread.cpp b/Source/core/layout/LayoutMultiColumnFlowThread.cpp |
index 51c0a42890106bbebbbca8f4a0e21e259904a6d8..f7aa2843721f51a5fcd0689c875a99f8b2307873 100644 |
--- a/Source/core/layout/LayoutMultiColumnFlowThread.cpp |
+++ b/Source/core/layout/LayoutMultiColumnFlowThread.cpp |
@@ -645,6 +645,13 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantWillBeRemoved(LayoutObject |
void LayoutMultiColumnFlowThread::flowThreadDescendantStyleWillChange(LayoutObject* descendant, StyleDifference diff, const ComputedStyle& newStyle) |
{ |
// If an in-flow descendant goes out-of-flow, we may have to remove a column set. |
+ if (descendant->isText()) { |
+ // Text nodes inherit all properties from the parent node (including non-inheritable |
dsinclair
2015/05/25 13:42:47
Is the larger bug here that we inherit non-inherit
mstensho (USE GERRIT)
2015/05/25 18:25:13
I've been thinking that doing something as crazy a
|
+ // ones). We don't care what its 'position' is. In fact, we _must_ ignore it, since the |
+ // parent may be the multicol container, and having that accidentally leaked into children |
+ // of the multicol is bad. |
+ return; |
+ } |
if (newStyle.hasOutOfFlowPosition() && !styleRef().hasOutOfFlowPosition()) |
flowThreadDescendantWillBeRemoved(descendant); |
} |
@@ -652,6 +659,13 @@ void LayoutMultiColumnFlowThread::flowThreadDescendantStyleWillChange(LayoutObje |
void LayoutMultiColumnFlowThread::flowThreadDescendantStyleDidChange(LayoutObject* descendant, StyleDifference diff, const ComputedStyle& oldStyle) |
{ |
// If an out-of-flow descendant goes in-flow, we may have to insert a column set. |
+ if (descendant->isText()) { |
+ // Text nodes inherit all properties from the parent node (including non-inheritable |
+ // ones). We don't care what its 'position' is. In fact, we _must_ ignore it, since the |
+ // parent may be the multicol container, and having that accidentally leaked into children |
+ // of the multicol is bad. |
+ return; |
+ } |
if (oldStyle.hasOutOfFlowPosition() && !styleRef().hasOutOfFlowPosition()) |
flowThreadDescendantWasInserted(descendant); |
} |