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

Side by Side Diff: Source/core/rendering/style/SVGRenderStyle.h

Issue 121173004: Make calls to AtomicString(const String&) explicit in svg/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take feedback into consideration Created 6 years, 11 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 Rob Buis <buis@kde.org> 3 2004, 2005 Rob Buis <buis@kde.org>
4 Copyright (C) 2005, 2006 Apple Computer, Inc. 4 Copyright (C) 2005, 2006 Apple Computer, Inc.
5 Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 static SVGPaint::SVGPaintType initialStrokePaintType() { return SVGPaint::SV G_PAINTTYPE_NONE; } 79 static SVGPaint::SVGPaintType initialStrokePaintType() { return SVGPaint::SV G_PAINTTYPE_NONE; }
80 static Color initialStrokePaintColor() { return Color(); } 80 static Color initialStrokePaintColor() { return Color(); }
81 static String initialStrokePaintUri() { return String(); } 81 static String initialStrokePaintUri() { return String(); }
82 static Vector<SVGLength> initialStrokeDashArray() { return Vector<SVGLength> (); } 82 static Vector<SVGLength> initialStrokeDashArray() { return Vector<SVGLength> (); }
83 static float initialStrokeMiterLimit() { return 4; } 83 static float initialStrokeMiterLimit() { return 4; }
84 static float initialStopOpacity() { return 1; } 84 static float initialStopOpacity() { return 1; }
85 static Color initialStopColor() { return Color(0, 0, 0); } 85 static Color initialStopColor() { return Color(0, 0, 0); }
86 static float initialFloodOpacity() { return 1; } 86 static float initialFloodOpacity() { return 1; }
87 static Color initialFloodColor() { return Color(0, 0, 0); } 87 static Color initialFloodColor() { return Color(0, 0, 0); }
88 static Color initialLightingColor() { return Color(255, 255, 255); } 88 static Color initialLightingColor() { return Color(255, 255, 255); }
89 static String initialClipperResource() { return String(); } 89 static const AtomicString& initialClipperResource() { return nullAtom; }
90 static String initialFilterResource() { return String(); } 90 static const AtomicString& initialFilterResource() { return nullAtom; }
91 static String initialMaskerResource() { return String(); } 91 static const AtomicString& initialMaskerResource() { return nullAtom; }
92 static String initialMarkerStartResource() { return String(); } 92 static String initialMarkerStartResource() { return String(); }
93 static String initialMarkerMidResource() { return String(); } 93 static String initialMarkerMidResource() { return String(); }
94 static String initialMarkerEndResource() { return String(); } 94 static String initialMarkerEndResource() { return String(); }
95 static EMaskType initialMaskType() { return MT_LUMINANCE; } 95 static EMaskType initialMaskType() { return MT_LUMINANCE; }
96 static EPaintOrder initialPaintOrder() { return PO_NORMAL; } 96 static EPaintOrder initialPaintOrder() { return PO_NORMAL; }
97 97
98 static SVGLength initialBaselineShiftValue() 98 static SVGLength initialBaselineShiftValue()
99 { 99 {
100 SVGLength length; 100 SVGLength length;
101 length.newValueSpecifiedUnits(LengthTypeNumber, 0, ASSERT_NO_EXCEPTION); 101 length.newValueSpecifiedUnits(LengthTypeNumber, 0, ASSERT_NO_EXCEPTION);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 misc.access()->lightingColor = obj; 256 misc.access()->lightingColor = obj;
257 } 257 }
258 258
259 void setBaselineShiftValue(const SVGLength& obj) 259 void setBaselineShiftValue(const SVGLength& obj)
260 { 260 {
261 if (!(misc->baselineShiftValue == obj)) 261 if (!(misc->baselineShiftValue == obj))
262 misc.access()->baselineShiftValue = obj; 262 misc.access()->baselineShiftValue = obj;
263 } 263 }
264 264
265 // Setters for non-inherited resources 265 // Setters for non-inherited resources
266 void setClipperResource(const String& obj) 266 void setClipperResource(const AtomicString& obj)
267 { 267 {
268 if (!(resources->clipper == obj)) 268 if (!(resources->clipper == obj))
269 resources.access()->clipper = obj; 269 resources.access()->clipper = obj;
270 } 270 }
271 271
272 void setFilterResource(const String& obj) 272 void setFilterResource(const AtomicString& obj)
273 { 273 {
274 if (!(resources->filter == obj)) 274 if (!(resources->filter == obj))
275 resources.access()->filter = obj; 275 resources.access()->filter = obj;
276 } 276 }
277 277
278 void setMaskerResource(const String& obj) 278 void setMaskerResource(const AtomicString& obj)
279 { 279 {
280 if (!(resources->masker == obj)) 280 if (!(resources->masker == obj))
281 resources.access()->masker = obj; 281 resources.access()->masker = obj;
282 } 282 }
283 283
284 // Setters for inherited resources 284 // Setters for inherited resources
285 void setMarkerStartResource(const String& obj) 285 void setMarkerStartResource(const String& obj)
286 { 286 {
287 if (!(inheritedResources->markerStart == obj)) 287 if (!(inheritedResources->markerStart == obj))
288 inheritedResources.access()->markerStart = obj; 288 inheritedResources.access()->markerStart = obj;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 float strokeMiterLimit() const { return stroke->miterLimit; } 330 float strokeMiterLimit() const { return stroke->miterLimit; }
331 SVGLength strokeWidth() const { return stroke->width; } 331 SVGLength strokeWidth() const { return stroke->width; }
332 SVGLength strokeDashOffset() const { return stroke->dashOffset; } 332 SVGLength strokeDashOffset() const { return stroke->dashOffset; }
333 SVGLength kerning() const { return text->kerning; } 333 SVGLength kerning() const { return text->kerning; }
334 float stopOpacity() const { return stops->opacity; } 334 float stopOpacity() const { return stops->opacity; }
335 const Color& stopColor() const { return stops->color; } 335 const Color& stopColor() const { return stops->color; }
336 float floodOpacity() const { return misc->floodOpacity; } 336 float floodOpacity() const { return misc->floodOpacity; }
337 const Color& floodColor() const { return misc->floodColor; } 337 const Color& floodColor() const { return misc->floodColor; }
338 const Color& lightingColor() const { return misc->lightingColor; } 338 const Color& lightingColor() const { return misc->lightingColor; }
339 SVGLength baselineShiftValue() const { return misc->baselineShiftValue; } 339 SVGLength baselineShiftValue() const { return misc->baselineShiftValue; }
340 String clipperResource() const { return resources->clipper; } 340 const AtomicString& clipperResource() const { return resources->clipper; }
341 String filterResource() const { return resources->filter; } 341 const AtomicString& filterResource() const { return resources->filter; }
342 String maskerResource() const { return resources->masker; } 342 const AtomicString& maskerResource() const { return resources->masker; }
343 String markerStartResource() const { return inheritedResources->markerStart; } 343 String markerStartResource() const { return inheritedResources->markerStart; }
344 String markerMidResource() const { return inheritedResources->markerMid; } 344 String markerMidResource() const { return inheritedResources->markerMid; }
345 String markerEndResource() const { return inheritedResources->markerEnd; } 345 String markerEndResource() const { return inheritedResources->markerEnd; }
346 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; } 346 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; }
347 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags._p aintOrder; } 347 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags._p aintOrder; }
348 EPaintOrderType paintOrderType(unsigned index) const; 348 EPaintOrderType paintOrderType(unsigned index) const;
349 349
350 const SVGPaint::SVGPaintType& visitedLinkFillPaintType() const { return fill ->visitedLinkPaintType; } 350 const SVGPaint::SVGPaintType& visitedLinkFillPaintType() const { return fill ->visitedLinkPaintType; }
351 const Color& visitedLinkFillPaintColor() const { return fill->visitedLinkPai ntColor; } 351 const Color& visitedLinkFillPaintColor() const { return fill->visitedLinkPai ntColor; }
352 const String& visitedLinkFillPaintUri() const { return fill->visitedLinkPain tUri; } 352 const String& visitedLinkFillPaintUri() const { return fill->visitedLinkPain tUri; }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 svg_noninherited_flags.f._baselineShift = initialBaselineShift(); 464 svg_noninherited_flags.f._baselineShift = initialBaselineShift();
465 svg_noninherited_flags.f._vectorEffect = initialVectorEffect(); 465 svg_noninherited_flags.f._vectorEffect = initialVectorEffect();
466 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); 466 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering();
467 svg_noninherited_flags.f.maskType = initialMaskType(); 467 svg_noninherited_flags.f.maskType = initialMaskType();
468 } 468 }
469 }; 469 };
470 470
471 } // namespace WebCore 471 } // namespace WebCore
472 472
473 #endif // SVGRenderStyle_h 473 #endif // SVGRenderStyle_h
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.cpp ('k') | Source/core/rendering/style/SVGRenderStyleDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698