| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 static EGlyphOrientation initialGlyphOrientationVertical() { return GO_AUTO;
} | 69 static EGlyphOrientation initialGlyphOrientationVertical() { return GO_AUTO;
} |
| 70 static float initialFillOpacity() { return 1; } | 70 static float initialFillOpacity() { return 1; } |
| 71 static SVGPaintType initialFillPaintType() { return SVG_PAINTTYPE_RGBCOLOR;
} | 71 static SVGPaintType initialFillPaintType() { return SVG_PAINTTYPE_RGBCOLOR;
} |
| 72 static Color initialFillPaintColor() { return Color::black; } | 72 static Color initialFillPaintColor() { return Color::black; } |
| 73 static String initialFillPaintUri() { return String(); } | 73 static String initialFillPaintUri() { return String(); } |
| 74 static float initialStrokeOpacity() { return 1; } | 74 static float initialStrokeOpacity() { return 1; } |
| 75 static SVGPaintType initialStrokePaintType() { return SVG_PAINTTYPE_NONE; } | 75 static SVGPaintType initialStrokePaintType() { return SVG_PAINTTYPE_NONE; } |
| 76 static Color initialStrokePaintColor() { return Color(); } | 76 static Color initialStrokePaintColor() { return Color(); } |
| 77 static String initialStrokePaintUri() { return String(); } | 77 static String initialStrokePaintUri() { return String(); } |
| 78 static PassRefPtrWillBeRawPtr<SVGLengthList> initialStrokeDashArray() { retu
rn SVGLengthList::create(); } | 78 static PassRefPtrWillBeRawPtr<SVGLengthList> initialStrokeDashArray() { retu
rn SVGLengthList::create(); } |
| 79 static Length initialStrokeDashOffset() { return Length(Fixed); } |
| 79 static float initialStrokeMiterLimit() { return 4; } | 80 static float initialStrokeMiterLimit() { return 4; } |
| 80 static float initialStopOpacity() { return 1; } | 81 static float initialStopOpacity() { return 1; } |
| 81 static Color initialStopColor() { return Color(0, 0, 0); } | 82 static Color initialStopColor() { return Color(0, 0, 0); } |
| 82 static float initialFloodOpacity() { return 1; } | 83 static float initialFloodOpacity() { return 1; } |
| 83 static Color initialFloodColor() { return Color(0, 0, 0); } | 84 static Color initialFloodColor() { return Color(0, 0, 0); } |
| 84 static Color initialLightingColor() { return Color(255, 255, 255); } | 85 static Color initialLightingColor() { return Color(255, 255, 255); } |
| 85 static const AtomicString& initialClipperResource() { return nullAtom; } | 86 static const AtomicString& initialClipperResource() { return nullAtom; } |
| 86 static const AtomicString& initialFilterResource() { return nullAtom; } | 87 static const AtomicString& initialFilterResource() { return nullAtom; } |
| 87 static const AtomicString& initialMaskerResource() { return nullAtom; } | 88 static const AtomicString& initialMaskerResource() { return nullAtom; } |
| 88 static const AtomicString& initialMarkerStartResource() { return nullAtom; } | 89 static const AtomicString& initialMarkerStartResource() { return nullAtom; } |
| 89 static const AtomicString& initialMarkerMidResource() { return nullAtom; } | 90 static const AtomicString& initialMarkerMidResource() { return nullAtom; } |
| 90 static const AtomicString& initialMarkerEndResource() { return nullAtom; } | 91 static const AtomicString& initialMarkerEndResource() { return nullAtom; } |
| 91 static EMaskType initialMaskType() { return MT_LUMINANCE; } | 92 static EMaskType initialMaskType() { return MT_LUMINANCE; } |
| 92 static EPaintOrder initialPaintOrder() { return PO_NORMAL; } | 93 static EPaintOrder initialPaintOrder() { return PO_NORMAL; } |
| 93 static Length initialX() { return Length(Fixed); } | 94 static Length initialX() { return Length(Fixed); } |
| 94 static Length initialY() { return Length(Fixed); } | 95 static Length initialY() { return Length(Fixed); } |
| 95 static Length initialRx() { return Length(Fixed); } | 96 static Length initialRx() { return Length(Fixed); } |
| 96 static Length initialRy() { return Length(Fixed); } | 97 static Length initialRy() { return Length(Fixed); } |
| 97 | 98 |
| 98 static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeDashOffset() | |
| 99 { | |
| 100 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(); | |
| 101 length->newValueSpecifiedUnits(LengthTypeNumber, 0); | |
| 102 return length.release(); | |
| 103 } | |
| 104 | |
| 105 static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeWidth() | 99 static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeWidth() |
| 106 { | 100 { |
| 107 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(); | 101 RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(); |
| 108 length->newValueSpecifiedUnits(LengthTypeNumber, 1); | 102 length->newValueSpecifiedUnits(LengthTypeNumber, 1); |
| 109 return length.release(); | 103 return length.release(); |
| 110 } | 104 } |
| 111 | 105 |
| 112 // SVG CSS Property setters | 106 // SVG CSS Property setters |
| 113 void setAlignmentBaseline(EAlignmentBaseline val) { svg_noninherited_flags.f
._alignmentBaseline = val; } | 107 void setAlignmentBaseline(EAlignmentBaseline val) { svg_noninherited_flags.f
._alignmentBaseline = val; } |
| 114 void setDominantBaseline(EDominantBaseline val) { svg_noninherited_flags.f._
dominantBaseline = val; } | 108 void setDominantBaseline(EDominantBaseline val) { svg_noninherited_flags.f._
dominantBaseline = val; } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 if (!(stroke->miterLimit == obj)) | 206 if (!(stroke->miterLimit == obj)) |
| 213 stroke.access()->miterLimit = obj; | 207 stroke.access()->miterLimit = obj; |
| 214 } | 208 } |
| 215 | 209 |
| 216 void setStrokeWidth(PassRefPtrWillBeRawPtr<SVGLength> obj) | 210 void setStrokeWidth(PassRefPtrWillBeRawPtr<SVGLength> obj) |
| 217 { | 211 { |
| 218 if (*stroke->width != *obj) | 212 if (*stroke->width != *obj) |
| 219 stroke.access()->width = obj; | 213 stroke.access()->width = obj; |
| 220 } | 214 } |
| 221 | 215 |
| 222 void setStrokeDashOffset(PassRefPtrWillBeRawPtr<SVGLength> obj) | 216 void setStrokeDashOffset(const Length& dashOffset) |
| 223 { | 217 { |
| 224 if (*stroke->dashOffset != *obj) | 218 if (!(stroke->dashOffset == dashOffset)) |
| 225 stroke.access()->dashOffset = obj; | 219 stroke.access()->dashOffset = dashOffset; |
| 226 } | 220 } |
| 227 | 221 |
| 228 void setStopOpacity(float obj) | 222 void setStopOpacity(float obj) |
| 229 { | 223 { |
| 230 if (!(stops->opacity == obj)) | 224 if (!(stops->opacity == obj)) |
| 231 stops.access()->opacity = obj; | 225 stops.access()->opacity = obj; |
| 232 } | 226 } |
| 233 | 227 |
| 234 void setStopColor(const Color& obj) | 228 void setStopColor(const Color& obj) |
| 235 { | 229 { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 const SVGPaintType& fillPaintType() const { return fill->paintType; } | 315 const SVGPaintType& fillPaintType() const { return fill->paintType; } |
| 322 const Color& fillPaintColor() const { return fill->paintColor; } | 316 const Color& fillPaintColor() const { return fill->paintColor; } |
| 323 const String& fillPaintUri() const { return fill->paintUri; } | 317 const String& fillPaintUri() const { return fill->paintUri; } |
| 324 float strokeOpacity() const { return stroke->opacity; } | 318 float strokeOpacity() const { return stroke->opacity; } |
| 325 const SVGPaintType& strokePaintType() const { return stroke->paintType; } | 319 const SVGPaintType& strokePaintType() const { return stroke->paintType; } |
| 326 const Color& strokePaintColor() const { return stroke->paintColor; } | 320 const Color& strokePaintColor() const { return stroke->paintColor; } |
| 327 const String& strokePaintUri() const { return stroke->paintUri; } | 321 const String& strokePaintUri() const { return stroke->paintUri; } |
| 328 SVGLengthList* strokeDashArray() const { return stroke->dashArray.get(); } | 322 SVGLengthList* strokeDashArray() const { return stroke->dashArray.get(); } |
| 329 float strokeMiterLimit() const { return stroke->miterLimit; } | 323 float strokeMiterLimit() const { return stroke->miterLimit; } |
| 330 SVGLength* strokeWidth() const { return stroke->width.get(); } | 324 SVGLength* strokeWidth() const { return stroke->width.get(); } |
| 331 SVGLength* strokeDashOffset() const { return stroke->dashOffset.get(); } | 325 const Length& strokeDashOffset() const { return stroke->dashOffset; } |
| 332 float stopOpacity() const { return stops->opacity; } | 326 float stopOpacity() const { return stops->opacity; } |
| 333 const Color& stopColor() const { return stops->color; } | 327 const Color& stopColor() const { return stops->color; } |
| 334 float floodOpacity() const { return misc->floodOpacity; } | 328 float floodOpacity() const { return misc->floodOpacity; } |
| 335 const Color& floodColor() const { return misc->floodColor; } | 329 const Color& floodColor() const { return misc->floodColor; } |
| 336 const Color& lightingColor() const { return misc->lightingColor; } | 330 const Color& lightingColor() const { return misc->lightingColor; } |
| 337 const Length& baselineShiftValue() const { return misc->baselineShiftValue;
} | 331 const Length& baselineShiftValue() const { return misc->baselineShiftValue;
} |
| 338 const Length& x() const { return layout->x; } | 332 const Length& x() const { return layout->x; } |
| 339 const Length& y() const { return layout->y; } | 333 const Length& y() const { return layout->y; } |
| 340 const Length& rx() const { return layout->rx; } | 334 const Length& rx() const { return layout->rx; } |
| 341 const Length& ry() const { return layout->ry; } | 335 const Length& ry() const { return layout->ry; } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 svg_noninherited_flags.f._baselineShift = initialBaselineShift(); | 463 svg_noninherited_flags.f._baselineShift = initialBaselineShift(); |
| 470 svg_noninherited_flags.f._vectorEffect = initialVectorEffect(); | 464 svg_noninherited_flags.f._vectorEffect = initialVectorEffect(); |
| 471 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); | 465 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); |
| 472 svg_noninherited_flags.f.maskType = initialMaskType(); | 466 svg_noninherited_flags.f.maskType = initialMaskType(); |
| 473 } | 467 } |
| 474 }; | 468 }; |
| 475 | 469 |
| 476 } // namespace blink | 470 } // namespace blink |
| 477 | 471 |
| 478 #endif // SVGLayoutStyle_h | 472 #endif // SVGLayoutStyle_h |
| OLD | NEW |