WebCore/generated/SVGElementFactory.cpp
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     1 /*
       
     2  * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
       
     3  *
       
     4  * This file was generated by the dom/make_names.pl script.
       
     5  *
       
     6  * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc.  All rights reserved.
       
     7  *
       
     8  * Redistribution and use in source and binary forms, with or without
       
     9  * modification, are permitted provided that the following conditions
       
    10  * are met:
       
    11  * 1. Redistributions of source code must retain the above copyright
       
    12  *    notice, this list of conditions and the following disclaimer.
       
    13  * 2. Redistributions in binary form must reproduce the above copyright
       
    14  *    notice, this list of conditions and the following disclaimer in the
       
    15  *    documentation and/or other materials provided with the distribution.
       
    16  *
       
    17  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
       
    18  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
       
    19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
       
    20  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
       
    21  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
       
    22  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
       
    23  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
       
    24  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
       
    25  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
       
    26  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
       
    27  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
    28  */
       
    29 
       
    30 #include "config.h"
       
    31 #include "SVGElementFactory.h"
       
    32 #include "SVGNames.h"
       
    33 
       
    34 #if ENABLE(SVG)
       
    35 
       
    36 #include "SVGAElement.h"
       
    37 #include "SVGAltGlyphElement.h"
       
    38 #include "SVGAnimateElement.h"
       
    39 #include "SVGAnimateColorElement.h"
       
    40 #include "SVGAnimateMotionElement.h"
       
    41 #include "SVGAnimateTransformElement.h"
       
    42 #include "SVGCircleElement.h"
       
    43 #include "SVGClipPathElement.h"
       
    44 #include "SVGCursorElement.h"
       
    45 #include "SVGDefsElement.h"
       
    46 #include "SVGDescElement.h"
       
    47 #include "SVGEllipseElement.h"
       
    48 #include "SVGFEBlendElement.h"
       
    49 #include "SVGFEColorMatrixElement.h"
       
    50 #include "SVGFEComponentTransferElement.h"
       
    51 #include "SVGFECompositeElement.h"
       
    52 #include "SVGFEConvolveMatrixElement.h"
       
    53 #include "SVGFEDiffuseLightingElement.h"
       
    54 #include "SVGFEDisplacementMapElement.h"
       
    55 #include "SVGFEDistantLightElement.h"
       
    56 #include "SVGFEFloodElement.h"
       
    57 #include "SVGFEFuncAElement.h"
       
    58 #include "SVGFEFuncBElement.h"
       
    59 #include "SVGFEFuncGElement.h"
       
    60 #include "SVGFEFuncRElement.h"
       
    61 #include "SVGFEGaussianBlurElement.h"
       
    62 #include "SVGFEImageElement.h"
       
    63 #include "SVGFEMergeElement.h"
       
    64 #include "SVGFEMergeNodeElement.h"
       
    65 #include "SVGFEMorphologyElement.h"
       
    66 #include "SVGFEOffsetElement.h"
       
    67 #include "SVGFEPointLightElement.h"
       
    68 #include "SVGFESpecularLightingElement.h"
       
    69 #include "SVGFESpotLightElement.h"
       
    70 #include "SVGFETileElement.h"
       
    71 #include "SVGFETurbulenceElement.h"
       
    72 #include "SVGFilterElement.h"
       
    73 #include "SVGFontElement.h"
       
    74 #include "SVGFontFaceElement.h"
       
    75 #include "SVGFontFaceFormatElement.h"
       
    76 #include "SVGFontFaceNameElement.h"
       
    77 #include "SVGFontFaceSrcElement.h"
       
    78 #include "SVGFontFaceUriElement.h"
       
    79 #include "SVGForeignObjectElement.h"
       
    80 #include "SVGGElement.h"
       
    81 #include "SVGGlyphElement.h"
       
    82 #include "SVGHKernElement.h"
       
    83 #include "SVGImageElement.h"
       
    84 #include "SVGLineElement.h"
       
    85 #include "SVGLinearGradientElement.h"
       
    86 #include "SVGMarkerElement.h"
       
    87 #include "SVGMaskElement.h"
       
    88 #include "SVGMetadataElement.h"
       
    89 #include "SVGMissingGlyphElement.h"
       
    90 #include "SVGMPathElement.h"
       
    91 #include "SVGPathElement.h"
       
    92 #include "SVGPatternElement.h"
       
    93 #include "SVGPolygonElement.h"
       
    94 #include "SVGPolylineElement.h"
       
    95 #include "SVGRadialGradientElement.h"
       
    96 #include "SVGRectElement.h"
       
    97 #include "SVGScriptElement.h"
       
    98 #include "SVGSetElement.h"
       
    99 #include "SVGStopElement.h"
       
   100 #include "SVGStyleElement.h"
       
   101 #include "SVGSVGElement.h"
       
   102 #include "SVGSwitchElement.h"
       
   103 #include "SVGSymbolElement.h"
       
   104 #include "SVGTextElement.h"
       
   105 #include "SVGTextPathElement.h"
       
   106 #include "SVGTitleElement.h"
       
   107 #include "SVGTRefElement.h"
       
   108 #include "SVGTSpanElement.h"
       
   109 #include "SVGUseElement.h"
       
   110 #include "SVGViewElement.h"
       
   111 #include "SVGVKernElement.h"
       
   112 #include <wtf/HashMap.h>
       
   113 
       
   114 #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(VIDEO)
       
   115 #include "Document.h"
       
   116 #include "Settings.h"
       
   117 #endif
       
   118 
       
   119 namespace WebCore {
       
   120 
       
   121 using namespace SVGNames;
       
   122 
       
   123 typedef PassRefPtr<SVGElement> (*ConstructorFunction)(const QualifiedName&, Document*, bool createdByParser);
       
   124 typedef HashMap<AtomicStringImpl*, ConstructorFunction> FunctionMap;
       
   125 
       
   126 static FunctionMap* gFunctionMap = 0;
       
   127 
       
   128 static PassRefPtr<SVGElement> aConstructor(const QualifiedName& tagName, Document* document, bool)
       
   129 {
       
   130     return new SVGAElement(tagName, document);
       
   131 }
       
   132 
       
   133 static PassRefPtr<SVGElement> altglyphConstructor(const QualifiedName& tagName, Document* document, bool)
       
   134 {
       
   135     return new SVGAltGlyphElement(tagName, document);
       
   136 }
       
   137 
       
   138 static PassRefPtr<SVGElement> animateConstructor(const QualifiedName& tagName, Document* document, bool)
       
   139 {
       
   140     return new SVGAnimateElement(tagName, document);
       
   141 }
       
   142 
       
   143 static PassRefPtr<SVGElement> animatecolorConstructor(const QualifiedName& tagName, Document* document, bool)
       
   144 {
       
   145     return new SVGAnimateColorElement(tagName, document);
       
   146 }
       
   147 
       
   148 static PassRefPtr<SVGElement> animatemotionConstructor(const QualifiedName& tagName, Document* document, bool)
       
   149 {
       
   150     return new SVGAnimateMotionElement(tagName, document);
       
   151 }
       
   152 
       
   153 static PassRefPtr<SVGElement> animatetransformConstructor(const QualifiedName& tagName, Document* document, bool)
       
   154 {
       
   155     return new SVGAnimateTransformElement(tagName, document);
       
   156 }
       
   157 
       
   158 static PassRefPtr<SVGElement> circleConstructor(const QualifiedName& tagName, Document* document, bool)
       
   159 {
       
   160     return new SVGCircleElement(tagName, document);
       
   161 }
       
   162 
       
   163 static PassRefPtr<SVGElement> clippathConstructor(const QualifiedName& tagName, Document* document, bool)
       
   164 {
       
   165     return new SVGClipPathElement(tagName, document);
       
   166 }
       
   167 
       
   168 static PassRefPtr<SVGElement> cursorConstructor(const QualifiedName& tagName, Document* document, bool)
       
   169 {
       
   170     return new SVGCursorElement(tagName, document);
       
   171 }
       
   172 
       
   173 static PassRefPtr<SVGElement> defsConstructor(const QualifiedName& tagName, Document* document, bool)
       
   174 {
       
   175     return new SVGDefsElement(tagName, document);
       
   176 }
       
   177 
       
   178 static PassRefPtr<SVGElement> descConstructor(const QualifiedName& tagName, Document* document, bool)
       
   179 {
       
   180     return new SVGDescElement(tagName, document);
       
   181 }
       
   182 
       
   183 static PassRefPtr<SVGElement> ellipseConstructor(const QualifiedName& tagName, Document* document, bool)
       
   184 {
       
   185     return new SVGEllipseElement(tagName, document);
       
   186 }
       
   187 
       
   188 static PassRefPtr<SVGElement> feblendConstructor(const QualifiedName& tagName, Document* document, bool)
       
   189 {
       
   190     return new SVGFEBlendElement(tagName, document);
       
   191 }
       
   192 
       
   193 static PassRefPtr<SVGElement> fecolormatrixConstructor(const QualifiedName& tagName, Document* document, bool)
       
   194 {
       
   195     return new SVGFEColorMatrixElement(tagName, document);
       
   196 }
       
   197 
       
   198 static PassRefPtr<SVGElement> fecomponenttransferConstructor(const QualifiedName& tagName, Document* document, bool)
       
   199 {
       
   200     return new SVGFEComponentTransferElement(tagName, document);
       
   201 }
       
   202 
       
   203 static PassRefPtr<SVGElement> fecompositeConstructor(const QualifiedName& tagName, Document* document, bool)
       
   204 {
       
   205     return new SVGFECompositeElement(tagName, document);
       
   206 }
       
   207 
       
   208 static PassRefPtr<SVGElement> feconvolvematrixConstructor(const QualifiedName& tagName, Document* document, bool)
       
   209 {
       
   210     return new SVGFEConvolveMatrixElement(tagName, document);
       
   211 }
       
   212 
       
   213 static PassRefPtr<SVGElement> fediffuselightingConstructor(const QualifiedName& tagName, Document* document, bool)
       
   214 {
       
   215     return new SVGFEDiffuseLightingElement(tagName, document);
       
   216 }
       
   217 
       
   218 static PassRefPtr<SVGElement> fedisplacementmapConstructor(const QualifiedName& tagName, Document* document, bool)
       
   219 {
       
   220     return new SVGFEDisplacementMapElement(tagName, document);
       
   221 }
       
   222 
       
   223 static PassRefPtr<SVGElement> fedistantlightConstructor(const QualifiedName& tagName, Document* document, bool)
       
   224 {
       
   225     return new SVGFEDistantLightElement(tagName, document);
       
   226 }
       
   227 
       
   228 static PassRefPtr<SVGElement> fefloodConstructor(const QualifiedName& tagName, Document* document, bool)
       
   229 {
       
   230     return new SVGFEFloodElement(tagName, document);
       
   231 }
       
   232 
       
   233 static PassRefPtr<SVGElement> fefuncaConstructor(const QualifiedName& tagName, Document* document, bool)
       
   234 {
       
   235     return new SVGFEFuncAElement(tagName, document);
       
   236 }
       
   237 
       
   238 static PassRefPtr<SVGElement> fefuncbConstructor(const QualifiedName& tagName, Document* document, bool)
       
   239 {
       
   240     return new SVGFEFuncBElement(tagName, document);
       
   241 }
       
   242 
       
   243 static PassRefPtr<SVGElement> fefuncgConstructor(const QualifiedName& tagName, Document* document, bool)
       
   244 {
       
   245     return new SVGFEFuncGElement(tagName, document);
       
   246 }
       
   247 
       
   248 static PassRefPtr<SVGElement> fefuncrConstructor(const QualifiedName& tagName, Document* document, bool)
       
   249 {
       
   250     return new SVGFEFuncRElement(tagName, document);
       
   251 }
       
   252 
       
   253 static PassRefPtr<SVGElement> fegaussianblurConstructor(const QualifiedName& tagName, Document* document, bool)
       
   254 {
       
   255     return new SVGFEGaussianBlurElement(tagName, document);
       
   256 }
       
   257 
       
   258 static PassRefPtr<SVGElement> feimageConstructor(const QualifiedName& tagName, Document* document, bool)
       
   259 {
       
   260     return new SVGFEImageElement(tagName, document);
       
   261 }
       
   262 
       
   263 static PassRefPtr<SVGElement> femergeConstructor(const QualifiedName& tagName, Document* document, bool)
       
   264 {
       
   265     return new SVGFEMergeElement(tagName, document);
       
   266 }
       
   267 
       
   268 static PassRefPtr<SVGElement> femergenodeConstructor(const QualifiedName& tagName, Document* document, bool)
       
   269 {
       
   270     return new SVGFEMergeNodeElement(tagName, document);
       
   271 }
       
   272 
       
   273 static PassRefPtr<SVGElement> femorphologyConstructor(const QualifiedName& tagName, Document* document, bool)
       
   274 {
       
   275     return new SVGFEMorphologyElement(tagName, document);
       
   276 }
       
   277 
       
   278 static PassRefPtr<SVGElement> feoffsetConstructor(const QualifiedName& tagName, Document* document, bool)
       
   279 {
       
   280     return new SVGFEOffsetElement(tagName, document);
       
   281 }
       
   282 
       
   283 static PassRefPtr<SVGElement> fepointlightConstructor(const QualifiedName& tagName, Document* document, bool)
       
   284 {
       
   285     return new SVGFEPointLightElement(tagName, document);
       
   286 }
       
   287 
       
   288 static PassRefPtr<SVGElement> fespecularlightingConstructor(const QualifiedName& tagName, Document* document, bool)
       
   289 {
       
   290     return new SVGFESpecularLightingElement(tagName, document);
       
   291 }
       
   292 
       
   293 static PassRefPtr<SVGElement> fespotlightConstructor(const QualifiedName& tagName, Document* document, bool)
       
   294 {
       
   295     return new SVGFESpotLightElement(tagName, document);
       
   296 }
       
   297 
       
   298 static PassRefPtr<SVGElement> fetileConstructor(const QualifiedName& tagName, Document* document, bool)
       
   299 {
       
   300     return new SVGFETileElement(tagName, document);
       
   301 }
       
   302 
       
   303 static PassRefPtr<SVGElement> feturbulenceConstructor(const QualifiedName& tagName, Document* document, bool)
       
   304 {
       
   305     return new SVGFETurbulenceElement(tagName, document);
       
   306 }
       
   307 
       
   308 static PassRefPtr<SVGElement> filterConstructor(const QualifiedName& tagName, Document* document, bool)
       
   309 {
       
   310     return new SVGFilterElement(tagName, document);
       
   311 }
       
   312 
       
   313 static PassRefPtr<SVGElement> fontConstructor(const QualifiedName& tagName, Document* document, bool)
       
   314 {
       
   315     return new SVGFontElement(tagName, document);
       
   316 }
       
   317 
       
   318 static PassRefPtr<SVGElement> fontfaceConstructor(const QualifiedName& tagName, Document* document, bool)
       
   319 {
       
   320     return new SVGFontFaceElement(tagName, document);
       
   321 }
       
   322 
       
   323 static PassRefPtr<SVGElement> fontfaceformatConstructor(const QualifiedName& tagName, Document* document, bool)
       
   324 {
       
   325     return new SVGFontFaceFormatElement(tagName, document);
       
   326 }
       
   327 
       
   328 static PassRefPtr<SVGElement> fontfacenameConstructor(const QualifiedName& tagName, Document* document, bool)
       
   329 {
       
   330     return new SVGFontFaceNameElement(tagName, document);
       
   331 }
       
   332 
       
   333 static PassRefPtr<SVGElement> fontfacesrcConstructor(const QualifiedName& tagName, Document* document, bool)
       
   334 {
       
   335     return new SVGFontFaceSrcElement(tagName, document);
       
   336 }
       
   337 
       
   338 static PassRefPtr<SVGElement> fontfaceuriConstructor(const QualifiedName& tagName, Document* document, bool)
       
   339 {
       
   340     return new SVGFontFaceUriElement(tagName, document);
       
   341 }
       
   342 
       
   343 static PassRefPtr<SVGElement> foreignobjectConstructor(const QualifiedName& tagName, Document* document, bool)
       
   344 {
       
   345     return new SVGForeignObjectElement(tagName, document);
       
   346 }
       
   347 
       
   348 static PassRefPtr<SVGElement> gConstructor(const QualifiedName& tagName, Document* document, bool)
       
   349 {
       
   350     return new SVGGElement(tagName, document);
       
   351 }
       
   352 
       
   353 static PassRefPtr<SVGElement> glyphConstructor(const QualifiedName& tagName, Document* document, bool)
       
   354 {
       
   355     return new SVGGlyphElement(tagName, document);
       
   356 }
       
   357 
       
   358 static PassRefPtr<SVGElement> hkernConstructor(const QualifiedName& tagName, Document* document, bool)
       
   359 {
       
   360     return new SVGHKernElement(tagName, document);
       
   361 }
       
   362 
       
   363 static PassRefPtr<SVGElement> imageConstructor(const QualifiedName& tagName, Document* document, bool)
       
   364 {
       
   365     return new SVGImageElement(tagName, document);
       
   366 }
       
   367 
       
   368 static PassRefPtr<SVGElement> lineConstructor(const QualifiedName& tagName, Document* document, bool)
       
   369 {
       
   370     return new SVGLineElement(tagName, document);
       
   371 }
       
   372 
       
   373 static PassRefPtr<SVGElement> lineargradientConstructor(const QualifiedName& tagName, Document* document, bool)
       
   374 {
       
   375     return new SVGLinearGradientElement(tagName, document);
       
   376 }
       
   377 
       
   378 static PassRefPtr<SVGElement> markerConstructor(const QualifiedName& tagName, Document* document, bool)
       
   379 {
       
   380     return new SVGMarkerElement(tagName, document);
       
   381 }
       
   382 
       
   383 static PassRefPtr<SVGElement> maskConstructor(const QualifiedName& tagName, Document* document, bool)
       
   384 {
       
   385     return new SVGMaskElement(tagName, document);
       
   386 }
       
   387 
       
   388 static PassRefPtr<SVGElement> metadataConstructor(const QualifiedName& tagName, Document* document, bool)
       
   389 {
       
   390     return new SVGMetadataElement(tagName, document);
       
   391 }
       
   392 
       
   393 static PassRefPtr<SVGElement> missingglyphConstructor(const QualifiedName& tagName, Document* document, bool)
       
   394 {
       
   395     return new SVGMissingGlyphElement(tagName, document);
       
   396 }
       
   397 
       
   398 static PassRefPtr<SVGElement> mpathConstructor(const QualifiedName& tagName, Document* document, bool)
       
   399 {
       
   400     return new SVGMPathElement(tagName, document);
       
   401 }
       
   402 
       
   403 static PassRefPtr<SVGElement> pathConstructor(const QualifiedName& tagName, Document* document, bool)
       
   404 {
       
   405     return new SVGPathElement(tagName, document);
       
   406 }
       
   407 
       
   408 static PassRefPtr<SVGElement> patternConstructor(const QualifiedName& tagName, Document* document, bool)
       
   409 {
       
   410     return new SVGPatternElement(tagName, document);
       
   411 }
       
   412 
       
   413 static PassRefPtr<SVGElement> polygonConstructor(const QualifiedName& tagName, Document* document, bool)
       
   414 {
       
   415     return new SVGPolygonElement(tagName, document);
       
   416 }
       
   417 
       
   418 static PassRefPtr<SVGElement> polylineConstructor(const QualifiedName& tagName, Document* document, bool)
       
   419 {
       
   420     return new SVGPolylineElement(tagName, document);
       
   421 }
       
   422 
       
   423 static PassRefPtr<SVGElement> radialgradientConstructor(const QualifiedName& tagName, Document* document, bool)
       
   424 {
       
   425     return new SVGRadialGradientElement(tagName, document);
       
   426 }
       
   427 
       
   428 static PassRefPtr<SVGElement> rectConstructor(const QualifiedName& tagName, Document* document, bool)
       
   429 {
       
   430     return new SVGRectElement(tagName, document);
       
   431 }
       
   432 
       
   433 static PassRefPtr<SVGElement> scriptConstructor(const QualifiedName& tagName, Document* document, bool createdByParser)
       
   434 {
       
   435     return new SVGScriptElement(tagName, document, createdByParser);
       
   436 }
       
   437 
       
   438 static PassRefPtr<SVGElement> setConstructor(const QualifiedName& tagName, Document* document, bool)
       
   439 {
       
   440     return new SVGSetElement(tagName, document);
       
   441 }
       
   442 
       
   443 static PassRefPtr<SVGElement> stopConstructor(const QualifiedName& tagName, Document* document, bool)
       
   444 {
       
   445     return new SVGStopElement(tagName, document);
       
   446 }
       
   447 
       
   448 static PassRefPtr<SVGElement> styleConstructor(const QualifiedName& tagName, Document* document, bool createdByParser)
       
   449 {
       
   450     return new SVGStyleElement(tagName, document, createdByParser);
       
   451 }
       
   452 
       
   453 static PassRefPtr<SVGElement> svgConstructor(const QualifiedName& tagName, Document* document, bool)
       
   454 {
       
   455     return new SVGSVGElement(tagName, document);
       
   456 }
       
   457 
       
   458 static PassRefPtr<SVGElement> switchConstructor(const QualifiedName& tagName, Document* document, bool)
       
   459 {
       
   460     return new SVGSwitchElement(tagName, document);
       
   461 }
       
   462 
       
   463 static PassRefPtr<SVGElement> symbolConstructor(const QualifiedName& tagName, Document* document, bool)
       
   464 {
       
   465     return new SVGSymbolElement(tagName, document);
       
   466 }
       
   467 
       
   468 static PassRefPtr<SVGElement> textConstructor(const QualifiedName& tagName, Document* document, bool)
       
   469 {
       
   470     return new SVGTextElement(tagName, document);
       
   471 }
       
   472 
       
   473 static PassRefPtr<SVGElement> textpathConstructor(const QualifiedName& tagName, Document* document, bool)
       
   474 {
       
   475     return new SVGTextPathElement(tagName, document);
       
   476 }
       
   477 
       
   478 static PassRefPtr<SVGElement> titleConstructor(const QualifiedName& tagName, Document* document, bool)
       
   479 {
       
   480     return new SVGTitleElement(tagName, document);
       
   481 }
       
   482 
       
   483 static PassRefPtr<SVGElement> trefConstructor(const QualifiedName& tagName, Document* document, bool)
       
   484 {
       
   485     return new SVGTRefElement(tagName, document);
       
   486 }
       
   487 
       
   488 static PassRefPtr<SVGElement> tspanConstructor(const QualifiedName& tagName, Document* document, bool)
       
   489 {
       
   490     return new SVGTSpanElement(tagName, document);
       
   491 }
       
   492 
       
   493 static PassRefPtr<SVGElement> useConstructor(const QualifiedName& tagName, Document* document, bool)
       
   494 {
       
   495     return new SVGUseElement(tagName, document);
       
   496 }
       
   497 
       
   498 static PassRefPtr<SVGElement> viewConstructor(const QualifiedName& tagName, Document* document, bool)
       
   499 {
       
   500     return new SVGViewElement(tagName, document);
       
   501 }
       
   502 
       
   503 static PassRefPtr<SVGElement> vkernConstructor(const QualifiedName& tagName, Document* document, bool)
       
   504 {
       
   505     return new SVGVKernElement(tagName, document);
       
   506 }
       
   507 
       
   508 static void addTag(const QualifiedName& tag, ConstructorFunction func)
       
   509 {
       
   510     gFunctionMap->set(tag.localName().impl(), func);
       
   511 }
       
   512 
       
   513 static void createFunctionMap()
       
   514 {
       
   515     ASSERT(!gFunctionMap);
       
   516 
       
   517     // Create the table.
       
   518     gFunctionMap = new FunctionMap;
       
   519     
       
   520     // Populate it with constructor functions.
       
   521     addTag(aTag, aConstructor);
       
   522     addTag(altGlyphTag, altglyphConstructor);
       
   523     addTag(animateTag, animateConstructor);
       
   524     addTag(animateColorTag, animatecolorConstructor);
       
   525     addTag(animateMotionTag, animatemotionConstructor);
       
   526     addTag(animateTransformTag, animatetransformConstructor);
       
   527     addTag(circleTag, circleConstructor);
       
   528     addTag(clipPathTag, clippathConstructor);
       
   529     addTag(cursorTag, cursorConstructor);
       
   530     addTag(defsTag, defsConstructor);
       
   531     addTag(descTag, descConstructor);
       
   532     addTag(ellipseTag, ellipseConstructor);
       
   533     addTag(feBlendTag, feblendConstructor);
       
   534     addTag(feColorMatrixTag, fecolormatrixConstructor);
       
   535     addTag(feComponentTransferTag, fecomponenttransferConstructor);
       
   536     addTag(feCompositeTag, fecompositeConstructor);
       
   537     addTag(feConvolveMatrixTag, feconvolvematrixConstructor);
       
   538     addTag(feDiffuseLightingTag, fediffuselightingConstructor);
       
   539     addTag(feDisplacementMapTag, fedisplacementmapConstructor);
       
   540     addTag(feDistantLightTag, fedistantlightConstructor);
       
   541     addTag(feFloodTag, fefloodConstructor);
       
   542     addTag(feFuncATag, fefuncaConstructor);
       
   543     addTag(feFuncBTag, fefuncbConstructor);
       
   544     addTag(feFuncGTag, fefuncgConstructor);
       
   545     addTag(feFuncRTag, fefuncrConstructor);
       
   546     addTag(feGaussianBlurTag, fegaussianblurConstructor);
       
   547     addTag(feImageTag, feimageConstructor);
       
   548     addTag(feMergeTag, femergeConstructor);
       
   549     addTag(feMergeNodeTag, femergenodeConstructor);
       
   550     addTag(feMorphologyTag, femorphologyConstructor);
       
   551     addTag(feOffsetTag, feoffsetConstructor);
       
   552     addTag(fePointLightTag, fepointlightConstructor);
       
   553     addTag(feSpecularLightingTag, fespecularlightingConstructor);
       
   554     addTag(feSpotLightTag, fespotlightConstructor);
       
   555     addTag(feTileTag, fetileConstructor);
       
   556     addTag(feTurbulenceTag, feturbulenceConstructor);
       
   557     addTag(filterTag, filterConstructor);
       
   558     addTag(fontTag, fontConstructor);
       
   559     addTag(font_faceTag, fontfaceConstructor);
       
   560     addTag(font_face_formatTag, fontfaceformatConstructor);
       
   561     addTag(font_face_nameTag, fontfacenameConstructor);
       
   562     addTag(font_face_srcTag, fontfacesrcConstructor);
       
   563     addTag(font_face_uriTag, fontfaceuriConstructor);
       
   564     addTag(foreignObjectTag, foreignobjectConstructor);
       
   565     addTag(gTag, gConstructor);
       
   566     addTag(glyphTag, glyphConstructor);
       
   567     addTag(hkernTag, hkernConstructor);
       
   568     addTag(imageTag, imageConstructor);
       
   569     addTag(lineTag, lineConstructor);
       
   570     addTag(linearGradientTag, lineargradientConstructor);
       
   571     addTag(markerTag, markerConstructor);
       
   572     addTag(maskTag, maskConstructor);
       
   573     addTag(metadataTag, metadataConstructor);
       
   574     addTag(missing_glyphTag, missingglyphConstructor);
       
   575     addTag(mpathTag, mpathConstructor);
       
   576     addTag(pathTag, pathConstructor);
       
   577     addTag(patternTag, patternConstructor);
       
   578     addTag(polygonTag, polygonConstructor);
       
   579     addTag(polylineTag, polylineConstructor);
       
   580     addTag(radialGradientTag, radialgradientConstructor);
       
   581     addTag(rectTag, rectConstructor);
       
   582     addTag(scriptTag, scriptConstructor);
       
   583     addTag(setTag, setConstructor);
       
   584     addTag(stopTag, stopConstructor);
       
   585     addTag(styleTag, styleConstructor);
       
   586     addTag(svgTag, svgConstructor);
       
   587     addTag(switchTag, switchConstructor);
       
   588     addTag(symbolTag, symbolConstructor);
       
   589     addTag(textTag, textConstructor);
       
   590     addTag(textPathTag, textpathConstructor);
       
   591     addTag(titleTag, titleConstructor);
       
   592     addTag(trefTag, trefConstructor);
       
   593     addTag(tspanTag, tspanConstructor);
       
   594     addTag(useTag, useConstructor);
       
   595     addTag(viewTag, viewConstructor);
       
   596     addTag(vkernTag, vkernConstructor);
       
   597 }
       
   598 
       
   599 PassRefPtr<SVGElement> SVGElementFactory::createSVGElement(const QualifiedName& qName, Document* document, bool createdByParser)
       
   600 {
       
   601     if (!document)
       
   602         return 0;
       
   603 
       
   604 #if ENABLE(DASHBOARD_SUPPORT)
       
   605     Settings* settings = document->settings();
       
   606     if (settings && settings->usesDashboardBackwardCompatibilityMode())
       
   607         return 0;
       
   608 #endif
       
   609     if (!gFunctionMap)
       
   610         createFunctionMap();
       
   611     if (ConstructorFunction function = gFunctionMap->get(qName.localName().impl()))
       
   612         return function(qName, document, createdByParser);
       
   613     return SVGElement::create(qName, document);
       
   614 }
       
   615 
       
   616 } // namespace WebCore
       
   617 
       
   618 #endif