Fix expanding profile call stacks being broken after sorting.
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Sep 2009 02:16:33 +0000 (02:16 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Sep 2009 02:16:33 +0000 (02:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=26423

Patch by Jessie Berlin <jberlin@webkit.org> on 2009-09-24
Reviewed by Timothy Hatcher.

* inspector/front-end/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype.sort):
Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
causes the children to be placed in the right positions.

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

WebCore/ChangeLog
WebCore/inspector/front-end/ProfileDataGridTree.js

index 501a1f5..57bb760 100644 (file)
@@ -1,3 +1,15 @@
+2009-09-24  Jessie Berlin  <jberlin@webkit.org>
+
+        Reviewed by Timothy Hatcher.
+
+        Fix expanding profile call stacks being broken after sorting.
+        https://bugs.webkit.org/show_bug.cgi?id=26423
+
+        * inspector/front-end/ProfileDataGridTree.js:
+        (WebInspector.ProfileDataGridNode.prototype.sort):
+        Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
+        causes the children to be placed in the right positions.
+
 2009-09-24  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Stephanie Lewis.
index 356f57d..3fb0e00 100644 (file)
@@ -153,8 +153,11 @@ WebInspector.ProfileDataGridNode.prototype = {
 
                 // If the grid node is collapsed, then don't sort children (save operation for later).
                 // If the grid node has the same sorting as previously, then there is no point in sorting it again.
-                if (!force && !gridNode.expanded || gridNode.lastComparator === comparator)
+                if (!force && !gridNode.expanded || gridNode.lastComparator === comparator) {
+                    if (gridNode.children.length)
+                        gridNode.shouldRefreshChildren = true;
                     continue;
+                }
 
                 gridNode.lastComparator = comparator;