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

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

Issue 1323313004: Don't re-implement containing block logic when marking container chains for layout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 4 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 | « third_party/WebKit/LayoutTests/fast/block/positioning/complex-positioned-movement-inline-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/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 806001ed1fb5e597d20b9b7eeb735733d5305f19..7ac46d51c2f2464ed6d3c5f85eabab83e0031563 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -798,15 +798,11 @@ void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay
if (!container && !object->isLayoutView())
return;
if (!last->isTextOrSVGChild() && last->style()->hasOutOfFlowPosition()) {
- bool willSkipRelativelyPositionedInlines = !object->isLayoutBlock() || object->isAnonymousBlock();
- // Skip relatively positioned inlines and anonymous blocks to get to the enclosing LayoutBlock.
- while (object && (!object->isLayoutBlock() || object->isAnonymousBlock()))
- object = object->container();
- if (!object || object->posChildNeedsLayout())
+ LayoutBlock* containingBlock = last->containingBlock();
+ if (containingBlock->posChildNeedsLayout())
return;
- if (willSkipRelativelyPositionedInlines)
- container = object->container();
- object->setPosChildNeedsLayout(true);
+ container = containingBlock->container();
+ containingBlock->setPosChildNeedsLayout(true);
simplifiedNormalFlowLayout = true;
ASSERT(!object->isSetNeedsLayoutForbidden());
} else if (simplifiedNormalFlowLayout) {
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/positioning/complex-positioned-movement-inline-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698