| 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) 2005 Alexander Kellett <lypanov@kde.org> | 4 * Copyright (C) 2005 Alexander Kellett <lypanov@kde.org> |
| 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 6 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009-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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 supportedAttributes.add(SVGNames::xAttr); | 67 supportedAttributes.add(SVGNames::xAttr); |
| 68 supportedAttributes.add(SVGNames::yAttr); | 68 supportedAttributes.add(SVGNames::yAttr); |
| 69 supportedAttributes.add(SVGNames::widthAttr); | 69 supportedAttributes.add(SVGNames::widthAttr); |
| 70 supportedAttributes.add(SVGNames::heightAttr); | 70 supportedAttributes.add(SVGNames::heightAttr); |
| 71 } | 71 } |
| 72 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 72 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void SVGMaskElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) | 75 void SVGMaskElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) |
| 76 { | 76 { |
| 77 SVGParsingError parseError = NoError; | 77 parseAttributeNew(name, value); |
| 78 | |
| 79 if (!isSupportedAttribute(name)) | |
| 80 SVGElement::parseAttribute(name, value); | |
| 81 else if (name == SVGNames::maskUnitsAttr) | |
| 82 m_maskUnits->setBaseValueAsString(value, parseError); | |
| 83 else if (name == SVGNames::maskContentUnitsAttr) | |
| 84 m_maskContentUnits->setBaseValueAsString(value, parseError); | |
| 85 else if (name == SVGNames::xAttr) | |
| 86 m_x->setBaseValueAsString(value, parseError); | |
| 87 else if (name == SVGNames::yAttr) | |
| 88 m_y->setBaseValueAsString(value, parseError); | |
| 89 else if (name == SVGNames::widthAttr) | |
| 90 m_width->setBaseValueAsString(value, parseError); | |
| 91 else if (name == SVGNames::heightAttr) | |
| 92 m_height->setBaseValueAsString(value, parseError); | |
| 93 else if (SVGTests::parseAttribute(name, value)) { | |
| 94 } else | |
| 95 ASSERT_NOT_REACHED(); | |
| 96 | |
| 97 reportAttributeParsingError(parseError, name, value); | |
| 98 } | 78 } |
| 99 | 79 |
| 100 void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName) | 80 void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName) |
| 101 { | 81 { |
| 102 if (!isSupportedAttribute(attrName)) { | 82 if (!isSupportedAttribute(attrName)) { |
| 103 SVGElement::svgAttributeChanged(attrName); | 83 SVGElement::svgAttributeChanged(attrName); |
| 104 return; | 84 return; |
| 105 } | 85 } |
| 106 | 86 |
| 107 SVGElement::InvalidationGuard invalidationGuard(this); | 87 SVGElement::InvalidationGuard invalidationGuard(this); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 135 | 115 |
| 136 bool SVGMaskElement::selfHasRelativeLengths() const | 116 bool SVGMaskElement::selfHasRelativeLengths() const |
| 137 { | 117 { |
| 138 return m_x->currentValue()->isRelative() | 118 return m_x->currentValue()->isRelative() |
| 139 || m_y->currentValue()->isRelative() | 119 || m_y->currentValue()->isRelative() |
| 140 || m_width->currentValue()->isRelative() | 120 || m_width->currentValue()->isRelative() |
| 141 || m_height->currentValue()->isRelative(); | 121 || m_height->currentValue()->isRelative(); |
| 142 } | 122 } |
| 143 | 123 |
| 144 } // namespace blink | 124 } // namespace blink |
| OLD | NEW |