Closed Bug 1632337 Opened 5 years ago Closed 5 years ago

OpenPGP shipped CSS errors

Categories

(MailNews Core :: Security: OpenPGP, task)

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 77.0

People

(Reporter: darktrojan, Assigned: KaiE)

References

Details

Attachments

(1 file, 1 obsolete file)

The test which checks shipped CSS can be parsed and doesn't reference files that don't exist is complaining. Here's a sample, although I imagine there are differences on each platform:

Loading resource://calendar/openpgp/skin/tb-linux/enigmail.css threw an error!
Loading chrome://openpgp/skin/enigmail.css threw an error!
Loading resource://calendar/openpgp/skin/tb-mac/enigmail.css threw an error!
missing chrome://openpgp/skin/importSuccess.png referenced from resource://calendar/openpgp/skin/tb-linux/enigmail-common.css
missing chrome://openpgp/skin/password-error.svg referenced from resource://calendar/openpgp/skin/tb-linux/enigmail-common.css
missing chrome://openpgp/skin/twisty-clsd.png referenced from resource://calendar/openpgp/skin/tb-linux/enigmail-common.css
missing chrome://openpgp/skin/twisty-open.png referenced from resource://calendar/openpgp/skin/tb-linux/enigmail-common.css
missing chrome://openpgp/skin/warning-16.png referenced from resource://calendar/openpgp/skin/tb-linux/enigmail-common.css
missing chrome://openpgp/skin/spinning-wheel.png referenced from resource://calendar/openpgp/skin/tb-linux/enigmail-common.css
missing chrome://openpgp/skin/ok-sign.svg referenced from resource://calendar/openpgp/skin/tb-linux/enigmail-common.css
Got error message for resource://calendar/openpgp/skin/tb-linux/enigmail-common.css: Unknown pseudo-class or pseudo-element ‘-moz-tree-cell-text’. Ruleset ignored due to bad selector.
Got error message for resource://calendar/openpgp/skin/tb-linux/enigmail-common.css: Unknown pseudo-class or pseudo-element ‘-moz-tree-cell-text’. Ruleset ignored due to bad selector.
Got error message for resource://calendar/openpgp/skin/tb-linux/enigmail-common.css: Unknown pseudo-class or pseudo-element ‘-moz-tree-cell-text’. Ruleset ignored due to bad selector.
Got error message for resource://calendar/openpgp/skin/tb-linux/enigmail-common.css: Unknown pseudo-class or pseudo-element ‘-moz-tree-column’. Ruleset ignored due to bad selector.
Got error message for resource://calendar/openpgp/skin/tb-linux/enigmail-common.css: Unknown pseudo-class or pseudo-element ‘-moz-tree-cell-text’. Ruleset ignored due to bad selector.
Got error message for resource://calendar/openpgp/skin/tb-linux/enigmail-common.css: Unknown pseudo-class or pseudo-element ‘-moz-tree-image’. Ruleset ignored due to bad selector.
Got error message for resource://calendar/openpgp/skin/tb-linux/enigmail-common.css: Unknown pseudo-class or pseudo-element ‘-moz-tree-image’. Ruleset ignored due to bad selector.
Got error message for resource://calendar/openpgp/skin/tb-linux/enigmail-common.css: Unknown pseudo-class or pseudo-element ‘-moz-tree-image’. Ruleset ignored due to bad selector.

To run this test for yourself do mach mochitest browser_parsable_css.js. If it's going to be a while before you get to this bug, we can temporarily whitelist the files.

Flags: needinfo?(kaie)

I don't understand why calendar code tries to load openpgp css files, or rather, how can we get a resource://calendar/openpgp URL?

I don't get the above failures on Linux.

It's probably nothing to do with calendar, that'll just be the first resource namespace they exist in. Because calendar is greedy and has just about everything in its namespace.

Richard, interested in taking this?

I don't run tests and can't see this errors.

Maybe this comes from this lines: https://searchfox.org/comm-central/source/mail/extensions/openpgp/jar.mn#18-20
and a % resource openpgp . is needed to to bind the files to openpgp.

This jar.mn is still based on a extension package. Maybe convert it to a normal packaging to messenger/openpgp

I wonder if bug 1632271 is related

Richard, if you know how to implement your suggestion from comment 4, I'd appreciate some guidance.

Flags: needinfo?(kaie)

It seems the old extension code tried to set up defaults inside a linux area, and have windows and mac inherit it.
That probably doesn't work currently.

I found similar code in mozilla/browser/extensions/formautofill/skin

Maybe I should use the same approach as used here:
https://searchfox.org/mozilla-central/source/browser/extensions/formautofill/jar.mn
https://searchfox.org/mozilla-central/source/browser/extensions/formautofill/moz.build

Yes, the shared code should be in his own directory.

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

This jar.mn is still based on a extension package. Maybe convert it to a normal packaging to messenger/openpgp

I decided to follow this advice (after various other attempts didn't work).

I have a patch that fixes bug 1632271.

Are you able to test if the attached patch fixes this issue, too?
Beware, binary and rename patch, you need to apply this patch with "git apply"

Attached patch skin2.patch (obsolete) (deleted) — Splinter Review
Assignee: nobody → kaie
Flags: needinfo?(richard.marti)

Like I wrote in the Phab review. Yes, this the way I thought. And the own key is in bold on Windows.

Flags: needinfo?(richard.marti)
Comment on attachment 9143301 [details] [diff] [review] skin2.patch Please keep the patches in either bugzilla or phab. It's confusing when they are in both places. I'm assuming phab is the one to use here?
Attachment #9143301 - Attachment is obsolete: true

(In reply to Magnus Melin [:mkmelin] from comment #14)

I'm assuming phab is the one to use here?

Sorry. Yes.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/446dd720023b
Fix OpenPGP skin across platforms. r=Paenglab

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 77.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: