| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Animated property definitions | 32 // Animated property definitions |
| 33 DEFINE_ANIMATED_ENUMERATION(SVGClipPathElement, SVGNames::clipPathUnitsAttr, Cli
pPathUnits, clipPathUnits, SVGUnitTypes::SVGUnitType) | 33 DEFINE_ANIMATED_ENUMERATION(SVGClipPathElement, SVGNames::clipPathUnitsAttr, Cli
pPathUnits, clipPathUnits, SVGUnitTypes::SVGUnitType) |
| 34 DEFINE_ANIMATED_BOOLEAN(SVGClipPathElement, SVGNames::externalResourcesRequiredA
ttr, ExternalResourcesRequired, externalResourcesRequired) | 34 DEFINE_ANIMATED_BOOLEAN(SVGClipPathElement, SVGNames::externalResourcesRequiredA
ttr, ExternalResourcesRequired, externalResourcesRequired) |
| 35 | 35 |
| 36 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGClipPathElement) | 36 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGClipPathElement) |
| 37 REGISTER_LOCAL_ANIMATED_PROPERTY(clipPathUnits) | 37 REGISTER_LOCAL_ANIMATED_PROPERTY(clipPathUnits) |
| 38 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 38 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
| 39 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) | 39 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
| 40 END_REGISTER_ANIMATED_PROPERTIES | 40 END_REGISTER_ANIMATED_PROPERTIES |
| 41 | 41 |
| 42 inline SVGClipPathElement::SVGClipPathElement(const QualifiedName& tagName, Docu
ment& document) | 42 inline SVGClipPathElement::SVGClipPathElement(Document& document) |
| 43 : SVGGraphicsElement(tagName, document) | 43 : SVGGraphicsElement(SVGNames::clipPathTag, document) |
| 44 , m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) | 44 , m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) |
| 45 { | 45 { |
| 46 ASSERT(hasTagName(SVGNames::clipPathTag)); | |
| 47 ScriptWrappable::init(this); | 46 ScriptWrappable::init(this); |
| 48 registerAnimatedPropertiesForSVGClipPathElement(); | 47 registerAnimatedPropertiesForSVGClipPathElement(); |
| 49 } | 48 } |
| 50 | 49 |
| 51 PassRefPtr<SVGClipPathElement> SVGClipPathElement::create(const QualifiedName& t
agName, Document& document) | 50 PassRefPtr<SVGClipPathElement> SVGClipPathElement::create(Document& document) |
| 52 { | 51 { |
| 53 return adoptRef(new SVGClipPathElement(tagName, document)); | 52 return adoptRef(new SVGClipPathElement(document)); |
| 54 } | 53 } |
| 55 | 54 |
| 56 bool SVGClipPathElement::isSupportedAttribute(const QualifiedName& attrName) | 55 bool SVGClipPathElement::isSupportedAttribute(const QualifiedName& attrName) |
| 57 { | 56 { |
| 58 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 57 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 59 if (supportedAttributes.isEmpty()) { | 58 if (supportedAttributes.isEmpty()) { |
| 60 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 59 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
| 61 supportedAttributes.add(SVGNames::clipPathUnitsAttr); | 60 supportedAttributes.add(SVGNames::clipPathUnitsAttr); |
| 62 } | 61 } |
| 63 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 62 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 if (RenderObject* object = renderer()) | 106 if (RenderObject* object = renderer()) |
| 108 object->setNeedsLayout(); | 107 object->setNeedsLayout(); |
| 109 } | 108 } |
| 110 | 109 |
| 111 RenderObject* SVGClipPathElement::createRenderer(RenderStyle*) | 110 RenderObject* SVGClipPathElement::createRenderer(RenderStyle*) |
| 112 { | 111 { |
| 113 return new RenderSVGResourceClipper(this); | 112 return new RenderSVGResourceClipper(this); |
| 114 } | 113 } |
| 115 | 114 |
| 116 } | 115 } |
| OLD | NEW |