Closed Bug 1596635 Opened 5 months ago Closed 5 months ago

Move some CSS overlay directives from jar.mn files to XUL files

Categories

(Calendar :: General, task)

task
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pmorris, Assigned: pmorris)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Some of these CSS overlays can be moved out of their jar.mn files and into their XUL (possibly XUL overlay) files:

https://searchfox.org/comm-central/search?q=%25+style&case=false&regexp=false&path=calendar

Looks like the five that overlay chrome://messenger/content/customizeToolbar.xul will need to stay as-is for now since there is no calendar overlay file that overlays customizeToolbar.xul. The other four can go.

Attached patch move-css-overlays-0.patch (obsolete) — Splinter Review

Pretty straightforward.

Attachment #9108898 - Flags: review?(geoff)
Status: NEW → ASSIGNED
Comment on attachment 9108898 [details] [diff] [review]
move-css-overlays-0.patch

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

Four out of nine ain't bad? It's a shame we can't get rid of the customizeToolbar.xul ones too, but this'll do for now.

::: calendar/lightning/content/messenger-overlay-messageWindow.xul
@@ +5,5 @@
>  
>  <overlay id="messsenger-overlay-messageWindow"
>           xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
> +
> +    <?xml-stylesheet href="chrome://lightning/skin/lightning.css" type="text/css"?>

That's … not where an XML processing instruction goes. Put it before the root element.
Attachment #9108898 - Flags: review?(geoff) → review+

Ah, of course... Thanks for catching that.

Attachment #9108898 - Attachment is obsolete: true
Attachment #9108902 - Flags: review+

customizeToolbar.* is no more toolkit and under our control. Either we could add the stylesheet to customizeToolbar.xul or if we don't want a warning in console, when we get one when Lightning is disabled, we could add the stylesheet in customizeToolbar.js with a try/catch?

Sorry, queries in BMO were broken this morning, bug 1596674, so I didn't see the bug. Will land later today.

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/430487e62ffd
Move four Calendar CSS overlays from jar.mn to .xul files. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 72

(In reply to Richard Marti (:Paenglab) from comment #4)

customizeToolbar.* is no more toolkit and under our control. Either we could add the stylesheet to customizeToolbar.xul or if we don't want a warning in console, when we get one when Lightning is disabled, we could add the stylesheet in customizeToolbar.js with a try/catch?

Good to know. What we do for these stylesheets will depend on what we do with integrating calendar into TB. If calendar becomes a system add-on then we'd likely include the CSS files dynamically via calendar JS code. If calendar is directly integrated then we'd either use the pre-processor to add those CSS directives in customizeToolbar.xul, or just add them to it directly.

You need to log in before you can comment on or make changes to this bug.