[Webkit-unassigned] [Bug 103911] Web Inspector: more robust treeoutline.findTreeElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 3 12:34:53 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=103911





--- Comment #3 from johnjbarton <johnjbarton at chromium.org>  2012-12-03 12:37:17 PST ---
(In reply to comment #2)

> I also don't think this is right: imagine you get here due to isAncestor(item.representedObject, representedObject) returning true above. And there are no tree elements created for the path from root to given representedObject yet. You get into recursive findTreeElement for the parent object as the next step, but oneLevel (isAncestor substitude) returns false and you never call onpopulate on the parent.

When we reach the first recursive findTreeElement call:

  childTreeElement = childTreeElement.treeOutline.findTreeElement(ancestors[i], oneLevel, noAncestors);

we have i = 0. So the first call to findTreeElement() will use ancestors[0]. This value will be the representedObject for the 'found' childTreeElement, which is one of this.children[]. 

I was assuming that this.children[] are all in the cache, so the findTreeElement() will return the childTreeElement and we will call onpopulate() on it to begin the process of building the children-tree. 

Is this assumption incorrect? (all the tests pass FWIW).

If my assumption is incorrect, then we need to prepend this.representedObject to the ancestors list.

If my assumption is correct, then I will add comments to the code.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list