Closed
Bug 1490269
Opened 6 years ago
Closed 6 years ago
enable thunderbird specific custom element loading
Categories
(Thunderbird :: Mail Window Front End, enhancement)
Thunderbird
Mail Window Front End
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 64.0
People
(Reporter: mkmelin, Assigned: mkmelin)
References
Details
Attachments
(1 file, 2 obsolete files)
2.38 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
We need a way to load thunderbird's custom elements. Like for bug 1489748.
Patch coming.
Assignee | ||
Comment 1•6 years ago
|
||
This seems to do it for me.
I refreshed the bug 1489748 patch to apply on top of this to test it out
Attachment #9008029 -
Flags: review?(arshdkhn1)
Assignee | ||
Updated•6 years ago
|
Blocks: tb-war-on-xbl
Comment 2•6 years ago
|
||
Comment on attachment 9008029 [details] [diff] [review]
bug1490269_tb_customelements.patch
Hey, the if condition in mailglue.js doesn't get truthy so the custom elements file is never called. My working directory is old, but i dont think that's the reason behind this. Could you recheck on your side and flag me again for review?
Attachment #9008029 -
Flags: review?(arshdkhn1) → review-
Assignee | ||
Comment 3•6 years ago
|
||
Comment on attachment 9008029 [details] [diff] [review]
bug1490269_tb_customelements.patch
Review of attachment 9008029 [details] [diff] [review]:
-----------------------------------------------------------------
There's really no reason those wouldn't get true. It's all copied from https://searchfox.org/comm-central/source/mozilla/toolkit/components/processsingleton/CustomElementsListener.jsm which loads the m-c customELements.js
THis patch in itself doesn't load the file of course, it's just infra.
You need the updated patch from bug 1489748 on top for it to do anything
Attachment #9008029 -
Flags: review- → review?(arshdkhn1)
Assignee | ||
Comment 4•6 years ago
|
||
(And yes, working well here.)
Updated•6 years ago
|
Attachment #9008029 -
Flags: review?(arshdkhn1) → review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Comment 5•6 years ago
|
||
Comment on attachment 9008029 [details] [diff] [review]
bug1490269_tb_customelements.patch
Review of attachment 9008029 [details] [diff] [review]:
-----------------------------------------------------------------
Did you lint this?
::: mail/components/mailGlue.js
@@ +132,5 @@
> +
> + // Set up our custom elements.
> + aSubject.addEventListener("DOMDocElementInserted", () => {
> + let doc = aSubject.document;
> + if (doc.nodePrincipal.isSystemPrincipal && (
This is really unusual placement of the parenthesis. It should go onto the next line.
@@ +135,5 @@
> + let doc = aSubject.document;
> + if (doc.nodePrincipal.isSystemPrincipal && (
> + doc.contentType == "application/vnd.mozilla.xul+xml" ||
> + doc.contentType == "application/xhtml+xml"
> + )) {
Please put at the end of the previous line.
Comment 6•6 years ago
|
||
c:\mozilla-source\comm-central\comm\common\content\customElements.js
9:1 error Block is redundant. no-lone-blocks (eslint)
If you want the block as the comment says, please disable linting there.
Keywords: checkin-needed
Assignee | ||
Comment 7•6 years ago
|
||
Eslint is actually correct. Since we don't do any declarations in the block it's not necessary.
The braces style was just copied from the toolkit file per above. Tried changing them now, but the original is easier to read so I didn't change it.
Attachment #9008029 -
Attachment is obsolete: true
Attachment #9008861 -
Flags: review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Comment 8•6 years ago
|
||
Hmm, but in the end you didn't follow toolkit's style but made up your own :-(
If you really must place the closing parenthesis of the 'if' on a new line, it goes right under the 'if'.
https://searchfox.org/mozilla-central/rev/dd965445ec47fbf3cee566eff93b301666bda0e1/toolkit/components/processsingleton/CustomElementsListener.jsm#17
Assignee | ||
Comment 9•6 years ago
|
||
Toolkit style
(must have been copy-paste error)
Attachment #9008861 -
Attachment is obsolete: true
Attachment #9008865 -
Flags: review+
Comment 10•6 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/760fa56f2806
enable Thunderbird specific custom element loading. r=arshad
Updated•6 years ago
|
Target Milestone: --- → Thunderbird 64.0
You need to log in
before you can comment on or make changes to this bug.
Description
•