Closed Bug 920034 Opened 11 years ago Closed 11 years ago

Markup panel does not update and breakcrumbs act weirdly on selector search after page reload

Categories

(DevTools :: Inspector, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 962647

People

(Reporter: Optimizer, Assigned: pbro)

Details

Using latest Nightlies: 1) Be on any page 2) Open Inspector 3) Search for an existing selector 4) suggestions appears, press enter to go to that selector, press Enter again to go to next. All works. 5) Reload the page 6) Repeat step 3 Actual result: Only the highlighter acts correctly. Breadcrumbs show the root node as the selected node, and markup view remains still at a wrong node. Expected result : same as Step 4
Oh, and I get two exceptions in browser console : [object DOMException] protocol.js:817 AND "unknownError" protocol.js:20
Since this is only after reload, this may be related to the inspector trying to re-select the last selected node after reload. If there's an initialization bug in there, it would prevent the markup-view from finishing to load properly.
Assignee: nobody → pbrosset
After having tested this with the latest nightly and aurora, I'm having different types of problems: 1) Go to a page 2) Open inspector 3) Search for an existing selector that matches an element that is at least 2 levels below body 4) Suggestions appear, highlighter works, but markup-view doesn't expand the node, and if you then try and expand it manually, you'll see an empty line in the markup-view. The problem seems to be related to searching for an element whose parent has not yet been imported (because collapsed still). Investigation ongoing.
I can now confirm the above assumption. To sum it up, there are 3 ways to expand a node in the markup-view: - Clicking on the expanded icon on each of its parent, manually, one by one, until the node appears. That is equivalent to importing each parent one by one, and that works fine. - Right-clicking on an element in the content page, and select "inspect element". This is a locally-supported operation only, and goes through selection.js/setNode -> inspector.js/frontForRawNode which makes sure that all parents of the node are imported, so this works fine too. - Searching for a selector using the search. This however uses the server-side querySelectorAll which returns a list of node actors whose parents haven't been imported yet. The markup-view, when trying to expand that element, will fail to import its chain of parents because it doesn't have one. The fix that I can think of right now consists in calling `this.walker.parents(aNode)` in markup-view.js/showNode to make sure all parents are imported. This however causes an other JS error, so I need to investigate some more.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.