OLD | NEW |
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 void copyNonInheritedFrom(const SVGLayoutStyle*); | 44 void copyNonInheritedFrom(const SVGLayoutStyle*); |
45 | 45 |
46 StyleDifference diff(const SVGLayoutStyle*) const; | 46 StyleDifference diff(const SVGLayoutStyle*) const; |
47 | 47 |
48 bool operator==(const SVGLayoutStyle&) const; | 48 bool operator==(const SVGLayoutStyle&) const; |
49 bool operator!=(const SVGLayoutStyle& o) const { return !(*this == o); } | 49 bool operator!=(const SVGLayoutStyle& o) const { return !(*this == o); } |
50 | 50 |
51 // Initial values for all the properties | 51 // Initial values for all the properties |
52 static EAlignmentBaseline initialAlignmentBaseline() { return AB_AUTO; } | 52 static EAlignmentBaseline initialAlignmentBaseline() { return AB_AUTO; } |
53 static EDominantBaseline initialDominantBaseline() { return DB_AUTO; } | 53 static EDominantBaseline initialDominantBaseline() { return DB_AUTO; } |
54 static EBaselineShift initialBaselineShift() { return BS_BASELINE; } | 54 static EBaselineShift initialBaselineShift() { return BS_LENGTH; } |
| 55 static Length initialBaselineShiftValue() { return Length(Fixed); } |
55 static EVectorEffect initialVectorEffect() { return VE_NONE; } | 56 static EVectorEffect initialVectorEffect() { return VE_NONE; } |
56 static EBufferedRendering initialBufferedRendering() { return BR_AUTO; } | 57 static EBufferedRendering initialBufferedRendering() { return BR_AUTO; } |
57 static LineCap initialCapStyle() { return ButtCap; } | 58 static LineCap initialCapStyle() { return ButtCap; } |
58 static WindRule initialClipRule() { return RULE_NONZERO; } | 59 static WindRule initialClipRule() { return RULE_NONZERO; } |
59 static EColorInterpolation initialColorInterpolation() { return CI_SRGB; } | 60 static EColorInterpolation initialColorInterpolation() { return CI_SRGB; } |
60 static EColorInterpolation initialColorInterpolationFilters() { return CI_LI
NEARRGB; } | 61 static EColorInterpolation initialColorInterpolationFilters() { return CI_LI
NEARRGB; } |
61 static EColorRendering initialColorRendering() { return CR_AUTO; } | 62 static EColorRendering initialColorRendering() { return CR_AUTO; } |
62 static WindRule initialFillRule() { return RULE_NONZERO; } | 63 static WindRule initialFillRule() { return RULE_NONZERO; } |
63 static LineJoin initialJoinStyle() { return MiterJoin; } | 64 static LineJoin initialJoinStyle() { return MiterJoin; } |
64 static EShapeRendering initialShapeRendering() { return SR_AUTO; } | 65 static EShapeRendering initialShapeRendering() { return SR_AUTO; } |
(...skipping 20 matching lines...) Expand all Loading... |
85 static const AtomicString& initialFilterResource() { return nullAtom; } | 86 static const AtomicString& initialFilterResource() { return nullAtom; } |
86 static const AtomicString& initialMaskerResource() { return nullAtom; } | 87 static const AtomicString& initialMaskerResource() { return nullAtom; } |
87 static const AtomicString& initialMarkerStartResource() { return nullAtom; } | 88 static const AtomicString& initialMarkerStartResource() { return nullAtom; } |
88 static const AtomicString& initialMarkerMidResource() { return nullAtom; } | 89 static const AtomicString& initialMarkerMidResource() { return nullAtom; } |
89 static const AtomicString& initialMarkerEndResource() { return nullAtom; } | 90 static const AtomicString& initialMarkerEndResource() { return nullAtom; } |
90 static EMaskType initialMaskType() { return MT_LUMINANCE; } | 91 static EMaskType initialMaskType() { return MT_LUMINANCE; } |
91 static EPaintOrder initialPaintOrder() { return PO_NORMAL; } | 92 static EPaintOrder initialPaintOrder() { return PO_NORMAL; } |
92 static Length initialX() { return Length(Fixed); } | 93 static Length initialX() { return Length(Fixed); } |
93 static Length initialY() { return Length(Fixed); } | 94 static Length initialY() { return Length(Fixed); } |
94 | 95 |
95 static PassRefPtrWillBeRawPtr<SVGLength> initialBaselineShiftValue() | |
96 { | |
97 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(); | |
98 length->newValueSpecifiedUnits(LengthTypeNumber, 0); | |
99 return length.release(); | |
100 } | |
101 | |
102 static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeDashOffset() | 96 static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeDashOffset() |
103 { | 97 { |
104 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(); | 98 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(); |
105 length->newValueSpecifiedUnits(LengthTypeNumber, 0); | 99 length->newValueSpecifiedUnits(LengthTypeNumber, 0); |
106 return length.release(); | 100 return length.release(); |
107 } | 101 } |
108 | 102 |
109 static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeWidth() | 103 static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeWidth() |
110 { | 104 { |
111 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(); | 105 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 if (!(misc->floodColor == obj)) | 236 if (!(misc->floodColor == obj)) |
243 misc.access()->floodColor = obj; | 237 misc.access()->floodColor = obj; |
244 } | 238 } |
245 | 239 |
246 void setLightingColor(const Color& obj) | 240 void setLightingColor(const Color& obj) |
247 { | 241 { |
248 if (!(misc->lightingColor == obj)) | 242 if (!(misc->lightingColor == obj)) |
249 misc.access()->lightingColor = obj; | 243 misc.access()->lightingColor = obj; |
250 } | 244 } |
251 | 245 |
252 void setBaselineShiftValue(PassRefPtrWillBeRawPtr<SVGLength> obj) | 246 void setBaselineShiftValue(const Length& baselineShiftValue) |
253 { | 247 { |
254 if (!(misc->baselineShiftValue == obj)) | 248 if (!(misc->baselineShiftValue == baselineShiftValue)) |
255 misc.access()->baselineShiftValue = obj; | 249 misc.access()->baselineShiftValue = baselineShiftValue; |
256 } | 250 } |
257 | 251 |
258 // Setters for non-inherited resources | 252 // Setters for non-inherited resources |
259 void setClipperResource(const AtomicString& obj) | 253 void setClipperResource(const AtomicString& obj) |
260 { | 254 { |
261 if (!(resources->clipper == obj)) | 255 if (!(resources->clipper == obj)) |
262 resources.access()->clipper = obj; | 256 resources.access()->clipper = obj; |
263 } | 257 } |
264 | 258 |
265 void setFilterResource(const AtomicString& obj) | 259 void setFilterResource(const AtomicString& obj) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 const String& strokePaintUri() const { return stroke->paintUri; } | 315 const String& strokePaintUri() const { return stroke->paintUri; } |
322 SVGLengthList* strokeDashArray() const { return stroke->dashArray.get(); } | 316 SVGLengthList* strokeDashArray() const { return stroke->dashArray.get(); } |
323 float strokeMiterLimit() const { return stroke->miterLimit; } | 317 float strokeMiterLimit() const { return stroke->miterLimit; } |
324 SVGLength* strokeWidth() const { return stroke->width.get(); } | 318 SVGLength* strokeWidth() const { return stroke->width.get(); } |
325 SVGLength* strokeDashOffset() const { return stroke->dashOffset.get(); } | 319 SVGLength* strokeDashOffset() const { return stroke->dashOffset.get(); } |
326 float stopOpacity() const { return stops->opacity; } | 320 float stopOpacity() const { return stops->opacity; } |
327 const Color& stopColor() const { return stops->color; } | 321 const Color& stopColor() const { return stops->color; } |
328 float floodOpacity() const { return misc->floodOpacity; } | 322 float floodOpacity() const { return misc->floodOpacity; } |
329 const Color& floodColor() const { return misc->floodColor; } | 323 const Color& floodColor() const { return misc->floodColor; } |
330 const Color& lightingColor() const { return misc->lightingColor; } | 324 const Color& lightingColor() const { return misc->lightingColor; } |
331 SVGLength* baselineShiftValue() const { return misc->baselineShiftValue.get(
); } | 325 const Length& baselineShiftValue() const { return misc->baselineShiftValue;
} |
332 const Length& x() const { return layout->x; } | 326 const Length& x() const { return layout->x; } |
333 const Length& y() const { return layout->y; } | 327 const Length& y() const { return layout->y; } |
334 const AtomicString& clipperResource() const { return resources->clipper; } | 328 const AtomicString& clipperResource() const { return resources->clipper; } |
335 const AtomicString& filterResource() const { return resources->filter; } | 329 const AtomicString& filterResource() const { return resources->filter; } |
336 const AtomicString& maskerResource() const { return resources->masker; } | 330 const AtomicString& maskerResource() const { return resources->masker; } |
337 const AtomicString& markerStartResource() const { return inheritedResources-
>markerStart; } | 331 const AtomicString& markerStartResource() const { return inheritedResources-
>markerStart; } |
338 const AtomicString& markerMidResource() const { return inheritedResources->m
arkerMid; } | 332 const AtomicString& markerMidResource() const { return inheritedResources->m
arkerMid; } |
339 const AtomicString& markerEndResource() const { return inheritedResources->m
arkerEnd; } | 333 const AtomicString& markerEndResource() const { return inheritedResources->m
arkerEnd; } |
340 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas
kType; } | 334 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas
kType; } |
341 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags._p
aintOrder; } | 335 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags._p
aintOrder; } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 svg_noninherited_flags.f._baselineShift = initialBaselineShift(); | 455 svg_noninherited_flags.f._baselineShift = initialBaselineShift(); |
462 svg_noninherited_flags.f._vectorEffect = initialVectorEffect(); | 456 svg_noninherited_flags.f._vectorEffect = initialVectorEffect(); |
463 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); | 457 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); |
464 svg_noninherited_flags.f.maskType = initialMaskType(); | 458 svg_noninherited_flags.f.maskType = initialMaskType(); |
465 } | 459 } |
466 }; | 460 }; |
467 | 461 |
468 } // namespace blink | 462 } // namespace blink |
469 | 463 |
470 #endif // SVGLayoutStyle_h | 464 #endif // SVGLayoutStyle_h |
OLD | NEW |