Last Comment Bug 740793 - Javascript code in Footer.html will be disabled in themes.
: Javascript code in Footer.html will be disabled in themes.
Status: NEW
:
Product: Thunderbird
Classification: Client Software
Component: Instant Messaging (show other bugs)
: unspecified
: All All
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks: 714733
  Show dependency treegraph
 
Reported: 2012-03-30 07:00 PDT by Alfred Kayser
Modified: 2012-05-11 02:45 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description User image Alfred Kayser 2012-03-30 07:00:32 PDT
When a theme (such as Nautipolis or Walnut) wants to include their own styling on the chat messages (by defining chrome://messages/skin), also the Footer.html needs to be includes (as that is also in messages/skin/). But Footer.html contains javascript which is disallowed in /skin/.

Or in short, the Javascript code in Footer.html should be moved to /content/.

(as stated in bug 714733 comment 105, Footer.html should be actually in content).
Comment 1 User image Patrick Cloke [:clokep] 2012-05-10 09:11:13 PDT
I've talked to Florian about this a couple of times on IRC and we're not really sure what the report is in this bug. Are you suggesting that Footer.html should not include JavaScript? Why?
Comment 2 User image Alfred Kayser 2012-05-10 11:46:19 PDT
Because if a theme wants to style the chat panel, it also has to include the Footer stuff, including the .js files, as they are all located in chrome://messages/skin/.
Footer.html and the js inside of Footer.html is not allowed in chrome://messages/skins/ (because of security reasons).
Comment 3 User image Benedikt Pfeifer [:Mic] 2012-05-10 13:00:42 PDT
So the concerns are theoretical and not because you've actually seen something not working?

The files of a messagetheme aren't shown directly. They're html snippets for a message/content message/the conversations 'footer'/... They are loaded from their (chrome-)URIs as text, parsed and inserted into a browser to show your conversation.
Comment 4 User image Alfred Kayser 2012-05-11 01:54:10 PDT
Not theoretical.

I have created several themes for Thunderbird, such a LittleFox, Nautipolis and Walnut. These also have styling for the chat panels. As this also needs inclusion of the chrome://messages/skin/ there is now javascript code include. This is refused by AMO, and when imported into a Thunderbird this javascript code is blocked, so that some functionality in the chat panel no longer works.
Comment 5 User image Florian Quèze [:florian] 2012-05-11 02:45:15 PDT
(In reply to Alfred Kayser from comment #4)

> I have created several themes for Thunderbird, such a LittleFox, Nautipolis
> and Walnut. These also have styling for the chat panels. As this also needs
> inclusion of the chrome://messages/skin/ there is now javascript code
> include. 

> This is refused by AMO,

Was your updated theme rejected by an automated process, or by an AMO editor?

> and when imported into a Thunderbird this
> javascript code is blocked, so that some functionality in the chat panel no
> longer works.

That seems very surprising, as the current Footer.html is in skin already (http://mxr.mozilla.org/comm-central/source/mail/components/﷒0﷓).

If you still think this file is causing an issue, I would need to look at your theme to understand what's going on (so either attach here, or email to me the version that contains these changes and that is refused on AMO).

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