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"); | |
82 addString(svgFeatures, "svg.static"); | |
83 #endif | |
84 // addString(svgFeatures, "svg.animation"); | 80 // addString(svgFeatures, "svg.animation"); |
85 // addString(svgFeatures, "svg.dynamic"); | 81 // addString(svgFeatures, "svg.dynamic"); |
86 // addString(svgFeatures, "svg.dom.animation"); | 82 // addString(svgFeatures, "svg.dom.animation"); |
87 // addString(svgFeatures, "svg.dom.dynamic"); | 83 // addString(svgFeatures, "svg.dom.dynamic"); |
88 #if ENABLE(SVG_FONTS) | |
89 addString(svgFeatures, "dom"); | |
90 addString(svgFeatures, "dom.svg"); | |
91 addString(svgFeatures, "dom.svg.static"); | |
92 #endif | |
93 // addString(svgFeatures, "svg.all"); | 84 // addString(svgFeatures, "svg.all"); |
94 // addString(svgFeatures, "dom.svg.all"); | 85 // addString(svgFeatures, "dom.svg.all"); |
95 initialized = true; | 86 initialized = true; |
96 } | 87 } |
97 return feature.startsWith("org.w3c.", false) | 88 return feature.startsWith("org.w3c.", false) |
98 && svgFeatures.contains(feature.right(feature.length() - 8)); | 89 && svgFeatures.contains(feature.right(feature.length() - 8)); |
99 } | 90 } |
100 | 91 |
101 static bool isSupportedSVG11Feature(const String& feature, const String& version
) | 92 static bool isSupportedSVG11Feature(const String& feature, const String& version
) |
102 { | 93 { |
103 if (!version.isEmpty() && version != "1.1") | 94 if (!version.isEmpty() && version != "1.1") |
104 return false; | 95 return false; |
105 | 96 |
106 static bool initialized = false; | 97 static bool initialized = false; |
107 DEFINE_STATIC_LOCAL(FeatureSet, svgFeatures, ()); | 98 DEFINE_STATIC_LOCAL(FeatureSet, svgFeatures, ()); |
108 if (!initialized) { | 99 if (!initialized) { |
109 // Sadly, we cannot claim to implement any of the SVG 1.1 generic featur
e sets | 100 // Sadly, we cannot claim to implement any of the SVG 1.1 generic featur
e sets |
110 // lack of Font and Filter support. | 101 // lack of Font and Filter support. |
111 // http://bugs.webkit.org/show_bug.cgi?id=15480 | 102 // http://bugs.webkit.org/show_bug.cgi?id=15480 |
112 #if ENABLE(SVG_FONTS) | |
113 addString(svgFeatures, "SVG"); | |
114 addString(svgFeatures, "SVGDOM"); | |
115 addString(svgFeatures, "SVG-static"); | |
116 addString(svgFeatures, "SVGDOM-static"); | |
117 #endif | |
118 addString(svgFeatures, "SVG-animation"); | 103 addString(svgFeatures, "SVG-animation"); |
119 addString(svgFeatures, "SVGDOM-animation"); | 104 addString(svgFeatures, "SVGDOM-animation"); |
120 // addString(svgFeatures, "SVG-dynamic); | 105 // addString(svgFeatures, "SVG-dynamic); |
121 // addString(svgFeatures, "SVGDOM-dynamic); | 106 // addString(svgFeatures, "SVGDOM-dynamic); |
122 addString(svgFeatures, "CoreAttribute"); | 107 addString(svgFeatures, "CoreAttribute"); |
123 addString(svgFeatures, "Structure"); | 108 addString(svgFeatures, "Structure"); |
124 addString(svgFeatures, "BasicStructure"); | 109 addString(svgFeatures, "BasicStructure"); |
125 addString(svgFeatures, "ContainerAttribute"); | 110 addString(svgFeatures, "ContainerAttribute"); |
126 addString(svgFeatures, "ConditionalProcessing"); | 111 addString(svgFeatures, "ConditionalProcessing"); |
127 addString(svgFeatures, "Image"); | 112 addString(svgFeatures, "Image"); |
(...skipping 18 matching lines...) Expand all Loading... |
146 addString(svgFeatures, "BasicFilter"); | 131 addString(svgFeatures, "BasicFilter"); |
147 addString(svgFeatures, "DocumentEventsAttribute"); | 132 addString(svgFeatures, "DocumentEventsAttribute"); |
148 addString(svgFeatures, "GraphicalEventsAttribute"); | 133 addString(svgFeatures, "GraphicalEventsAttribute"); |
149 // addString(svgFeatures, "AnimationEventsAttribute"); | 134 // addString(svgFeatures, "AnimationEventsAttribute"); |
150 addString(svgFeatures, "Cursor"); | 135 addString(svgFeatures, "Cursor"); |
151 addString(svgFeatures, "Hyperlinking"); | 136 addString(svgFeatures, "Hyperlinking"); |
152 addString(svgFeatures, "XlinkAttribute"); | 137 addString(svgFeatures, "XlinkAttribute"); |
153 addString(svgFeatures, "View"); | 138 addString(svgFeatures, "View"); |
154 addString(svgFeatures, "Script"); | 139 addString(svgFeatures, "Script"); |
155 addString(svgFeatures, "Animation"); | 140 addString(svgFeatures, "Animation"); |
156 #if ENABLE(SVG_FONTS) | |
157 addString(svgFeatures, "Font"); | |
158 addString(svgFeatures, "BasicFont"); | |
159 #endif | |
160 addString(svgFeatures, "Extensibility"); | 141 addString(svgFeatures, "Extensibility"); |
161 initialized = true; | 142 initialized = true; |
162 } | 143 } |
163 return feature.startsWith("http://www.w3.org/tr/svg11/feature#", false) | 144 return feature.startsWith("http://www.w3.org/tr/svg11/feature#", false) |
164 && svgFeatures.contains(feature.right(feature.length() - 35)); | 145 && svgFeatures.contains(feature.right(feature.length() - 35)); |
165 } | 146 } |
166 | 147 |
167 DOMImplementation::DOMImplementation(Document& document) | 148 DOMImplementation::DOMImplementation(Document& document) |
168 : m_document(document) | 149 : m_document(document) |
169 { | 150 { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 365 |
385 return HTMLDocument::create(init); | 366 return HTMLDocument::create(init); |
386 } | 367 } |
387 | 368 |
388 void DOMImplementation::trace(Visitor* visitor) | 369 void DOMImplementation::trace(Visitor* visitor) |
389 { | 370 { |
390 visitor->trace(m_document); | 371 visitor->trace(m_document); |
391 } | 372 } |
392 | 373 |
393 } | 374 } |
OLD | NEW |