Closed Bug 738196 Opened 8 years ago Closed 6 years ago

document.styleSheets should be iterable

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: dao, Assigned: Ms2ger)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(2 files, 2 obsolete files)

[x for (x of document.styleSheets)]

Error: document.styleSheets is not iterable
Blocks: 737792
Is this just a matter of switching document.styleSheets to the new list bindings?
Assignee: general → Ms2ger
Component: JavaScript Engine → DOM: Core & HTML
Attached patch Part a: Move (obsolete) — Splinter Review
Attached patch Part b: Binding (obsolete) — Splinter Review
This caused leaks I didn't get around to figuring out.
Assignee: Ms2ger → nobody
Can we give this another shot? Maybe the world looks a little different now...
Ms2ger, mind updating the patches to trunk?  The patch in bug 978646 might well have fixed that leak...
Flags: needinfo?(Ms2ger)
Assignee: nobody → Ms2ger
Flags: needinfo?(Ms2ger)
It turned out the code changed enough that I was better off starting from scratch.
Attachment #724987 - Attachment is obsolete: true
Attachment #724988 - Attachment is obsolete: true
Attachment #8399143 - Flags: review?(bzbarsky)
Comment on attachment 8399143 [details] [diff] [review]
Part a: introduce a common superclass for nsDOMStyleSheetList and ShadowRootStyleSheetList

Please do file a followup to change nsDocument to storing nsCSSStyleSheet* and/or eliminate nsIStyleSheet?

r=me
Attachment #8399143 - Flags: review?(bzbarsky) → review+
Depends on: 990250
Comment on attachment 8399144 [details] [diff] [review]
Part b: move StyleSheetList to WebIDL

>+++ b/content/base/src/ShadowRoot.h
> class ShadowRootStyleSheetList : public StyleSheetList
>+  NS_DECL_ISUPPORTS

NS_DECL_ISUPPORTS_INHERITED, please!

>+++ b/content/base/src/nsDocument.h
>   NS_DECL_ISUPPORTS

Likewise.

r=me with those fixed.  Thank you!
Attachment #8399144 - Flags: review?(bzbarsky) → review+
Almost certainly not related to this bug, fwiw.
https://hg.mozilla.org/mozilla-central/rev/bb922d22d392
https://hg.mozilla.org/mozilla-central/rev/17af503e70cc
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.