| 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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 const ComputedStyle& newStyle = styleRef(); | 196 const ComputedStyle& newStyle = styleRef(); |
| 197 | 197 |
| 198 if (oldStyle && parent()) { | 198 if (oldStyle && parent()) { |
| 199 if (oldStyle->position() != newStyle.position() && newStyle.position() !
= StaticPosition) { | 199 if (oldStyle->position() != newStyle.position() && newStyle.position() !
= StaticPosition) { |
| 200 // In LayoutObject::styleWillChange() we already removed ourself fro
m our old containing | 200 // In LayoutObject::styleWillChange() we already removed ourself fro
m our old containing |
| 201 // block's positioned descendant list, and we will be inserted to th
e new containing | 201 // block's positioned descendant list, and we will be inserted to th
e new containing |
| 202 // block's list during layout. However the positioned descendant lay
out logic assumes | 202 // block's list during layout. However the positioned descendant lay
out logic assumes |
| 203 // layout objects to obey parent-child order in the list. Remove our
descendants here | 203 // layout objects to obey parent-child order in the list. Remove our
descendants here |
| 204 // so they will be re-inserted after us. | 204 // so they will be re-inserted after us. |
| 205 if (LayoutBlock* cb = containingBlock()) | 205 if (LayoutBlock* cb = containingBlock()) { |
| 206 cb->removePositionedObjects(this, NewContainingBlock); | 206 cb->removePositionedObjects(this, NewContainingBlock); |
| 207 if (isOutOfFlowPositioned()) { |
| 208 // Insert this object into containing block's positioned des
cendants list |
| 209 // in case the parent won't layout. This is needed especiall
y there are |
| 210 // descendants scheduled for overflow recalc. |
| 211 cb->insertPositionedObject(this); |
| 212 } |
| 213 } |
| 207 } | 214 } |
| 208 } | 215 } |
| 209 | 216 |
| 210 if (TextAutosizer* textAutosizer = document().textAutosizer()) | 217 if (TextAutosizer* textAutosizer = document().textAutosizer()) |
| 211 textAutosizer->record(this); | 218 textAutosizer->record(this); |
| 212 | 219 |
| 213 propagateStyleToAnonymousChildren(); | 220 propagateStyleToAnonymousChildren(); |
| 214 | 221 |
| 215 // It's possible for our border/padding to change, but for the overall logic
al width or height of the block to | 222 // It's possible for our border/padding to change, but for the overall logic
al width or height of the block to |
| 216 // end up being the same. We keep track of this change so in layoutBlock, we
can know to set relayoutChildren=true. | 223 // end up being the same. We keep track of this change so in layoutBlock, we
can know to set relayoutChildren=true. |
| (...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1852 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { | 1859 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { |
| 1853 LayoutBox* currBox = *it; | 1860 LayoutBox* currBox = *it; |
| 1854 ASSERT(!currBox->needsLayout()); | 1861 ASSERT(!currBox->needsLayout()); |
| 1855 } | 1862 } |
| 1856 } | 1863 } |
| 1857 } | 1864 } |
| 1858 | 1865 |
| 1859 #endif | 1866 #endif |
| 1860 | 1867 |
| 1861 } // namespace blink | 1868 } // namespace blink |
| OLD | NEW |