Web Inspector: Modify the type profiler runtime protocol to transfer some computation into the WebInspector
https://bugs.webkit.org/show_bug.cgi?id=136500

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

This patch changes the type profiler protocol to the Web Inspector
by moving the work of calculating computed properties that effect the UI 
into the Web Inspector. This makes the Web Inspector have control over the 
strings it displays as UI elements representing type information to the user 
instead of JavaScriptCore deciding on a convention for these strings.
JavaScriptCore now sends enough information to the Web Inspector so that 
it can compute the properties JavaScriptCore used to compute.

* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
* inspector/protocol/Runtime.json:
* runtime/TypeProfiler.cpp:
(JSC::TypeProfiler::getTypesForVariableAtOffsetForInspector): Deleted.
* runtime/TypeProfiler.h:
* runtime/TypeSet.cpp:
(JSC::TypeSet::inspectorTypeSet):
(JSC::StructureShape::leastCommonAncestor):
(JSC::StructureShape::inspectorRepresentation):
* runtime/TypeSet.h:

Source/WebInspectorUI:

This patch maintains the same UI in the Web Inspector for displaying
type information, but now accounts for the new protocol for type profiling.
        
The Inspector now has a TypeSet class that wraps the TypeDescription 
protocol object and creates a simple interface for asking protocol objects 
about their type.

* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeTokensForEachNode):
* UserInterface/Main.html:
* UserInterface/Models/TypeSet.js: Added.
(WebInspector.TypeSet):
(WebInspector.TypeSet.fromPayload):
(WebInspector.TypeSet.prototype.isContainedIn):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation.handler):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation):
* UserInterface/Views/TypePropertiesSection.js:
(WebInspector.TypePropertiesSection.prototype.onpopulate):
(WebInspector.TypePropertyTreeElement.prototype.onpopulate):
* UserInterface/Views/TypeTokenView.js:
(WebInspector.TypeTokenView.prototype.update):
(WebInspector.TypeTokenView.prototype._shouldShowPopover):
(WebInspector.TypeTokenView.prototype._displayTypeName):



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