Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (180592 => 180593)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-02-25 00:31:38 UTC (rev 180593)
@@ -1,5 +1,244 @@
2015-02-24 Joseph Pecoraro <pecor...@apple.com>
+ Web Inspector: New Object Tree View UI
+ https://bugs.webkit.org/show_bug.cgi?id=141932
+
+ Reviewed by Timothy Hatcher.
+
+ Part 1: Majority of the UI.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Images/Eye.svg: Added.
+ * UserInterface/Images/TypeBoolean.svg: Added.
+ * UserInterface/Images/TypeNull.svg: Added.
+ * UserInterface/Images/TypeNumber.svg: Added.
+ * UserInterface/Images/TypeObject.svg: Added.
+ * UserInterface/Images/TypeRegex.svg: Added.
+ * UserInterface/Images/TypeString.svg: Added.
+ * UserInterface/Images/TypeSymbol.svg: Added.
+ * UserInterface/Images/TypeUndefined.svg: Added.
+ * UserInterface/Main.html:
+ Miscellaneous.
+
+ * UserInterface/Views/FormattedValue.css:
+ (.formatted-boolean):
+ Give booleans a light purple color.
+
+ * UserInterface/Views/FormattedValue.js:
+ (WebInspector.FormattedValue.createElementForTypesAndValue):
+ Previously we were truncating function value logging in the console. E.g.
+ js> multiLineFunction
+ <- function multiLineFunction() {
+ No longer truncate so we display the full string.
+
+ * UserInterface/Models/PropertyPath.js: Added.
+ (WebInspector.PropertyPath):
+ (WebInspector.PropertyPath.prototype.get object):
+ (WebInspector.PropertyPath.prototype.get parent):
+ (WebInspector.PropertyPath.prototype.get isPrototype):
+ (WebInspector.PropertyPath.prototype.get rootObject):
+ (WebInspector.PropertyPath.prototype.get lastNonPrototypeObject):
+ (WebInspector.PropertyPath.prototype.get pathComponent):
+ (WebInspector.PropertyPath.prototype.get fullPath):
+ (WebInspector.PropertyPath.prototype.isRoot):
+ (WebInspector.PropertyPath.prototype.isPathComponentImpossible):
+ (WebInspector.PropertyPath.prototype.isFullPathImpossible):
+ (WebInspector.PropertyPath.prototype.appendPropertyName):
+ (WebInspector.PropertyPath.prototype.appendPropertySymbol):
+ (WebInspector.PropertyPath.prototype.appendInternalPropertyName):
+ (WebInspector.PropertyPath.prototype.appendArrayIndex):
+ (WebInspector.PropertyPath.prototype.appendCollectionIndex):
+ (WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
+ (WebInspector.PropertyPath.prototype._canPropertyNameBeDotAccess):
+ PropertyPaths are a linked list of remote object / patch component pairs.
+ For a property like "foo['property 1'].__proto__.baz" we will have a PropertyPath
+ chain with the RemoteObject for each component. This allows us to accurately
+ select the RemoteObject on which we should invoke a getter. It also allows
+ us to display the property path string from the root object, if possible.
+
+ * UserInterface/Protocol/RemoteObject.js:
+ (WebInspector.RemoteObject.prototype.callFunction):
+ (WebInspector.RemoteObject.prototype.backendInvokeGetter):
+ (WebInspector.RemoteObject.prototype.invokeGetter):
+ Provide a way to invoke a getter function on a remote object if we
+ have a reference to the getter function. At the same time, improve
+ the mostly unused callFunction API to automatically convert
+ RemoteObjects / values to their Runtime.CallArgument format.
+
+ * UserInterface/Views/ObjectTreePropertyTreeElement.css: Added.
+ (.object-tree-property):
+ (.object-tree-property > .disclosure-button):
+ (.object-tree-property.parent > .disclosure-button):
+ (.object-tree-property.parent.expanded > .disclosure-button):
+ (.object-tree-property > .titles):
+ Focused styles for the ObjectTree property GeneralTreeElements.
+ Reuse navigation sidebar disclosure-triangles.
+
+ (.object-tree-property > .icon):
+ (.object-tree-property.boolean > .icon):
+ (.object-tree-property.function > .icon):
+ (.object-tree-property.number > .icon):
+ (.object-tree-property.object > .icon):
+ (.object-tree-property.object.null > .icon):
+ (.object-tree-property.object.node > .icon):
+ (.object-tree-property.regex > .icon):
+ (.object-tree-property.string > .icon):
+ (.object-tree-property.symbol > .icon):
+ (.object-tree-property.undefined > .icon):
+ Use different icons for different object types. Special case
+ "accessor" to be undefined.
+
+ (.object-tree-property .prototype-name):
+ (.object-tree-property .property-name.not-enumerable):
+ Style property names in sans-serif font.
+ Give non-enumerable properties a slightly transparent look.
+
+ (.object-tree-property.prototype-property):
+ (.object-tree-property.prototype-property > .icon):
+ (.object-tree-property.prototype-property + ol):
+ Special styles for prototype properties and their children.
+
+ (.object-tree-property .getter):
+ (.object-tree-property .getter:hover):
+ (.object-tree-property .read-only):
+ Styles for clickable getter button and non-interactive read-only indicator.
+
+ (.object-tree-property :matches(.formatted-string, .formatted-regexp)):
+ Do not allow wrapping for values that previously allowed wrapping.
+
+ (.object-tree-property .value.error):
+ If getting a value resulted in an error, display that error in red.
+
+ * UserInterface/Views/ObjectTreePropertyTreeElement.js:
+ (WebInspector.ObjectTreePropertyTreeElement):
+ Extend from GeneralTreeElement and set up class names on the root <li> object.
+
+ (WebInspector.ObjectTreePropertyTreeElement.prototype.onattach): Deleted.
+ No longer needed by using GeneralTreeElement.
+
+ (WebInspector.ObjectTreePropertyTreeElement.prototype.onexpand):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype.oncollapse):
+ Expand / collapse an associated ObjectPreview if we have one.
+
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
+ This PropertyTreeElement may be displaying for a value, or a getter that has
+ gotten a value. Refer to this as the "resolvedValue".
+
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath):
+ A PropertyPath leaf used for tooltips.
+
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTooltips):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
+ Helpers for updating small parts of the UI. When a getter is invoked,
+ we need to update the entire UI of this TreeElement.
+
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._titleFragment):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitle): Deleted.
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitlePropertyStyle): Deleted.
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAPIStyle): Deleted.
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitleAPIStyle):
+ Create the UI for the mainTitle of this PropertyTreeElement.
+
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._createReadOnlyIconElement):
+ Helpers for creating the small components of the title UI.
+
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._alwaysDisplayAsProperty):
+ Establish when a property should still be displayed as a "property" even when in API mode.
+ For example a value property on a prototype, should still display as an expandable property.
+
+ * UserInterface/Views/ObjectTreeView.css:
+ (.object-tree > :matches(.title, .object-preview)::before):
+ (.object-tree:not(.lossless-preview) > :matches(.title, .object-preview)):
+ (.object-tree.expanded > :matches(.title, .object-preview)::before):
+ (.object-tree .object-tree-outline):
+ (.object-tree-outline ol):
+ (.object-tree-outline li .empty-message):
+ (:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline):
+ (.object-tree > .title): Deleted.
+ (.object-tree-outline): Deleted.
+ (.object-tree-outline li): Deleted.
+ (.object-tree-outline li.parent): Deleted.
+ (.object-tree-outline li.parent::before): Deleted.
+ (.object-tree-outline li.parent.expanded::before): Deleted.
+ (.object-tree-property .name): Deleted.
+ (.object-tree-property .name.not-enumerable): Deleted.
+ (.object-tree-property .value.error): Deleted.
+ (.console-group-messages .object-tree:not(.lossless-preview)): Deleted.
+ (.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)): Deleted.
+ (.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)::before): Deleted.
+ (.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree): Deleted.
+ (.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline): Deleted.
+ Move most PropertyTreeElement specific styles into ObjectPropertyTreeElement.css.
+ Plenty of console specific files were eliminated.
+
+ * UserInterface/Views/ObjectTreeView.js:
+ (WebInspector.ObjectTreeView.prototype.update):
+ (WebInspector.ObjectTreeView.prototype._updateProperties):
+
+
+ Part 2: Provide better parameter lists for native functions.
+
+ When expanding an object's prototype chain, with authored code
+ you will accurately see parameter lists for user authored functions
+ because we can get this by parsing Function.prototype.toString.
+ For native code, we don't get any parameter information. In such cases
+ we can detect we are a native function, and provide our own strings.
+
+ This fills in most of the _javascript_ built-ins and some DOM
+ functions, however we should autogenerate the rest of the DOM.
+
+ * UserInterface/Base/Utilities.js:
+ (isFunctionStringNativeCode):
+ Helper to check if a function is native or not based on its string.
+
+ * UserInterface/Main.html:
+ * UserInterface/Models/NativeFunctionParameters.js: Added.
+ Dictionary of parameter lists for native constructor functions
+ and prototype functions.
+
+ * UserInterface/Views/ObjectTreePropertyTreeElement.js:
+ (WebInspector.ObjectTreePropertyTreeElement):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._functionPropertyString):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype):
+ When we have a native function, try to provide a better parameter string.
+
+
+ Part 3: Better handle errors when invoking getters.
+
+ * UserInterface/Protocol/RemoteObject.js:
+ (WebInspector.RemoteObject.prototype.callFunction):
+ (WebInspector.RemoteObject.prototype.invokeGetter):
+ Pass the error, wasThrown, and result through to the caller so they can
+ act on all the information possible. Provide encapsulation though
+ and auto-convert the result to a RemoteObject for the callback.
+
+ * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
+ (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved):
+ (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady):
+ * UserInterface/Views/DOMTreeElement.js:
+ (WebInspector.DOMTreeElement.prototype._createTooltipForNode.setTooltip):
+ (WebInspector.DOMTreeElement.prototype._createTooltipForNode.resolvedNode):
+ (WebInspector.DOMTreeElement.prototype._createTooltipForNode):
+ Update current users of callFunctionOn for the new callback parameters.
+
+ * UserInterface/Views/ObjectTreePropertyTreeElement.css:
+ (.object-tree-property.had-error > .icon):
+ * UserInterface/Views/ObjectTreePropertyTreeElement.js:
+ (WebInspector.ObjectTreePropertyTreeElement):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
+ (WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement.):
+ Better style getters with errors.
+
+2015-02-24 Joseph Pecoraro <pecor...@apple.com>
+
Web Inspector: Do not show "{}" after Date description in Object Previews
https://bugs.webkit.org/show_bug.cgi?id=141898
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (180592 => 180593)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -25,6 +25,7 @@
localizedStrings["%s (default)"] = "%s (default)";
localizedStrings["%s (hidden)"] = "%s (hidden)";
localizedStrings["%s Event Dispatched"] = "%s Event Dispatched";
+localizedStrings["%s Prototype"] = "%s Prototype";
localizedStrings["(Index)"] = "(Index)";
localizedStrings["(anonymous function)"] = "(anonymous function)";
localizedStrings["(many)"] = "(many)";
@@ -119,6 +120,7 @@
localizedStrings["Cookies"] = "Cookies";
localizedStrings["Copy Row"] = "Copy Row";
localizedStrings["Copy as HTML"] = "Copy as HTML";
+localizedStrings["Could not fetch properties. Object may no longer exist."] = "Could not fetch properties. Object may no longer exist.";
localizedStrings["DOM Tree"] = "DOM Tree";
localizedStrings["Data"] = "Data";
localizedStrings["Data returned from the database is too large."] = "Data returned from the database is too large.";
@@ -258,6 +260,7 @@
localizedStrings["Input: "] = "Input: ";
localizedStrings["Inspect"] = "Inspect";
localizedStrings["Invalid"] = "Invalid";
+localizedStrings["Invoke getter"] = "Invoke getter";
localizedStrings["_javascript_ & Events"] = "_javascript_ & Events";
localizedStrings["Keep Log on Reload"] = "Keep Log on Reload";
localizedStrings["Key"] = "Key";
@@ -351,6 +354,7 @@
localizedStrings["Query String"] = "Query String";
localizedStrings["Radial Gradient"] = "Radial Gradient";
localizedStrings["Range Issue"] = "Range Issue";
+localizedStrings["Read only"] = "Read only";
localizedStrings["Readonly"] = "Readonly";
localizedStrings["Reasons for compositing:"] = "Reasons for compositing:";
localizedStrings["Recording"] = "Recording";
@@ -462,6 +466,7 @@
localizedStrings["Type"] = "Type";
localizedStrings["Type Issue"] = "Type Issue";
localizedStrings["Type information for variable: %s"] = "Type information for variable: %s";
+localizedStrings["Unable to determine path to property from root"] = "Unable to determine path to property from root";
localizedStrings["Unknown node"] = "Unknown node";
localizedStrings["Untitled"] = "Untitled";
localizedStrings["User Agent Stylesheet"] = "User Agent Stylesheet";
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -1026,6 +1026,11 @@
}
});
+function isFunctionStringNativeCode(str)
+{
+ return str.endsWith("{\n [native code]\n}");
+}
+
function clamp(min, value, max)
{
return Math.min(Math.max(min, value), max);
Added: trunk/Source/WebInspectorUI/UserInterface/Images/Eye.svg (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Images/Eye.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Eye.svg 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg viewBox="0 0 16 11" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M 7.942 8.124 C 6.53 8.124 5.385 6.95 5.385 5.499 C 5.385 4.05 6.53 2.875 7.942 2.875 C 9.355 2.875 10.5 4.05 10.5 5.499 C 10.5 6.95 9.355 8.124 7.942 8.124 M 7.942 1.0 C 3.923 1.0 1.001 5.499 1.001 5.499 C 1.001 5.499 3.923 9.999 7.942 9.999 C 11.962 9.999 14.884 5.499 14.884 5.499 C 14.884 5.499 11.962 1.0 7.942 1.0" fill="none" stroke="black"/>
+ <path d="M 7.942 4.375 C 7.337 4.375 6.846 4.878 6.846 5.5 C 6.846 6.121 7.337 6.625 7.942 6.625 C 8.548 6.625 9.038 6.121 9.038 5.5 C 9.038 4.878 8.548 4.375 7.942 4.375"/>
+</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/TypeBoolean.svg (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Images/TypeBoolean.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/TypeBoolean.svg 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M 13 1 L 3 1 C 1.9 1 1 1.9 1 3 L 1 13 C 1 14.1 1.9 15 3 15 L 13 15 C 14.1 15 15 14.1 15 13 L 15 3 C 15 1.9 14.1 1 13 1 L 13 1 Z" fill="rgb(190, 165, 202)"/>
+ <path d="M 13 1 L 3 1 C 1.9 1 1 1.9 1 3 L 1 13 C 1 14.1 1.9 15 3 15 L 13 15 C 14.1 15 15 14.1 15 13 L 15 3 C 15 1.9 14.1 1 13 1 M 13 2 C 13.552 2 14 2.449 14 3 L 14 13 C 14 13.552 13.552 14 13 14 L 3 14 C 2.449 14 2 13.552 2 13 L 2 3 C 2 2.449 2.449 2 3 2 L 13 2" fill="rgb(141, 118, 153)"/>
+ <path d="M 6.7266 10.872101 L 7.1006 10.872101 C 7.8306 10.872101 8.3356 10.7971 8.6116 10.6471 C 8.8896 10.5001 9.027599 10.2281 9.027599 9.8351 C 9.027599 9.4291 8.841599 9.0931 8.4716 8.8241 C 8.0996 8.555099 7.6316 8.421101 7.0656 8.421101 L 6.7266 8.421101 L 6.7266 10.872101 Z M 6.7266 7.3571 L 7.1396 7.3571 C 7.6286 7.3571 8.0186 7.2421 8.3056 7.013101 C 8.5956 6.7831 8.7386 6.4721 8.7386 6.0781 C 8.7386 5.7121 8.6226 5.4641 8.3926 5.3331 C 8.1586 5.2031 7.7216 5.1371 7.0776 5.1371 L 6.7266 5.1371 L 6.7266 7.3571 Z M 5.0876 12.0001 L 5.0876 4.0461 L 7.9306 4.0461 C 8.770599 4.0461 9.4116 4.1961 9.850599 4.4971 C 10.2896 4.7981 10.5086 5.2371 10.5086 5.8141 C 10.5086 6.770101 9.8386 7.4481 8.501599 7.8461 C 10.0656 8.2071 10.8476 8.9361 10.8476 10.0331 C 10.8476 10.6681 10.6186 11.1521 10.1616 11.4931 C 9.7036 11.8301 9.0456 12.0001 8.190599 12.0001 L 5.0876 12.0001 Z" fill="white"/>
+ <path d="M 7.7266 9.8457 L 7.7266 9.5417 C 7.7836 9.568701 7.8366 9.5987 7.8856 9.6337 C 7.9926 9.7117 8.0186 9.7607 8.025599 9.7997 C 7.9596 9.8147 7.8636 9.8317 7.7266 9.8457 M 7.9306 3.0457 L 5.0876 3.0457 L 4.0876 3.0457 L 4.0876 4.0457 L 4.0876 11.999701 L 4.0876 12.999701 L 5.0876 12.999701 L 8.190599 12.999701 C 9.2586 12.999701 10.1216 12.7637 10.7536 12.2987 C 11.4706 11.7637 11.8476 10.9817 11.8476 10.0337 C 11.8476 9.419701 11.6646 8.485701 10.7176 7.7477 C 11.3386 7.1267 11.5086 6.4107 11.5086 5.8137 C 11.5086 4.9037 11.1306 4.1627 10.4156 3.6727 C 9.8006 3.2507 8.987599 3.0457 7.9306 3.0457 M 6.7266 10.8717 L 7.1006 10.8717 C 7.8306 10.8717 8.3356 10.7967 8.6116 10.6477 C 8.8896 10.499701 9.027599 10.228701 9.027599 9.8347 C 9.027599 9.428699 8.841599 9.0927 8.4716 8.8237 C 8.0996 8.554701 7.6316 8.4207 7.0656 8.4207 L 6.7266 8.4207 L 6.7266 10.8717 M 6.7266 7.3567 L 7.1396 7.3567 C 7.6286 7.3567 8.0186 7.2417 8.3056 7.0127 C 8.5956 6.782701 8.7386 6
.471701 8.7386 6.077701 C 8.7386 5.7117 8.6226 5.4637 8.3926 5.3337 C 8.1586 5.2027 7.7216 5.1377 7.0776 5.1377 L 6.7266 5.1377 L 6.7266 7.3567 M 7.9306 4.0457 C 8.770599 4.0457 9.4116 4.1967 9.850599 4.4977 C 10.2896 4.7987 10.5086 5.2377 10.5086 5.8137 C 10.5086 6.7707 9.8386 7.447701 8.501599 7.8457 C 10.0656 8.207701 10.8476 8.936701 10.8476 10.0337 C 10.8476 10.6677 10.6186 11.1527 10.1616 11.492701 C 9.7036 11.8297 9.0456 11.999701 8.190599 11.999701 L 5.0876 11.999701 L 5.0876 4.0457 L 7.9306 4.0457" fill="rgb(153, 127, 166)"/>
+</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/TypeNull.svg (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Images/TypeNull.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/TypeNull.svg 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
+ <path fill="rgb(203, 203, 203)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
+ <path fill="rgb(153, 153, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
+ <path fill="rgb(166, 166, 166)" d="M 9.5625 12.742188 C 9.230469 12.742188 8.917969 12.574219 8.734375 12.300781 C 8.734375 12.300781 7.816406 10.941406 6.90625 9.585938 C 6.90625 10.617188 6.90625 11.742188 6.90625 11.742188 C 6.90625 12.292969 6.457031 12.742188 5.90625 12.742188 L 4.578125 12.742188 C 4.027344 12.742188 3.578125 12.292969 3.578125 11.742188 L 3.578125 3.792969 C 3.578125 3.242188 4.027344 2.792969 4.578125 2.792969 L 6.035156 2.792969 C 6.367188 2.792969 6.675781 2.957031 6.863281 3.230469 C 6.863281 3.230469 7.789062 4.601562 8.71875 5.96875 C 8.71875 4.925781 8.71875 3.792969 8.71875 3.792969 C 8.71875 3.242188 9.164062 2.792969 9.71875 2.792969 L 11.046875 2.792969 C 11.597656 2.792969 12.046875 3.242188 12.046875 3.792969 L 12.046875 11.742188 C 12.046875 12.292969 11.597656 12.742188 11.046875 12.742188 L 9.5625 12.742188"/>
+ <path fill="white" d="M 4.578125 11.742188 L 4.578125 3.792969 L 6.035156 3.792969 L 9.71875 9.222656 L 9.71875 3.792969 L 11.046875 3.792969 L 11.046875 11.742188 L 9.5625 11.742188 L 5.90625 6.3125 L 5.90625 11.742188 Z"/>
+</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/TypeNumber.svg (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Images/TypeNumber.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/TypeNumber.svg 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
+ <path fill="rgb(148, 183, 219)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
+ <path fill="rgb(106, 136, 170)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
+ <path fill="rgb(113, 146, 184)" d="M 9.5625 12.742188 C 9.230469 12.742188 8.917969 12.574219 8.734375 12.300781 C 8.734375 12.300781 7.816406 10.941406 6.90625 9.585938 C 6.90625 10.617188 6.90625 11.742188 6.90625 11.742188 C 6.90625 12.292969 6.457031 12.742188 5.90625 12.742188 L 4.578125 12.742188 C 4.027344 12.742188 3.578125 12.292969 3.578125 11.742188 L 3.578125 3.792969 C 3.578125 3.242188 4.027344 2.792969 4.578125 2.792969 L 6.035156 2.792969 C 6.367188 2.792969 6.675781 2.957031 6.863281 3.230469 C 6.863281 3.230469 7.789062 4.601562 8.71875 5.96875 C 8.71875 4.925781 8.71875 3.792969 8.71875 3.792969 C 8.71875 3.242188 9.164062 2.792969 9.71875 2.792969 L 11.046875 2.792969 C 11.597656 2.792969 12.046875 3.242188 12.046875 3.792969 L 12.046875 11.742188 C 12.046875 12.292969 11.597656 12.742188 11.046875 12.742188 L 9.5625 12.742188"/>
+ <path fill="white" d="M 4.578125 11.742188 L 4.578125 3.792969 L 6.035156 3.792969 L 9.71875 9.222656 L 9.71875 3.792969 L 11.046875 3.792969 L 11.046875 11.742188 L 9.5625 11.742188 L 5.90625 6.3125 L 5.90625 11.742188 Z"/>
+</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/TypeObject.svg (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Images/TypeObject.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/TypeObject.svg 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M 13 1 L 3 1 C 1.9 1 1 1.9 1 3 L 1 13 C 1 14.1 1.9 15 3 15 L 13 15 C 14.1 15 15 14.1 15 13 L 15 3 C 15 1.9 14.1 1 13 1 L 13 1 Z" fill="rgb(246, 222, 146)"/>
+ <path d="M 13 1 L 3 1 C 1.9 1 1 1.9 1 3 L 1 13 C 1 14.1 1.9 15 3 15 L 13 15 C 14.1 15 15 14.1 15 13 L 15 3 C 15 1.9 14.1 1 13 1 M 13 2 C 13.552 2 14 2.449 14 3 L 14 13 C 14 13.552 13.552 14 13 14 L 3 14 C 2.449 14 2 13.552 2 13 L 2 3 C 2 2.449 2.449 2 3 2 L 13 2" fill="rgb(204, 181, 108)"/>
+ <path d="M 7.9736 11.041 C 8.6766 11.041 9.2346 10.757999 9.6436 10.193 C 10.0536 9.629 10.2586 8.864 10.2586 7.898 C 10.2586 6.962 10.0526 6.210999 9.6406 5.645 C 9.2286 5.079 8.683599 4.795 8.0056 4.795 C 7.3206 4.795 6.7726 5.079 6.3626 5.645 C 5.9526 6.210999 5.7476 6.967999 5.7476 7.915 C 5.7476 8.855 5.9516 9.611 6.3596 10.183 C 6.7676 10.754999 7.3066 11.041 7.9736 11.041 M 7.9526 12.15 C 6.7556 12.15 5.7986 11.766 5.0816 10.997 C 4.3646 10.226999 4.0056 9.202 4.0056 7.92 C 4.0056 6.624 4.3666 5.596 5.0866 4.833 C 5.8076 4.071 6.7806 3.69 8.0056 3.69 C 9.223599 3.69 10.1936 4.071 10.9156 4.833 C 11.6386 5.596 11.9996 6.62 11.9996 7.903999 C 11.9996 9.217999 11.6386 10.254999 10.9156 11.013 C 10.1936 11.771 9.2056 12.15 7.9526 12.15" fill="white"/>
+ <path d="M 7.9736 10.041 C 7.6326 10.041 7.3936 9.91 7.1736 9.601999 C 6.8906 9.205999 6.7476 8.638 6.7476 7.915 C 6.7476 7.186999 6.8906 6.620999 7.1726 6.23 C 7.3936 5.926 7.6426 5.795 8.0056 5.795 C 8.3616 5.795 8.6086 5.926 8.8316 6.233 C 9.1156 6.622 9.2586 7.183 9.2586 7.898 C 9.2586 8.643999 9.1166 9.217999 8.834599 9.605 C 8.6136 9.910999 8.355599 10.041 7.9736 10.041 M 8.0056 2.69 C 6.5006 2.69 5.2736 3.18 4.3606 4.146 C 3.4616 5.097 3.0056 6.367 3.0056 7.92 C 3.0056 9.455999 3.4576 10.721 4.3496 11.679 C 5.2616 12.655 6.4736 13.15 7.9526 13.15 C 9.4846 13.15 10.7246 12.663 11.6406 11.702 C 12.5416 10.756 12.9996 9.478 12.9996 7.903999 C 12.9996 6.360999 12.5426 5.096 11.6416 4.145 C 10.7256 3.18 9.5026 2.69 8.0056 2.69 M 7.9736 11.041 C 8.6766 11.041 9.2346 10.757999 9.6436 10.193 C 10.0536 9.629 10.2586 8.864 10.2586 7.898 C 10.2586 6.962 10.0526 6.210999 9.6406 5.645 C 9.2286 5.079 8.683599 4.795 8.0056 4.795 C 7.3206 4.795 6.7726 5.079 6.3626 5.645 C
5.9526 6.210999 5.7476 6.967999 5.7476 7.915 C 5.7476 8.855 5.9516 9.611 6.3596 10.183 C 6.7676 10.754999 7.3066 11.041 7.9736 11.041 M 8.0056 3.69 C 9.223599 3.69 10.1936 4.071 10.9156 4.833 C 11.6386 5.596 11.9996 6.62 11.9996 7.903999 C 11.9996 9.217999 11.6386 10.254999 10.9156 11.013 C 10.1936 11.771 9.2056 12.15 7.9526 12.15 C 6.7556 12.15 5.7986 11.766 5.0816 10.997 C 4.3646 10.226999 4.0056 9.202 4.0056 7.92 C 4.0056 6.624 4.3666 5.596 5.0866 4.833 C 5.8076 4.071 6.7806 3.69 8.0056 3.69" fill="rgb(216, 193, 115)"/>
+</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/TypeRegex.svg (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Images/TypeRegex.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/TypeRegex.svg 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path d="M 13 1 L 3 1 C 1.9 1 1 1.9 1 3 L 1 13 C 1 14.1 1.9 15 3 15 L 13 15 C 14.1 15 15 14.1 15 13 L 15 3 C 15 1.9 14.1 1 13 1 L 13 1 Z" fill="rgb(236, 151, 153)"/>
+ <path d="M 13 1 L 3 1 C 1.9 1 1 1.9 1 3 L 1 13 C 1 14.1 1.9 15 3 15 L 13 15 C 14.1 15 15 14.1 15 13 L 15 3 C 15 1.9 14.1 1 13 1 M 13 2 C 13.552 2 14 2.449 14 3 L 14 13 C 14 13.552 13.552 14 13 14 L 3 14 C 2.449 14 2 13.552 2 13 L 2 3 C 2 2.449 2.449 2 3 2 L 13 2" fill="rgb(191, 109, 113)"/>
+ <path d="M 8.1104 3 L 5.0004 3 L 4.0004 3 L 4.0004 4 L 4.0004 12 L 4.0004 13 L 5.0004 13 L 7.0004 13 L 8.0004 13 L 8.0004 12 L 8.0004 11.646 L 8.5584 12.533 L 8.8524 13 L 9.4044 13 L 11.7494 13 L 13.7134 13 L 12.5574 11.412 L 10.5494 8.650999 C 10.8754 8.459 11.1754 8.226 11.3874 7.924999 C 11.7944 7.351999 12.0004 6.702999 12.0004 6 C 12.0004 4.178 10.4734 3 8.1104 3 M 7.0004 7.632 L 7.0274 7.632 C 8.280399 7.632 9.0624 7.144 9.0624 6.167 C 9.0624 5.454 8.3484 5.097 7.2294 5.097 L 7.0004 5.097 L 7.0004 7.632 M 8.1104 4 C 9.7984 4 11.0004 4.678 11.0004 6 C 11.0004 6.493999 10.8574 6.943 10.5704 7.349 C 10.2854 7.754 9.5334 8.049 9.0314 8.264999 L 11.7494 12 L 9.4044 12 L 7.3434 8.729 L 7.0004 8.729 L 7.0004 12 L 5.0004 12 L 5.0004 4 L 8.1104 4" fill="rgb(204, 116, 121)"/>
+ <path d="M 7 7.6323 L 7.027 7.6323 C 8.281 7.6323 9.063001 7.1443 9.063001 6.1673 C 9.063001 5.4543 8.348001 5.0973 7.229001 5.0973 L 7 5.0973 L 7 7.6323 Z M 5 12.0003 L 5 4.0003 L 8.11 4.0003 C 9.799001 4.0003 11 4.6773 11 6.0003 C 11 6.4943 10.857 6.9433 10.57 7.3493 C 10.285 7.7543 9.533 8.0493 9.031 8.2643 L 11.749 12.0003 L 9.404 12.0003 L 7.344 8.7293 L 7 8.7293 L 7 12.0003 L 5 12.0003 Z" fill="white"/>
+</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/TypeString.svg (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Images/TypeString.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/TypeString.svg 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path fill="rgb(236, 151, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
+ <path fill="rgb(191, 109, 113)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
+ <path fill="rgb(204, 116, 121)" d="M 5.19849793 12.6584609 C 5.2831472 12.676395 6.98277851 12.9487305 7.62939453 12.9487305 C 8.79640591 12.9487305 9.76331344 12.6806542 10.5034462 12.1146703 C 11.3037555 11.5026691 11.7177734 10.6286312 11.7177734 9.58544922 C 11.7177734 8.84534902 11.4998181 8.18341061 11.0628295 7.63852362 C 10.6767371 7.15709971 10.0557113 6.69185669 9.18734192 6.20492057 L 8.61524891 5.88648574 C 8.27558142 5.69523066 8.15431716 5.69238281 8.23632812 5.69238281 C 8.56703836 5.69238281 9.10333246 5.81936052 9.8138795 6.08542439 L 11.1645508 6.59118236 L 11.1645508 5.14892578 L 11.1645508 3.87597656 L 11.1645508 3.07965768 L 10.3884483 2.90136387 C 9.52406853 2.70279014 8.73593121 2.60205078 8.02148438 2.60205078 C 7.01081351 2.60205078 6.14909735 2.87110984 5.47554965 3.42697448 C 4.76046595 4.01711791 4.38964844 4.82767811 4.38964844 5.77734375 C 4.38964844 6.49239045 4.61205052 7.14196725 5.04920932 7.68841575 C 5.43639142 8.1723
9338 6.03437082 8.62885808 6.84888633 9.08727887 L 7.38545082 9.38538774 C 7.71699471 9.57330366 7.92926232 9.72631865 7.99164827 9.79813503 C 7.94460492 9.81851991 7.82252674 9.85302734 7.60253906 9.85302734 C 7.14294036 9.85302734 6.53493744 9.70437137 5.79174704 9.39341305 L 4.40576172 8.81350287 L 4.40576172 10.315918 L 4.40576172 11.6801758 L 4.40576172 12.4905083 L 5.19849793 12.6584609 C 5.52713094 12.7280865 5.52713094 12.7280865 5.57407851 12.738033 L 5.19849793 12.6584609 Z M 5.19849793 12.6584609"/>
+ <path fill="white" d="M 5.40576172 11.6801758 L 5.40576172 10.315918 C 6.26156027 10.6739927 6.99381206 10.8530273 7.60253906 10.8530273 C 8.02864796 10.8530273 8.36433797 10.758139 8.60961914 10.5683594 C 8.85490031 10.3785798 8.97753906 10.1207699 8.97753906 9.79492188 C 8.97753906 9.53710809 8.90055416 9.31958096 8.74658203 9.14233398 C 8.59260991 8.965087 8.3007834 8.75472127 7.87109375 8.51123047 L 7.33935547 8.21582031 C 6.6267868 7.81477664 6.12369938 7.43074728 5.83007812 7.0637207 C 5.53645687 6.69669413 5.38964844 6.2679061 5.38964844 5.77734375 C 5.38964844 5.12206704 5.63045007 4.59570511 6.11206055 4.19824219 C 6.59367103 3.80077926 7.23013927 3.60205078 8.02148438 3.60205078 C 8.65527661 3.60205078 9.36962493 3.69335846 10.1645508 3.87597656 L 10.1645508 5.14892578 C 9.3517212 4.84456228 8.70898674 4.69238281 8.23632812 4.69238281 C 7.87109192 4.69238281 7.57837024 4.77384359 7.3581543 4.93676758 C 7.13793835 5.09969157 7.02783203 5.313638
7.02783203 5.57861328 C 7.02783203 5.79703885 7.10481694 5.98860595 7.25878906 6.15332031 C 7.41276119 6.31803468 7.70279735 6.52034385 8.12890625 6.76025391 L 8.69824219 7.07714844 C 9.46452206 7.50683809 9.99267433 7.9025047 10.2827148 8.26416016 C 10.5727554 8.62581561 10.7177734 9.06624089 10.7177734 9.58544922 C 10.7177734 10.3230831 10.4438504 10.9013651 9.89599609 11.3203125 C 9.34814179 11.7392599 8.59261549 11.9487305 7.62939453 11.9487305 C 6.99202155 11.9487305 6.25081803 11.8592131 5.40576172 11.6801758 C 5.40576172 11.6801758 6.25081803 11.8592131 5.40576172 11.6801758 L 5.40576172 11.6801758 L 5.40576172 11.6801758 Z M 5.40576172 11.6801758"/>
+</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/TypeSymbol.svg (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Images/TypeSymbol.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/TypeSymbol.svg 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg">
+ <path fill="rgb(159, 221, 214)" d="M 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 L 3 1 Z M 3 1"/>
+ <path fill="rgb(63, 169, 156)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
+ <path fill="rgb(90, 168, 159)" d="M 5.19849793 12.6584609 C 5.2831472 12.676395 6.98277851 12.9487305 7.62939453 12.9487305 C 8.79640591 12.9487305 9.76331344 12.6806542 10.5034462 12.1146703 C 11.3037555 11.5026691 11.7177734 10.6286312 11.7177734 9.58544922 C 11.7177734 8.84534902 11.4998181 8.18341061 11.0628295 7.63852362 C 10.6767371 7.15709971 10.0557113 6.69185669 9.18734192 6.20492057 L 8.61524891 5.88648574 C 8.27558142 5.69523066 8.15431716 5.69238281 8.23632812 5.69238281 C 8.56703836 5.69238281 9.10333246 5.81936052 9.8138795 6.08542439 L 11.1645508 6.59118236 L 11.1645508 5.14892578 L 11.1645508 3.87597656 L 11.1645508 3.07965768 L 10.3884483 2.90136387 C 9.52406853 2.70279014 8.73593121 2.60205078 8.02148438 2.60205078 C 7.01081351 2.60205078 6.14909735 2.87110984 5.47554965 3.42697448 C 4.76046595 4.01711791 4.38964844 4.82767811 4.38964844 5.77734375 C 4.38964844 6.49239045 4.61205052 7.14196725 5.04920932 7.68841575 C 5.43639142 8.17239
338 6.03437082 8.62885808 6.84888633 9.08727887 L 7.38545082 9.38538774 C 7.71699471 9.57330366 7.92926232 9.72631865 7.99164827 9.79813503 C 7.94460492 9.81851991 7.82252674 9.85302734 7.60253906 9.85302734 C 7.14294036 9.85302734 6.53493744 9.70437137 5.79174704 9.39341305 L 4.40576172 8.81350287 L 4.40576172 10.315918 L 4.40576172 11.6801758 L 4.40576172 12.4905083 L 5.19849793 12.6584609 C 5.52713094 12.7280865 5.52713094 12.7280865 5.57407851 12.738033 L 5.19849793 12.6584609 Z M 5.19849793 12.6584609"/>
+ <path fill="white" d="M 5.40576172 11.6801758 L 5.40576172 10.315918 C 6.26156027 10.6739927 6.99381206 10.8530273 7.60253906 10.8530273 C 8.02864796 10.8530273 8.36433797 10.758139 8.60961914 10.5683594 C 8.85490031 10.3785798 8.97753906 10.1207699 8.97753906 9.79492188 C 8.97753906 9.53710809 8.90055416 9.31958096 8.74658203 9.14233398 C 8.59260991 8.965087 8.3007834 8.75472127 7.87109375 8.51123047 L 7.33935547 8.21582031 C 6.6267868 7.81477664 6.12369938 7.43074728 5.83007812 7.0637207 C 5.53645687 6.69669413 5.38964844 6.2679061 5.38964844 5.77734375 C 5.38964844 5.12206704 5.63045007 4.59570511 6.11206055 4.19824219 C 6.59367103 3.80077926 7.23013927 3.60205078 8.02148438 3.60205078 C 8.65527661 3.60205078 9.36962493 3.69335846 10.1645508 3.87597656 L 10.1645508 5.14892578 C 9.3517212 4.84456228 8.70898674 4.69238281 8.23632812 4.69238281 C 7.87109192 4.69238281 7.57837024 4.77384359 7.3581543 4.93676758 C 7.13793835 5.09969157 7.02783203 5.313638
7.02783203 5.57861328 C 7.02783203 5.79703885 7.10481694 5.98860595 7.25878906 6.15332031 C 7.41276119 6.31803468 7.70279735 6.52034385 8.12890625 6.76025391 L 8.69824219 7.07714844 C 9.46452206 7.50683809 9.99267433 7.9025047 10.2827148 8.26416016 C 10.5727554 8.62581561 10.7177734 9.06624089 10.7177734 9.58544922 C 10.7177734 10.3230831 10.4438504 10.9013651 9.89599609 11.3203125 C 9.34814179 11.7392599 8.59261549 11.9487305 7.62939453 11.9487305 C 6.99202155 11.9487305 6.25081803 11.8592131 5.40576172 11.6801758 C 5.40576172 11.6801758 6.25081803 11.8592131 5.40576172 11.6801758 L 5.40576172 11.6801758 L 5.40576172 11.6801758 Z M 5.40576172 11.6801758"/>
+</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/TypeUndefined.svg (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Images/TypeUndefined.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/TypeUndefined.svg 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2015 Apple Inc. All rights reserved. -->
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
+ <path fill="rgb(203, 203, 203)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
+ <path fill="rgb(153, 153, 153)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
+ <path fill="rgb(166, 166, 166)" d="M 6.796875 12.742188 C 6.242188 12.742188 5.796875 12.292969 5.796875 11.742188 L 5.796875 10.417969 C 5.796875 10.25 5.835938 10.09375 5.910156 9.953125 C 5.835938 9.816406 5.796875 9.660156 5.796875 9.492188 L 5.796875 9.339844 C 5.796875 8.511719 6.152344 7.699219 6.847656 6.925781 L 7.234375 6.503906 C 7.671875 6.019531 7.734375 5.757812 7.746094 5.671875 C 7.691406 5.660156 7.609375 5.652344 7.488281 5.652344 C 7.097656 5.652344 6.613281 5.78125 6.046875 6.039062 C 5.914062 6.101562 5.773438 6.128906 5.632812 6.128906 C 5.441406 6.128906 5.253906 6.078125 5.089844 5.972656 C 4.804688 5.785156 4.628906 5.472656 4.628906 5.128906 L 4.628906 3.917969 C 4.628906 3.476562 4.917969 3.089844 5.339844 2.960938 C 6.144531 2.71875 6.941406 2.59375 7.71875 2.59375 C 8.769531 2.59375 9.632812 2.816406 10.285156 3.25 C 11.058594 3.761719 11.46875 4.511719 11.46875 5.414062 C 11.46875 6.214844 11.066406 7 10.269531 7.753906 L 9
.917969 8.09375 C 9.546875 8.441406 9.460938 8.601562 9.453125 8.621094 C 9.4375 8.652344 9.390625 8.765625 9.390625 9.035156 L 9.390625 9.492188 C 9.390625 9.660156 9.351562 9.816406 9.277344 9.953125 C 9.351562 10.09375 9.390625 10.25 9.390625 10.417969 L 9.390625 11.742188 C 9.390625 12.292969 8.945312 12.742188 8.390625 12.742188 L 6.796875 12.742188"/>
+ <path fill="white" d="M 6.796875 11.742188 L 6.796875 10.414062 L 8.390625 10.414062 L 8.390625 11.742188 Z M 8.390625 9.492188 L 6.796875 9.492188 L 6.796875 9.339844 C 6.796875 8.765625 7.0625 8.183594 7.589844 7.597656 L 7.972656 7.175781 C 8.488281 6.609375 8.746094 6.097656 8.746094 5.652344 C 8.746094 4.984375 8.328125 4.652344 7.488281 4.652344 C 6.949219 4.652344 6.328125 4.8125 5.632812 5.128906 L 5.632812 3.917969 C 6.34375 3.703125 7.039062 3.59375 7.71875 3.59375 C 8.570312 3.59375 9.238281 3.757812 9.730469 4.082031 C 10.222656 4.410156 10.46875 4.851562 10.46875 5.414062 C 10.46875 5.929688 10.175781 6.46875 9.585938 7.027344 L 9.222656 7.371094 C 8.886719 7.6875 8.664062 7.957031 8.554688 8.179688 C 8.445312 8.398438 8.390625 8.683594 8.390625 9.035156 Z"/>
+</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Main.html 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html 2015-02-25 00:31:38 UTC (rev 180593)
@@ -99,6 +99,7 @@
<link rel="stylesheet" href=""
<link rel="stylesheet" href=""
<link rel="stylesheet" href=""
+ <link rel="stylesheet" href=""
<link rel="stylesheet" href=""
<link rel="stylesheet" href=""
<link rel="stylesheet" href=""
@@ -248,6 +249,7 @@
<script src=""
<script src=""
<script src=""
+ <script src=""
<script src=""
<script src=""
<script src=""
@@ -258,6 +260,7 @@
<script src=""
<script src=""
<script src=""
+ <script src=""
<script src=""
<script src=""
<script src=""
Added: trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,450 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// FIXME: Provide Parameter lists for the constructors themselves? (new RegExp(...)).
+// FIXME: Provide Parameter lists for global functions (eval, decodeURI, ...).
+
+WebInspector.NativeConstructorFunctionParameters = {
+ Object: {
+ create: "prototype, [propertiesObject]",
+ defineProperty: "object, propertyName, descriptor",
+ defineProperties: "object, properties",
+ freeze: "object",
+ getOwnPropertyDescriptor: "object, propertyName",
+ getOwnPropertyNames: "object",
+ getPrototypeOf: "object",
+ isExtensible: "object",
+ isFrozen: "object",
+ isSealed: "object",
+ keys: "object",
+ preventExtensions: "object",
+ seal: "object",
+ __proto__: null,
+ },
+
+ Array: {
+ from: "arrayLike, [mapFunction], [thisArg]",
+ isArray: "object",
+ of: "[...values]",
+ __proto__: null,
+ },
+
+ ArrayBuffer: {
+ isView: "object",
+ transfer: "oldBuffer, [newByteLength=length]",
+ __proto__: null,
+ },
+
+ Number: {
+ isFinite: "value",
+ isInteger: "value",
+ isNaN: "value",
+ isSafeInteger: "value",
+ parseFloat: "string",
+ parseInt: "string, [radix]",
+ __proto__: null,
+ },
+
+ Math: {
+ abs: "x",
+ acos: "x",
+ acosh: "x",
+ asin: "x",
+ asinh: "x",
+ atan: "x",
+ atan2: "y, x",
+ atanh: "x",
+ cbrt: "x",
+ ceil: "x",
+ cos: "x",
+ cosh: "x",
+ exp: "x",
+ expm1: "x",
+ floor: "x",
+ fround: "x",
+ hypot: "[...x]",
+ imul: "x",
+ log: "x",
+ log1p: "x",
+ log2: "x",
+ log10: "x",
+ max: "[...x]",
+ min: "[...x]",
+ pow: "x, y",
+ round: "x",
+ sin: "x",
+ sinh: "x",
+ sqrt: "x",
+ tan: "x",
+ tanh: "x",
+ trunc: "x",
+ __proto__: null,
+ },
+
+ JSON: {
+ parse: "text, [reviver]",
+ stringify: "value, [replacer], [space]",
+ __proto__: null,
+ },
+
+ Date: {
+ parse: "dateString",
+ UTC: "year, [month], [day], [hour], [minute], [second], [ms]",
+ __proto__: null,
+ },
+
+ Promise: {
+ all: "iterable",
+ race: "iterable",
+ reject: "reason",
+ resolve: "value",
+ __proto__: null,
+ },
+
+ String: {
+ fromCharCode: "code, [...codes]",
+ __proto__: null,
+ },
+
+ Symbol: {
+ for: "key",
+ keyFor: "symbol",
+ __proto__: null,
+ },
+};
+
+WebInspector.NativePrototypeFunctionParameters = {
+
+ // Built-in _javascript_ objects.
+ // FIXME: TypedArrays (Int8Array, etc),
+
+ Object: {
+ __defineGetter__: "propertyName, getterFunction",
+ __defineSetter__: "propertyName, setterFunction",
+ __lookupGetter__: "propertyName",
+ __lookupSetter__: "propertyName",
+ hasOwnProperty: "propertyName",
+ isPrototypeOf: "property",
+ propertyIsEnumerable: "propertyName",
+ __proto__: null,
+ },
+
+ Array: {
+ concat: "value, ...",
+ every: "callback, [thisArg]",
+ fill: "value, [startIndex=0], [endIndex=length]",
+ filter: "callback, [thisArg]",
+ find: "callback, [thisArg]",
+ findIndex: "callback, [thisArg]",
+ forEach: "callback, [thisArg]",
+ indexOf: "searchValue, [startIndex=0]",
+ join: "[separator=\",\"]",
+ lastIndexOf: "searchValue, [startIndex=length]",
+ map: "callback, [thisArg]",
+ push: "value, ...",
+ reduce: "callback, [initialValue]",
+ reduceRight: "callback, [initialValue]",
+ slice: "[startIndex=0], [endIndex=length]",
+ some: "callback, [thisArg]",
+ sort: "[compareFunction]",
+ splice: "startIndex, [deleteCount=0], ...itemsToAdd",
+ __proto__: null,
+ },
+
+ ArrayBuffer: {
+ slice: "startIndex, [endIndex=byteLength]",
+ __proto__: null,
+ },
+
+ DataView: {
+ setInt8: "byteOffset, value",
+ setInt16: "byteOffset, value, [littleEndian=false]",
+ setInt23: "byteOffset, value, [littleEndian=false]",
+ setUint8: "byteOffset, value",
+ setUint16: "byteOffset, value, [littleEndian=false]",
+ setUint32: "byteOffset, value, [littleEndian=false]",
+ setFloat32: "byteOffset, value, [littleEndian=false]",
+ setFloat64: "byteOffset, value, [littleEndian=false]",
+ getInt8: "byteOffset",
+ getInt16: "byteOffset, [littleEndian=false]",
+ getInt23: "byteOffset, [littleEndian=false]",
+ getUint8: "byteOffset",
+ getUint16: "byteOffset, [littleEndian=false]",
+ getUint32: "byteOffset, [littleEndian=false]",
+ getFloat32: "byteOffset, [littleEndian=false]",
+ getFloat64: "byteOffset, [littleEndian=false]",
+ __proto__: null,
+ },
+
+ Date: {
+ setDate: "day",
+ setFullYear: "year, [month=getMonth()], [day=getDate()]",
+ setHours: "hours, [minutes=getMinutes()], [seconds=getSeconds()], [ms=getMilliseconds()]",
+ setMilliseconds: "ms",
+ setMinutes: "minutes, [seconds=getSeconds()], [ms=getMilliseconds()]",
+ setMonth: "month, [day=getDate()]",
+ setSeconds: "seconds, [ms=getMilliseconds()]",
+ setTime: "time",
+ setUTCDate: "day",
+ setUTCFullYear: "year, [month=getUTCMonth()], [day=getUTCDate()]",
+ setUTCHours: "hours, [minutes=getUTCMinutes()], [seconds=getUTCSeconds()], [ms=getUTCMilliseconds()]",
+ setUTCMilliseconds: "ms",
+ setUTCMinutes: "minutes, [seconds=getUTCSeconds()], [ms=getUTCMilliseconds()]",
+ setUTCMonth: "month, [day=getUTCDate()]",
+ setUTCSeconds: "seconds, [ms=getUTCMilliseconds()]",
+ setUTCTime: "time",
+ setYear: "year",
+ __proto__: null,
+ },
+
+ Function: {
+ apply: "thisObject, [argumentsArray]",
+ bind: "thisObject, ...arguments",
+ call: "thisObject, ...arguments",
+ __proto__: null,
+ },
+
+ Map: {
+ delete: "key",
+ forEach: "callback, [thisArg]",
+ get: "key",
+ has: "key",
+ set: "key, value",
+ __proto__: null,
+ },
+
+ Number: {
+ toExponential: "[digits]",
+ toFixed: "[digits]",
+ toPrecision: "[significantDigits]",
+ toString: "[radix=10]",
+ __proto__: null,
+ },
+
+ RegExp: {
+ compile: "pattern, flags",
+ exec: "string",
+ test: "string",
+ __proto__: null,
+ },
+
+ Set: {
+ delete: "value",
+ forEach: "callback, [thisArg]",
+ has: "value",
+ add: "value",
+ __proto__: null,
+ },
+
+ String: {
+ charAt: "index",
+ charCodeAt: "index",
+ concat: "string, ...",
+ indexOf: "searchValue, [startIndex=0]",
+ lastIndexOf: "searchValue, [startIndex=length]",
+ localeCompare: "string",
+ match: "regex",
+ replace: "regex|string, replaceString|replaceHandler, [flags]",
+ search: "regex",
+ slice: "startIndex, [endIndex=length]",
+ split: "[separator], [limit]",
+ substr: "startIndex, [numberOfCharacters]",
+ substring: "startIndex, [endIndex=length]",
+ __proto__: null,
+ },
+
+ Promise: {
+ catch: "rejectionHandler",
+ then: "resolvedHandler, rejectionHandler",
+ __proto__: null,
+ },
+
+ // DOM objects.
+ // FIXME: Many idls. Generate?
+
+ HTMLElement: {
+ insertAdjacentElement: "position, [element]",
+ insertAdjacentHTML: "position, [html]",
+ insertAdjacentText: "position, [text]",
+ __proto__: null,
+ },
+
+ Element: {
+ closest: "selectors",
+ getAttribute: "attributeName",
+ getAttributeNS: "namespace, attributeName",
+ getAttributeNode: "attributeName",
+ getAttributeNodeNS: "namespace, attributeName",
+ getElementsByClassName: "names",
+ getElementsByTagName: "tagName",
+ getElementsByTagNameNS: "namespace, localName",
+ hasAttribute: "attributeName",
+ hasAttributeNS: "namespace, attributeName",
+ matches: "selector",
+ removeAttribute: "attributeName",
+ removeAttributeNS: "namespace, attributeName",
+ removeAttributeNode: "attributeName",
+ scrollIntoView: "[alignWithTop]",
+ scrollIntoViewIfNeeded: "[centerIfNeeded]",
+ scrollByLines: "[lines]",
+ scrollByPages: "[pages]",
+ setAttribute: "name, value",
+ setAttributeNS: "namespace, name, value",
+ setAttributeNode: "attributeNode",
+ setAttributeNodeNS: "namespace, attributeNode",
+ webkitMatchesSelector: "selectors",
+ __proto__: null,
+ },
+
+ Node: {
+ appendChild: "child",
+ cloneNode: "deep",
+ compareDocumentPosition: "node",
+ contains: "node",
+ insertBefore: "insertElement, referenceElement",
+ isDefaultNamespace: "namespace",
+ isEqualNode: "node",
+ lookupNamespaceURI: "prefix",
+ removeChild: "node",
+ replaceChild: "newChild, oldChild",
+ __proto__: null,
+ },
+
+ Window: {
+ alert: "message",
+ atob: "encodedData",
+ btoa: "stringToEncode",
+ clearTimeout: "timeoutId",
+ confirm: "message",
+ find: "string, [caseSensitive], [backwards], [wrapAround]",
+ getComputedStyle: "element, [pseudoElement]",
+ matchMedia: "mediaQueryString",
+ moveBy: "deltaX, deltaY",
+ moveTo: "screenX, screenY",
+ open: "url, windowName, [featuresString]",
+ postMessage: "message, targetOrigin, [...transferables]",
+ prompt: "text, [value]",
+ resizeBy: "deltaX, deltaY",
+ resizeTo: "width, height",
+ scrollBy: "deltaX, deltaY",
+ scrollTo: "x, y",
+ setInterval: "func, [delay], [...params]",
+ setTimeout: "func, [delay], [...params]",
+ showModalDialog: "url, [arguments], [options]",
+ __proto__: null,
+ },
+
+ Event: {
+ initEvent: "type, bubbles, cancelable",
+ __proto__: null,
+ },
+
+ HTMLDocument: {
+ write: "html",
+ writeln: "html",
+ __proto__: null,
+ },
+
+ Document: {
+ adoptNode: "node",
+ caretPositionFromPoint: "x, y",
+ createAttribute: "attributeName",
+ createCDATASection: "data",
+ createComment: "data",
+ createElement: "tagName",
+ createElementNS: "namespace, qualifiedName",
+ createEvent: "type",
+ createExpression: "xpath, namespaceURLMapper",
+ createNSResolver: "node",
+ createNodeIterator: "root, whatToShow, filter",
+ createProcessingInstruction: "target, data",
+ createTextNode: "data",
+ createTreeWalker: "root, whatToShow, filter, entityReferenceExpansion",
+ elementFromPoint: "x, y",
+ evaluate: "xpath, contextNode, namespaceResolver, resultType, result",
+ execCommand: "command, userInterface, value",
+ getElementById: "id",
+ getElementsByName: "name",
+ importNode: "node, deep",
+ __proto__: null,
+ },
+
+ Geolocation: {
+ clearWatch: "watchId",
+ getCurrentPosition: "successHandler, [errorHandler], [options]",
+ watchPosition: "successHandler, [errorHandler], [options]",
+ __proto__: null,
+ },
+
+ Storage: {
+ getItem: "key",
+ key: "index",
+ removeItem: "key",
+ __proto__: null,
+ },
+
+ Location: {
+ assign: "url",
+ reload: "[force=false]",
+ replace: "url",
+ __proto__: null,
+ },
+
+ History: {
+ go: "distance",
+ pushState: "data, title, url",
+ replaceState: "data, title, url",
+ __proto__: null,
+ },
+};
+
+WebInspector.NativePrototypeFunctionParameters.WeakMap = WebInspector.NativePrototypeFunctionParameters.Map;
+
+(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]",
+ dispatchEvent: "event",
+ };
+
+ mixin(WebInspector.NativePrototypeFunctionParameters.Node, EventTarget);
+ mixin(WebInspector.NativePrototypeFunctionParameters.Window, EventTarget);
+
+ var ElementQueries = {
+ getElementsByClassName: "names",
+ getElementsByTagName: "tagName",
+ getElementsByTagNameNS: "namespace, localName",
+ querySelector: "selectors",
+ querySelectorAll: "selectors",
+ };
+
+ mixin(WebInspector.NativePrototypeFunctionParameters.Element, ElementQueries);
+ mixin(WebInspector.NativePrototypeFunctionParameters.Document, ElementQueries);
+})();
Added: trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPath.js (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPath.js (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPath.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,181 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.PropertyPath = function(object, pathComponent, parent, isPrototype)
+{
+ WebInspector.Object.call(this);
+
+ console.assert(object instanceof WebInspector.RemoteObject || object === null);
+ console.assert(!pathComponent || typeof pathComponent === "string");
+ console.assert(!parent || parent instanceof WebInspector.PropertyPath);
+ console.assert(!parent || pathComponent.length);
+
+ // We allow property pathes with null objects as end-caps only.
+ // Disallow appending to a PropertyPath with null objects.
+ if (parent && !parent.object)
+ throw new Error("Attempted to append to a PropertyPath with null object.");
+
+ this._object = object;
+ this._pathComponent = pathComponent || null;
+ this._parent = parent || null;
+ this._isPrototype = isPrototype || false;
+};
+
+WebInspector.PropertyPath.SpecialPathComponent = {
+ CollectionIndex: "@collection[?]",
+ InternalPropertyName: "@internal",
+ SymbolPropertyName: "@symbol",
+ GetterPropertyName: "@getter",
+};
+
+WebInspector.PropertyPath.prototype = {
+ constructor: WebInspector.PropertyPath,
+ __proto__: WebInspector.Object.prototype,
+
+ // Public
+
+ get object()
+ {
+ return this._object;
+ },
+
+ get parent()
+ {
+ return this._parent;
+ },
+
+ get isPrototype()
+ {
+ return this._isPrototype;
+ },
+
+ get rootObject()
+ {
+ return this._parent ? this._parent.rootObject : this._object;
+ },
+
+ get lastNonPrototypeObject()
+ {
+ if (!this._parent)
+ return this._object;
+
+ var p = this._parent;
+ while (p) {
+ if (!p.isPrototype)
+ break;
+ if (!p.parent)
+ break;
+ p = p.parent;
+ }
+
+ return p.object;
+ },
+
+ get pathComponent()
+ {
+ return this._pathComponent;
+ },
+
+ get fullPath()
+ {
+ var components = [];
+ for (var p = this; p && p.pathComponent; p = p.parent)
+ components.push(p.pathComponent);
+ components.reverse()
+ return components.join("");
+ },
+
+ isRoot: function()
+ {
+ return !this._parent;
+ },
+
+ isPathComponentImpossible: function()
+ {
+ return this._pathComponent && this._pathComponent.startsWith("@");
+ },
+
+ isFullPathImpossible: function()
+ {
+ if (this.isPathComponentImpossible())
+ return true;
+
+ if (this._parent)
+ return this._parent.isFullPathImpossible();
+
+ return false;
+ },
+
+ appendPropertyName: function(object, propertyName)
+ {
+ var isPrototype = propertyName === "__proto__";
+ var component = this._canPropertyNameBeDotAccess(propertyName) ? "." + propertyName : "[\"" + propertyName.replace(/"/, "\\\"") + "\"]";
+ return new WebInspector.PropertyPath(object, component, this, isPrototype);
+ },
+
+ appendPropertySymbol: function(object, symbolName)
+ {
+ var component = WebInspector.PropertyPath.SpecialPathComponent.SymbolPropertyName + (symbolName.length ? "(" + symbolName + ")" : "");
+ return new WebInspector.PropertyPath(object, component, this);
+ },
+
+ appendInternalPropertyName: function(object, propertyName)
+ {
+ var component = WebInspector.PropertyPath.SpecialPathComponent.InternalPropertyName + "[" + propertyName + "]";
+ return new WebInspector.PropertyPath(object, component, this);
+ },
+
+ appendArrayIndex: function(object, indexString)
+ {
+ var component = "[" + indexString + "]";
+ return new WebInspector.PropertyPath(object, component, this);
+ },
+
+ appendCollectionIndex: function(object)
+ {
+ var component = WebInspector.PropertyPath.SpecialPathComponent.CollectionIndex;
+ return new WebInspector.PropertyPath(object, component, this);
+ },
+
+ appendPropertyDescriptor: function(object, descriptor)
+ {
+ if (descriptor.isInternalProperty)
+ return this.appendInternalPropertyName(object, descriptor.name);
+
+ // FIXME: We don't yet have Symbol descriptors.
+
+ if (this._object.subtype === "array" && !isNaN(parseInt(descriptor.name)))
+ return this.appendArrayIndex(object, descriptor.name);
+
+ return this.appendPropertyName(object, descriptor.name)
+ },
+
+ // Private
+
+ _canPropertyNameBeDotAccess: function(propertyName)
+ {
+ return /^(?![0-9])\w+$/.test(propertyName);
+ }
+};
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -384,14 +384,26 @@
callback(0);
},
- callFunction: function(functionDeclaration, args, callback)
+ callFunction: function(functionDeclaration, args, generatePreview, callback)
{
function mycallback(error, result, wasThrown)
{
- callback((error || wasThrown) ? null : WebInspector.RemoteObject.fromPayload(result));
+ result = result ? WebInspector.RemoteObject.fromPayload(result) : null;
+ callback(error, result, wasThrown);
}
- RuntimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, true, undefined, true, mycallback);
+ if (args) {
+ args = args.map(function(arg) {
+ if (arg instanceof WebInspector.RemoteObject) {
+ if (arg.objectId)
+ return {objectId: arg.objectId};
+ return {value: arg.value};
+ }
+ return {value: arg};
+ });
+ }
+
+ RuntimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, true, undefined, generatePreview, mycallback);
},
callFunctionJSON: function(functionDeclaration, args, callback)
@@ -403,7 +415,19 @@
RuntimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, true, true, mycallback);
},
+
+ invokeGetter: function(getterRemoteObject, callback)
+ {
+ console.assert(getterRemoteObject instanceof WebInspector.RemoteObject);
+ function backendInvokeGetter(getter)
+ {
+ return getter ? getter.call(this) : undefined;
+ }
+
+ this.callFunction(backendInvokeGetter, [getterRemoteObject], true, callback);
+ },
+
release: function()
{
RuntimeAgent.releaseObject(this._objectId);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -162,13 +162,13 @@
return result;
}
- object.callFunction(collectPrototypes, undefined, nodePrototypesReady.bind(this));
+ object.callFunction(collectPrototypes, undefined, false, nodePrototypesReady.bind(this));
object.release();
}
- function nodePrototypesReady(object)
+ function nodePrototypesReady(error, object, wasThrown)
{
- if (!object)
+ if (error || wasThrown || !object)
return;
// Bail if the DOM node changed while we were waiting for the async response.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -222,9 +222,9 @@
if (!node.nodeName() || node.nodeName().toLowerCase() !== "img")
return;
- function setTooltip(result)
+ function setTooltip(error, result, wasThrown)
{
- if (!result || result.type !== "string")
+ if (error || wasThrown || !result || result.type !== "string")
return;
try {
@@ -252,7 +252,7 @@
return "[" + this.offsetWidth + "," + this.offsetHeight + "," + this.naturalWidth + "," + this.naturalHeight + "]";
}
- object.callFunction(dimensions, undefined, setTooltip.bind(this));
+ object.callFunction(dimensions, undefined, false, setTooltip.bind(this));
object.release();
}
WebInspector.RemoteObject.resolveNode(node, "", resolvedNode.bind(this));
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css 2015-02-25 00:31:38 UTC (rev 180593)
@@ -34,6 +34,10 @@
color: rgb(28, 0, 207);
}
+.formatted-boolean {
+ color: rgb(170, 13, 145);
+}
+
.formatted-string, .formatted-regexp {
white-space: pre;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -62,12 +62,9 @@
return span;
}
- // Function: ellided in previews, collapsed whitespace normally.
+ // Function: ellided in previews.
if (type === "function") {
- if (isPreview)
- span.textContent = "function";
- else
- span.textContent = /.*/.exec(displayString)[0].replace(/ +$/g, "");
+ span.textContent = isPreview ? "function" : displayString;
return span;
}
Added: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.css (0 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.css (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.css 2015-02-25 00:31:38 UTC (rev 180593)
@@ -0,0 +1,179 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.object-tree-property {
+ margin-top: 1px;
+}
+
+.object-tree-property > .disclosure-button {
+ float: left;
+
+ width: 16px;
+ height: 16px;
+
+ border: 0;
+ background: none;
+ -webkit-appearance: none;
+}
+
+.object-tree-property.parent > .disclosure-button {
+ background-color: transparent;
+ background-image: -webkit-canvas(navigation-sidebar-panel-disclosure-triangle-closed-normal);
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: 13px 13px;
+}
+
+.object-tree-property.parent.expanded > .disclosure-button {
+ background-image: -webkit-canvas(navigation-sidebar-panel-disclosure-triangle-open-normal);
+}
+
+.object-tree-property > .icon {
+ float: left;
+ position: relative;
+
+ width: 16px;
+ height: 16px;
+
+ margin-right: 3px;
+}
+
+.object-tree-property.boolean > .icon {
+ content: url(../Images/TypeBoolean.svg);
+}
+
+.object-tree-property.function > .icon {
+ content: url(../Images/Function.svg);
+}
+
+.object-tree-property.number > .icon {
+ content: url(../Images/TypeNumber.svg);
+}
+
+.object-tree-property.object > .icon {
+ content: url(../Images/TypeObject.svg);
+}
+
+.object-tree-property.object.null > .icon {
+ content: url(../Images/TypeNull.svg);
+}
+
+.object-tree-property.object.node > .icon {
+ content: url(../Images/DOMElement.svg);
+}
+
+.object-tree-property.regex > .icon {
+ content: url(../Images/TypeRegex.svg);
+}
+
+.object-tree-property.string > .icon {
+ content: url(../Images/TypeString.svg);
+}
+
+.object-tree-property.symbol > .icon {
+ content: url(../Images/TypeSymbol.svg);
+}
+
+.object-tree-property.accessor > .icon,
+.object-tree-property.undefined > .icon {
+ content: url(../Images/TypeUndefined.svg);
+}
+
+.object-tree-property.had-error > .icon {
+ content: url(../Images/TypeUndefined.svg) !important;
+}
+
+.object-tree-property .property-name,
+.object-tree-property .function-parameters,
+.object-tree-property .prototype-name {
+ font-family: sans-serif;
+ font-size: 12px;
+}
+
+.object-tree-property .property-name.not-enumerable {
+ opacity: 0.6;
+}
+
+.object-tree-property.prototype-property {
+ display: inline-block;
+
+ border: 1px solid rgb(222, 222, 222);
+ background-color: rgb(242, 242, 242);
+ border-radius: 3px;
+
+ padding: 0 10px 1px 0;
+ margin: 3px 0 2px 0;
+}
+
+.object-tree-property.prototype-property > .icon {
+ display: none;
+}
+
+.object-tree-property.prototype-property + ol {
+ -webkit-padding-start: 0px;
+}
+
+.object-tree-property .getter {
+ position: relative;
+ top: 1px;
+
+ content: url(../Images/Eye.svg);
+ opacity: 0.6;
+
+ width: 16px;
+ height: 11px;
+ margin-left: 3px;
+}
+
+.object-tree-property .getter:hover {
+ opacity: 1;
+}
+
+.object-tree-property .read-only {
+ content: url(../Images/Locked.svg);
+ opacity: 0.5;
+
+ width: 8px;
+ height: 10px;
+ margin-left: 3px;
+}
+
+.object-tree-property :matches(.formatted-string, .formatted-regexp) {
+ white-space: nowrap;
+}
+
+.object-tree-property .value.error {
+ color: red;
+}
+
+.object-tree-property > .titles {
+ position: relative;
+ top: 2px;
+ line-height: normal;
+ padding-bottom: 1px;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -23,24 +23,44 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-WebInspector.ObjectTreePropertyTreeElement = function(property, mode)
+WebInspector.ObjectTreePropertyTreeElement = function(property, propertyPath, mode, prototypeName)
{
console.assert(property instanceof WebInspector.PropertyDescriptor);
+ console.assert(propertyPath instanceof WebInspector.PropertyPath);
this._property = property;
this._mode = mode || WebInspector.ObjectTreeView.Mode.Properties;
+ this._propertyPath = propertyPath;
+ this._prototypeName = prototypeName;
- // FIXME: API Mode not turned on yet.
- this._mode = WebInspector.ObjectTreeView.Mode.Properties;
+ var classNames = ["object-tree-property"];
- TreeElement.call(this, "", null, false);
+ if (this._property.hasValue()) {
+ classNames.push(this._property.value.type);
+ if (this._property.value.subtype)
+ classNames.push(this._property.value.subtype);
+ } else
+ classNames.push("accessor");
+
+ if (this._property.wasThrown)
+ classNames.push("had-error");
+
+ if (this._property.name === "__proto__")
+ classNames.push("prototype-property");
+
+ WebInspector.GeneralTreeElement.call(this, classNames, this._titleFragment(), null, this._property, false);
+ this._updateTooltips();
+ this._updateHasChildren();
+
+ this.small = true;
this.toggleOnClick = true;
this.selectable = false;
+ this.tooltipHandledSeparately = true;
};
WebInspector.ObjectTreePropertyTreeElement.prototype = {
constructor: WebInspector.ObjectTreePropertyTreeElement,
- __proto__: TreeElement.prototype,
+ __proto__: WebInspector.GeneralTreeElement.prototype,
// Public
@@ -56,34 +76,123 @@
this._updateChildren();
},
- onattach: function()
+ onexpand: function()
{
- this.listItemElement.classList.add("object-tree-property");
+ if (this._previewView)
+ this._previewView.showTitle();
+ },
- this._updateTitle();
+ oncollapse: function()
+ {
+ if (this._previewView)
+ this._previewView.showPreview();
},
// Private
- _updateTitle: function()
+ _resolvedValue: function()
{
- this.listItemElement.removeChildren();
+ if (this._getterValue)
+ return this._getterValue;
- if (this._mode === WebInspector.ObjectTreeView.Mode.Properties) {
- this._updateTitlePropertyStyle();
- this.hasChildren = this._property.hasValue() && this._property.value.hasChildren && !this._property.wasThrown;
- } else {
- this._updateTitleAPIStyle();
- this.hasChildren = this._property.hasValue() && this._property.value.hasChildren && !this._property.wasThrown && this._property.name === "__proto__";
+ if (this._property.hasValue())
+ return this._property.value;
+
+ return null;
+ },
+
+ _resolvedValuePropertyPath: function()
+ {
+ // FIXME: We could make a better path here.
+ // If this getter was not overridden, then <this._propertyPath.lastNonPrototypeObject>[<this._property.name>] is a valid path.
+ // However, we cannot easily determine from here if this getter was overridden or not.
+ if (this._getterValue)
+ return new WebInspector.PropertyPath(this._getterValue, WebInspector.PropertyPath.SpecialPathComponent.GetterPropertyName);
+
+ if (this._property.hasValue())
+ return this._propertyPath.appendPropertyDescriptor(this._property.value, this._property);
+
+ return null;
+ },
+
+ _thisPropertyPath: function()
+ {
+ return this._propertyPath.appendPropertyDescriptor(null, this._property);
+ },
+
+ _updateHasChildren: function()
+ {
+ var resolvedValue = this._resolvedValue();
+ var valueHasChildren = (resolvedValue && resolvedValue.hasChildren);
+ var wasThrown = this._property.wasThrown || this._getterHadError;
+
+ if (this._mode === WebInspector.ObjectTreeView.Mode.Properties)
+ this.hasChildren = !wasThrown && valueHasChildren;
+ else
+ this.hasChildren = !wasThrown && valueHasChildren && (this._property.name === "__proto__" || this._alwaysDisplayAsProperty());
+ },
+
+ _updateTooltips: function()
+ {
+ var attributes = [];
+
+ if (this._property.configurable)
+ attributes.push("configurable");
+ if (this._property.enumerable)
+ attributes.push("enumerable");
+ if (this._property.writable)
+ attributes.push("writable");
+
+ this.iconElement.title = attributes.join(" ");
+ },
+
+ _updateTitleAndIcon: function()
+ {
+ this.mainTitle = this._titleFragment();
+
+ if (this._getterValue) {
+ this.addClassName(this._getterValue.type);
+ if (this._getterValue.subtype)
+ this.addClassName(this._getterValue.subtype);
+ if (this._getterHadError)
+ this.addClassName("had-error");
+ this.removeClassName("accessor");
}
+
+ this._updateHasChildren();
},
- _updateTitlePropertyStyle: function()
+ _titleFragment: function()
{
+ if (this._property.name === "__proto__")
+ return this._createTitlePrototype();
+
+ if (this._mode === WebInspector.ObjectTreeView.Mode.Properties)
+ return this._createTitlePropertyStyle();
+ else
+ return this._createTitleAPIStyle();
+ },
+
+ _createTitlePrototype: function()
+ {
+ console.assert(this._property.hasValue());
+ console.assert(this._property.name === "__proto__");
+
+ var nameElement = document.createElement("span");
+ nameElement.className = "prototype-name";
+ nameElement.textContent = WebInspector.UIString("%s Prototype").format(this._sanitizedPrototypeString(this._property.value));
+ return nameElement;
+ },
+
+ _createTitlePropertyStyle: function()
+ {
+ var container = document.createDocumentFragment();
+
// Property name.
var nameElement = document.createElement("span");
- nameElement.className = "name";
- nameElement.textContent = this._property.name;
+ nameElement.className = "property-name";
+ nameElement.textContent = this._property.name + ": ";
+ nameElement.title = this._propertyPathString(this._thisPropertyPath());
// Property attributes.
if (this._mode === WebInspector.ObjectTreeView.Mode.Properties) {
@@ -91,104 +200,223 @@
nameElement.classList.add("not-enumerable");
}
- // Separator.
- var separatorElement = document.createElement("span");
- separatorElement.className = "separator";
- separatorElement.textContent = ": ";
+ // Value / Getter Value / Getter.
+ var valueOrGetterElement;
+ var resolvedValue = this._resolvedValue();
+ if (resolvedValue) {
+ if (resolvedValue.preview) {
+ this._previewView = new WebInspector.ObjectPreviewView(resolvedValue.preview);
+ valueOrGetterElement = this._previewView.element;
+ } else {
+ valueOrGetterElement = WebInspector.FormattedValue.createElementForRemoteObject(resolvedValue, this._property.wasThrown || this._getterHadError);
- // Value / Getter.
- var valueOrGetterElement;
- if (this._property.hasValue()) {
- valueOrGetterElement = WebInspector.FormattedValue.createElementForRemoteObject(this._property.value, this._property.wasThrown);
+ // Special case a function property string.
+ if (resolvedValue.type === "function")
+ valueOrGetterElement.textContent = this._functionPropertyString();
+ }
+
// FIXME: Context Menu for Value. (See ObjectPropertiesSection).
// FIXME: Option+Click for Value.
} else {
- console.assert(this._property.hasGetter());
valueOrGetterElement = document.createElement("span");
- valueOrGetterElement.textContent = "(...)";
- // FIXME: Click to Populate Value.
- // FIXME: Context Menu to Populate Value.
+ if (this._property.hasGetter())
+ valueOrGetterElement.appendChild(this._createInteractiveGetterElement());
+ if (!this._property.hasSetter())
+ valueOrGetterElement.appendChild(this._createReadOnlyIconElement());
+ // FIXME: What if just a setter?
}
valueOrGetterElement.classList.add("value");
- if (this._property.wasThrown)
+ if (this._property.wasThrown || this._getterHadError)
valueOrGetterElement.classList.add("error");
- this.listItemElement.appendChild(nameElement);
- this.listItemElement.appendChild(separatorElement);
- this.listItemElement.appendChild(valueOrGetterElement);
+ container.appendChild(nameElement);
+ container.appendChild(valueOrGetterElement);
+ return container;
},
- _updateTitleAPIStyle: function()
+ _createTitleAPIStyle: function()
{
- // Fixed value. Display like a property.
- const propertyNamesToDisplayAsValues = ["__proto__", "constructor"];
- if (propertyNamesToDisplayAsValues.contains(this._property.name) || (this._property.hasValue() && this._property.value.type !== "function")) {
- this._updateTitlePropertyStyle();
- return;
- }
+ // Fixed values and special properties display like a property.
+ if (this._alwaysDisplayAsProperty())
+ return this._createTitlePropertyStyle();
+ // Fetched getter values should already have been shown as properties.
+ console.assert(!this._getterValue);
+
// No API to display.
var isFunction = this._property.hasValue() && this._property.value.type === "function";
if (!isFunction && !this._property.hasGetter() && !this._property.hasSetter())
- return;
+ return null;
+ var container = document.createDocumentFragment();
+
// Function / Getter / Setter.
var nameElement = document.createElement("span");
- nameElement.className = "name";
+ nameElement.className = "property-name";
nameElement.textContent = this._property.name;
- this.listItemElement.appendChild(nameElement);
+ nameElement.title = this._propertyPathString(this._thisPropertyPath());
+ container.appendChild(nameElement);
if (isFunction) {
var paramElement = document.createElement("span");
+ paramElement.className = "function-parameters";
paramElement.textContent = this._functionParameterString();
- this.listItemElement.appendChild(paramElement);
+ container.appendChild(paramElement);
+ } else {
+ if (this._property.hasGetter())
+ container.appendChild(this._createInteractiveGetterElement());
+ if (!this._property.hasSetter())
+ container.appendChild(this._createReadOnlyIconElement());
+ // FIXME: What if just a setter?
}
- if (this._property.hasGetter()) {
- var icon = document.createElement("span");
- icon.textContent += "[G]";
- this.listItemElement.appendChild(icon);
- }
- if (this._property.hasSetter()) {
- var icon = document.createElement("span");
- icon.textContent += "[S]";
- this.listItemElement.appendChild(icon);
- }
+ return container;
},
+ _createInteractiveGetterElement: function()
+ {
+ var getterElement = document.createElement("img");
+ getterElement.className = "getter";
+ getterElement.title = WebInspector.UIString("Invoke getter");
+
+ getterElement.addEventListener("click", function(event) {
+ event.stopPropagation();
+ var lastNonPrototypeObject = this._propertyPath.lastNonPrototypeObject;
+ var getterObject = this._property.get;
+ lastNonPrototypeObject.invokeGetter(getterObject, function(error, result, wasThrown) {
+ this._getterHadError = !!(error || wasThrown);
+ this._getterValue = result;
+ this._updateTitleAndIcon();
+ }.bind(this));
+ }.bind(this));
+
+ return getterElement;
+ },
+
+ _createReadOnlyIconElement: function()
+ {
+ var readOnlyElement = document.createElement("img");
+ readOnlyElement.className = "read-only";
+ readOnlyElement.title = WebInspector.UIString("Read only");
+ return readOnlyElement;
+ },
+
+ _alwaysDisplayAsProperty: function()
+ {
+ // Constructor, though a function, is often better treated as an expandable object.
+ if (this._property.name === "constructor")
+ return true;
+
+ // Non-function objects are often better treated as properties.
+ if (this._property.hasValue() && this._property.value.type !== "function")
+ return true;
+
+ // Fetched getter value.
+ if (this._getterValue)
+ return true;
+
+ return false;
+ },
+
+ _functionPropertyString: function()
+ {
+ return "function" + this._functionParameterString();
+ },
+
_functionParameterString: function()
{
- console.assert(this._property.value.type === "function");
+ var resolvedValue = this._resolvedValue();
+ console.assert(resolvedValue.type === "function");
- var match = this._property.value.description.match(/^function.*?(\([^)]+?\))/);
+ // For Native methods, the toString is poor. We try to provide good function parameter strings.
+ if (isFunctionStringNativeCode(resolvedValue.description)) {
+ // Native function on a prototype, likely "Foo.prototype.method".
+ if (this._prototypeName) {
+ if (WebInspector.NativePrototypeFunctionParameters[this._prototypeName]) {
+ var params = WebInspector.NativePrototypeFunctionParameters[this._prototypeName][this._property.name];
+ return params ? "(" + params + ")" : "()";
+ }
+ }
+
+ // Native function property on a native function is likely a "Foo.method".
+ if (isFunctionStringNativeCode(this._propertyPath.object.description)) {
+ var match = this._propertyPath.object.description.match(/^function\s+([^)]+?)\(/);
+ if (match) {
+ var name = match[1];
+ if (WebInspector.NativeConstructorFunctionParameters[name]) {
+ var params = WebInspector.NativeConstructorFunctionParameters[name][this._property.name];
+ return params ? "(" + params + ")" : "()";
+ }
+ }
+ }
+ }
+
+ var match = resolvedValue.description.match(/^function.*?(\([^)]+?\))/);
return match ? match[1] : "()";
},
+ _sanitizedPrototypeString: function(value)
+ {
+ // FIXME: <https://webkit.org/b/141610> For many X, X.prototype is an X when it must be a plain object
+ if (value.type === "function")
+ return "Function";
+ if (value.subtype === "date")
+ return "Date";
+ if (value.subtype === "regexp")
+ return "RegExp";
+
+ return value.description.replace(/\[\d+\]$/, "").replace(/Prototype$/, "");
+ },
+
+ _propertyPathString: function(propertyPath)
+ {
+ if (propertyPath.isFullPathImpossible())
+ return WebInspector.UIString("Unable to determine path to property from root");
+
+ return propertyPath.fullPath;
+ },
+
_updateChildren: function()
{
if (this.children.length && !this.shouldRefreshChildren)
return;
+ var resolvedValue = this._resolvedValue();
+ var resolvedValuePropertyPath = this._resolvedValuePropertyPath();
+
function callback(mode, properties)
{
this.removeChildren();
- if (properties) {
- properties.sort(WebInspector.ObjectTreeView.ComparePropertyDescriptors);
- for (var propertyDescriptor of properties)
- this.appendChild(new WebInspector.ObjectTreePropertyTreeElement(propertyDescriptor, mode));
+ if (!properties) {
+ var errorMessageElement = document.createElement("div");
+ errorMessageElement.className = "empty-message";
+ errorMessageElement.textContent = WebInspector.UIString("Could not fetch properties. Object may no longer exist.");;
+ this.appendChild(new TreeElement(errorMessageElement, null, false));
+ return;
}
- if (mode === WebInspector.ObjectTreeView.Mode.Properties) {
- if (this._property.value.isCollectionType())
- this.appendChild(new WebInspector.ObjectTreeCollectionTreeElement(this._property.value));
+ var prototypeName = undefined;
+ if (this._property.name === "__proto__") {
+ if (resolvedValue.description)
+ prototypeName = this._sanitizedPrototypeString(resolvedValue);
}
+
+ properties.sort(WebInspector.ObjectTreeView.ComparePropertyDescriptors);
+ for (var propertyDescriptor of properties)
+ this.appendChild(new WebInspector.ObjectTreePropertyTreeElement(propertyDescriptor, resolvedValuePropertyPath, mode, prototypeName));
+
+ // FIXME: Re-enable Collection Entries with new UI.
+ // if (mode === WebInspector.ObjectTreeView.Mode.Properties) {
+ // if (resolvedValue.isCollectionType())
+ // this.appendChild(new WebInspector.ObjectTreeCollectionTreeElement(resolvedValue));
+ // }
};
if (this._property.name === "__proto__")
- this._property.value.getOwnPropertyDescriptors(callback.bind(this, WebInspector.ObjectTreeView.Mode.API));
+ resolvedValue.getOwnPropertyDescriptors(callback.bind(this, WebInspector.ObjectTreeView.Mode.API));
else
- this._property.value.getOwnAndGetterPropertyDescriptors(callback.bind(this, this._mode));
- }
+ resolvedValue.getOwnPropertyDescriptors(callback.bind(this, this._mode));
+ },
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.css (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.css 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.css 2015-02-25 00:31:38 UTC (rev 180593)
@@ -27,32 +27,29 @@
position: relative;
}
-.object-tree > .title {
- color: black;
- padding: 0 8px 0 18px;
- min-height: 18px;
- white-space: nowrap;
- background-origin: padding;
- background-clip: padding;
-}
-
.object-tree > :matches(.title, .object-preview)::before {
position: absolute;
- top: 5px;
- left: 7px;
- width: 8px;
- height: 8px;
+ top: 0;
+ left: -2px;
- background-image: -webkit-canvas(disclosure-triangle-tiny-closed-normal);
- background-size: 8px 8px;
+ width: 13px;
+ height: 13px;
+
+ background-image: -webkit-canvas(navigation-sidebar-panel-disclosure-triangle-closed-normal);
+ background-size: 13px 13px;
background-repeat: no-repeat;
+ background-position: center;
content: "";
}
+.object-tree:not(.lossless-preview) > :matches(.title, .object-preview) {
+ margin-left: 13px;
+}
+
.object-tree.expanded > :matches(.title, .object-preview)::before {
- background-image: -webkit-canvas(disclosure-triangle-tiny-open-normal);
+ background-image: -webkit-canvas(navigation-sidebar-panel-disclosure-triangle-open-normal);
}
.object-tree.expanded .object-preview {
@@ -64,7 +61,7 @@
width: 0px;
}
-.object-tree-outline {
+.object-tree .object-tree-outline {
display: none;
}
@@ -82,7 +79,6 @@
}
.object-tree-outline li {
- margin-left: 12px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
@@ -90,34 +86,10 @@
cursor: default;
}
-.object-tree-outline li.parent {
- margin-left: 1px;
-}
-
-.object-tree-outline li.parent::before {
- float: left;
-
- content: "";
-
- background-image: -webkit-canvas(disclosure-triangle-tiny-closed-normal);
- background-size: 8px 8px;
- background-repeat: no-repeat;
-
- width: 8px;
- height: 8px;
-
- margin-top: 3px;
- padding-right: 2px;
-}
-
-.object-tree-outline li.parent.expanded::before {
- background-image: -webkit-canvas(disclosure-triangle-tiny-open-normal);
-}
-
.object-tree-outline ol {
display: none;
margin: 0;
- -webkit-padding-start: 12px;
+ -webkit-padding-start: 16px;
list-style: none;
}
@@ -126,48 +98,15 @@
}
.object-tree-outline li .empty-message {
- padding-top: 0;
- padding-bottom: 0;
color: rgb(60%, 60%, 60%);
+ margin-left: 7px;
+ font-family: sans-serif;
+ font-size: 12px;
}
-/* Property Colors */
-
-.object-tree-property .name {
- color: rgb(136, 19, 145);
-}
-
-.object-tree-property .name.not-enumerable {
- opacity: 0.6;
-}
-
-.object-tree-property .value.error {
- color: red;
-}
-
-
/* Console Overrides */
-.console-group-messages .object-tree:not(.lossless-preview) {
- margin: 0 0 0 12px !important;
+:matches(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap) .object-tree-outline,
+:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline {
+ padding-left: 6px !important;
}
-
-.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview) {
- padding: 0 8px 0 0;
-}
-
-.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)::before {
- top: 2px;
- left: 1px;
-}
-
-/* FIXME: Transitioning the console over to formatted-object */
-.console-group-messages :matches(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap) .object-tree,
-.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree {
- position: static;
-}
-
-.console-group-messages :matches(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap) .object-tree-outline,
-.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline {
- padding-left: 0 !important;
-}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js (180592 => 180593)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js 2015-02-25 00:31:34 UTC (rev 180592)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js 2015-02-25 00:31:38 UTC (rev 180593)
@@ -171,24 +171,36 @@
update: function()
{
- this._object.getOwnAndGetterPropertyDescriptors(this._updateProperties.bind(this));
+ this._object.getOwnPropertyDescriptors(this._updateProperties.bind(this));
},
// Private
_updateProperties: function(properties)
{
+ this._outline.removeChildren();
+
+ if (!properties) {
+ var errorMessageElement = document.createElement("div");
+ errorMessageElement.className = "empty-message";
+ errorMessageElement.textContent = WebInspector.UIString("Could not fetch properties. Object may no longer exist.");;
+ this._outline.appendChild(new TreeElement(errorMessageElement, null, false));
+ return;
+ }
+
properties.sort(WebInspector.ObjectTreeView.ComparePropertyDescriptors);
- this._outline.removeChildren();
+ // FIXME: Intialize component with "$n" instead of "obj".
+ var rootPropertyPath = new WebInspector.PropertyPath(this._object, "obj");
for (var propertyDescriptor of properties)
- this._outline.appendChild(new WebInspector.ObjectTreePropertyTreeElement(propertyDescriptor, this._mode));
+ this._outline.appendChild(new WebInspector.ObjectTreePropertyTreeElement(propertyDescriptor, rootPropertyPath, this._mode));
- if (this._mode === WebInspector.ObjectTreeView.Mode.Properties) {
- if (this._object.isCollectionType())
- this._outline.appendChild(new WebInspector.ObjectTreeCollectionTreeElement(this._object));
- }
+ // FIXME: Re-enable Collection Entries with new UI.
+ // if (this._mode === WebInspector.ObjectTreeView.Mode.Properties) {
+ // if (this._object.isCollectionType())
+ // this._outline.appendChild(new WebInspector.ObjectTreeCollectionTreeElement(this._object));
+ // }
if (!this._outline.children.length) {
var emptyMessageElement = document.createElement("div");