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

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
« no previous file with comments | « Source/core/layout/style/LayoutStyle.h ('k') | Source/core/layout/style/SVGLayoutStyle.cpp » ('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 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 static Color initialFloodColor() { return Color(0, 0, 0); } 85 static Color initialFloodColor() { return Color(0, 0, 0); }
86 static Color initialLightingColor() { return Color(255, 255, 255); } 86 static Color initialLightingColor() { return Color(255, 255, 255); }
87 static const AtomicString& initialClipperResource() { return nullAtom; } 87 static const AtomicString& initialClipperResource() { return nullAtom; }
88 static const AtomicString& initialFilterResource() { return nullAtom; } 88 static const AtomicString& initialFilterResource() { return nullAtom; }
89 static const AtomicString& initialMaskerResource() { return nullAtom; } 89 static const AtomicString& initialMaskerResource() { return nullAtom; }
90 static const AtomicString& initialMarkerStartResource() { return nullAtom; } 90 static const AtomicString& initialMarkerStartResource() { return nullAtom; }
91 static const AtomicString& initialMarkerMidResource() { return nullAtom; } 91 static const AtomicString& initialMarkerMidResource() { return nullAtom; }
92 static const AtomicString& initialMarkerEndResource() { return nullAtom; } 92 static const AtomicString& initialMarkerEndResource() { return nullAtom; }
93 static EMaskType initialMaskType() { return MT_LUMINANCE; } 93 static EMaskType initialMaskType() { return MT_LUMINANCE; }
94 static EPaintOrder initialPaintOrder() { return PO_NORMAL; } 94 static EPaintOrder initialPaintOrder() { return PO_NORMAL; }
95 static Length initialCx() { return Length(Fixed); }
96 static Length initialCy() { return Length(Fixed); }
95 static Length initialX() { return Length(Fixed); } 97 static Length initialX() { return Length(Fixed); }
96 static Length initialY() { return Length(Fixed); } 98 static Length initialY() { return Length(Fixed); }
99 static Length initialR() { return Length(Fixed); }
97 static Length initialRx() { return Length(Fixed); } 100 static Length initialRx() { return Length(Fixed); }
98 static Length initialRy() { return Length(Fixed); } 101 static Length initialRy() { return Length(Fixed); }
99 102
100 // SVG CSS Property setters 103 // SVG CSS Property setters
101 void setAlignmentBaseline(EAlignmentBaseline val) { svg_noninherited_flags.f ._alignmentBaseline = val; } 104 void setAlignmentBaseline(EAlignmentBaseline val) { svg_noninherited_flags.f ._alignmentBaseline = val; }
102 void setDominantBaseline(EDominantBaseline val) { svg_noninherited_flags.f._ dominantBaseline = val; } 105 void setDominantBaseline(EDominantBaseline val) { svg_noninherited_flags.f._ dominantBaseline = val; }
103 void setBaselineShift(EBaselineShift val) { svg_noninherited_flags.f._baseli neShift = val; } 106 void setBaselineShift(EBaselineShift val) { svg_noninherited_flags.f._baseli neShift = val; }
104 void setVectorEffect(EVectorEffect val) { svg_noninherited_flags.f._vectorEf fect = val; } 107 void setVectorEffect(EVectorEffect val) { svg_noninherited_flags.f._vectorEf fect = val; }
105 void setBufferedRendering(EBufferedRendering val) { svg_noninherited_flags.f .bufferedRendering = val; } 108 void setBufferedRendering(EBufferedRendering val) { svg_noninherited_flags.f .bufferedRendering = val; }
106 void setCapStyle(LineCap val) { svg_inherited_flags._capStyle = val; } 109 void setCapStyle(LineCap val) { svg_inherited_flags._capStyle = val; }
107 void setClipRule(WindRule val) { svg_inherited_flags._clipRule = val; } 110 void setClipRule(WindRule val) { svg_inherited_flags._clipRule = val; }
108 void setColorInterpolation(EColorInterpolation val) { svg_inherited_flags._c olorInterpolation = val; } 111 void setColorInterpolation(EColorInterpolation val) { svg_inherited_flags._c olorInterpolation = val; }
109 void setColorInterpolationFilters(EColorInterpolation val) { svg_inherited_f lags._colorInterpolationFilters = val; } 112 void setColorInterpolationFilters(EColorInterpolation val) { svg_inherited_f lags._colorInterpolationFilters = val; }
110 void setColorRendering(EColorRendering val) { svg_inherited_flags._colorRend ering = val; } 113 void setColorRendering(EColorRendering val) { svg_inherited_flags._colorRend ering = val; }
111 void setFillRule(WindRule val) { svg_inherited_flags._fillRule = val; } 114 void setFillRule(WindRule val) { svg_inherited_flags._fillRule = val; }
112 void setJoinStyle(LineJoin val) { svg_inherited_flags._joinStyle = val; } 115 void setJoinStyle(LineJoin val) { svg_inherited_flags._joinStyle = val; }
113 void setShapeRendering(EShapeRendering val) { svg_inherited_flags._shapeRend ering = val; } 116 void setShapeRendering(EShapeRendering val) { svg_inherited_flags._shapeRend ering = val; }
114 void setTextAnchor(ETextAnchor val) { svg_inherited_flags._textAnchor = val; } 117 void setTextAnchor(ETextAnchor val) { svg_inherited_flags._textAnchor = val; }
115 void setWritingMode(SVGWritingMode val) { svg_inherited_flags._writingMode = val; } 118 void setWritingMode(SVGWritingMode val) { svg_inherited_flags._writingMode = val; }
116 void setGlyphOrientationHorizontal(EGlyphOrientation val) { svg_inherited_fl ags._glyphOrientationHorizontal = val; } 119 void setGlyphOrientationHorizontal(EGlyphOrientation val) { svg_inherited_fl ags._glyphOrientationHorizontal = val; }
117 void setGlyphOrientationVertical(EGlyphOrientation val) { svg_inherited_flag s._glyphOrientationVertical = val; } 120 void setGlyphOrientationVertical(EGlyphOrientation val) { svg_inherited_flag s._glyphOrientationVertical = val; }
118 void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; } 121 void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; }
119 void setPaintOrder(EPaintOrder val) { svg_inherited_flags._paintOrder = (int )val; } 122 void setPaintOrder(EPaintOrder val) { svg_inherited_flags._paintOrder = (int )val; }
123 void setCx(const Length& obj)
124 {
125 if (!(layout->cx == obj))
126 layout.access()->cx = obj;
127 }
128 void setCy(const Length& obj)
129 {
130 if (!(layout->cy == obj))
131 layout.access()->cy = obj;
132 }
120 void setX(const Length& obj) 133 void setX(const Length& obj)
121 { 134 {
122 if (!(layout->x == obj)) 135 if (!(layout->x == obj))
123 layout.access()->x = obj; 136 layout.access()->x = obj;
124 } 137 }
125 void setY(const Length& obj) 138 void setY(const Length& obj)
126 { 139 {
127 if (!(layout->y == obj)) 140 if (!(layout->y == obj))
128 layout.access()->y = obj; 141 layout.access()->y = obj;
129 } 142 }
143 void setR(const Length& obj)
144 {
145 if (!(layout->r == obj))
146 layout.access()->r = obj;
147 }
130 void setRx(const Length& obj) 148 void setRx(const Length& obj)
131 { 149 {
132 if (!(layout->rx == obj)) 150 if (!(layout->rx == obj))
133 layout.access()->rx = obj; 151 layout.access()->rx = obj;
134 } 152 }
135 void setRy(const Length& obj) 153 void setRy(const Length& obj)
136 { 154 {
137 if (!(layout->ry == obj)) 155 if (!(layout->ry == obj))
138 layout.access()->ry = obj; 156 layout.access()->ry = obj;
139 } 157 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 SVGDashArray* strokeDashArray() const { return stroke->dashArray.get(); } 334 SVGDashArray* strokeDashArray() const { return stroke->dashArray.get(); }
317 float strokeMiterLimit() const { return stroke->miterLimit; } 335 float strokeMiterLimit() const { return stroke->miterLimit; }
318 const UnzoomedLength& strokeWidth() const { return stroke->width; } 336 const UnzoomedLength& strokeWidth() const { return stroke->width; }
319 const Length& strokeDashOffset() const { return stroke->dashOffset; } 337 const Length& strokeDashOffset() const { return stroke->dashOffset; }
320 float stopOpacity() const { return stops->opacity; } 338 float stopOpacity() const { return stops->opacity; }
321 const Color& stopColor() const { return stops->color; } 339 const Color& stopColor() const { return stops->color; }
322 float floodOpacity() const { return misc->floodOpacity; } 340 float floodOpacity() const { return misc->floodOpacity; }
323 const Color& floodColor() const { return misc->floodColor; } 341 const Color& floodColor() const { return misc->floodColor; }
324 const Color& lightingColor() const { return misc->lightingColor; } 342 const Color& lightingColor() const { return misc->lightingColor; }
325 const Length& baselineShiftValue() const { return misc->baselineShiftValue; } 343 const Length& baselineShiftValue() const { return misc->baselineShiftValue; }
344 const Length& cx() const { return layout->cx; }
345 const Length& cy() const { return layout->cy; }
326 const Length& x() const { return layout->x; } 346 const Length& x() const { return layout->x; }
327 const Length& y() const { return layout->y; } 347 const Length& y() const { return layout->y; }
348 const Length& r() const { return layout->r; }
328 const Length& rx() const { return layout->rx; } 349 const Length& rx() const { return layout->rx; }
329 const Length& ry() const { return layout->ry; } 350 const Length& ry() const { return layout->ry; }
330 const AtomicString& clipperResource() const { return resources->clipper; } 351 const AtomicString& clipperResource() const { return resources->clipper; }
331 const AtomicString& filterResource() const { return resources->filter; } 352 const AtomicString& filterResource() const { return resources->filter; }
332 const AtomicString& maskerResource() const { return resources->masker; } 353 const AtomicString& maskerResource() const { return resources->masker; }
333 const AtomicString& markerStartResource() const { return inheritedResources- >markerStart; } 354 const AtomicString& markerStartResource() const { return inheritedResources- >markerStart; }
334 const AtomicString& markerMidResource() const { return inheritedResources->m arkerMid; } 355 const AtomicString& markerMidResource() const { return inheritedResources->m arkerMid; }
335 const AtomicString& markerEndResource() const { return inheritedResources->m arkerEnd; } 356 const AtomicString& markerEndResource() const { return inheritedResources->m arkerEnd; }
336 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; } 357 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; }
337 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags._p aintOrder; } 358 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags._p aintOrder; }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 svg_noninherited_flags.f._baselineShift = initialBaselineShift(); 478 svg_noninherited_flags.f._baselineShift = initialBaselineShift();
458 svg_noninherited_flags.f._vectorEffect = initialVectorEffect(); 479 svg_noninherited_flags.f._vectorEffect = initialVectorEffect();
459 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); 480 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering();
460 svg_noninherited_flags.f.maskType = initialMaskType(); 481 svg_noninherited_flags.f.maskType = initialMaskType();
461 } 482 }
462 }; 483 };
463 484
464 } // namespace blink 485 } // namespace blink
465 486
466 #endif // SVGLayoutStyle_h 487 #endif // SVGLayoutStyle_h
OLDNEW
« no previous file with comments | « Source/core/layout/style/LayoutStyle.h ('k') | Source/core/layout/style/SVGLayoutStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698