OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 class SVGAnimatedPathLength final : public SVGAnimatedNumber { | 32 class SVGAnimatedPathLength final : public SVGAnimatedNumber { |
33 public: | 33 public: |
34 static PassRefPtrWillBeRawPtr<SVGAnimatedPathLength> create(SVGPathElement*
contextElement) | 34 static PassRefPtrWillBeRawPtr<SVGAnimatedPathLength> create(SVGPathElement*
contextElement) |
35 { | 35 { |
36 return adoptRefWillBeNoop(new SVGAnimatedPathLength(contextElement)); | 36 return adoptRefWillBeNoop(new SVGAnimatedPathLength(contextElement)); |
37 } | 37 } |
38 | 38 |
39 void setBaseValueAsString(const String& value, SVGParsingError& parseError)
override | 39 SVGParsingError setBaseValueAsString(const String& value) override |
40 { | 40 { |
41 SVGAnimatedNumber::setBaseValueAsString(value, parseError); | 41 SVGParsingError parseStatus = SVGAnimatedNumber::setBaseValueAsString(va
lue); |
42 | 42 |
43 ASSERT(contextElement()); | 43 ASSERT(contextElement()); |
44 if (parseError == NoError && baseValue()->value() < 0) | 44 if (parseStatus == NoError && baseValue()->value() < 0) |
45 contextElement()->document().accessSVGExtensions().reportError("A ne
gative value for path attribute <pathLength> is not allowed"); | 45 contextElement()->document().accessSVGExtensions().reportError("A ne
gative value for path attribute <pathLength> is not allowed"); |
| 46 return parseStatus; |
46 } | 47 } |
47 | 48 |
48 private: | 49 private: |
49 explicit SVGAnimatedPathLength(SVGPathElement* contextElement) | 50 explicit SVGAnimatedPathLength(SVGPathElement* contextElement) |
50 : SVGAnimatedNumber(contextElement, SVGNames::pathLengthAttr, SVGNumber:
:create()) | 51 : SVGAnimatedNumber(contextElement, SVGNames::pathLengthAttr, SVGNumber:
:create()) |
51 { | 52 { |
52 } | 53 } |
53 }; | 54 }; |
54 | 55 |
55 inline SVGPathElement::SVGPathElement(Document& document) | 56 inline SVGPathElement::SVGPathElement(Document& document) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 return InsertionDone; | 180 return InsertionDone; |
180 } | 181 } |
181 | 182 |
182 void SVGPathElement::removedFrom(ContainerNode* rootParent) | 183 void SVGPathElement::removedFrom(ContainerNode* rootParent) |
183 { | 184 { |
184 SVGGeometryElement::removedFrom(rootParent); | 185 SVGGeometryElement::removedFrom(rootParent); |
185 invalidateMPathDependencies(); | 186 invalidateMPathDependencies(); |
186 } | 187 } |
187 | 188 |
188 } // namespace blink | 189 } // namespace blink |
OLD | NEW |