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

Side by Side Diff: Source/core/rendering/RenderLayerModelObject.cpp

Issue 663923002: Rename hasTransform() to hasTransformRelatedProperty, since the meaning is the latter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | 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, 2012 Google Inc. All rights reserved. 7 * Copyright (C) 2010, 2012 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 || oldStyle->clip() != newStyle.clip()) 97 || oldStyle->clip() != newStyle.clip())
98 layer()->clipper().clearClipRectsIncludingDescendants(); 98 layer()->clipper().clearClipRectsIncludingDescendants();
99 } 99 }
100 } 100 }
101 101
102 RenderObject::styleWillChange(diff, newStyle); 102 RenderObject::styleWillChange(diff, newStyle);
103 } 103 }
104 104
105 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt yle* oldStyle) 105 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt yle* oldStyle)
106 { 106 {
107 bool hadTransform = hasTransform(); 107 bool hadTransform = hasTransformRelatedProperty();
108 bool hadLayer = hasLayer(); 108 bool hadLayer = hasLayer();
109 bool layerWasSelfPainting = hadLayer && layer()->isSelfPaintingLayer(); 109 bool layerWasSelfPainting = hadLayer && layer()->isSelfPaintingLayer();
110 110
111 RenderObject::styleDidChange(diff, oldStyle); 111 RenderObject::styleDidChange(diff, oldStyle);
112 updateFromStyle(); 112 updateFromStyle();
113 113
114 LayerType type = layerTypeRequired(); 114 LayerType type = layerTypeRequired();
115 if (type != NoLayer) { 115 if (type != NoLayer) {
116 if (!layer() && layerCreationAllowedForSubtree()) { 116 if (!layer() && layerCreationAllowedForSubtree()) {
117 if (s_wasFloating && isFloating()) 117 if (s_wasFloating && isFloating())
118 setChildNeedsLayout(); 118 setChildNeedsLayout();
119 createLayer(type); 119 createLayer(type);
120 if (parent() && !needsLayout()) { 120 if (parent() && !needsLayout()) {
121 // FIXME: We should call a specialized version of this function. 121 // FIXME: We should call a specialized version of this function.
122 layer()->updateLayerPositionsAfterLayout(); 122 layer()->updateLayerPositionsAfterLayout();
123 } 123 }
124 } 124 }
125 } else if (layer() && layer()->parent()) { 125 } else if (layer() && layer()->parent()) {
126 setHasTransform(false); // Either a transform wasn't specified or the ob ject doesn't support transforms, so just null out the bit. 126 setHasTransformRelatedProperty(false); // Either a transform wasn't spec ified or the object doesn't support transforms, so just null out the bit.
127 setHasReflection(false); 127 setHasReflection(false);
128 layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_l ayer 128 layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_l ayer
129 if (s_wasFloating && isFloating()) 129 if (s_wasFloating && isFloating())
130 setChildNeedsLayout(); 130 setChildNeedsLayout();
131 if (hadTransform) 131 if (hadTransform)
132 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 132 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
133 } 133 }
134 134
135 if (layer()) { 135 if (layer()) {
136 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer 136 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Note: the subpixel accumulation of layer() does not need to be ad ded here. It is already taken into account. 205 // Note: the subpixel accumulation of layer() does not need to be ad ded here. It is already taken into account.
206 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval idationRect), invalidationReason); 206 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval idationRect), invalidationReason);
207 } 207 }
208 } else { 208 } else {
209 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason); 209 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason);
210 } 210 }
211 } 211 }
212 212
213 } // namespace blink 213 } // namespace blink
214 214
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698