Title: [197874] trunk
Revision
197874
Author
[email protected]
Date
2016-03-09 12:37:36 -0800 (Wed, 09 Mar 2016)

Log Message

Move attributes to the instance for most interfaces that have "Error" in their name
https://bugs.webkit.org/show_bug.cgi?id=155231

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Our bindings generator was keeping attributes on the instances for
interfaces having "Error" or "Exception" in their name. The reason is
that interfaces that have "Error" in their prototype would not behave
correctly otherwise because "Error" incorrectly has its attributes on
the instance at the moment. However, in our bindings generator, the
condition to decide if an interface's prototype should be "Error" is
if $interface->isException. Therefore, we should use the same condition
to decide if we should keep attributes on the instance until "Error"
is updated to have its attributes on the prototype. Doing this for any
interface having "Error" or "Exception" in their name is overkill.

No new tests, already covered by existing test.

* bindings/scripts/CodeGeneratorJS.pm:
(InterfaceRequiresAttributesOnInstance):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (197873 => 197874)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-03-09 20:36:40 UTC (rev 197873)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-03-09 20:37:36 UTC (rev 197874)
@@ -1,5 +1,16 @@
 2016-03-09  Chris Dumez  <[email protected]>
 
+        Move attributes to the instance for most interfaces that have "Error" in their name
+        https://bugs.webkit.org/show_bug.cgi?id=155231
+
+        Reviewed by Darin Adler.
+
+        Rebaseline now that more checks are passing.
+
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+
+2016-03-09  Chris Dumez  <[email protected]>
+
         Align HTMLKeygenElement.keytype with the specification
         https://bugs.webkit.org/show_bug.cgi?id=155214
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (197873 => 197874)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-03-09 20:36:40 UTC (rev 197873)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-03-09 20:37:36 UTC (rev 197874)
@@ -2177,14 +2177,14 @@
 PASS MediaError interface: constant MEDIA_ERR_DECODE on interface prototype object 
 PASS MediaError interface: constant MEDIA_ERR_SRC_NOT_SUPPORTED on interface object 
 PASS MediaError interface: constant MEDIA_ERR_SRC_NOT_SUPPORTED on interface prototype object 
-FAIL MediaError interface: attribute code assert_true: The prototype object must have a property "code" expected true got false
+PASS MediaError interface: attribute code 
 PASS MediaError must be primary interface of errorVideo.error 
 PASS Stringification of errorVideo.error 
 PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_ABORTED" with the proper type (0) 
 PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_NETWORK" with the proper type (1) 
 PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_DECODE" with the proper type (2) 
 PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_SRC_NOT_SUPPORTED" with the proper type (3) 
-FAIL MediaError interface: errorVideo.error must inherit property "code" with the proper type (4) assert_inherits: property "code" found on object expected in prototype chain
+PASS MediaError interface: errorVideo.error must inherit property "code" with the proper type (4) 
 PASS AudioTrackList interface: existence and properties of interface object 
 PASS AudioTrackList interface object length 
 PASS AudioTrackList interface object name 
@@ -4253,10 +4253,10 @@
 PASS ErrorEvent interface object name 
 PASS ErrorEvent interface: existence and properties of interface prototype object 
 PASS ErrorEvent interface: existence and properties of interface prototype object's "constructor" property 
-FAIL ErrorEvent interface: attribute message assert_true: The prototype object must have a property "message" expected true got false
-FAIL ErrorEvent interface: attribute filename assert_true: The prototype object must have a property "filename" expected true got false
-FAIL ErrorEvent interface: attribute lineno assert_true: The prototype object must have a property "lineno" expected true got false
-FAIL ErrorEvent interface: attribute colno assert_true: The prototype object must have a property "colno" expected true got false
+PASS ErrorEvent interface: attribute message 
+PASS ErrorEvent interface: attribute filename 
+PASS ErrorEvent interface: attribute lineno 
+PASS ErrorEvent interface: attribute colno 
 FAIL ErrorEvent interface: attribute error assert_true: The prototype object must have a property "error" expected true got false
 PASS Navigator interface: existence and properties of interface object 
 PASS Navigator interface object length 

Modified: trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (197873 => 197874)


--- trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-03-09 20:36:40 UTC (rev 197873)
+++ trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-03-09 20:37:36 UTC (rev 197874)
@@ -2177,14 +2177,14 @@
 PASS MediaError interface: constant MEDIA_ERR_DECODE on interface prototype object 
 PASS MediaError interface: constant MEDIA_ERR_SRC_NOT_SUPPORTED on interface object 
 PASS MediaError interface: constant MEDIA_ERR_SRC_NOT_SUPPORTED on interface prototype object 
