OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) | 6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 static bool isSupportedSVG10Feature(const String& feature, const String& version
) | 72 static bool isSupportedSVG10Feature(const String& feature, const String& version
) |
73 { | 73 { |
74 if (!version.isEmpty() && version != "1.0") | 74 if (!version.isEmpty() && version != "1.0") |
75 return false; | 75 return false; |
76 | 76 |
77 static bool initialized = false; | 77 static bool initialized = false; |
78 DEFINE_STATIC_LOCAL(FeatureSet, svgFeatures, ()); | 78 DEFINE_STATIC_LOCAL(FeatureSet, svgFeatures, ()); |
79 if (!initialized) { | 79 if (!initialized) { |
80 #if ENABLE(SVG_FONTS) | |
81 addString(svgFeatures, "svg"); | 80 addString(svgFeatures, "svg"); |
82 addString(svgFeatures, "svg.static"); | 81 addString(svgFeatures, "svg.static"); |
83 #endif | |
84 // addString(svgFeatures, "svg.animation"); | 82 // addString(svgFeatures, "svg.animation"); |
85 // addString(svgFeatures, "svg.dynamic"); | 83 // addString(svgFeatures, "svg.dynamic"); |
86 // addString(svgFeatures, "svg.dom.animation"); | 84 // addString(svgFeatures, "svg.dom.animation"); |
87 // addString(svgFeatures, "svg.dom.dynamic"); | 85 // addString(svgFeatures, "svg.dom.dynamic"); |
88 #if ENABLE(SVG_FONTS) | |
89 addString(svgFeatures, "dom"); | 86 addString(svgFeatures, "dom"); |
90 addString(svgFeatures, "dom.svg"); | 87 addString(svgFeatures, "dom.svg"); |
91 addString(svgFeatures, "dom.svg.static"); | 88 addString(svgFeatures, "dom.svg.static"); |
92 #endif | |
93 // addString(svgFeatures, "svg.all"); | 89 // addString(svgFeatures, "svg.all"); |
94 // addString(svgFeatures, "dom.svg.all"); | 90 // addString(svgFeatures, "dom.svg.all"); |
95 initialized = true; | 91 initialized = true; |
96 } | 92 } |
97 return feature.startsWith("org.w3c.", false) | 93 return feature.startsWith("org.w3c.", false) |
98 && svgFeatures.contains(feature.right(feature.length() - 8)); | 94 && svgFeatures.contains(feature.right(feature.length() - 8)); |
99 } | 95 } |
100 | 96 |
101 static bool isSupportedSVG11Feature(const String& feature, const String& version
) | 97 static bool isSupportedSVG11Feature(const String& feature, const String& version
) |
102 { | 98 { |
103 if (!version.isEmpty() && version != "1.1") | 99 if (!version.isEmpty() && version != "1.1") |
104 return false; | 100 return false; |
105 | 101 |
106 static bool initialized = false; | 102 static bool initialized = false; |
107 DEFINE_STATIC_LOCAL(FeatureSet, svgFeatures, ()); | 103 DEFINE_STATIC_LOCAL(FeatureSet, svgFeatures, ()); |
108 if (!initialized) { | 104 if (!initialized) { |
109 // Sadly, we cannot claim to implement any of the SVG 1.1 generic featur
e sets | 105 // Sadly, we cannot claim to implement any of the SVG 1.1 generic featur
e sets |
110 // lack of Font and Filter support. | 106 // lack of Font and Filter support. |
111 // http://bugs.webkit.org/show_bug.cgi?id=15480 | 107 // http://bugs.webkit.org/show_bug.cgi?id=15480 |
112 #if ENABLE(SVG_FONTS) | |
113 addString(svgFeatures, "SVG"); | 108 addString(svgFeatures, "SVG"); |
114 addString(svgFeatures, "SVGDOM"); | 109 addString(svgFeatures, "SVGDOM"); |
115 addString(svgFeatures, "SVG-static"); | 110 addString(svgFeatures, "SVG-static"); |
116 addString(svgFeatures, "SVGDOM-static"); | 111 addString(svgFeatures, "SVGDOM-static"); |
117 #endif | |
118 addString(svgFeatures, "SVG-animation"); | 112 addString(svgFeatures, "SVG-animation"); |
119 addString(svgFeatures, "SVGDOM-animation"); | 113 addString(svgFeatures, "SVGDOM-animation"); |
120 // addString(svgFeatures, "SVG-dynamic); | 114 // addString(svgFeatures, "SVG-dynamic); |
121 // addString(svgFeatures, "SVGDOM-dynamic); | 115 // addString(svgFeatures, "SVGDOM-dynamic); |
122 addString(svgFeatures, "CoreAttribute"); | 116 addString(svgFeatures, "CoreAttribute"); |
123 addString(svgFeatures, "Structure"); | 117 addString(svgFeatures, "Structure"); |
124 addString(svgFeatures, "BasicStructure"); | 118 addString(svgFeatures, "BasicStructure"); |
125 addString(svgFeatures, "ContainerAttribute"); | 119 addString(svgFeatures, "ContainerAttribute"); |
126 addString(svgFeatures, "ConditionalProcessing"); | 120 addString(svgFeatures, "ConditionalProcessing"); |
127 addString(svgFeatures, "Image"); | 121 addString(svgFeatures, "Image"); |
(...skipping 18 matching lines...) Expand all Loading... |
146 addString(svgFeatures, "BasicFilter"); | 140 addString(svgFeatures, "BasicFilter"); |
147 addString(svgFeatures, "DocumentEventsAttribute"); | 141 addString(svgFeatures, "DocumentEventsAttribute"); |
148 addString(svgFeatures, "GraphicalEventsAttribute"); | 142 addString(svgFeatures, "GraphicalEventsAttribute"); |
149 // addString(svgFeatures, "AnimationEventsAttribute"); | 143 // addString(svgFeatures, "AnimationEventsAttribute"); |
150 addString(svgFeatures, "Cursor"); | 144 addString(svgFeatures, "Cursor"); |
151 addString(svgFeatures, "Hyperlinking"); | 145 addString(svgFeatures, "Hyperlinking"); |
152 addString(svgFeatures, "XlinkAttribute"); | 146 addString(svgFeatures, "XlinkAttribute"); |
153 addString(svgFeatures, "View"); | 147 addString(svgFeatures, "View"); |
154 addString(svgFeatures, "Script"); | 148 addString(svgFeatures, "Script"); |
155 addString(svgFeatures, "Animation"); | 149 addString(svgFeatures, "Animation"); |
156 #if ENABLE(SVG_FONTS) | |
157 addString(svgFeatures, "Font"); | |
158 addString(svgFeatures, "BasicFont"); | |
159 #endif | |
160 addString(svgFeatures, "Extensibility"); | 150 addString(svgFeatures, "Extensibility"); |
161 initialized = true; | 151 initialized = true; |
162 } | 152 } |
163 return feature.startsWith("http://www.w3.org/tr/svg11/feature#", false) | 153 return feature.startsWith("http://www.w3.org/tr/svg11/feature#", false) |
164 && svgFeatures.contains(feature.right(feature.length() - 35)); | 154 && svgFeatures.contains(feature.right(feature.length() - 35)); |
165 } | 155 } |
166 | 156 |
167 DOMImplementation::DOMImplementation(Document& document) | 157 DOMImplementation::DOMImplementation(Document& document) |
168 : m_document(document) | 158 : m_document(document) |
169 { | 159 { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 374 |
385 return HTMLDocument::create(init); | 375 return HTMLDocument::create(init); |
386 } | 376 } |
387 | 377 |
388 void DOMImplementation::trace(Visitor* visitor) | 378 void DOMImplementation::trace(Visitor* visitor) |
389 { | 379 { |
390 visitor->trace(m_document); | 380 visitor->trace(m_document); |
391 } | 381 } |
392 | 382 |
393 } | 383 } |
OLD | NEW |