Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
| index 06b747857bf5c636f032f9636b2e59c468b49fec..5ddf9d9983a28c5a3a47e83274e5471b402b0e91 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp |
| @@ -1010,6 +1010,14 @@ void LayoutBoxModelObject::moveChildTo(LayoutBoxModelObject* toBoxModelObject, L |
| ASSERT(this == child->parent()); |
| ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
| + |
| + // If a child is moving from a block-flow to an inline-flow parent then any floats currently intruding into |
| + // the child can no longer do so. This can happen if a block becomes floating or out-of-flow and is moved |
| + // to an an anonymous block. Remove them from their float-lists immediately as markAllDescendantsWithFloatsForLayout |
|
mstensho (USE GERRIT)
2015/12/07 21:14:44
"them" as in "intruding floats"?
|
| + // won't attempt to remove floats from parents that have inline-flow if we try later. |
| + if (child->isLayoutBlockFlow() && toBoxModelObject->childrenInline() && !child->childrenInline()) |
| + toLayoutBlockFlow(child)->removeFloatingObjectsFromDescendants(); |
| + |
| if (fullRemoveInsert && (toBoxModelObject->isLayoutBlock() || toBoxModelObject->isLayoutInline())) { |
| // Takes care of adding the new child correctly if toBlock and fromBlock |
| // have different kind of children (block vs inline). |