Changeset 147218 in webkit
- Timestamp:
- Mar 29, 2013 8:02:17 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r147217 r147218 1 2013-03-29 Peter Rybin <prybin@chromium.org> 2 3 Web Inspector: gather accessor property getter and setter under a single tree node 4 https://bugs.webkit.org/show_bug.cgi?id=113357 5 6 Reviewed by Yury Semikhatsky. 7 8 Expectations are fixed with changed functionality and changed tests. 9 10 * inspector/debugger/properties-special-expected.txt: 11 * inspector/debugger/properties-special.html: 12 * inspector/runtime/runtime-getProperties-expected.txt: 13 * inspector/runtime/runtime-getProperties.html: 14 * platform/chromium/inspector/debugger/properties-special-expected.txt: 15 1 16 2013-03-29 Timothy Hatcher <timothy@apple.com> 2 17 -
trunk/LayoutTests/inspector/console/command-line-api-expected.txt
r146840 r147218 1 CONSOLE MESSAGE: line 122 2: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s")1 CONSOLE MESSAGE: line 1226: The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $("#%s") 2 2 Tests that command line api works. 3 3 -
trunk/LayoutTests/inspector/debugger/properties-special-expected.txt
r134914 r147218 6 6 Watch expressions updated. 7 7 Nodes are expanded. 8 error: Function scope data is not available 9 Subnodes are expanded. 8 10 'Object(true)' => 'Boolean' 9 11 '__proto__' => 'Boolean' … … 14 16 'name' => '""' 15 17 'prototype' => 'Object' 18 'constructor' => 'function (a, b) { return a + b; }' 19 '__proto__' => 'Object' 16 20 '__proto__' => 'function () {' 17 21 <function scope> 18 22 '(function(a,b) { return a + b; }).bind({}, 2)' => 'function () {' 19 'get arguments' => 'function () {' 20 'get caller' => 'function () {' 23 'arguments' => null 24 'get' => 'function () {' 25 'set' => 'function () {' 26 'caller' => null 27 'get' => 'function () {' 28 'set' => 'function () {' 21 29 'length' => '1' 22 30 'name' => '""' 23 'set arguments' => 'function () {'24 'set caller' => 'function () {'25 31 '__proto__' => 'function () {' 26 32 <function scope> -
trunk/LayoutTests/inspector/debugger/properties-special.html
r141777 r147218 65 65 { 66 66 InspectorTest.addResult("Nodes are expanded."); 67 var treeNodes = watchExpressionsSection.propertiesTreeOutline.children; 68 for (var i = 0; i < treeNodes.length; i++) { 69 var children = treeNodes[i].children; 70 for (var j = 0; j < children.length; j++) { 71 if (children[j].nameElement && children[j].nameElement.textContent === "__proto__") 72 continue; 73 children[j].expand(); 74 } 75 } 76 InspectorTest.runAfterPendingDispatches(subnodesExpanded); 77 } 78 79 function subnodesExpanded() 80 { 81 InspectorTest.addResult("Subnodes are expanded."); 67 82 InspectorTest.dumpObjectPropertySectionDeep(watchExpressionsSection); 68 83 -
trunk/LayoutTests/inspector/runtime/runtime-getProperties-expected.txt
r127147 r147218 7 7 { 8 8 enumerable : true 9 name : "get foo" 10 value : { 9 getter : { 11 10 description : "function () { return 1; }" 12 11 objectId : <string> 13 12 type : "function" 14 13 } 15 writable : false 16 } 17 { 18 enumerable : true 19 name : "set foo" 20 value : { 14 name : "foo" 15 setter : { 21 16 description : "function (value) { }" 22 17 objectId : <string> … … 29 24 { 30 25 enumerable : true 31 name : "get foo" 32 value : { 26 getter : { 33 27 description : "function () { return 1; }" 34 28 objectId : <string> 35 29 type : "function" 36 30 } 37 writable : false 38 } 39 { 40 enumerable : true 41 name : "set foo" 42 value : { 31 name : "foo" 32 setter : { 43 33 description : "undefined" 44 34 objectId : <undefined> -
trunk/LayoutTests/inspector/runtime/runtime-getProperties.html
r102916 r147218 61 61 ]); 62 62 63 function convertPropertyValueForTest(propertyObject, fieldName) 64 { 65 var value = propertyObject[fieldName]; 66 if (value) 67 propertyObject[fieldName] = { type: value.type, description: value.description.replace("function foo", "function "), objectId: value.objectId }; 68 } 69 63 70 function dumpProperty(property) 64 71 { … … 66 73 return; 67 74 68 var value = property.value;69 if (value)70 property.value = { type: value.type, description: value.description.replace("function foo", "function "), objectId: value.objectId };75 convertPropertyValueForTest(property, "value"); 76 convertPropertyValueForTest(property, "getter"); 77 convertPropertyValueForTest(property, "setter"); 71 78 InspectorTest.dump(property, { objectId: "formatAsTypeName" }); 72 79 } -
trunk/LayoutTests/platform/chromium/inspector/debugger/properties-special-expected.txt
r134914 r147218 6 6 Watch expressions updated. 7 7 Nodes are expanded. 8 Subnodes are expanded. 8 9 'Object(true)' => 'Boolean' 9 10 '__proto__' => 'Boolean' … … 15 16 'name' => '""' 16 17 'prototype' => 'Object' 18 'constructor' => 'function (a,b) { return a + b; }' 19 '__proto__' => 'Object' 17 20 '__proto__' => 'function Empty() {}' 18 21 <function scope> 22 'With Block' => 'Object' 23 Closure 24 'Global' => 'Window' 19 25 '(function(a,b) { return a + b; }).bind({}, 2)' => 'function () { [native code] }' 20 'get arguments' => 'function ThrowTypeError() { [native code] }' 21 'get caller' => 'function ThrowTypeError() { [native code] }' 26 'arguments' => null 27 'get' => 'function ThrowTypeError() { [native code] }' 28 'set' => 'function ThrowTypeError() { [native code] }' 29 'caller' => null 30 'get' => 'function ThrowTypeError() { [native code] }' 31 'set' => 'function ThrowTypeError() { [native code] }' 22 32 'length' => '1' 23 33 'name' => '""' 24 'set arguments' => 'function ThrowTypeError() { [native code] }'25 'set caller' => 'function ThrowTypeError() { [native code] }'26 34 '__proto__' => 'function Empty() {}' 27 35 '[[TargetFunction]]' => 'function (a,b) { return a + b; }' 36 'arguments' => 'null' 37 'caller' => 'null' 38 'length' => '2' 39 'name' => '""' 40 'prototype' => 'Object' 41 '__proto__' => 'function Empty() {}' 42 <function scope> 28 43 '[[BoundThis]]' => 'Object' 44 '__proto__' => 'Object' 29 45 '[[BoundArgs]]' => 'Array[1]' 46 '0' => '2' 47 'length' => '1' 48 '__proto__' => 'Array[0]' 30 49 Debugger was disabled. 31 50 -
trunk/Source/WebCore/ChangeLog
r147213 r147218 1 2013-03-29 Peter Rybin <prybin@chromium.org> 2 3 Web Inspector: gather accessor property getter and setter under a single tree node 4 https://bugs.webkit.org/show_bug.cgi?id=113357 5 6 Reviewed by Yury Semikhatsky. 7 8 A new tree element class AccessorPropertyTreeElemenet is added. 9 RemoteObjectProperty can now represent accessor property (if value is null). 10 New tree element is supported in CSS stylesheet. 11 12 Testing code is slightly modified for exploring new tree elements. 13 14 * inspector/InjectedScriptSource.js: 15 (.): 16 * inspector/front-end/ObjectPropertiesSection.js: 17 (WebInspector.ObjectPropertyTreeElement.populateWithProperties): 18 (WebInspector.AccessorPropertyTreeElement): 19 (WebInspector.AccessorPropertyTreeElement.prototype.onattach): 20 (WebInspector.AccessorPropertyTreeElement.prototype.update): 21 (WebInspector.AccessorPropertyTreeElement.prototype.onpopulate): 22 * inspector/front-end/RemoteObject.js: 23 * inspector/front-end/inspector.css: 24 (.accessor-property-name): 25 1 26 2013-03-29 Ilya Tikhonovsky <loislo@chromium.org> 2 27 -
trunk/Source/WebCore/inspector/InjectedScriptSource.js
r146937 r147218 346 346 return "Cannot resolve function by id."; 347 347 var details = InjectedScriptHost.functionDetails(func); 348 349 if (details === undefined) 350 return "Function scope data is not available"; 351 348 352 if ("rawScopes" in details) { 349 353 var objectGroupName = this._idToObjectGroupName[parsedFunctionId.id]; -
trunk/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js
r146900 r147218 479 479 continue; 480 480 properties[i].parentObject = value; 481 treeElement.appendChild(new treeElementConstructor(properties[i])); 481 if (properties[i].value) 482 treeElement.appendChild(new treeElementConstructor(properties[i])); 483 else 484 treeElement.appendChild(new WebInspector.AccessorPropertyTreeElement(properties[i])); 482 485 } 483 486 if (value && value.type === "function") { … … 595 598 /** 596 599 * @constructor 600 * @param {WebInspector.RemoteObjectProperty} property accessor property 601 * @extends {TreeElement} 602 */ 603 WebInspector.AccessorPropertyTreeElement = function(property) 604 { 605 TreeElement.call(this, "", null, false); 606 this._property = property; 607 this.toggleOnClick = true; 608 this.selectable = false; 609 this.hasChildren = true; 610 } 611 612 WebInspector.AccessorPropertyTreeElement.prototype = { 613 onattach: function() 614 { 615 this.update(); 616 }, 617 618 update: function() 619 { 620 var markerElement = document.createElement("span"); 621 markerElement.textContent = "\u2388"; 622 markerElement.className = "name accessor-property-name"; 623 624 var nameElement = document.createElement("span"); 625 nameElement.textContent = this._property.name; 626 nameElement.className = "name accessor-property-name"; 627 628 this.listItemElement.removeChildren(); 629 this.listItemElement.appendChild(markerElement); 630 this.listItemElement.appendChild(nameElement); 631 632 this.nameElement = nameElement; 633 }, 634 635 onpopulate: function() 636 { 637 this.removeChildren(); 638 639 if (this._property.getter) { 640 var getterProperty = new WebInspector.RemoteObjectProperty("get", this._property.getter); 641 this.appendChild(new this.treeOutline.section.treeElementConstructor(getterProperty)); 642 } 643 if (this._property.setter) { 644 var setterProperty = new WebInspector.RemoteObjectProperty("set", this._property.setter); 645 this.appendChild(new this.treeOutline.section.treeElementConstructor(setterProperty)); 646 } 647 }, 648 649 __proto__: TreeElement.prototype 650 } 651 652 /** 653 * @constructor 597 654 * @extends {TreeElement} 598 655 * @param {WebInspector.RemoteObject} remoteObject -
trunk/Source/WebCore/inspector/front-end/RemoteObject.js
r146759 r147218 216 216 for (var i = 0; properties && i < properties.length; ++i) { 217 217 var property = properties[i]; 218 if (property.get || property.set) { 219 if (property.get) 220 result.push(new WebInspector.RemoteObjectProperty("get " + property.name, WebInspector.RemoteObject.fromPayload(property.get), property)); 221 if (property.set) 222 result.push(new WebInspector.RemoteObjectProperty("set " + property.name, WebInspector.RemoteObject.fromPayload(property.set), property)); 223 } else 224 result.push(new WebInspector.RemoteObjectProperty(property.name, WebInspector.RemoteObject.fromPayload(property.value), property)); 218 result.push(new WebInspector.RemoteObjectProperty(property.name, null, property)); 225 219 } 226 220 var internalPropertiesResult; … … 445 439 * @constructor 446 440 * @param {string} name 447 * @param { WebInspector.RemoteObject} value441 * @param {?WebInspector.RemoteObject} value 448 442 * @param {Object=} descriptor 449 443 */ … … 451 445 { 452 446 this.name = name; 453 this.value = value;454 447 this.enumerable = descriptor ? !!descriptor.enumerable : true; 455 448 this.writable = descriptor ? !!descriptor.writable : true; 449 if (value === null && descriptor) { 450 if (descriptor.value) 451 this.value = WebInspector.RemoteObject.fromPayload(descriptor.value) 452 if (descriptor.get) 453 this.getter = WebInspector.RemoteObject.fromPayload(descriptor.get); 454 if (descriptor.set) 455 this.setter = WebInspector.RemoteObject.fromPayload(descriptor.set); 456 } else 457 this.value = value; 458 456 459 if (descriptor && descriptor.wasThrown) 457 460 this.wasThrown = true; -
trunk/Source/WebCore/inspector/front-end/inspector.css
r146918 r147218 1805 1805 } 1806 1806 1807 .accessor-property-name { 1808 font-style: italic; 1809 } 1810 1807 1811 .swatch { 1808 1812 margin-left: 1px;
Note: See TracChangeset
for help on using the changeset viewer.