-FAIL MediaError interface: attribute code assert_true: The prototype object must have a property "code" expected true got false
+PASS MediaError interface: attribute code 
 PASS MediaError must be primary interface of errorVideo.error 
 PASS Stringification of errorVideo.error 
 PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_ABORTED" with the proper type (0) 
 PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_NETWORK" with the proper type (1) 
 PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_DECODE" with the proper type (2) 
 PASS MediaError interface: errorVideo.error must inherit property "MEDIA_ERR_SRC_NOT_SUPPORTED" with the proper type (3) 
-FAIL MediaError interface: errorVideo.error must inherit property "code" with the proper type (4) assert_inherits: property "code" found on object expected in prototype chain
+PASS MediaError interface: errorVideo.error must inherit property "code" with the proper type (4) 
 PASS AudioTrackList interface: existence and properties of interface object 
 PASS AudioTrackList interface object length 
 PASS AudioTrackList interface object name 
@@ -4253,10 +4253,10 @@
 PASS ErrorEvent interface object name 
 PASS ErrorEvent interface: existence and properties of interface prototype object 
 PASS ErrorEvent interface: existence and properties of interface prototype object's "constructor" property 
-FAIL ErrorEvent interface: attribute message assert_true: The prototype object must have a property "message" expected true got false
-FAIL ErrorEvent interface: attribute filename assert_true: The prototype object must have a property "filename" expected true got false
-FAIL ErrorEvent interface: attribute lineno assert_true: The prototype object must have a property "lineno" expected true got false
-FAIL ErrorEvent interface: attribute colno assert_true: The prototype object must have a property "colno" expected true got false
+PASS ErrorEvent interface: attribute message 
+PASS ErrorEvent interface: attribute filename 
+PASS ErrorEvent interface: attribute lineno 
+PASS ErrorEvent interface: attribute colno 
 FAIL ErrorEvent interface: attribute error assert_true: The prototype object must have a property "error" expected true got false
 PASS Navigator interface: existence and properties of interface object 
 PASS Navigator interface object length 

Modified: trunk/Source/WebCore/ChangeLog (197873 => 197874)


--- trunk/Source/WebCore/ChangeLog	2016-03-09 20:36:40 UTC (rev 197873)
+++ trunk/Source/WebCore/ChangeLog	2016-03-09 20:37:36 UTC (rev 197874)
@@ -1,3 +1,26 @@
+2016-03-09  Chris Dumez  <[email protected]>
+
+        Move attributes to the instance for most interfaces that have "Error" in their name
+        https://bugs.webkit.org/show_bug.cgi?id=155231
+
+        Reviewed by Darin Adler.
+
+        Our bindings generator was keeping attributes on the instances for
+        interfaces having "Error" or "Exception" in their name. The reason is
+        that interfaces that have "Error" in their prototype would not behave
+        correctly otherwise because "Error" incorrectly has its attributes on
+        the instance at the moment. However, in our bindings generator, the
+        condition to decide if an interface's prototype should be "Error" is
+        if $interface->isException. Therefore, we should use the same condition
+        to decide if we should keep attributes on the instance until "Error"
+        is updated to have its attributes on the prototype. Doing this for any
+        interface having "Error" or "Exception" in their name is overkill.
+
+        No new tests, already covered by existing test.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (InterfaceRequiresAttributesOnInstance):
+
 2016-03-09  Daniel Bates  <[email protected]>
 
         Rename WebCore/platform/crypto/mac/CryptoDigestMac.cpp to WebCore/platform/crypto/commoncrypto/CryptoDigestCommonCrypto.cpp

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (197873 => 197874)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-03-09 20:36:40 UTC (rev 197873)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-03-09 20:37:36 UTC (rev 197874)
@@ -673,9 +673,8 @@
     # Some of them are unavoidable due to DOM weirdness, in which case we should
     # add an IDL attribute for them
 
-    # FIXME: These two should be fixed by removing the custom override of message, etc
-    return 1 if $interfaceName =~ "Exception";
-    return 1 if $interfaceName =~ "Error";
+    # FIXME: We should be able to drop this once <rdar://problem/24466097> is fixed.
+    return 1 if $interface->isException;
 
     return 1 if IsDOMGlobalObject($interface);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to