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(const QualifiedName& tagName, Docu
ment& document) |
43 : SVGGraphicsElement(tagName, document) | 43 : SVGGraphicsElement(tagName, document) |
44 , m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) | 44 , m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) |
45 { | 45 { |
46 ASSERT(hasTagName(SVGNames::clipPathTag)); | 46 ASSERT(hasTagName(SVGNames::clipPathTag)); |
47 ScriptWrappable::init(this); | 47 ScriptWrappable::init(this); |
48 registerAnimatedPropertiesForSVGClipPathElement(); | 48 registerAnimatedPropertiesForSVGClipPathElement(); |
49 } | 49 } |
50 | 50 |
51 PassRefPtr<SVGClipPathElement> SVGClipPathElement::create(const QualifiedName& t
agName, Document* document) | 51 PassRefPtr<SVGClipPathElement> SVGClipPathElement::create(const QualifiedName& t
agName, Document& document) |
52 { | 52 { |
53 return adoptRef(new SVGClipPathElement(tagName, document)); | 53 return adoptRef(new SVGClipPathElement(tagName, document)); |
54 } | 54 } |
55 | 55 |
56 bool SVGClipPathElement::isSupportedAttribute(const QualifiedName& attrName) | 56 bool SVGClipPathElement::isSupportedAttribute(const QualifiedName& attrName) |
57 { | 57 { |
58 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 58 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
59 if (supportedAttributes.isEmpty()) { | 59 if (supportedAttributes.isEmpty()) { |
60 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 60 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
61 supportedAttributes.add(SVGNames::clipPathUnitsAttr); | 61 supportedAttributes.add(SVGNames::clipPathUnitsAttr); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 if (RenderObject* object = renderer()) | 106 if (RenderObject* object = renderer()) |
107 object->setNeedsLayout(); | 107 object->setNeedsLayout(); |
108 } | 108 } |
109 | 109 |
110 RenderObject* SVGClipPathElement::createRenderer(RenderStyle*) | 110 RenderObject* SVGClipPathElement::createRenderer(RenderStyle*) |
111 { | 111 { |
112 return new RenderSVGResourceClipper(this); | 112 return new RenderSVGResourceClipper(this); |
113 } | 113 } |
114 | 114 |
115 } | 115 } |
OLD | NEW |