Title: [107567] trunk
Revision
107567
Author
[email protected]
Date
2012-02-13 06:27:51 -0800 (Mon, 13 Feb 2012)

Log Message

Web Inspector: In Inspector.json PropertyDescriptor.writable should be declared optional
https://bugs.webkit.org/show_bug.cgi?id=77917

Patch by Peter Rybin <[email protected]> on 2012-02-13
Reviewed by Pavel Feldman.

Source/WebCore:

Property descriptor is fixed in Inspector.json. Also retroactively in
0.1 and 1.0.
Injected script in instructed to never return null property values.

* inspector/InjectedScriptSource.js:
(.):
* inspector/Inspector-0.1.json:
* inspector/Inspector-1.0.json:
* inspector/Inspector.json:

LayoutTests:

"Undefined" getter and setter is now visible.

* inspector/runtime/runtime-getProperties-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (107566 => 107567)


--- trunk/LayoutTests/ChangeLog	2012-02-13 14:18:13 UTC (rev 107566)
+++ trunk/LayoutTests/ChangeLog	2012-02-13 14:27:51 UTC (rev 107567)
@@ -1,3 +1,14 @@
+2012-02-13  Peter Rybin  <[email protected]>
+
+        Web Inspector: In Inspector.json PropertyDescriptor.writable should be declared optional
+        https://bugs.webkit.org/show_bug.cgi?id=77917
+
+        Reviewed by Pavel Feldman.
+
+        "Undefined" getter and setter is now visible.
+
+        * inspector/runtime/runtime-getProperties-expected.txt:
+
 2012-02-13  Csaba Osztrogonác  <[email protected]>
 
         [Qt] Unreviewed gardening.

Modified: trunk/LayoutTests/inspector/runtime/runtime-getProperties-expected.txt (107566 => 107567)


--- trunk/LayoutTests/inspector/runtime/runtime-getProperties-expected.txt	2012-02-13 14:18:13 UTC (rev 107566)
+++ trunk/LayoutTests/inspector/runtime/runtime-getProperties-expected.txt	2012-02-13 14:27:51 UTC (rev 107567)
@@ -36,4 +36,14 @@
     enumerable : true
     writable : false
 }
+{
+    name : "set foo"
+    value : {
+        type : "undefined"
+        description : "undefined"
+        objectId : <undefined>
+    }
+    enumerable : true
+    writable : false
+}
 

Modified: trunk/Source/WebCore/ChangeLog (107566 => 107567)


--- trunk/Source/WebCore/ChangeLog	2012-02-13 14:18:13 UTC (rev 107566)
+++ trunk/Source/WebCore/ChangeLog	2012-02-13 14:27:51 UTC (rev 107567)
@@ -1,3 +1,20 @@
+2012-02-13  Peter Rybin  <[email protected]>
+
+        Web Inspector: In Inspector.json PropertyDescriptor.writable should be declared optional
+        https://bugs.webkit.org/show_bug.cgi?id=77917
+
+        Reviewed by Pavel Feldman.
+
+        Property descriptor is fixed in Inspector.json. Also retroactively in
+        0.1 and 1.0.
+        Injected script in instructed to never return null property values.
+
+        * inspector/InjectedScriptSource.js:
+        (.):
+        * inspector/Inspector-0.1.json:
+        * inspector/Inspector-1.0.json:
+        * inspector/Inspector.json:
+
 2012-02-13  ChangSeok Oh  <[email protected]>
 
         [GTK] Revise configuration for MHTML

Modified: trunk/Source/WebCore/inspector/InjectedScriptSource.js (107566 => 107567)


--- trunk/Source/WebCore/inspector/InjectedScriptSource.js	2012-02-13 14:18:13 UTC (rev 107566)
+++ trunk/Source/WebCore/inspector/InjectedScriptSource.js	2012-02-13 14:27:51 UTC (rev 107567)
@@ -184,12 +184,17 @@
 
         for (var i = 0; i < descriptors.length; ++i) {
             var descriptor = descriptors[i];
-            if (descriptor.get)
+            if ("get" in descriptor)
                 descriptor.get = this._wrapObject(descriptor.get, objectGroupName);
-            if (descriptor.set)
+            if ("set" in descriptor)
                 descriptor.set = this._wrapObject(descriptor.set, objectGroupName);
             if ("value" in descriptor)
                 descriptor.value = this._wrapObject(descriptor.value, objectGroupName);
+            if (!("configurable" in descriptor))
+                descriptor.configurable = false;
+            if (!("enumerable" in descriptor))
+                descriptor.enumerable = false;
+            
         }
         return descriptors;
     },

Modified: trunk/Source/WebCore/inspector/Inspector-0.1.json (107566 => 107567)


--- trunk/Source/WebCore/inspector/Inspector-0.1.json	2012-02-13 14:18:13 UTC (rev 107566)
+++ trunk/Source/WebCore/inspector/Inspector-0.1.json	2012-02-13 14:27:51 UTC (rev 107567)
@@ -265,7 +265,7 @@
                 "properties": [
                     { "name": "name", "type": "string", "description": "Property name." },
                     { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
-                    { "name": "writable", "type": "boolean", "description": "True if the value associated with the property may be changed (data descriptors only)." },
+                    { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
                     { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
                     { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
                     { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." },

Modified: trunk/Source/WebCore/inspector/Inspector-1.0.json (107566 => 107567)


--- trunk/Source/WebCore/inspector/Inspector-1.0.json	2012-02-13 14:18:13 UTC (rev 107566)
+++ trunk/Source/WebCore/inspector/Inspector-1.0.json	2012-02-13 14:27:51 UTC (rev 107567)
@@ -376,7 +376,7 @@
                 "properties": [
                     { "name": "name", "type": "string", "description": "Property name." },
                     { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
-                    { "name": "writable", "type": "boolean", "description": "True if the value associated with the property may be changed (data descriptors only)." },
+                    { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
                     { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
                     { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
                     { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." },

Modified: trunk/Source/WebCore/inspector/Inspector.json (107566 => 107567)


--- trunk/Source/WebCore/inspector/Inspector.json	2012-02-13 14:18:13 UTC (rev 107566)
+++ trunk/Source/WebCore/inspector/Inspector.json	2012-02-13 14:27:51 UTC (rev 107567)
@@ -377,7 +377,7 @@
                 "properties": [
                     { "name": "name", "type": "string", "description": "Property name." },
                     { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
-                    { "name": "writable", "type": "boolean", "description": "True if the value associated with the property may be changed (data descriptors only)." },
+                    { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
                     { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
                     { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
                     { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." },
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to