Closed Bug 1454468 Opened 7 years ago Closed 6 years ago

Audit calls to document.styleSheets from devtools.

Categories

(DevTools :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1476908

People

(Reporter: emilio, Unassigned)

References

Details

Since they do not return Shadow DOM styles. I'm landing a way to inspect Shadow DOM styles in bug 1452143. But we need to be careful about unconditionally exposing Shadow DOM / XBL rules, in presence of privileged stuff like the videocontrols or what not.
Severity: normal → enhancement
Product: Firefox → DevTools
Had a quick look. I imagine the goal is to replace calls to document.styleSheets by `InspectorUtils.getAllStyleSheets(doc, true)` The second parameter is documentOnly and avoids returning UA / User sheets. The following call sites are relying on document.styleSheets right now: devtools/server/actors/stylesheets.js : https://searchfox.org/mozilla-central/rev/403038737ba75af3842ba6b43b6e2fb47eb06609/devtools/server/actors/stylesheets.js#780 devtools/server/actors/inspector/css-logic.js : https://searchfox.org/mozilla-central/rev/403038737ba75af3842ba6b43b6e2fb47eb06609/devtools/server/actors/inspector/css-logic.js#224-233 devtools/server/actors/csscoverage.js : https://searchfox.org/mozilla-central/rev/403038737ba75af3842ba6b43b6e2fb47eb06609/devtools/server/actors/csscoverage.js#505 devtools/server/actors/stylesheets.js : https://searchfox.org/mozilla-central/rev/403038737ba75af3842ba6b43b6e2fb47eb06609/devtools/server/actors/stylesheets.js#324-325 I think all the other call sites for document.styleSheets are in test file (I also omitted one in gcli).
Migrated all call sites in Bug 1476908
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.