Guest User

Untitled

a guest
Apr 26th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. diff --git a/WebCore/page/inspector/ProfileView.js b/WebCore/page/inspector/ProfileView.js
  2. index 2296441..630d7b8 100644
  3. --- a/WebCore/page/inspector/ProfileView.js
  4. +++ b/WebCore/page/inspector/ProfileView.js
  5. @@ -195,7 +195,18 @@ WebInspector.ProfileDataGridNode = function(profileView, profileNode)
  6. this.profileNode = profileNode;
  7. profileNode._dataGridNode = this;
  8.  
  9. - var hasChildren = (profileNode.children.length ? true : false);
  10. + // Find the first child that is visible. Since we don't want to claim
  11. + // we have children if all the children are invisible.
  12. + var hasChildren = false;
  13. + var children = this.profileNode.children;
  14. + var childrenLength = children.length;
  15. + for (var i = 0; i < childrenLength; ++i) {
  16. + if (children[i].visible) {
  17. + hasChildren = true;
  18. + break;
  19. + }
  20. + }
  21. +
  22. WebInspector.DataGridNode.call(this, null, hasChildren);
  23.  
  24. this.addEventListener("populate", this._populate, this);
Add Comment
Please, Sign In to add comment