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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp

Issue 1892793002: Invalidate column rules when the width of a multicol container changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
index 8d5cfab0434f80564e64097f3c23ba7f2c13e51b..1ad819fdd11c5e6203fd0f1fe0bbf977c233e6d7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
@@ -342,6 +342,20 @@ void LayoutMultiColumnSet::endFlow(LayoutUnit offsetInFlowThread)
m_fragmentainerGroups.last().setLogicalBottomInFlowThread(offsetInFlowThread);
}
+void LayoutMultiColumnSet::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
+{
+ LayoutBlockFlow::styleDidChange(diff, oldStyle);
+
+ // column-rule is specified on the parent (the multicol container) of this object, but it's the
+ // column sets that are in charge of painting them. A column rule is pretty much like any other
+ // box decoration, like borders. We need to say that we have box decorations here, so that the
+ // columnn set is invalidated when it gets laid out. We cannot check here whether the multicol
+ // container actually has a visible column rule or not, because we may not have been inserted
+ // into the tree yet. Painting a column set is cheap anyway, because the only thing it can
+ // paint is the column rule, while actual multicol content is handled by the flow thread.
+ setHasBoxDecorationBackground(true);
+}
+
void LayoutMultiColumnSet::layout()
{
if (recalculateColumnHeight())
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698