Closed Bug 1590050 Opened 5 years ago Closed 5 years ago

Preserve selected node in markup view when reloading page with iframe

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(firefox72 fixed)

RESOLVED FIXED
Firefox 72
Tracking Status
firefox72 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(4 files)

The inspector currently attempts to reselect the selected node in the markup view when reloading the page.

It does so by keeping track of the CSS selector of the currently selected element.
However this doesn't support elements nested in iframes or webcomponents.

We would like to introduce iframes in our DAMP tests. Supporting this feature would make the inspector tests more relevant when using an iframe.

See Bug 1589011

Cleanup before adding more content to the walker front

Depends on D49938

This helper can be moved on the walker front and will be useful to find the selected node front after a page reload

Depends on D49939

Small fix on the findNodeFront helper. The walker should be able to calculate its depth without relying on consumers to remove selectors from the array passed to findNodeFront.

Depends on D49940

To support this feature we perform two main changes

  • the node actor exposes a getAllSelectors method, and the inspector now stores all selectors rather than just one
  • the node actor exposes a waitForFrameLoad method, and the walkerFront findNodeFront helper uses it to make sure frames are loaded before querying a selector

Also added a test

Attachment #9103001 - Attachment description: Bug 1590050 - Walker findNodeFront should use selectors relevant to its rootNode → Bug 1590050 - Walker findNodeFront should use selectors relevant to its rootNode
Blocks: 1588773
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3354b8426f38
Extract DevTools walker fronts & specs to dedicated files r=gl
https://hg.mozilla.org/integration/autoland/rev/35bb8f4411e5
Move findNodeFront helper to walker front r=gl
https://hg.mozilla.org/integration/autoland/rev/8a9767a9ed77
Walker findNodeFront should use selectors relevant to its rootNode r=rcaliman
https://hg.mozilla.org/integration/autoland/rev/78b0791bfb15
Preserve markup view selection in iframes after reload r=rcaliman,gl
Blocks: 1592513
Regressions: 1592996
Regressions: 1599635
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: