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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 2109263002: Revert of Update containing block's positioned descendants list when an object becomes ... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 const ComputedStyle& newStyle = styleRef(); 217 const ComputedStyle& newStyle = styleRef();
218 218
219 if (oldStyle && parent()) { 219 if (oldStyle && parent()) {
220 if (oldStyle->position() != newStyle.position() && newStyle.position() ! = StaticPosition) { 220 if (oldStyle->position() != newStyle.position() && newStyle.position() ! = StaticPosition) {
221 // Remove our absolute and fixed positioned descendants from their n ew containing block, 221 // Remove our absolute and fixed positioned descendants from their n ew containing block,
222 // in case containingBlock() changes by the change to the position p roperty. 222 // in case containingBlock() changes by the change to the position p roperty.
223 // See styleWillChange() for other cases. 223 // See styleWillChange() for other cases.
224 if (LayoutBlock* cb = containingBlock()) 224 if (LayoutBlock* cb = containingBlock())
225 cb->removePositionedObjects(this, NewContainingBlock); 225 cb->removePositionedObjects(this, NewContainingBlock);
226 if (isOutOfFlowPositioned()) {
227 // Insert this object into containing block's positioned des cendants list
228 // in case the parent won't layout. This is needed especiall y there are
229 // descendants scheduled for overflow recalc.
230 cb->insertPositionedObject(this);
231 }
232 }
233 } 226 }
234 } 227 }
235 228
236 if (TextAutosizer* textAutosizer = document().textAutosizer()) 229 if (TextAutosizer* textAutosizer = document().textAutosizer())
237 textAutosizer->record(this); 230 textAutosizer->record(this);
238 231
239 propagateStyleToAnonymousChildren(true); 232 propagateStyleToAnonymousChildren(true);
240 233
241 // It's possible for our border/padding to change, but for the overall logic al width or height of the block to 234 // It's possible for our border/padding to change, but for the overall logic al width or height of the block to
242 // end up being the same. We keep track of this change so in layoutBlock, we can know to set relayoutChildren=true. 235 // end up being the same. We keep track of this change so in layoutBlock, we can know to set relayoutChildren=true.
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) { 1914 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) {
1922 LayoutBox* currBox = *it; 1915 LayoutBox* currBox = *it;
1923 ASSERT(!currBox->needsLayout()); 1916 ASSERT(!currBox->needsLayout());
1924 } 1917 }
1925 } 1918 }
1926 } 1919 }
1927 1920
1928 #endif 1921 #endif
1929 1922
1930 } // namespace blink 1923 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/overflow/add-visual-overflow-and-change-container-position-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698