Stop 'using namespace *Names' in files generated by make_names.pl
https://bugs.webkit.org/show_bug.cgi?id=202907

Reviewed by Geoffrey Garen.

* dom/make_names.pl:
(printFunctionTable):
(printFactoryCppFile):
(printWrapperFactoryCppFile):
Stop 'using namespace SVGNames' and 'using namepace HTMLNames' in
files generated by make_names.pl. Just use fully-qualified names.

There is some overlap between the two namespaces, so this is a
prerequsite for doing more aggressive unified source bundling in bindings.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index d783f16..b76d319 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,5 +1,22 @@
 2019-10-13  Tim Horton  <timothy_horton@apple.com>
 
+        Stop 'using namespace *Names' in files generated by make_names.pl
+        https://bugs.webkit.org/show_bug.cgi?id=202907
+
+        Reviewed by Geoffrey Garen.
+
+        * dom/make_names.pl:
+        (printFunctionTable):
+        (printFactoryCppFile):
+        (printWrapperFactoryCppFile):
+        Stop 'using namespace SVGNames' and 'using namepace HTMLNames' in
+        files generated by make_names.pl. Just use fully-qualified names.
+
+        There is some overlap between the two namespaces, so this is a
+        prerequsite for doing more aggressive unified source bundling in bindings.
+
+2019-10-13  Tim Horton  <timothy_horton@apple.com>
+
         Don't include ApplicationServices in npapi.h
         https://bugs.webkit.org/show_bug.cgi?id=202911
 
diff --git a/Source/WebCore/dom/make_names.pl b/Source/WebCore/dom/make_names.pl
index d951ff0..7041f12 100755
--- a/Source/WebCore/dom/make_names.pl
+++ b/Source/WebCore/dom/make_names.pl
@@ -504,9 +504,9 @@
         }
 
         if ($enabledTags{$tagName}{mapToTagName}) {
-            print F "        { ${tagName}Tag, $enabledTags{$tagName}{mapToTagName}To${tagName}Constructor },\n";
+            print F "        { $parameters{namespace}Names::${tagName}Tag, $enabledTags{$tagName}{mapToTagName}To${tagName}Constructor },\n";
         } else {
-            print F "        { ${tagName}Tag, $tagConstructorMap{$tagName}Constructor },\n";
+            print F "        { $parameters{namespace}Names::${tagName}Tag, $tagConstructorMap{$tagName}Constructor },\n";
         }
 
         if ($conditional) {
@@ -967,8 +967,6 @@
 
 namespace WebCore {
 
-using namespace $parameters{namespace}Names;
-
 typedef Ref<$parameters{namespace}Element> (*$parameters{namespace}ConstructorFunction)(const QualifiedName&, Document&$formElementArgumentForDeclaration, bool createdByParser);
 
 END
@@ -1059,7 +1057,7 @@
         const auto& name = *entry.qualifiedName;
         return entry.function($argumentList);
     }
-    return $parameters{fallbackInterfaceName}::create(QualifiedName(nullAtom(), localName, ${lowercaseNamespacePrefix}NamespaceURI), document);
+    return $parameters{fallbackInterfaceName}::create(QualifiedName(nullAtom(), localName, $parameters{namespace}Names::${lowercaseNamespacePrefix}NamespaceURI), document);
 }
 
 Ref<$parameters{namespace}Element> $parameters{namespace}ElementFactory::createElement(const QualifiedName& name, Document& document$formElementArgumentForDefinition, bool createdByParser)
@@ -1249,8 +1247,6 @@
 
 namespace WebCore {
 
-using namespace $parameters{namespace}Names;
-
 typedef JSDOMObject* (*Create$parameters{namespace}ElementWrapperFunction)(JSDOMGlobalObject*, Ref<$parameters{namespace}Element>&&);
 
 END
@@ -1288,7 +1284,7 @@
             $ucTag = $enabledTags{$tag}{JSInterfaceName};
         }
 
-        print F "        { ${tag}Tag, create${ucTag}Wrapper },\n";
+        print F "        { $parameters{namespace}Names::${tag}Tag, create${ucTag}Wrapper },\n";
 
         if ($conditional) {
             print F "#endif\n";