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

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

Issue 980233002: [svg2] Make 'cx', 'cy' and 'r' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 9 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 static Color initialFloodColor() { return Color(0, 0, 0); } 84 static Color initialFloodColor() { return Color(0, 0, 0); }
85 static Color initialLightingColor() { return Color(255, 255, 255); } 85 static Color initialLightingColor() { return Color(255, 255, 255); }
86 static const AtomicString& initialClipperResource() { return nullAtom; } 86 static const AtomicString& initialClipperResource() { return nullAtom; }
87 static const AtomicString& initialFilterResource() { return nullAtom; } 87 static const AtomicString& initialFilterResource() { return nullAtom; }
88 static const AtomicString& initialMaskerResource() { return nullAtom; } 88 static const AtomicString& initialMaskerResource() { return nullAtom; }
89 static const AtomicString& initialMarkerStartResource() { return nullAtom; } 89 static const AtomicString& initialMarkerStartResource() { return nullAtom; }
90 static const AtomicString& initialMarkerMidResource() { return nullAtom; } 90 static const AtomicString& initialMarkerMidResource() { return nullAtom; }
91 static const AtomicString& initialMarkerEndResource() { return nullAtom; } 91 static const AtomicString& initialMarkerEndResource() { return nullAtom; }
92 static EMaskType initialMaskType() { return MT_LUMINANCE; } 92 static EMaskType initialMaskType() { return MT_LUMINANCE; }
93 static EPaintOrder initialPaintOrder() { return PO_NORMAL; } 93 static EPaintOrder initialPaintOrder() { return PO_NORMAL; }
94 static Length initialCx() { return Length(Fixed); }
95 static Length initialCy() { return Length(Fixed); }
94 static Length initialX() { return Length(Fixed); } 96 static Length initialX() { return Length(Fixed); }
95 static Length initialY() { return Length(Fixed); } 97 static Length initialY() { return Length(Fixed); }
98 static Length initialR() { return Length(Fixed); }
96 static Length initialRx() { return Length(Fixed); } 99 static Length initialRx() { return Length(Fixed); }
97 static Length initialRy() { return Length(Fixed); } 100 static Length initialRy() { return Length(Fixed); }
98 101
99 static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeWidth() 102 static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeWidth()
100 { 103 {
101 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(); 104 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create();
102 length->newValueSpecifiedUnits(LengthTypeNumber, 1); 105 length->newValueSpecifiedUnits(LengthTypeNumber, 1);
103 return length.release(); 106 return length.release();
104 } 107 }
105 108
(...skipping 10 matching lines...) Expand all
116 void setColorRendering(EColorRendering val) { svg_inherited_flags._colorRend ering = val; } 119 void setColorRendering(EColorRendering val) { svg_inherited_flags._colorRend ering = val; }
117 void setFillRule(WindRule val) { svg_inherited_flags._fillRule = val; } 120 void setFillRule(WindRule val) { svg_inherited_flags._fillRule = val; }
118 void setJoinStyle(LineJoin val) { svg_inherited_flags._joinStyle = val; } 121 void setJoinStyle(LineJoin val) { svg_inherited_flags._joinStyle = val; }
119 void setShapeRendering(EShapeRendering val) { svg_inherited_flags._shapeRend ering = val; } 122 void setShapeRendering(EShapeRendering val) { svg_inherited_flags._shapeRend ering = val; }
120 void setTextAnchor(ETextAnchor val) { svg_inherited_flags._textAnchor = val; } 123 void setTextAnchor(ETextAnchor val) { svg_inherited_flags._textAnchor = val; }
121 void setWritingMode(SVGWritingMode val) { svg_inherited_flags._writingMode = val; } 124 void setWritingMode(SVGWritingMode val) { svg_inherited_flags._writingMode = val; }
122 void setGlyphOrientationHorizontal(EGlyphOrientation val) { svg_inherited_fl ags._glyphOrientationHorizontal = val; } 125 void setGlyphOrientationHorizontal(EGlyphOrientation val) { svg_inherited_fl ags._glyphOrientationHorizontal = val; }
123 void setGlyphOrientationVertical(EGlyphOrientation val) { svg_inherited_flag s._glyphOrientationVertical = val; } 126 void setGlyphOrientationVertical(EGlyphOrientation val) { svg_inherited_flag s._glyphOrientationVertical = val; }
124 void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; } 127 void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; }
125 void setPaintOrder(EPaintOrder val) { svg_inherited_flags._paintOrder = (int )val; } 128 void setPaintOrder(EPaintOrder val) { svg_inherited_flags._paintOrder = (int )val; }
129 void setCx(const Length& obj)
130 {
131 if (!(layout->cx == obj))
132 layout.access()->cx = obj;
133 }
134 void setCy(const Length& obj)
135 {
136 if (!(layout->cy == obj))
137 layout.access()->cy = obj;
138 }
126 void setX(const Length& obj) 139 void setX(const Length& obj)
127 { 140 {
128 if (!(layout->x == obj)) 141 if (!(layout->x == obj))
129 layout.access()->x = obj; 142 layout.access()->x = obj;
130 } 143 }
131 void setY(const Length& obj) 144 void setY(const Length& obj)
132 { 145 {
133 if (!(layout->y == obj)) 146 if (!(layout->y == obj))
134 layout.access()->y = obj; 147 layout.access()->y = obj;
135 } 148 }
149 void setR(const Length& obj)
150 {
151 if (!(layout->r == obj))
152 layout.access()->r = obj;
153 }
136 void setRx(const Length& obj) 154 void setRx(const Length& obj)
137 { 155 {
138 if (!(layout->rx == obj)) 156 if (!(layout->rx == obj))
139 layout.access()->rx = obj; 157 layout.access()->rx = obj;
140 } 158 }
141 void setRy(const Length& obj) 159 void setRy(const Length& obj)
142 { 160 {
143 if (!(layout->ry == obj)) 161 if (!(layout->ry == obj))
144 layout.access()->ry = obj; 162 layout.access()->ry = obj;
145 } 163 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 SVGDashArray* strokeDashArray() const { return stroke->dashArray.get(); } 340 SVGDashArray* strokeDashArray() const { return stroke->dashArray.get(); }
323 float strokeMiterLimit() const { return stroke->miterLimit; } 341 float strokeMiterLimit() const { return stroke->miterLimit; }
324 SVGLength* strokeWidth() const { return stroke->width.get(); } 342 SVGLength* strokeWidth() const { return stroke->width.get(); }
325 const Length& strokeDashOffset() const { return stroke->dashOffset; } 343 const Length& strokeDashOffset() const { return stroke->dashOffset; }
326 float stopOpacity() const { return stops->opacity; } 344 float stopOpacity() const { return stops->opacity; }
327 const Color& stopColor() const { return stops->color; } 345 const Color& stopColor() const { return stops->color; }
328 float floodOpacity() const { return misc->floodOpacity; } 346 float floodOpacity() const { return misc->floodOpacity; }
329 const Color& floodColor() const { return misc->floodColor; } 347 const Color& floodColor() const { return misc->floodColor; }
330 const Color& lightingColor() const { return misc->lightingColor; } 348 const Color& lightingColor() const { return misc->lightingColor; }
331 const Length& baselineShiftValue() const { return misc->baselineShiftValue; } 349 const Length& baselineShiftValue() const { return misc->baselineShiftValue; }
350 const Length& cx() const { return layout->cx; }
351 const Length& cy() const { return layout->cy; }
332 const Length& x() const { return layout->x; } 352 const Length& x() const { return layout->x; }
333 const Length& y() const { return layout->y; } 353 const Length& y() const { return layout->y; }
354 const Length& r() const { return layout->r; }
334 const Length& rx() const { return layout->rx; } 355 const Length& rx() const { return layout->rx; }
335 const Length& ry() const { return layout->ry; } 356 const Length& ry() const { return layout->ry; }
336 const AtomicString& clipperResource() const { return resources->clipper; } 357 const AtomicString& clipperResource() const { return resources->clipper; }
337 const AtomicString& filterResource() const { return resources->filter; } 358 const AtomicString& filterResource() const { return resources->filter; }
338 const AtomicString& maskerResource() const { return resources->masker; } 359 const AtomicString& maskerResource() const { return resources->masker; }
339 const AtomicString& markerStartResource() const { return inheritedResources- >markerStart; } 360 const AtomicString& markerStartResource() const { return inheritedResources- >markerStart; }
340 const AtomicString& markerMidResource() const { return inheritedResources->m arkerMid; } 361 const AtomicString& markerMidResource() const { return inheritedResources->m arkerMid; }
341 const AtomicString& markerEndResource() const { return inheritedResources->m arkerEnd; } 362 const AtomicString& markerEndResource() const { return inheritedResources->m arkerEnd; }
342 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; } 363 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; }
343 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags._p aintOrder; } 364 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags._p aintOrder; }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 svg_noninherited_flags.f._baselineShift = initialBaselineShift(); 484 svg_noninherited_flags.f._baselineShift = initialBaselineShift();
464 svg_noninherited_flags.f._vectorEffect = initialVectorEffect(); 485 svg_noninherited_flags.f._vectorEffect = initialVectorEffect();
465 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); 486 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering();
466 svg_noninherited_flags.f.maskType = initialMaskType(); 487 svg_noninherited_flags.f.maskType = initialMaskType();
467 } 488 }
468 }; 489 };
469 490
470 } // namespace blink 491 } // namespace blink
471 492
472 #endif // SVGLayoutStyle_h 493 #endif // SVGLayoutStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698