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

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

Issue 275563002: Don't layout when isSelfPaintingLayer() changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: just remove it Created 6 years, 7 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 | « LayoutTests/TestExpectations ('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, 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 } 115 }
116 } 116 }
117 117
118 RenderObject::styleWillChange(diff, newStyle); 118 RenderObject::styleWillChange(diff, newStyle);
119 } 119 }
120 120
121 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt yle* oldStyle) 121 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt yle* oldStyle)
122 { 122 {
123 bool hadTransform = hasTransform(); 123 bool hadTransform = hasTransform();
124 bool hadLayer = hasLayer();
125 bool layerWasSelfPainting = hadLayer && layer()->isSelfPaintingLayer();
126 124
127 RenderObject::styleDidChange(diff, oldStyle); 125 RenderObject::styleDidChange(diff, oldStyle);
128 updateFromStyle(); 126 updateFromStyle();
129 127
130 LayerType type = layerTypeRequired(); 128 LayerType type = layerTypeRequired();
131 if (type != NoLayer) { 129 if (type != NoLayer) {
132 if (!layer() && layerCreationAllowedForSubtree()) { 130 if (!layer() && layerCreationAllowedForSubtree()) {
133 if (s_wasFloating && isFloating()) 131 if (s_wasFloating && isFloating())
134 setChildNeedsLayout(); 132 setChildNeedsLayout();
135 createLayer(type); 133 createLayer(type);
(...skipping 18 matching lines...) Expand all
154 if (s_wasFloating && isFloating()) 152 if (s_wasFloating && isFloating())
155 setChildNeedsLayout(); 153 setChildNeedsLayout();
156 if (hadTransform) 154 if (hadTransform)
157 setNeedsLayoutAndPrefWidthsRecalc(); 155 setNeedsLayoutAndPrefWidthsRecalc();
158 } 156 }
159 157
160 if (layer()) { 158 if (layer()) {
161 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer 159 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer
162 // from the style. 160 // from the style.
163 layer()->setLayerType(type); 161 layer()->setLayerType(type);
164
165 layer()->styleChanged(diff, oldStyle); 162 layer()->styleChanged(diff, oldStyle);
166 if (hadLayer && layer()->isSelfPaintingLayer() != layerWasSelfPainting)
167 setChildNeedsLayout();
168 } 163 }
169 164
170 if (FrameView *frameView = view()->frameView()) { 165 if (FrameView *frameView = view()->frameView()) {
171 bool newStyleIsViewportConstained = style()->hasViewportConstrainedPosit ion(); 166 bool newStyleIsViewportConstained = style()->hasViewportConstrainedPosit ion();
172 bool oldStyleIsViewportConstrained = oldStyle && oldStyle->hasViewportCo nstrainedPosition(); 167 bool oldStyleIsViewportConstrained = oldStyle && oldStyle->hasViewportCo nstrainedPosition();
173 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) { 168 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) {
174 if (newStyleIsViewportConstained && layer()) 169 if (newStyleIsViewportConstained && layer())
175 frameView->addViewportConstrainedObject(this); 170 frameView->addViewportConstrainedObject(this);
176 else 171 else
177 frameView->removeViewportConstrainedObject(this); 172 frameView->removeViewportConstrainedObject(this);
(...skipping 29 matching lines...) Expand all
207 return m_layer ? m_layer->hasCompositedLayerMapping() : false; 202 return m_layer ? m_layer->hasCompositedLayerMapping() : false;
208 } 203 }
209 204
210 CompositedLayerMapping* RenderLayerModelObject::groupedMapping() const 205 CompositedLayerMapping* RenderLayerModelObject::groupedMapping() const
211 { 206 {
212 return m_layer ? m_layer->groupedMapping() : 0; 207 return m_layer ? m_layer->groupedMapping() : 0;
213 } 208 }
214 209
215 } // namespace WebCore 210 } // namespace WebCore
216 211
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698