Web Inspector: some measurements are missing in PerformanceTests/inspector/heap-*.html
https://bugs.webkit.org/show_bug.cgi?id=107687

Reviewed by Pavel Feldman.

* inspector/heap-snapshot-performance-test.js: override methods on JSHeapSnapshot instead
of HeapSnapshot, otherwise overrides from JSHeapSnapshot will rule.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: heap profiler shows nodes with distance 0
https://bugs.webkit.org/show_bug.cgi?id=107425

Reviewed by Pavel Feldman.

"Document DOM tree" entities now have distance 1. So if there is a DOM
wrapper that is not referenced from javascript it will anyways be shown
in the heap snapshot and will have distance 2. Also such DOM wrappers
are considered to be reachable from user roots (e.g. global Window objects)
otherwice they are not event shown in the heap snapshots.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype.distanceForUserRoot):
(WebInspector.HeapSnapshot.prototype._calculateDistances):
* inspector/front-end/JSHeapSnapshot.js:
(WebInspector.JSHeapSnapshot.prototype.distanceForUserRoot): distance for
"(Document DOM trees)" is set to 0 to make sure distance of "Ddocument DOM tree" is 1.
(WebInspector.JSHeapSnapshot.prototype._markPageOwnedNodes):
(WebInspector.JSHeapSnapshotNode.prototype.isDocumentDOMTreesRoot):

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