Closed Bug 2056740 Opened 3 months ago Closed 3 months ago

The ruler highlighter isn't removed when closing DevTools

Categories

(DevTools :: Shared Components, defect, P2)

Firefox 155
x86_64
Linux
defect

Tracking

(firefox-esr140 unaffected, firefox-esr153 unaffected, firefox153 unaffected, firefox154 fixed, firefox155 fixed)

RESOLVED FIXED
155 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- unaffected
firefox153 --- unaffected
firefox154 --- fixed
firefox155 --- fixed

People

(Reporter: B.RJL, Assigned: nchevobbe)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 2 external files)

When I select:

#!/usr/bin/env xdg-open
document.querySelector('#command-button-rulers').click();
document.querySelector('#toolbox-close'').click();

When I next select //*[@id="command-button-rulers"], it overlays another ruler, rather than remove the previously-applied one, thereby merely increasing its opacity, and rendering it impossible to remove.

My Environment

PS /home/beedell.roke_julian_lockhart> rpm -qf (Get-Command firefox-nightly).Source --queryformat @'
>> Name: %{NAME}
>> Version: %{VERSION}
>> Release: %{RELEASE}
>> Architecture: %{ARCH}
>> Install Date: %{INSTALLTIME:date}
>> Size: %{SIZE}
>> Signature: %{SIGPGP:pgpsig}
>> Source RPM: %{SOURCERPM}
>> Build Date: %{BUILDTIME:date}
>> Build Host: %{BUILDHOST}
>> Packager: %{PACKAGER}
>> Vendor: %{VENDOR}
>> '@ | yq -P
Name: firefox-nightly
Version: 155.0a1
Release: 20260721202327
Architecture: x86_64
Install Date: Wed 22 Jul 2026 00:03:08 BST
Size: 396032189
Signature: (none)
Source RPM: firefox-nightly-155.0a1-20260721202327.src.rpm
Build Date: Tue 21 Jul 2026 23:31:33 BST
Build Host: 8d77f84d0ff1
Packager: (none)
Vendor: Mozilla

Looks like this was regressed by Bug 1247553

Keywords: regression
Regressed by: 1247553
Summary: The ruler cannot be removed from a tab, if the DevTools are closed before its removal. → The ruler highlighter isn't remove when closing DevTools

Set release status flags based on info from the regressing bug 1247553

Nicolas will have a look.

Severity: -- → S3
Flags: needinfo?(nchevobbe)
Priority: -- → P2

The highlighter actor we create should be managed by a target scoped actor (e.g. the inspectorActor)
I'll provide a patch

Flags: needinfo?(nchevobbe)

With this, the highlighter will be destroyed when the parent actor is destroyed.
This will fix the issue where the Rulers highlighters wasn't removed when
closing the toolbox.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Blocks: 2062526
Pushed by nchevobbe@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e1b29c2806ff https://hg.mozilla.org/integration/autoland/rev/dcaea3ad67d9 [devtools] Actually manage the CustomHighlighterActor by the parent actor passed in the constructor. r=devtools-reviewers,bomsy,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch

The patch landed in nightly and beta is affected.
:nchevobbe, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(nchevobbe)

(In reply to BugBot [:suhaib / :marco] from comment #9)

The patch landed in nightly and beta is affected.
:nchevobbe, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

it's a bit late I guess, but let's see if release manager will take it

Flags: needinfo?(nchevobbe)

With the patch from Bug 1247553, the created CustomHighlighterActor is no longer
returned to the client, which mean it wasn't managed anymore.

Here, we explicitly manage the new instance with the parent actor that is passed,
so fixes the issue where the Rulers highlighters wasn't removed when closing
the toolbox.

Original Revision: https://phabricator.services.mozilla.com/D316454

Attachment #9625652 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: DevTools rulers highlighters stays visible on the page after DevTools toolbox is closed
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: no
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing: -
  • Risk associated with taking this patch: low
  • Explanation of risk level: one-liner fix, covered by a mochitest
  • String changes made/needed?: No
  • Is Android affected?: no

Comment on attachment 9625652 [details]
Bug 2056740 - [devtools] Actually manage the CustomHighlighterActor by the parent actor passed in the constructor. .

There are no more betas in the 154 cycle. Moving request to firefox-release for dot release consideration.

Attachment #9625652 - Flags: approval-mozilla-beta? → approval-mozilla-release?
QA Whiteboard: [qa-triage-done-c156/b155]
Attachment #9625652 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: