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

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

Issue 1218023004: Fix a regression when position:static with absolute child changed to relative (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mstensho@ review in #10, and test from #11 Created 5 years, 5 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
Index: Source/core/layout/LayoutBlock.cpp
diff --git a/Source/core/layout/LayoutBlock.cpp b/Source/core/layout/LayoutBlock.cpp
index fc625dabc3bb795c86c022451ac44cb97e7b89b4..431f7599831f5c52c161c32cf917fb835a981be1 100644
--- a/Source/core/layout/LayoutBlock.cpp
+++ b/Source/core/layout/LayoutBlock.cpp
@@ -287,7 +287,7 @@ void LayoutBlock::styleWillChange(StyleDifference diff, const ComputedStyle& new
} else if (!oldStyleIsContainer && (newStyle.position() != StaticPosition || newHasTransformRelatedProperty)) {
// Remove our absolutely positioned descendants from their current containing block.
// They will be inserted into our positioned objects list during layout.
- if (LayoutBlock* cb = containingBlock())
+ if (LayoutBlock* cb = containingBlockForAbsolutePosition())
cb->removePositionedObjects(this, NewContainingBlock);
}
}

Powered by Google App Engine
This is Rietveld 408576698