OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> | 4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> |
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 invalidate(); | 109 invalidate(); |
110 } | 110 } |
111 | 111 |
112 bool SVGFEImageElement::isSupportedAttribute(const QualifiedName& attrName) | 112 bool SVGFEImageElement::isSupportedAttribute(const QualifiedName& attrName) |
113 { | 113 { |
114 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 114 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
115 if (supportedAttributes.isEmpty()) { | 115 if (supportedAttributes.isEmpty()) { |
116 SVGURIReference::addSupportedAttributes(supportedAttributes); | 116 SVGURIReference::addSupportedAttributes(supportedAttributes); |
117 SVGLangSpace::addSupportedAttributes(supportedAttributes); | |
118 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); | 117 SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes
); |
119 supportedAttributes.add(SVGNames::preserveAspectRatioAttr); | 118 supportedAttributes.add(SVGNames::preserveAspectRatioAttr); |
120 } | 119 } |
121 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 120 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
122 } | 121 } |
123 | 122 |
124 void SVGFEImageElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) | 123 void SVGFEImageElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) |
125 { | 124 { |
126 if (!isSupportedAttribute(name)) { | 125 if (!isSupportedAttribute(name)) { |
127 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); | 126 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); |
128 return; | 127 return; |
129 } | 128 } |
130 | 129 |
131 if (name == SVGNames::preserveAspectRatioAttr) { | 130 if (name == SVGNames::preserveAspectRatioAttr) { |
132 SVGPreserveAspectRatio preserveAspectRatio; | 131 SVGPreserveAspectRatio preserveAspectRatio; |
133 preserveAspectRatio.parse(value); | 132 preserveAspectRatio.parse(value); |
134 setPreserveAspectRatioBaseValue(preserveAspectRatio); | 133 setPreserveAspectRatioBaseValue(preserveAspectRatio); |
135 return; | 134 return; |
136 } | 135 } |
137 | 136 |
138 if (SVGURIReference::parseAttribute(name, value)) | 137 if (SVGURIReference::parseAttribute(name, value)) |
139 return; | 138 return; |
140 if (SVGLangSpace::parseAttribute(name, value)) | |
141 return; | |
142 if (SVGExternalResourcesRequired::parseAttribute(name, value)) | 139 if (SVGExternalResourcesRequired::parseAttribute(name, value)) |
143 return; | 140 return; |
144 | 141 |
145 ASSERT_NOT_REACHED(); | 142 ASSERT_NOT_REACHED(); |
146 } | 143 } |
147 | 144 |
148 void SVGFEImageElement::svgAttributeChanged(const QualifiedName& attrName) | 145 void SVGFEImageElement::svgAttributeChanged(const QualifiedName& attrName) |
149 { | 146 { |
150 if (!isSupportedAttribute(attrName)) { | 147 if (!isSupportedAttribute(attrName)) { |
151 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); | 148 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); |
152 return; | 149 return; |
153 } | 150 } |
154 | 151 |
155 SVGElementInstance::InvalidationGuard invalidationGuard(this); | 152 SVGElementInstance::InvalidationGuard invalidationGuard(this); |
156 | 153 |
157 if (attrName == SVGNames::preserveAspectRatioAttr) { | 154 if (attrName == SVGNames::preserveAspectRatioAttr) { |
158 invalidate(); | 155 invalidate(); |
159 return; | 156 return; |
160 } | 157 } |
161 | 158 |
162 if (SVGURIReference::isKnownAttribute(attrName)) { | 159 if (SVGURIReference::isKnownAttribute(attrName)) { |
163 buildPendingResource(); | 160 buildPendingResource(); |
164 return; | 161 return; |
165 } | 162 } |
166 | 163 |
167 if (SVGLangSpace::isKnownAttribute(attrName) || SVGExternalResourcesRequired
::isKnownAttribute(attrName)) | 164 if (SVGExternalResourcesRequired::isKnownAttribute(attrName)) |
168 return; | 165 return; |
169 | 166 |
170 ASSERT_NOT_REACHED(); | 167 ASSERT_NOT_REACHED(); |
171 } | 168 } |
172 | 169 |
173 Node::InsertionNotificationRequest SVGFEImageElement::insertedInto(ContainerNode
* rootParent) | 170 Node::InsertionNotificationRequest SVGFEImageElement::insertedInto(ContainerNode
* rootParent) |
174 { | 171 { |
175 SVGFilterPrimitiveStandardAttributes::insertedInto(rootParent); | 172 SVGFilterPrimitiveStandardAttributes::insertedInto(rootParent); |
176 buildPendingResource(); | 173 buildPendingResource(); |
177 return InsertionDone; | 174 return InsertionDone; |
(...skipping 28 matching lines...) Expand all Loading... |
206 } | 203 } |
207 | 204 |
208 void SVGFEImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) con
st | 205 void SVGFEImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) con
st |
209 { | 206 { |
210 SVGFilterPrimitiveStandardAttributes::addSubresourceAttributeURLs(urls); | 207 SVGFilterPrimitiveStandardAttributes::addSubresourceAttributeURLs(urls); |
211 | 208 |
212 addSubresourceURL(urls, document()->completeURL(href())); | 209 addSubresourceURL(urls, document()->completeURL(href())); |
213 } | 210 } |
214 | 211 |
215 } | 212 } |
OLD | NEW |