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 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 bool SVGLinearGradientElement::isSupportedAttribute(const QualifiedName& attrNam
e) | 69 bool SVGLinearGradientElement::isSupportedAttribute(const QualifiedName& attrNam
e) |
70 { | 70 { |
71 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 71 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
72 if (supportedAttributes.isEmpty()) { | 72 if (supportedAttributes.isEmpty()) { |
73 supportedAttributes.add(SVGNames::x1Attr); | 73 supportedAttributes.add(SVGNames::x1Attr); |
74 supportedAttributes.add(SVGNames::x2Attr); | 74 supportedAttributes.add(SVGNames::x2Attr); |
75 supportedAttributes.add(SVGNames::y1Attr); | 75 supportedAttributes.add(SVGNames::y1Attr); |
76 supportedAttributes.add(SVGNames::y2Attr); | 76 supportedAttributes.add(SVGNames::y2Attr); |
77 } | 77 } |
78 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato
r>(attrName); | 78 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
79 } | 79 } |
80 | 80 |
81 void SVGLinearGradientElement::parseAttribute(const QualifiedName& name, const A
tomicString& value) | 81 void SVGLinearGradientElement::parseAttribute(const QualifiedName& name, const A
tomicString& value) |
82 { | 82 { |
83 SVGParsingError parseError = NoError; | 83 SVGParsingError parseError = NoError; |
84 | 84 |
85 if (!isSupportedAttribute(name)) | 85 if (!isSupportedAttribute(name)) |
86 SVGGradientElement::parseAttribute(name, value); | 86 SVGGradientElement::parseAttribute(name, value); |
87 else if (name == SVGNames::x1Attr) | 87 else if (name == SVGNames::x1Attr) |
88 setX1BaseValue(SVGLength::construct(LengthModeWidth, value, parseError))
; | 88 setX1BaseValue(SVGLength::construct(LengthModeWidth, value, parseError))
; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 bool SVGLinearGradientElement::selfHasRelativeLengths() const | 187 bool SVGLinearGradientElement::selfHasRelativeLengths() const |
188 { | 188 { |
189 return x1().isRelative() | 189 return x1().isRelative() |
190 || y1().isRelative() | 190 || y1().isRelative() |
191 || x2().isRelative() | 191 || x2().isRelative() |
192 || y2().isRelative(); | 192 || y2().isRelative(); |
193 } | 193 } |
194 | 194 |
195 } | 195 } |
OLD | NEW |