Web Inspector: Adopt Object.assign and improve its display in Console
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Apr 2015 02:08:07 +0000 (02:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Apr 2015 02:08:07 +0000 (02:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144135

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-23
Reviewed by Darin Adler.

* UserInterface/Models/NativeFunctionParameters.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183233 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js

index d9d3486..f356f7d 100644 (file)
@@ -1,3 +1,12 @@
+2015-04-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Adopt Object.assign and improve its display in Console
+        https://bugs.webkit.org/show_bug.cgi?id=144135
+
+        Reviewed by Darin Adler.
+
+        * UserInterface/Models/NativeFunctionParameters.js:
+
 2015-04-23  Timothy Hatcher  <timothy@apple.com>
 
         Web Inspector: DebuggerSidebarPanel's _callStackContentTreeOutline should suppress filtering
index 1330105..3894f25 100644 (file)
@@ -28,6 +28,7 @@
 
 WebInspector.NativeConstructorFunctionParameters = {
     Object: {
+        assign: "target, ...sources",
         create: "prototype, [propertiesObject]",
         defineProperty: "object, propertyName, descriptor",
         defineProperties: "object, properties",
@@ -2066,11 +2067,6 @@ WebInspector.NativePrototypeFunctionParameters.WeakMap = WebInspector.NativeProt
 WebInspector.NativePrototypeFunctionParameters.WeakSet = WebInspector.NativePrototypeFunctionParameters.Set;
 
 (function() {
-    function mixin(o, mixin) {
-        for (var p in mixin)
-            o[p] = mixin[p];
-    }
-
     var EventTarget = {
         addEventListener: "type, listener, [useCapture=false]",
         removeEventListener: "type, listener, [useCapture=false]",
@@ -2087,7 +2083,7 @@ WebInspector.NativePrototypeFunctionParameters.WeakSet = WebInspector.NativeProt
     ];
 
     for (var type of eventTargetTypes)
-        mixin(WebInspector.NativePrototypeFunctionParameters[type], EventTarget);
+        Object.assign(WebInspector.NativePrototypeFunctionParameters[type], EventTarget);
 
     var ElementQueries = {
         getElementsByClassName: "classNames",
@@ -2097,6 +2093,6 @@ WebInspector.NativePrototypeFunctionParameters.WeakSet = WebInspector.NativeProt
         querySelectorAll: "selectors",
     };
 
-    mixin(WebInspector.NativePrototypeFunctionParameters.Element, ElementQueries);
-    mixin(WebInspector.NativePrototypeFunctionParameters.Document, ElementQueries);
+    Object.assign(WebInspector.NativePrototypeFunctionParameters.Element, ElementQueries);
+    Object.assign(WebInspector.NativePrototypeFunctionParameters.Document, ElementQueries);
 })();