webengine/osswebengine/WebCore/html/HTMLElementFactory.cpp
changeset 10 a359256acfc6
parent 5 10e98eab6f85
equal deleted inserted replaced
5:10e98eab6f85 10:a359256acfc6
   394 static void addTag(const QualifiedName& tag, ConstructorFunc func)
   394 static void addTag(const QualifiedName& tag, ConstructorFunc func)
   395 {
   395 {
   396     gFunctionMap->set(tag.localName().impl(), func);
   396     gFunctionMap->set(tag.localName().impl(), func);
   397 }
   397 }
   398 
   398 
   399 struct cleanupFuncMap {
   399 void cleanupFuncMap() 
   400     ~cleanupFuncMap() {
   400 {
   401         if( gFunctionMap ) {
   401     if( gFunctionMap ) {
   402             gFunctionMap->clear();
   402         gFunctionMap->clear();
   403             delete gFunctionMap;
   403         delete gFunctionMap;
   404             gFunctionMap=0;
   404         gFunctionMap=0;
   405         }
   405 
   406     }
   406     }
   407 };
   407 }
   408 static cleanupFuncMap cleanup;
   408 
   409 static void createFunctionMap()
   409 static void createFunctionMap()
   410 {
   410 {
   411     // Create the table.
   411     // Create the table.
   412     gFunctionMap = new FunctionMap;
   412     gFunctionMap = new FunctionMap;
   413     
   413