Closed Bug 1921937 Opened 11 months ago Closed 11 months ago

[InactiveCSS] incorrect inactive CSS on pseudo element when pseudo element node is selected

Categories

(DevTools :: Inspector: Rules, defect, P2)

defect

Tracking

(firefox-esr128 unaffected, firefox131 unaffected, firefox132 fixed, firefox133 fixed)

RESOLVED FIXED
133 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox131 --- unaffected
firefox132 --- fixed
firefox133 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Steps to reproduce

  1. Go to data:text/html,<meta charset=utf8><style>button::before { content: "d"; position: relative; top: 20px; }</style><button>hello</button>
  2. Open the inspector
  3. Select the button ::before node

Actual results

The top declaration is marked as inactive, although it is, since the element has position: relative


This was regressed by Bug 1583641

When directly selecting the pseudo element in the markup view,
we were still passing the pseudo element as a second arguement
of getComputedStyle, which would not return the expected data.

A test case is added to ensure we don't regress this.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

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

Severity: -- → S3
Priority: -- → P2
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f7452beb2ca4 [devtools] Fix retrieval of computed style for pseudo element node. r=devtools-reviewers,ochameau. https://hg.mozilla.org/integration/autoland/rev/023a53a2e2b7 [devtools] Don't pass pseudo to _styleRef when handling inline style. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch

When directly selecting the pseudo element in the markup view,
we were still passing the pseudo element as a second arguement
of getComputedStyle, which would not return the expected data.

A test case is added to ensure we don't regress this.

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

Attachment #9429028 - Flags: approval-mozilla-beta?
Attachment #9429029 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: Erroneous inactive CSS information in the Inspector when selecting a pseudo element node
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: -
  • Risk associated with taking this patch: low
  • Explanation of risk level: simple devtools only fix, covered by automated test
  • String changes made/needed: -
  • Is Android affected?: no
Attachment #9429028 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9429029 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: