Title: [170534] trunk
Revision
170534
Author
mhahnenb...@apple.com
Date
2014-06-27 10:49:25 -0700 (Fri, 27 Jun 2014)

Log Message

XHR should keep attributes on instance
https://bugs.webkit.org/show_bug.cgi?id=134363

Reviewed by Sam Weinig.


Source/WebCore: 
Test: js/dom/xhr-prototype-define-property.html

Having them on the prototype broke some sites due to the fact that these DOM attributes are currently 
not configurable. Once we make them configurable, we can move XHR attributes back to the prototype.

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

LayoutTests: 
Added a new test for defining properties on XHR prototype.

* js/dom/xhr-prototype-define-property-expected.txt: Added.
* js/dom/xhr-prototype-define-property.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (170533 => 170534)


--- trunk/LayoutTests/ChangeLog	2014-06-27 17:06:57 UTC (rev 170533)
+++ trunk/LayoutTests/ChangeLog	2014-06-27 17:49:25 UTC (rev 170534)
@@ -1,3 +1,15 @@
+2014-06-27  Mark Hahnenberg  <mhahnenb...@apple.com>
+
+        XHR should keep attributes on instance
+        https://bugs.webkit.org/show_bug.cgi?id=134363
+
+        Reviewed by Sam Weinig.
+
+        Added a new test for defining properties on XHR prototype.
+
+        * js/dom/xhr-prototype-define-property-expected.txt: Added.
+        * js/dom/xhr-prototype-define-property.html: Added.
+
 2014-06-27  Manuel Rego Casasnovas  <r...@igalia.com>
 
         [CSS Grid Layout] Interaction between auto-placement and column / row spanning

Added: trunk/LayoutTests/js/dom/xhr-prototype-define-property-expected.txt (0 => 170534)


--- trunk/LayoutTests/js/dom/xhr-prototype-define-property-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/js/dom/xhr-prototype-define-property-expected.txt	2014-06-27 17:49:25 UTC (rev 170534)
@@ -0,0 +1,9 @@
+Check that XHR prototype allows defineProperty for built-in attributes.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/js/dom/xhr-prototype-define-property.html (0 => 170534)


--- trunk/LayoutTests/js/dom/xhr-prototype-define-property.html	                        (rev 0)
+++ trunk/LayoutTests/js/dom/xhr-prototype-define-property.html	2014-06-27 17:49:25 UTC (rev 170534)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script>
+description('Check that XHR prototype allows defineProperty for built-in attributes.');
+
+function a() {
+    this.overrideMimeType("text/plain; charset=x-user-defined");
+};
+var d = XMLHttpRequest.prototype;
+Object.defineProperty(d, "responseType", {
+   set: a
+});
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (170533 => 170534)


--- trunk/Source/WebCore/ChangeLog	2014-06-27 17:06:57 UTC (rev 170533)
+++ trunk/Source/WebCore/ChangeLog	2014-06-27 17:49:25 UTC (rev 170534)
@@ -1,3 +1,18 @@
+2014-06-27  Mark Hahnenberg  <mhahnenb...@apple.com>
+
+        XHR should keep attributes on instance
+        https://bugs.webkit.org/show_bug.cgi?id=134363
+
+        Reviewed by Sam Weinig.
+
+        Test: js/dom/xhr-prototype-define-property.html
+
+        Having them on the prototype broke some sites due to the fact that these DOM attributes are currently 
+        not configurable. Once we make them configurable, we can move XHR attributes back to the prototype.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (InterfaceRequiresAttributesOnInstanceForCompatibility):
+
 2014-06-27  Jeremy Jones  <jere...@apple.com>
 
         removeCodedFrames should modify ref to TrackBuffer no a copy.

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (170533 => 170534)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2014-06-27 17:06:57 UTC (rev 170533)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2014-06-27 17:49:25 UTC (rev 170534)
@@ -611,6 +611,8 @@
     # Needed for compatibility with existing content
     return 1 if $interfaceName =~ "Touch";
     return 1 if $interfaceName =~ "Navigator";
+    # FIXME: Once https://bugs.webkit.org/show_bug.cgi?id=134364 is fixed, we can remove this.
+    return 1 if $interfaceName =~ "XMLHttpRequest";
 
     return 0;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to