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

Side by Side Diff: Source/core/layout/LayoutBoxModelObject.cpp

Issue 1058533003: Update descendent layer positions when a DeprecatedPaintLayer is removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 8 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
« no previous file with comments | « LayoutTests/animations/inline-element-animation-end-hit-test-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 if (!layer() && layerCreationAllowedForSubtree()) { 171 if (!layer() && layerCreationAllowedForSubtree()) {
172 if (s_wasFloating && isFloating()) 172 if (s_wasFloating && isFloating())
173 setChildNeedsLayout(); 173 setChildNeedsLayout();
174 createLayer(type); 174 createLayer(type);
175 if (parent() && !needsLayout()) { 175 if (parent() && !needsLayout()) {
176 // FIXME: We should call a specialized version of this function. 176 // FIXME: We should call a specialized version of this function.
177 layer()->updateLayerPositionsAfterLayout(); 177 layer()->updateLayerPositionsAfterLayout();
178 } 178 }
179 } 179 }
180 } else if (layer() && layer()->parent()) { 180 } else if (layer() && layer()->parent()) {
181 DeprecatedPaintLayer* parentLayer = layer()->parent();
181 setHasTransformRelatedProperty(false); // Either a transform wasn't spec ified or the object doesn't support transforms, so just null out the bit. 182 setHasTransformRelatedProperty(false); // Either a transform wasn't spec ified or the object doesn't support transforms, so just null out the bit.
182 setHasReflection(false); 183 setHasReflection(false);
183 layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_l ayer 184 layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_l ayer
184 if (s_wasFloating && isFloating()) 185 if (s_wasFloating && isFloating())
185 setChildNeedsLayout(); 186 setChildNeedsLayout();
186 if (hadTransform) 187 if (hadTransform)
187 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInva lidationReason::StyleChange); 188 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInva lidationReason::StyleChange);
189 if (!needsLayout()) {
190 // FIXME: We should call a specialized version of this function.
191 parentLayer->updateLayerPositionsAfterLayout();
192 }
188 } 193 }
189 194
190 if (layer()) { 195 if (layer()) {
191 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer 196 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer
192 // from the style. 197 // from the style.
193 layer()->setLayerType(type); 198 layer()->setLayerType(type);
194 199
195 layer()->styleChanged(diff, oldStyle); 200 layer()->styleChanged(diff, oldStyle);
196 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting) 201 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting)
197 setChildNeedsLayout(); 202 setChildNeedsLayout();
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 891 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
887 for (LayoutObject* child = startChild; child && child != endChild; ) { 892 for (LayoutObject* child = startChild; child && child != endChild; ) {
888 // Save our next sibling as moveChildTo will clear it. 893 // Save our next sibling as moveChildTo will clear it.
889 LayoutObject* nextSibling = child->nextSibling(); 894 LayoutObject* nextSibling = child->nextSibling();
890 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 895 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
891 child = nextSibling; 896 child = nextSibling;
892 } 897 }
893 } 898 }
894 899
895 } // namespace blink 900 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/animations/inline-element-animation-end-hit-test-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698