Closed Bug 1998357 Opened 4 months ago Closed 29 days ago

incorrect inactive CSS on pseudo element when CSS rules has selectors with multiple pseudo element

Categories

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

defect

Tracking

(firefox149 fixed)

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: nchevobbe, Assigned: ochameau)

References

(Blocks 3 open bugs, )

Details

Attachments

(1 file)

Steps to reproduce

  1. Navigate to data:text/html,<meta charset=utf8><style>h1::before, h1::after { position: absolute; content: "-"; top: 0; }</style><h1>Hello
  2. Open the inspector
  3. Expand the <h1> node
  4. Select the ::before node
  5. Select the ::after node

Expected results

The top: 0 declaration is never inactive

Actual results

The top: 0 declaration is declared inactive when selecting the ::before node

See Also: → 1863318
Severity: -- → S3
Priority: -- → P3
Blocks: 1196250

Simplifying the logic of pseudo element in the backend fix that "for free".

When selecting a pseudo elements, the rules for it aren't
considered as pseudo elements rules.
We currently have a workaround to nullify pseudoElement on the
appliedstyle object.

But we could simplify the logic here to stop involving a binding element
and pseudo element string when fetching rules for the selected pseudo
element.

Pseudo element rules should only be about rules for pseudo elements
which are children of the currently selected element.
i.e. the logic at the end of #getAllElementRules, after skipPseudo.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d02a28df0263 https://hg.mozilla.org/integration/autoland/rev/8e822a0c054c [devtools] Simplify backend logic about pseudo elements. r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 29 days ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: