Closed Bug 1578753 Opened 11 months ago Closed 8 months ago

Make the Style Editor support target switching

Categories

(DevTools :: Style Editor, enhancement, P1)

enhancement

Tracking

(Fission Milestone:M6, firefox73 fixed)

RESOLVED FIXED
Firefox 73
Fission Milestone M6
Tracking Status
firefox73 --- fixed

People

(Reporter: ochameau, Assigned: daisuke)

References

(Blocks 2 open bugs)

Details

(Whiteboard: dt-fission-m2-mvp)

Attachments

(3 files)

Bug 1565263 landed the TargetList API which helps support switching to another target (as well as supporting the additional remote iframe target).
But we should followup in each tool in order to start using this new API.
The very first goal is to:

  • stop memoizing the target/targetFront and may be also the target scoped front (inspector, console, thread, storage, ...). Instead we should use toolbox.targetList.targetFront in order to query for the current top level target front.
  • support target switching by using TargetList.watchTargets. In a first iteration we would only care about the top level target. In order to do so, we can check for the isTopLevel argument being passed to the two callbacks register to watchTargets:
  this._toolbox.targetList.watchTargets([this._toolbox.targetList.TYPES.FRAME],
    (type, targetFront, isTopLevel) => {
      if (isTopLevel) {
        // A new top level target is available
        // This will be fired on toolbox opening, for the first one,
        // And then, evertime we navigate to another process.
        // For now, you would need `devtools.target-switching.enabled` to be set to true
        // And navigate from any http website to about:robots, which loads into the parent process. Or enable Fission and navigate between two distinct top level domains.
      }
    },
    (type, targetFront, isTopLevel) => {
      if (isTopLevel) {
        // A top level target has been destroyed
      }
    }

See bug 1565263 for how we migrated the console or bug 1578242 for the inspector.

Priority: -- → P3
Assignee: nobody → daisuke
Blocks: 1592575
Blocks: 1602791
No longer blocks: 1602791
Whiteboard: dt-fission-m2-mvp

Tracking dt-fission-m2 bugs for Fission Nightly (M6)

Fission Milestone: --- → M6
See Also: → 1604126
Pushed by dakatsuka.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b0b6c99e9cf0
Use the current target of TargetList. r=jdescottes,ochameau
https://hg.mozilla.org/integration/autoland/rev/2297b54080b1
Reflect the switching of the top-level target. r=jdescottes,ochameau
https://hg.mozilla.org/integration/autoland/rev/3cff413b1897
Add a test for top-level target switing. r=jdescottes,ochameau
Status: NEW → ASSIGNED
Priority: P3 → P1
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
You need to log in before you can comment on or make changes to this bug.