Web Inspector: Improve the UI of the type profiler popover
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 May 2015 23:33:42 +0000 (23:33 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 May 2015 23:33:42 +0000 (23:33 +0000)
commit579f07ae13a6e414e9412c6aa1148a3a82e2bbe1
treec4d74ae86b39785305ef5ea375e4bf439d24f1d9
parent3975d6f51b968b9ab6e09609596e7076598e121f
Web Inspector: Improve the UI of the type profiler popover
https://bugs.webkit.org/show_bug.cgi?id=140737

Reviewed by Timothy Hatcher.

Display TypeDescriptions in a Tree similiar to ObjectTrees.
Currently the only information we have in a TypeDescription
is the property names, and not their types, so all we can
display in the tree are names.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeToken):
* UserInterface/Main.html:
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype.updateTypes):
* UserInterface/Models/StructureDescription.js: Added.
(WebInspector.StructureDescription):
(WebInspector.StructureDescription.fromPayload):
(WebInspector.StructureDescription.prototype.get fields):
(WebInspector.StructureDescription.prototype.get optionalFields):
(WebInspector.StructureDescription.prototype.get constructorName):
(WebInspector.StructureDescription.prototype.get prototypeStructure):
(WebInspector.StructureDescription.prototype.get imprecise):
* UserInterface/Models/TypeDescription.js: Added.
(WebInspector.TypeDescription):
(WebInspector.TypeDescription.fromPayload):
(WebInspector.TypeDescription.prototype.get leastCommonAncestor):
(WebInspector.TypeDescription.prototype.get typeSet):
(WebInspector.TypeDescription.prototype.get structures):
(WebInspector.TypeDescription.prototype.get valid):
(WebInspector.TypeDescription.prototype.get truncated):
* UserInterface/Models/TypeSet.js:
(WebInspector.TypeSet):
(WebInspector.TypeSet.prototype.get primitiveTypeNames):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype._updateChildren):
* UserInterface/Views/Section.css: Removed.
* UserInterface/Views/Section.js: Removed.
* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .expandable):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.showPopoverForTypes):
(WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation.handler):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
* UserInterface/Views/TypePropertiesSection.js: Removed.
* UserInterface/Views/TypeTokenView.js:
(WebInspector.TypeTokenView):
(WebInspector.TypeTokenView.titleForPopover):
(WebInspector.TypeTokenView.prototype.update):
(WebInspector.TypeTokenView.prototype._setUpMouseoverHandlers):
(WebInspector.TypeTokenView.prototype._shouldShowPopover):
(WebInspector.TypeTokenView.prototype._displayTypeName):
* UserInterface/Views/TypeTreeElement.css: Added.
(.type-tree-element):
(.type-tree-element > .titles):
(.type-tree-element > .disclosure-button):
(.type-tree-element.parent > .disclosure-button):
(.type-tree-element.parent.expanded > .disclosure-button):
(.type-tree-element > .icon):
(.type-tree-element.prototype):
(.type-tree-element.prototype:focus):
(.type-tree-element.prototype + ol):
* UserInterface/Views/TypeTreeElement.js: Added.
(WebInspector.TypeTreeElement):
(WebInspector.TypeTreeElement.prototype.get name):
(WebInspector.TypeTreeElement.prototype.get isPrototype):
(WebInspector.TypeTreeElement.prototype.onpopulate):
(WebInspector.TypeTreeElement.prototype.onexpand):
* UserInterface/Views/TypeTreeView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/PropertiesSection.js.
(.type-tree):
(.type-tree-outline):
(.type-tree-outline li):
(.type-tree-outline ol):
(.type-tree-outline ol.expanded):
(.type-tree-outline li .empty-message):
* UserInterface/Views/TypeTreeView.js: Added.
(WebInspector.TypeTreeView):
(WebInspector.TypeTreeView.prototype.get typeDescription):
(WebInspector.TypeTreeView.prototype.get element):
(WebInspector.TypeTreeView.prototype.get treeOutline):
(WebInspector.TypeTreeView.prototype._populate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Controllers/TypeTokenAnnotator.js
Source/WebInspectorUI/UserInterface/Main.html
Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js
Source/WebInspectorUI/UserInterface/Models/StructureDescription.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Models/TypeDescription.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Models/TypeSet.js
Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js
Source/WebInspectorUI/UserInterface/Views/Section.css [deleted file]
Source/WebInspectorUI/UserInterface/Views/Section.js [deleted file]
Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.css
Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js
Source/WebInspectorUI/UserInterface/Views/TypePropertiesSection.js [deleted file]
Source/WebInspectorUI/UserInterface/Views/TypeTokenView.js
Source/WebInspectorUI/UserInterface/Views/TypeTreeElement.css [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/TypeTreeElement.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/TypeTreeView.css [moved from Source/WebInspectorUI/UserInterface/Views/PropertiesSection.js with 63% similarity]
Source/WebInspectorUI/UserInterface/Views/TypeTreeView.js [new file with mode: 0644]