Closed Bug 1809107 Opened 3 years ago Closed 1 year ago

Constructable stylesheet are displayed as "inline style sheet"

Categories

(DevTools :: Style Editor, defect, P3)

defect

Tracking

(firefox140 fixed)

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Steps to reproduce

  1. Navigate to data:text/html,<meta charset=utf8>Hello<script>let s = new CSSStyleSheet();s.replace('body { color: blue; }');document.adoptedStyleSheets = [ s ];</script>
  2. Open the style editor

Expected results

There's a <constructed style sheet #1> item

Actual results

There's a <inline style sheet #1> item


The STYLESHEET resource has a constructed property that we could use for that (https://searchfox.org/mozilla-central/rev/d62c4c4d5547064487006a1506287da394b64724/devtools/server/actors/resources/stylesheets.js#72)

Severity: -- → S3
Priority: -- → P3

This adds a new <constructed style sheet #N> string that we use for constructable
stylesheets.
The index that we display probably doesn't make much sense for toolboxes handling
multiple documents, but we already have the same issue with the inline stylesheet
labels.

Some constructed stylesheets are added in browser_styleeditor_filter.js so we can
test that the label is the one we wanted and that filtering does work for those
stylesheets as well.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/39dd3524b155 [devtools] Display proper label for constructable stylesheet in Style Editor. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
QA Whiteboard: [qa-triage-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: