Title: [252480] trunk/Source/WebCore
Revision
252480
Author
[email protected]
Date
2019-11-15 00:29:37 -0800 (Fri, 15 Nov 2019)

Log Message

IDL: remove [PrimaryGlobal]
https://bugs.webkit.org/show_bug.cgi?id=180469

Patch by Rob Buis <[email protected]> on 2019-11-15
Reviewed by Sam Weinig.

Remove support for [PrimaryGlobal] from the code
generator and the existing IDL.

* bindings/scripts/CodeGeneratorJS.pm:
(IsGlobalOrPrimaryGlobalInterface):
* page/DOMWindow.idl:
* page/RemoteDOMWindow.idl:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (252479 => 252480)


--- trunk/Source/WebCore/ChangeLog	2019-11-15 06:50:11 UTC (rev 252479)
+++ trunk/Source/WebCore/ChangeLog	2019-11-15 08:29:37 UTC (rev 252480)
@@ -1,3 +1,18 @@
+2019-11-15  Rob Buis  <[email protected]>
+
+        IDL: remove [PrimaryGlobal]
+        https://bugs.webkit.org/show_bug.cgi?id=180469
+
+        Reviewed by Sam Weinig.
+
+        Remove support for [PrimaryGlobal] from the code
+        generator and the existing IDL.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (IsGlobalOrPrimaryGlobalInterface):
+        * page/DOMWindow.idl:
+        * page/RemoteDOMWindow.idl:
+
 2019-11-14  Wenson Hsieh  <[email protected]>
 
         Crash when setting HTMLInputElement.checked for a disconnected radio button in a shadow root

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (252479 => 252480)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2019-11-15 06:50:11 UTC (rev 252479)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2019-11-15 08:29:37 UTC (rev 252480)
@@ -1152,9 +1152,9 @@
         }
     }
     
-    # 2. If O supports named properties, O does not implement an interface with the [Global] or [PrimaryGlobal]
+    # 2. If O supports named properties, O does not implement an interface with the [Global]
     #    extended attribute and P is not an unforgeable property name of O, then:
