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

Side by Side Diff: Source/WebCore/rendering/style/SVGRenderStyle.cpp

Issue 7002001: Revert 79985 - 2011-03-01 Nikolas Zimmermann <nzimmermann@rim.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2010 Rob Buis <buis@kde.org> 3 2004, 2005, 2010 Rob Buis <buis@kde.org>
4 Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 5
6 Based on khtml code by: 6 Based on khtml code by:
7 Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 7 Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) 8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org) 9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org)
10 Copyright (C) 2002 Apple Computer, Inc. 10 Copyright (C) 2002 Apple Computer, Inc.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 || svg_inherited_flags._joinStyle != other->svg_inherited_flags._joinSty le) 162 || svg_inherited_flags._joinStyle != other->svg_inherited_flags._joinSty le)
163 return StyleDifferenceLayout; 163 return StyleDifferenceLayout;
164 164
165 // Shadow changes require relayouts, as they affect the repaint rects. 165 // Shadow changes require relayouts, as they affect the repaint rects.
166 if (shadowSVG != other->shadowSVG) 166 if (shadowSVG != other->shadowSVG)
167 return StyleDifferenceLayout; 167 return StyleDifferenceLayout;
168 168
169 // Some stroke properties, requires relayouts, as the cached stroke boundari es need to be recalculated. 169 // Some stroke properties, requires relayouts, as the cached stroke boundari es need to be recalculated.
170 if (stroke != other->stroke) { 170 if (stroke != other->stroke) {
171 if (stroke->width != other->stroke->width 171 if (stroke->width != other->stroke->width
172 || stroke->paintType != other->stroke->paintType 172 || stroke->paint != other->stroke->paint
173 || stroke->paintColor != other->stroke->paintColor
174 || stroke->paintUri != other->stroke->paintUri
175 || stroke->miterLimit != other->stroke->miterLimit 173 || stroke->miterLimit != other->stroke->miterLimit
176 || stroke->dashArray != other->stroke->dashArray 174 || stroke->dashArray != other->stroke->dashArray
177 || stroke->dashOffset != other->stroke->dashOffset) 175 || stroke->dashOffset != other->stroke->dashOffset)
178 return StyleDifferenceLayout; 176 return StyleDifferenceLayout;
179 177
180 // Only the stroke-opacity case remains, where we only need a repaint. 178 // Only the stroke-opacity case remains, where we only need a repaint.
181 ASSERT(stroke->opacity != other->stroke->opacity); 179 ASSERT(stroke->opacity != other->stroke->opacity);
182 return StyleDifferenceRepaint; 180 return StyleDifferenceRepaint;
183 } 181 }
184 182
185 // NOTE: All comparisions below may only return StyleDifferenceRepaint 183 // NOTE: All comparisions below may only return StyleDifferenceRepaint
186 184
187 // Painting related properties only need repaints. 185 // Painting related properties only need repaints.
188 if (miscNotEqual) { 186 if (miscNotEqual) {
189 if (misc->floodColor != other->misc->floodColor 187 if (misc->floodColor != other->misc->floodColor
190 || misc->floodOpacity != other->misc->floodOpacity 188 || misc->floodOpacity != other->misc->floodOpacity
191 || misc->lightingColor != other->misc->lightingColor) 189 || misc->lightingColor != other->misc->lightingColor)
192 return StyleDifferenceRepaint; 190 return StyleDifferenceRepaint;
193 } 191 }
194 192
195 // If fill changes, we just need to repaint. Fill boundaries are not influen ced by this, only by the Path, that RenderSVGPath contains. 193 // If fill changes, we just need to repaint. Fill boundaries are not influen ced by this, only by the Path, that RenderSVGPath contains.
196 if (fill->paintType != other->fill->paintType || fill->paintColor != other-> fill->paintColor || fill->paintUri != other->fill->paintUri) 194 if (fill != other->fill)
197 return StyleDifferenceRepaint; 195 return StyleDifferenceRepaint;
198 196
199 // If gradient stops change, we just need to repaint. Style updates are alre ady handled through RenderSVGGradientSTop. 197 // If gradient stops change, we just need to repaint. Style updates are alre ady handled through RenderSVGGradientSTop.
200 if (stops != other->stops) 198 if (stops != other->stops)
201 return StyleDifferenceRepaint; 199 return StyleDifferenceRepaint;
202 200
203 // Changes of these flags only cause repaints. 201 // Changes of these flags only cause repaints.
204 if (svg_inherited_flags._colorRendering != other->svg_inherited_flags._color Rendering 202 if (svg_inherited_flags._colorRendering != other->svg_inherited_flags._color Rendering
205 || svg_inherited_flags._imageRendering != other->svg_inherited_flags._im ageRendering 203 || svg_inherited_flags._imageRendering != other->svg_inherited_flags._im ageRendering
206 || svg_inherited_flags._shapeRendering != other->svg_inherited_flags._sh apeRendering 204 || svg_inherited_flags._shapeRendering != other->svg_inherited_flags._sh apeRendering
207 || svg_inherited_flags._clipRule != other->svg_inherited_flags._clipRule 205 || svg_inherited_flags._clipRule != other->svg_inherited_flags._clipRule
208 || svg_inherited_flags._fillRule != other->svg_inherited_flags._fillRule 206 || svg_inherited_flags._fillRule != other->svg_inherited_flags._fillRule
209 || svg_inherited_flags._colorInterpolation != other->svg_inherited_flags ._colorInterpolation 207 || svg_inherited_flags._colorInterpolation != other->svg_inherited_flags ._colorInterpolation
210 || svg_inherited_flags._colorInterpolationFilters != other->svg_inherite d_flags._colorInterpolationFilters) 208 || svg_inherited_flags._colorInterpolationFilters != other->svg_inherite d_flags._colorInterpolationFilters)
211 return StyleDifferenceRepaint; 209 return StyleDifferenceRepaint;
212 210
213 // FIXME: vector-effect is not taken into account in the layout-phase. Once this is fixed, we should relayout here. 211 // FIXME: vector-effect is not taken into account in the layout-phase. Once this is fixed, we should relayout here.
214 if (svg_noninherited_flags.f._vectorEffect != other->svg_noninherited_flags. f._vectorEffect) 212 if (svg_noninherited_flags.f._vectorEffect != other->svg_noninherited_flags. f._vectorEffect)
215 return StyleDifferenceRepaint; 213 return StyleDifferenceRepaint;
216 214
217 return StyleDifferenceEqual; 215 return StyleDifferenceEqual;
218 } 216 }
219 217
220 } 218 }
221 219
222 #endif // ENABLE(SVG) 220 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/style/SVGRenderStyle.h ('k') | Source/WebCore/rendering/style/SVGRenderStyleDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698