Closed Bug 499071 Opened 15 years ago Closed 14 years ago
IEditor Style Sheets .idl's comments have a tenuous grasp on the concept of truth
The docs for nsIEditorStyleSheets carefully detail which things are sync and async. The problem is that they are only rarely actually correct: addStyleSheet and replaceStyleSheet are always async, despite the claim that replace "can involve async" and that add (which is just replace(nothing) in the impl) is always sync; addOverrideStyleSheet and replaceOverrideStyleSheet are always sync, though the docs say "always" and whatever "assumed to be" was supposed to mean. Unfortunately, they go on to talk about whether the remove and enable methods are sync or async (claiming sync for all), so fixing this is going to require that I stop getting lost trying to trace whether or not that's true. (Note to self: go for extra credit by fixing the pasteo of "@param aURL The style sheet to be removed" for enableStyleSheet.)
Adds at least some truthiness.
Comment on attachment 385611 [details] [diff] [review] Fix v.1 Looks ok, except the "no @import" thing is out of date. Nowadays if you're doing a sync load of a stylesheet the CSSLoader will also sync-load the things it imports. So you just have to make sure all the things involved (toplevel sheet and imports) are local files of some sort.
Attachment #385611 - Flags: superreview?(bzbarsky) → superreview+
Yeah, I didn't put that very well, what I meant was "without any @imports that aren't also of local files."
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs a tweaked patch]
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.