Closed Bug 1322661 Opened 3 years ago Closed 3 years ago

stylo: expose style sheets to devtools

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: heycam, Unassigned)

References

Details

Attachments

(1 file)

We are returning early from inDOMUtils::GetAllStyleSheets but now that we implement nsIDOMCSSStyleSheet on ServoStyleSheets, we can expose a document's sheets to devtools.  (Still not XBL sheets, though, which will need to wait until we support XBL at all in stylo.)
Attached patch patchSplinter Review
Attachment #8817583 - Attachment description: a.patch → patch
Attachment #8817583 - Flags: review?(xidorn+moz)
(Also this is hard to test since opening devtools still crashes the browser.)
Comment on attachment 8817583 [details] [diff] [review]
patch

Review of attachment 8817583 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/inspector/inDOMUtils.cpp
@@ +96,5 @@
>      for (int32_t i = 0; i < styleSet->SheetCount(sheetType); i++) {
>        sheets.AppendElement(styleSet->StyleSheetAt(sheetType, i));
>      }
>      AutoTArray<CSSStyleSheet*, 32> xblSheetArray;
> +    if (styleSet->IsGecko()) {

It seems code from the variable definition line above to the end of the loop body is all useless for stylo at the moment. Probably wrap all of them inside the if-statement?
Attachment #8817583 - Flags: review?(xidorn+moz) → review+
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/66ade78caf23
Expose (non-XBL) style sheets to devtools. r=xidorn
https://hg.mozilla.org/mozilla-central/rev/66ade78caf23
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.