| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 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) Research In Motion Limited 2009-2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 6 * Copyright (C) 2012 University of Szeged | 6 * Copyright (C) 2012 University of Szeged |
| 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> | 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 static bool isDisallowedElement(const Element& element) | 243 static bool isDisallowedElement(const Element& element) |
| 244 { | 244 { |
| 245 // Spec: "Any 'svg', 'symbol', 'g', graphics element or other 'use' is poten
tially a template object that can be re-used | 245 // Spec: "Any 'svg', 'symbol', 'g', graphics element or other 'use' is poten
tially a template object that can be re-used |
| 246 // (i.e., "instanced") in the SVG document via a 'use' element." | 246 // (i.e., "instanced") in the SVG document via a 'use' element." |
| 247 // "Graphics Element" is defined as 'circle', 'ellipse', 'image', 'line', 'p
ath', 'polygon', 'polyline', 'rect', 'text' | 247 // "Graphics Element" is defined as 'circle', 'ellipse', 'image', 'line', 'p
ath', 'polygon', 'polyline', 'rect', 'text' |
| 248 // Excluded are anything that is used by reference or that only make sense t
o appear once in a document. | 248 // Excluded are anything that is used by reference or that only make sense t
o appear once in a document. |
| 249 if (!element.isSVGElement()) | 249 if (!element.isSVGElement()) |
| 250 return true; | 250 return true; |
| 251 | 251 |
| 252 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, allowedElementTags, ()); | 252 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, allowedElementTags, ({ |
| 253 if (allowedElementTags.isEmpty()) { | 253 SVGNames::aTag, |
| 254 allowedElementTags.add(SVGNames::aTag); | 254 SVGNames::circleTag, |
| 255 allowedElementTags.add(SVGNames::circleTag); | 255 SVGNames::descTag, |
| 256 allowedElementTags.add(SVGNames::descTag); | 256 SVGNames::ellipseTag, |
| 257 allowedElementTags.add(SVGNames::ellipseTag); | 257 SVGNames::gTag, |
| 258 allowedElementTags.add(SVGNames::gTag); | 258 SVGNames::imageTag, |
| 259 allowedElementTags.add(SVGNames::imageTag); | 259 SVGNames::lineTag, |
| 260 allowedElementTags.add(SVGNames::lineTag); | 260 SVGNames::metadataTag, |
| 261 allowedElementTags.add(SVGNames::metadataTag); | 261 SVGNames::pathTag, |
| 262 allowedElementTags.add(SVGNames::pathTag); | 262 SVGNames::polygonTag, |
| 263 allowedElementTags.add(SVGNames::polygonTag); | 263 SVGNames::polylineTag, |
| 264 allowedElementTags.add(SVGNames::polylineTag); | 264 SVGNames::rectTag, |
| 265 allowedElementTags.add(SVGNames::rectTag); | 265 SVGNames::svgTag, |
| 266 allowedElementTags.add(SVGNames::svgTag); | 266 SVGNames::switchTag, |
| 267 allowedElementTags.add(SVGNames::switchTag); | 267 SVGNames::symbolTag, |
| 268 allowedElementTags.add(SVGNames::symbolTag); | 268 SVGNames::textTag, |
| 269 allowedElementTags.add(SVGNames::textTag); | 269 SVGNames::textPathTag, |
| 270 allowedElementTags.add(SVGNames::textPathTag); | 270 SVGNames::titleTag, |
| 271 allowedElementTags.add(SVGNames::titleTag); | 271 SVGNames::tspanTag, |
| 272 allowedElementTags.add(SVGNames::tspanTag); | 272 SVGNames::useTag, |
| 273 allowedElementTags.add(SVGNames::useTag); | 273 })); |
| 274 } | |
| 275 return !allowedElementTags.contains<SVGAttributeHashTranslator>(element.tagQ
Name()); | 274 return !allowedElementTags.contains<SVGAttributeHashTranslator>(element.tagQ
Name()); |
| 276 } | 275 } |
| 277 | 276 |
| 278 void SVGUseElement::scheduleShadowTreeRecreation() | 277 void SVGUseElement::scheduleShadowTreeRecreation() |
| 279 { | 278 { |
| 280 if (inUseShadowTree()) | 279 if (inUseShadowTree()) |
| 281 return; | 280 return; |
| 282 m_needsShadowTreeRecreation = true; | 281 m_needsShadowTreeRecreation = true; |
| 283 document().scheduleUseShadowTreeUpdate(*this); | 282 document().scheduleUseShadowTreeUpdate(*this); |
| 284 } | 283 } |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 | 748 |
| 750 if (m_resource) | 749 if (m_resource) |
| 751 m_resource->removeClient(this); | 750 m_resource->removeClient(this); |
| 752 | 751 |
| 753 m_resource = resource; | 752 m_resource = resource; |
| 754 if (m_resource) | 753 if (m_resource) |
| 755 m_resource->addClient(this); | 754 m_resource->addClient(this); |
| 756 } | 755 } |
| 757 | 756 |
| 758 } // namespace blink | 757 } // namespace blink |
| OLD | NEW |