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

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

Issue 2103843003: Update containing block's positioned descendants list when an object becomes out-of-flow-positioned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/LayoutTests/fast/overflow/add-visual-overflow-and-change-container-position-expected.html ('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/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 860274f46a39d989823c745a4d2850ce83358c18..874b798ef5d162c3e150e181eca1dedc25d8175d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -202,8 +202,15 @@ void LayoutBlock::styleDidChange(StyleDifference diff, const ComputedStyle* oldS
// block's list during layout. However the positioned descendant layout logic assumes
// layout objects to obey parent-child order in the list. Remove our descendants here
// so they will be re-inserted after us.
- if (LayoutBlock* cb = containingBlock())
+ if (LayoutBlock* cb = containingBlock()) {
cb->removePositionedObjects(this, NewContainingBlock);
+ if (isOutOfFlowPositioned()) {
+ // Insert this object into containing block's positioned descendants list
+ // in case the parent won't layout. This is needed especially there are
+ // descendants scheduled for overflow recalc.
+ cb->insertPositionedObject(this);
+ }
+ }
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/overflow/add-visual-overflow-and-change-container-position-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698