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

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

Issue 1294063005: Recalculate intrinsic widths in the old containing block chain when going out of flow. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make fast/layers/scroll-descendant-with-cached-cliprects.html NOT depend on the bug that this CL fi… Created 5 years, 4 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/layers/scroll-descendant-with-cached-cliprects.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index be83e8a61e6eb00a2579d3521aac8dca3697ee74..ea879e7c43714ef258896388a35537ce95634c9d 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -170,7 +170,13 @@ void LayoutBox::styleWillChange(StyleDifference diff, const ComputedStyle& newSt
// When a layout hint happens and an object's position style changes, we have to do a layout
// to dirty the layout tree using the old position value now.
if (diff.needsFullLayout() && parent() && oldStyle->position() != newStyle.position()) {
- markContainerChainForLayout();
+ if (!oldStyle->hasOutOfFlowPosition() && newStyle.hasOutOfFlowPosition()) {
+ // We're about to go out of flow. Before that takes place, we need to mark the
+ // current containing block chain for preferred widths recalculation.
+ setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::StyleChange);
+ } else {
+ markContainerChainForLayout();
+ }
if (oldStyle->position() == StaticPosition)
setShouldDoFullPaintInvalidation();
else if (newStyle.hasOutOfFlowPosition())
« no previous file with comments | « LayoutTests/fast/layers/scroll-descendant-with-cached-cliprects.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698