Remove nsIEditorStyleSheets
Categories
(Core :: DOM: Editor, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: jwatt, Assigned: emilio)
References
Details
Attachments
(4 files)
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Just looked, these can't work. Also comment 1 is an XBL binding so glazou would have worse problems than this.
Assignee | ||
Comment 3•5 years ago
|
||
Users have much better, easier alternatives, like
DOMWindowUtils.{loadSheetUsingURIString,removeSheet}, which we use to
replace the only caller that exists in mozilla-central (the editor
element, which loads EditorOverride.css).
This allows to clean up the style system and editor. There are other
callers in comm-central, but it seems they can switch to DOMWindowUtils
trivially, as the DOMWindowUtils APIs also use the system principal and
thus they can load any URL.
I'll make sure to give them some time with the migration and/or help
out of course.
Depends on D71262
Assignee | ||
Comment 4•5 years ago
|
||
Should also have no behavior change.
After the previous patch we don't have sheets associated with a document but
not owned by it, so take advantage of that.
Depends on D71263
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)
Just looked, these can't work. Also comment 1 is an XBL binding so glazou would have worse problems than this.
Update: They do work ;)
Magnus, this will affect some Thunderbird callers that are using the existing API from JS. Seems not many:
The alternatives are straight-forward:
-
addOverrideStyleSheet(uri)
->windowUtils.loadSheetUsingURIString(uri, windowUtils.AGENT_SHEET)
. Both do sync loads and they should load any uri. -
removeOverrideStyleSheet(uri)
-> windowUtils.removeSheet(uri, windowUtils.AGENT_SHEET)` -
enableStyleSheet(uri, enable)
->(enable ? windowUtils.loadStyleSheetUsingURIString : windowUtils.removeSheet)(uri, windowUtils.AGENT_SHEET)
.
Let me know if you hit any snags or I can help to do this. I'm happy to wait for a bit until this is done if you need too of course.
Comment 6•5 years ago
|
||
Thanks for the heads up. Here is a patch adjusting the Thunderbird parts. (editor/ is abandoned). Just had to be careful which window's windowUtils to use. Seems to work for me. Looks good?
Assignee | ||
Comment 7•5 years ago
|
||
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D71264
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5c14d6b8b6ad
https://hg.mozilla.org/mozilla-central/rev/537d098b45cb
https://hg.mozilla.org/mozilla-central/rev/8d00b26084f9
Comment 12•5 years ago
|
||
Description
•