OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1003 } | 1003 } |
1004 | 1004 |
1005 void LayoutBoxModelObject::moveChildTo(LayoutBoxModelObject* toBoxModelObject, L ayoutObject* child, LayoutObject* beforeChild, bool fullRemoveInsert) | 1005 void LayoutBoxModelObject::moveChildTo(LayoutBoxModelObject* toBoxModelObject, L ayoutObject* child, LayoutObject* beforeChild, bool fullRemoveInsert) |
1006 { | 1006 { |
1007 // We assume that callers have cleared their positioned objects list for chi ld moves (!fullRemoveInsert) so the | 1007 // We assume that callers have cleared their positioned objects list for chi ld moves (!fullRemoveInsert) so the |
1008 // positioned layoutObject maps don't become stale. It would be too slow to do the map lookup on each call. | 1008 // positioned layoutObject maps don't become stale. It would be too slow to do the map lookup on each call. |
1009 ASSERT(!fullRemoveInsert || !isLayoutBlock() || !toLayoutBlock(this)->hasPos itionedObjects()); | 1009 ASSERT(!fullRemoveInsert || !isLayoutBlock() || !toLayoutBlock(this)->hasPos itionedObjects()); |
1010 | 1010 |
1011 ASSERT(this == child->parent()); | 1011 ASSERT(this == child->parent()); |
1012 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 1012 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
1013 | |
1014 // If a child is moving from a block-flow to an inline-flow parent then any floats currently intruding into | |
mstensho (USE GERRIT)
2015/12/07 14:07:35
I think we need an example here. When can things l
| |
1015 // the child can no longer do so. Remove them from their float-lists immedia tely as markAllDescendantsWithFloatsForLayout | |
1016 // won't attempt to remove floats from parents that have inline-flow if we t ry later. | |
mstensho (USE GERRIT)
2015/12/07 14:07:35
Yeah... regarding that... Why don't we just attemp
rhogan
2015/12/07 17:29:52
Performance. I removed it once but then added it b
mstensho (USE GERRIT)
2015/12/07 21:14:44
Why did that cause a performance regression? I don
rhogan
2015/12/08 18:15:44
I let markAllDescendantsWithFloatForLayout() desce
| |
1017 if (child->isLayoutBlockFlow() && toBoxModelObject->childrenInline() && !chi ld->childrenInline()) | |
mstensho (USE GERRIT)
2015/12/07 21:14:44
I think something is missing here.
The condition
rhogan
2015/12/08 18:15:44
Yes, that's true - it couldn't have any intruding
| |
1018 toLayoutBlockFlow(child)->removeFloatingObjectsFromDescendants(); | |
1019 | |
1013 if (fullRemoveInsert && (toBoxModelObject->isLayoutBlock() || toBoxModelObje ct->isLayoutInline())) { | 1020 if (fullRemoveInsert && (toBoxModelObject->isLayoutBlock() || toBoxModelObje ct->isLayoutInline())) { |
1014 // Takes care of adding the new child correctly if toBlock and fromBlock | 1021 // Takes care of adding the new child correctly if toBlock and fromBlock |
1015 // have different kind of children (block vs inline). | 1022 // have different kind of children (block vs inline). |
1016 toBoxModelObject->addChild(virtualChildren()->removeChildNode(this, chil d), beforeChild); | 1023 toBoxModelObject->addChild(virtualChildren()->removeChildNode(this, chil d), beforeChild); |
1017 } else { | 1024 } else { |
1018 toBoxModelObject->virtualChildren()->insertChildNode(toBoxModelObject, v irtualChildren()->removeChildNode(this, child, fullRemoveInsert), beforeChild, f ullRemoveInsert); | 1025 toBoxModelObject->virtualChildren()->insertChildNode(toBoxModelObject, v irtualChildren()->removeChildNode(this, child, fullRemoveInsert), beforeChild, f ullRemoveInsert); |
1019 } | 1026 } |
1020 } | 1027 } |
1021 | 1028 |
1022 void LayoutBoxModelObject::moveChildrenTo(LayoutBoxModelObject* toBoxModelObject , LayoutObject* startChild, LayoutObject* endChild, LayoutObject* beforeChild, b ool fullRemoveInsert) | 1029 void LayoutBoxModelObject::moveChildrenTo(LayoutBoxModelObject* toBoxModelObject , LayoutObject* startChild, LayoutObject* endChild, LayoutObject* beforeChild, b ool fullRemoveInsert) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1057 if (rootElementStyle->hasBackground()) | 1064 if (rootElementStyle->hasBackground()) |
1058 return false; | 1065 return false; |
1059 | 1066 |
1060 if (node() != document().firstBodyElement()) | 1067 if (node() != document().firstBodyElement()) |
1061 return false; | 1068 return false; |
1062 | 1069 |
1063 return true; | 1070 return true; |
1064 } | 1071 } |
1065 | 1072 |
1066 } // namespace blink | 1073 } // namespace blink |
OLD | NEW |