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

Side by Side Diff: third_party/WebKit/Source/core/style/SVGComputedStyleDefs.cpp

Issue 1439793003: SVG: Promote d to a property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CSSPropertyParser Created 5 years 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, 2007 Rob Buis <buis@kde.org> 3 2004, 2005, 2007 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 10 matching lines...) Expand all
21 21
22 You should have received a copy of the GNU Library General Public License 22 You should have received a copy of the GNU Library General Public License
23 along with this library; see the file COPYING.LIB. If not, write to 23 along with this library; see the file COPYING.LIB. If not, write to
24 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 24 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 Boston, MA 02110-1301, USA. 25 Boston, MA 02110-1301, USA.
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 #include "core/style/SVGComputedStyleDefs.h" 29 #include "core/style/SVGComputedStyleDefs.h"
30 30
31 #include "core/style/DataEquivalency.h"
31 #include "core/style/SVGComputedStyle.h" 32 #include "core/style/SVGComputedStyle.h"
32 33
33 namespace blink { 34 namespace blink {
34 35
35 StyleFillData::StyleFillData() 36 StyleFillData::StyleFillData()
36 : opacity(SVGComputedStyle::initialFillOpacity()) 37 : opacity(SVGComputedStyle::initialFillOpacity())
37 , paintType(SVGComputedStyle::initialFillPaintType()) 38 , paintType(SVGComputedStyle::initialFillPaintType())
38 , paintColor(SVGComputedStyle::initialFillPaintColor()) 39 , paintColor(SVGComputedStyle::initialFillPaintColor())
39 , paintUri(SVGComputedStyle::initialFillPaintUri()) 40 , paintUri(SVGComputedStyle::initialFillPaintUri())
40 , visitedLinkPaintType(SVGComputedStyle::initialStrokePaintType()) 41 , visitedLinkPaintType(SVGComputedStyle::initialStrokePaintType())
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 195 }
195 196
196 bool StyleInheritedResourceData::operator==(const StyleInheritedResourceData& ot her) const 197 bool StyleInheritedResourceData::operator==(const StyleInheritedResourceData& ot her) const
197 { 198 {
198 return markerStart == other.markerStart 199 return markerStart == other.markerStart
199 && markerMid == other.markerMid 200 && markerMid == other.markerMid
200 && markerEnd == other.markerEnd; 201 && markerEnd == other.markerEnd;
201 } 202 }
202 203
203 StyleLayoutData::StyleLayoutData() 204 StyleLayoutData::StyleLayoutData()
204 : cx(SVGComputedStyle::initialCx()) 205 : d()
206 , cx(SVGComputedStyle::initialCx())
205 , cy(SVGComputedStyle::initialCy()) 207 , cy(SVGComputedStyle::initialCy())
206 , x(SVGComputedStyle::initialX()) 208 , x(SVGComputedStyle::initialX())
207 , y(SVGComputedStyle::initialY()) 209 , y(SVGComputedStyle::initialY())
208 , r(SVGComputedStyle::initialR()) 210 , r(SVGComputedStyle::initialR())
209 , rx(SVGComputedStyle::initialRx()) 211 , rx(SVGComputedStyle::initialRx())
210 , ry(SVGComputedStyle::initialRy()) 212 , ry(SVGComputedStyle::initialRy())
211 { 213 {
212 } 214 }
213 215
214 inline StyleLayoutData::StyleLayoutData(const StyleLayoutData& other) 216 inline StyleLayoutData::StyleLayoutData(const StyleLayoutData& other)
215 : RefCounted<StyleLayoutData>() 217 : RefCounted<StyleLayoutData>()
218 , d()
216 , cx(other.cx) 219 , cx(other.cx)
217 , cy(other.cy) 220 , cy(other.cy)
218 , x(other.x) 221 , x(other.x)
219 , y(other.y) 222 , y(other.y)
220 , r(other.r) 223 , r(other.r)
221 , rx(other.rx) 224 , rx(other.rx)
222 , ry(other.ry) 225 , ry(other.ry)
223 { 226 {
227 if (other.d)
228 d = other.d->copy();
224 } 229 }
225 230
226 PassRefPtr<StyleLayoutData> StyleLayoutData::copy() const 231 PassRefPtr<StyleLayoutData> StyleLayoutData::copy() const
227 { 232 {
228 return adoptRef(new StyleLayoutData(*this)); 233 return adoptRef(new StyleLayoutData(*this));
229 } 234 }
230 235
231 bool StyleLayoutData::operator==(const StyleLayoutData& other) const 236 bool StyleLayoutData::operator==(const StyleLayoutData& other) const
232 { 237 {
233 return x == other.x 238 return x == other.x
234 && y == other.y 239 && y == other.y
235 && r == other.r 240 && r == other.r
236 && rx == other.rx 241 && rx == other.rx
237 && ry == other.ry 242 && ry == other.ry
238 && cx == other.cx 243 && cx == other.cx
239 && cy == other.cy; 244 && cy == other.cy
245 && dataEquivalent(d, other.d);
240 } 246 }
241 247
242 } 248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698