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

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

Issue 1966223002: Helper for interesting things to do when a block becomes a float or out-of-flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixup! Helper for interesting things to do when a block becomes a float or out-of-flow. Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.h » ('j') | 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 2ef3c37559e0d29a34041f50adb818f5bc5297d8..e9b689bbbf80f8effcc73acd9cdb9a70689b5ecb 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -321,18 +321,8 @@ void LayoutBlock::styleDidChange(StyleDifference diff, const ComputedStyle* oldS
{
LayoutBox::styleDidChange(diff, oldStyle);
- if (isFloatingOrOutOfFlowPositioned() && oldStyle && !oldStyle->isFloating() && !oldStyle->hasOutOfFlowPosition() && parent() && parent()->isLayoutBlockFlow()) {
- toLayoutBlock(parent())->makeChildrenInlineIfPossible();
- // Reparent to an adjacent anonymous block if one is available.
- if (previousSibling() && previousSibling()->isAnonymousBlock()) {
- LayoutBlock* newParent = toLayoutBlock(previousSibling());
- toLayoutBlock(parent())->moveChildTo(newParent, this, nullptr, false);
- // The anonymous block we've moved to may now be adjacent to former siblings of ours that it can contain also.
- newParent->reparentSubsequentFloatingOrOutOfFlowSiblings();
- } else if (nextSibling() && nextSibling()->isAnonymousBlock()) {
- toLayoutBlock(parent())->moveChildTo(toLayoutBlock(nextSibling()), this, nextSibling()->slowFirstChild(), false);
- }
- }
+ if (isFloatingOrOutOfFlowPositioned() && oldStyle && !oldStyle->isFloating() && !oldStyle->hasOutOfFlowPosition() && parent() && parent()->isLayoutBlockFlow())
+ toLayoutBlockFlow(parent())->childBecameFloatingOrOutOfFlow(this);
const ComputedStyle& newStyle = styleRef();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698