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

Unified Diff: Source/core/rendering/RenderBox.cpp

Issue 875563003: Ensure that positioned objects' list is always in parent first order (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WIP (just idea): redesign positioned objects handling Created 5 years, 9 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 | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 849f7def1309120b39c6b6eda32c4e9960a043c3..335e5e5333569d568b8b68c4b5818ef8843fc3d5 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -164,8 +164,17 @@ void RenderBox::removeFloatingOrPositionedChildFromBlockLists()
}
}
- if (isOutOfFlowPositioned())
- RenderBlock::removePositionedObject(this);
+ if (isOutOfFlowPositioned()) {
+ RenderBlock* block = const_cast<RenderBlock*>(toRenderBlock(this));
+ ASSERT(block);
+ for (RenderObject* curr = parent(); curr; curr = curr->parent()) {
+ ASSERT(curr);
+ if (curr->isRenderBlock()) {
+ // toRenderBlock(curr)->removePositionedObject(this);
+ toRenderBlock(curr)->removePositionedObjects(block, NewContainingBlock);
+ }
+ }
+ }
}
void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698