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

Side by Side Diff: Source/core/layout/style/SVGLayoutStyle.cpp

Issue 927583002: Moving RenderSVG* files from rendering/ to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/layout/LayoutTreeAsText.cpp ('k') | Source/core/layout/svg/LayoutSVGEllipse.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) 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 return styleDifference; 129 return styleDifference;
130 } 130 }
131 131
132 bool SVGLayoutStyle::diffNeedsLayoutAndPaintInvalidation(const SVGLayoutStyle* o ther) const 132 bool SVGLayoutStyle::diffNeedsLayoutAndPaintInvalidation(const SVGLayoutStyle* o ther) const
133 { 133 {
134 // If resources change, we need a relayout, as the presence of resources inf luences the paint invalidation rect. 134 // If resources change, we need a relayout, as the presence of resources inf luences the paint invalidation rect.
135 if (resources != other->resources) 135 if (resources != other->resources)
136 return true; 136 return true;
137 137
138 // If markers change, we need a relayout, as marker boundaries are cached in RenderSVGPath. 138 // If markers change, we need a relayout, as marker boundaries are cached in LayoutSVGPath.
139 if (inheritedResources != other->inheritedResources) 139 if (inheritedResources != other->inheritedResources)
140 return true; 140 return true;
141 141
142 // All text related properties influence layout. 142 // All text related properties influence layout.
143 if (svg_inherited_flags._textAnchor != other->svg_inherited_flags._textAncho r 143 if (svg_inherited_flags._textAnchor != other->svg_inherited_flags._textAncho r
144 || svg_inherited_flags._writingMode != other->svg_inherited_flags._writi ngMode 144 || svg_inherited_flags._writingMode != other->svg_inherited_flags._writi ngMode
145 || svg_inherited_flags._glyphOrientationHorizontal != other->svg_inherit ed_flags._glyphOrientationHorizontal 145 || svg_inherited_flags._glyphOrientationHorizontal != other->svg_inherit ed_flags._glyphOrientationHorizontal
146 || svg_inherited_flags._glyphOrientationVertical != other->svg_inherited _flags._glyphOrientationVertical 146 || svg_inherited_flags._glyphOrientationVertical != other->svg_inherited _flags._glyphOrientationVertical
147 || svg_noninherited_flags.f._alignmentBaseline != other->svg_noninherite d_flags.f._alignmentBaseline 147 || svg_noninherited_flags.f._alignmentBaseline != other->svg_noninherite d_flags.f._alignmentBaseline
148 || svg_noninherited_flags.f._dominantBaseline != other->svg_noninherited _flags.f._dominantBaseline 148 || svg_noninherited_flags.f._dominantBaseline != other->svg_noninherited _flags.f._dominantBaseline
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return true; 186 return true;
187 187
188 // Painting related properties only need paint invalidation. 188 // Painting related properties only need paint invalidation.
189 if (misc.get() != other->misc.get()) { 189 if (misc.get() != other->misc.get()) {
190 if (misc->floodColor != other->misc->floodColor 190 if (misc->floodColor != other->misc->floodColor
191 || misc->floodOpacity != other->misc->floodOpacity 191 || misc->floodOpacity != other->misc->floodOpacity
192 || misc->lightingColor != other->misc->lightingColor) 192 || misc->lightingColor != other->misc->lightingColor)
193 return true; 193 return true;
194 } 194 }
195 195
196 // If fill changes, we just need to issue paint invalidations. Fill boundari es are not influenced by this, only by the Path, that RenderSVGPath contains. 196 // If fill changes, we just need to issue paint invalidations. Fill boundari es are not influenced by this, only by the Path, that LayoutSVGPath contains.
197 if (fill.get() != other->fill.get()) { 197 if (fill.get() != other->fill.get()) {
198 if (fill->paintType != other->fill->paintType 198 if (fill->paintType != other->fill->paintType
199 || fill->paintColor != other->fill->paintColor 199 || fill->paintColor != other->fill->paintColor
200 || fill->paintUri != other->fill->paintUri 200 || fill->paintUri != other->fill->paintUri
201 || fill->opacity != other->fill->opacity) 201 || fill->opacity != other->fill->opacity)
202 return true; 202 return true;
203 } 203 }
204 204
205 // If gradient stops change, we just need to issue paint invalidations. Styl e updates are already handled through RenderSVGGradientSTop. 205 // If gradient stops change, we just need to issue paint invalidations. Styl e updates are already handled through RenderSVGGradientSTop.
206 if (stops != other->stops) 206 if (stops != other->stops)
(...skipping 19 matching lines...) Expand all
226 } 226 }
227 227
228 EPaintOrderType SVGLayoutStyle::paintOrderType(unsigned index) const 228 EPaintOrderType SVGLayoutStyle::paintOrderType(unsigned index) const
229 { 229 {
230 ASSERT(index < ((1 << kPaintOrderBitwidth)-1)); 230 ASSERT(index < ((1 << kPaintOrderBitwidth)-1));
231 unsigned pt = (paintOrder() >> (kPaintOrderBitwidth*index)) & ((1u << kPaint OrderBitwidth) - 1); 231 unsigned pt = (paintOrder() >> (kPaintOrderBitwidth*index)) & ((1u << kPaint OrderBitwidth) - 1);
232 return (EPaintOrderType)pt; 232 return (EPaintOrderType)pt;
233 } 233 }
234 234
235 } 235 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTreeAsText.cpp ('k') | Source/core/layout/svg/LayoutSVGEllipse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698