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

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

Issue 1962623002: Relayout an object that becomes a spanner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/layout/LayoutMultiColumnSpannerPlaceholder.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/LayoutMultiColumnSpannerPlaceholder.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSpannerPlaceholder.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSpannerPlaceholder.cpp
index 7b46b2a1437550e09aedeb9fd728519d2d437a13..825e40158bd460e292e181f95895260541f3111b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSpannerPlaceholder.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSpannerPlaceholder.cpp
@@ -59,6 +59,14 @@ void LayoutMultiColumnSpannerPlaceholder::updateMarginProperties()
setStyle(newStyle);
}
+void LayoutMultiColumnSpannerPlaceholder::insertedIntoTree()
+{
+ LayoutBox::insertedIntoTree();
+ // The object may previously have been laid out as a non-spanner, but since it's a spanner now,
+ // it needs to be relaid out.
+ m_layoutObjectInFlowThread->setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::ColumnsChanged);
+}
+
void LayoutMultiColumnSpannerPlaceholder::willBeRemovedFromTree()
{
if (m_layoutObjectInFlowThread) {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnSpannerPlaceholder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698