Created attachment 43306 [details] Screen shots with tree breakage samples I tried it on a benchmark just because it generates lots of profiling data. Any other page with JavaScript can be actually used. I observe the following problems: - in Heavy view, after focusing on a non-expanded function node and then restoring back, its children disappear from view (see the first two samples on screen shots); - in Tree view, after focusing on a non-expanded function node and then restoring back, node completely disappears.
Created attachment 43354 [details] Proposed fix
Comment on attachment 43354 [details] Proposed fix > + if (this.parent && this.parent.children.indexOf(this) >= 0) { > + this._savedPosition = { > + parent: this.parent, > + index: this.parent.children.indexOf(this) You should cache the result of this.parent.children.indexOf so you don't need to do it twice. When would you not be a child of your parent? Do you need the test.
Otherwise r+.
Created attachment 43411 [details] Proposed fix, comments addressed OK, I've introduced an assertion to be sure that a node for which savePosition is called has a parent. And yes, I think I don't need to check if a node with parent really exists in its children.
Comment on attachment 43411 [details] Proposed fix, comments addressed Clearing flags on attachment: 43411 Committed r51139: <http://trac.webkit.org/changeset/51139>
All reviewed patches have been landed. Closing bug.