Title: [251064] trunk/Source/WebCore
Revision
251064
Author
timothy_hor...@apple.com
Date
2019-10-13 22:04:29 -0700 (Sun, 13 Oct 2019)

Log Message

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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (251063 => 251064)


--- trunk/Source/WebCore/ChangeLog	2019-10-14 00:05:47 UTC (rev 251063)
+++ trunk/Source/WebCore/ChangeLog	2019-10-14 05:04:29 UTC (rev 251064)
@@ -1,5 +1,22 @@
 2019-10-13  Tim Horton  <timothy_hor...@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_hor...@apple.com>
+
         Don't include ApplicationServices in npapi.h
         https://bugs.webkit.org/show_bug.cgi?id=202911
 

Modified: trunk/Source/WebCore/dom/make_names.pl (251063 => 251064)


--- trunk/Source/WebCore/dom/make_names.pl	2019-10-14 00:05:47 UTC (rev 251063)
+++ trunk/Source/WebCore/dom/make_names.pl	2019-10-14 05:04:29 UTC (rev 251064)
@@ -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";
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to