Fixes the hang that could happen when option-clicking to expand
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 22:31:11 +0000 (22:31 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 22:31:11 +0000 (22:31 +0000)
commit7f97729701adc2819635027a3cb340c365aa6dfb
tree648e1a6e27f48475fcaa8985e382ee3891f15c6d
parent11f4d1db9b14855819c13199a420e09015b957b7
Fixes the hang that could happen when option-clicking to expand
a disclosure triangle in the Properties pane. This change limits
the recursion depth when expanding the tree elements.

<rdar://problem/5847681> Safari hangs when option-clicking a
disclosure triangle in the Inspector's Properties pane

Reviewed by John Sullivan.

* page/inspector/treeoutline.js:
(TreeElement.prototype.expandRecursively): Pass an empty info object to
traverseNextTreeElement to get the depthChange value. This is used to
compute a current depth. If the depth exceeds the maxDepth argument, the
item isn't expanded and children wont be populated when traverseNextTreeElement
is called until the depth goes below the maxDepth.
(TreeElement.prototype.traverseNextTreeElement): Added a new info
argument that can be optionally used to return extra info like depth change.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/page/inspector/treeoutline.js