[Webkit-unassigned] [Bug 122125] Web Inspector: restore navigation panel state across page reloads and reopens

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 2 19:01:01 PST 2013


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





--- Comment #8 from Brian Burg <burg at cs.washington.edu>  2013-12-02 18:59:23 PST ---
(In reply to comment #7)
> (From update of attachment 218246 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=218246&action=review
> 
> > Source/WebInspectorUI/UserInterface/NavigationSidebarPanel.js:557
> > +        var workList = [];
> > +        this._visibleContentTreeOutlines.forEach(function(outline) { workList.push(outline); });
> > +        for (var i = 0; i < workList.length; ++i) {
> > +            if (workList[i].hasChildren)
> > +                workList = workList.concat(workList[i].children);
> > +        }
> > +
> > +        // Remove TreeOutline elements from the front of the work list.
> > +        workList.splice(0, this._visibleContentTreeOutlines.size);
> 
> I think this can be simplified (and likely in a performant way). Can this just iterate over the TreeOutlines and then use traverseNextTreeElement to append to workList?

I couldn't figure out traverseNextTreeElement or find an example where it seems to iterate the entire tree. If it works, it would definitely be faster.

-- 
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