-    if (GetNamedGetterOperation($interface) && !IsGlobalOrPrimaryGlobalInterface($interface)) {
+    if (GetNamedGetterOperation($interface) && !IsGlobalInterface($interface)) {
         # FIMXE: We need a more comprehensive story for Symbols.
         push(@$outputArray, "    if (!propertyName.isSymbol()) {\n");
         
@@ -1215,9 +1215,9 @@
     
     push(@$outputArray, "    PropertyDescriptor newPropertyDescriptor = propertyDescriptor;\n");
         
-    # 3. If O does not implement an interface with the [Global] or [PrimaryGlobal] extended attribute,
+    # 3. If O does not implement an interface with the [Global] extended attribute,
     #    then set Desc.[[Configurable]] to true.
-    if (!IsGlobalOrPrimaryGlobalInterface($interface)) {
+    if (!IsGlobalInterface($interface)) {
         push(@$outputArray, "    newPropertyDescriptor.setConfigurable(true);\n");
     }
     
@@ -1236,11 +1236,10 @@
     # so it can be shared between the generation of deleteProperty and deletePropertyByIndex.
 
     # 2. If O supports named properties, O does not implement an interface with the
-    #    [Global] or [PrimaryGlobal] extended attribute and the result of calling the
-    #    named property visibility algorithm with property name P and object O is true,
-    #    then:
+    #    [Global] extended attribute and the result of calling the named
+    #    property visibility algorithm with property name P and object O is true, then:
     assert("Named property deleters are not allowed without a corresponding named property getter.") if !GetNamedGetterOperation($interface);
-    assert("Named property deleters are not allowed on global object interfaces.") if IsGlobalOrPrimaryGlobalInterface($interface);
+    assert("Named property deleters are not allowed on global object interfaces.") if IsGlobalInterface($interface);
 
     AddToImplIncludes("JSDOMAbstractOperations.h", $conditional);
     my $overrideBuiltin = $codeGenerator->InheritsExtendedAttribute($interface, "OverrideBuiltins") ? "OverrideBuiltins::Yes" : "OverrideBuiltins::No";
@@ -1383,7 +1382,7 @@
     # the deleteProperty and deletePropertyByIndex override hooks.
 
     assert("Named property deleters are not allowed without a corresponding named property getter.") if !GetNamedGetterOperation($interface);
-    assert("Named property deleters are not allowed on global object interfaces.") if IsGlobalOrPrimaryGlobalInterface($interface);
+    assert("Named property deleters are not allowed on global object interfaces.") if IsGlobalInterface($interface);
 
     my $conditional = $namedDeleterOperation->extendedAttributes->{Conditional};
     if ($conditional) {
@@ -1655,11 +1654,11 @@
     return 0;
 }
 
-sub IsGlobalOrPrimaryGlobalInterface
+sub IsGlobalInterface
 {
     my $interface = shift;
 
-    return $interface->extendedAttributes->{Global} || $interface->extendedAttributes->{PrimaryGlobal};
+    return $interface->extendedAttributes->{Global};
 }
 
 sub AttributeShouldBeOnInstance
@@ -1667,7 +1666,7 @@
     my $interface = shift;
     my $attribute = shift;
 
-    return 1 if IsGlobalOrPrimaryGlobalInterface($interface);
+    return 1 if IsGlobalInterface($interface);
     return 1 if $codeGenerator->IsConstructorType($attribute->type);
 
     # [Unforgeable] attributes should be on the instance.
@@ -1732,7 +1731,7 @@
 {
     my ($interface, $operation) = @_;
 
-    return 1 if IsGlobalOrPrimaryGlobalInterface($interface);
+    return 1 if IsGlobalInterface($interface);
 
     # [Unforgeable] operations should be on the instance. https://heycam.github.io/webidl/#Unforgeable
     if (IsUnforgeable($interface, $operation)) {
@@ -4264,7 +4263,7 @@
         push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleInterfaceName}Prototype\", &Base::s_info, &${className}PrototypeTable, nullptr, CREATE_METHOD_TABLE(${className}Prototype) };\n\n");
     }
 
-    if (PrototypeHasStaticPropertyTable($interface) && !IsGlobalOrPrimaryGlobalInterface($interface)) {
+    if (PrototypeHasStaticPropertyTable($interface) && !IsGlobalInterface($interface)) {
         push(@implContent, "void ${className}Prototype::finishCreation(VM& vm)\n");
         push(@implContent, "{\n");
         push(@implContent, "    Base::finishCreation(vm);\n");
@@ -7148,7 +7147,7 @@
     push(@$outputArray, "    }\n");
 
     if (PrototypeHasStaticPropertyTable($interface)) {
-        if (IsGlobalOrPrimaryGlobalInterface($interface)) {
+        if (IsGlobalInterface($interface)) {
             $structureFlags{"JSC::HasStaticPropertyTable"} = 1;
         } else {
             push(@$outputArray, "\n");

Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.json (252479 => 252480)


--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.json	2019-11-15 06:50:11 UTC (rev 252479)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.json	2019-11-15 08:29:37 UTC (rev 252480)
@@ -372,13 +372,6 @@
             "contextsAllowed": ["interface"],
             "notes" : "Should only be used by elements that forward to Netscape plug-ins"
         },
-        "PrimaryGlobal": {
-            "contextsAllowed": ["interface"],
-            "values": ["*"],
-            "standard": {
-                "url": "https://heycam.github.io/webidl/#Global"
-            }
-        },
         "PrivateIdentifier": {
             "contextsAllowed": ["interface", "attribute", "operation"]
         },

Modified: trunk/Source/WebCore/page/DOMWindow.idl (252479 => 252480)


--- trunk/Source/WebCore/page/DOMWindow.idl	2019-11-15 06:50:11 UTC (rev 252479)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2019-11-15 08:29:37 UTC (rev 252480)
@@ -47,7 +47,8 @@
     JSCustomToNativeObject,
     JSLegacyParent=JSDOMWindowBase,
     LegacyUnenumerableNamedProperties,
-    PrimaryGlobal,
+    Global=Window,
+    Exposed=Window,
 ] interface DOMWindow : EventTarget {
     // The current browsing context.
     [DoNotCheckSecurity, Unforgeable, CustomGetter] readonly attribute WindowProxy window;

Modified: trunk/Source/WebCore/page/RemoteDOMWindow.idl (252479 => 252480)


--- trunk/Source/WebCore/page/RemoteDOMWindow.idl	2019-11-15 06:50:11 UTC (rev 252479)
+++ trunk/Source/WebCore/page/RemoteDOMWindow.idl	2019-11-15 08:29:37 UTC (rev 252480)
@@ -41,7 +41,8 @@
     JSLegacyParent=JSRemoteDOMWindowBase,
     LegacyUnenumerableNamedProperties,
     NoInterfaceObject,
-    PrimaryGlobal,
+    Global=Window,
+    Exposed=Window,
 ] interface RemoteDOMWindow {
     [Unforgeable, ImplementedAs=self] readonly attribute WindowProxy window;
     [Replaceable] readonly attribute WindowProxy self;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to