Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1262)

Unified Diff: Source/core/layout/LayoutMultiColumnFlowThread.cpp

Issue 1149333003: Ignore style changes on text node flowthread descendants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/multicol/multicol-becomes-abspos-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « LayoutTests/fast/multicol/multicol-becomes-abspos-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698