Closed Bug 392166 Opened 18 years ago Closed 18 years ago

Enable canvas in Thunderbird, for extension developers

Categories

(Thunderbird :: Build Config, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mail, Assigned: philor)

Details

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3 Build Identifier: Thunderbird 2.x working on an extension that needs to use canvas i realized that it's disabled in the standard distributions. after lot's of searching it turns out the only way to enable the canvas seems to have "enable-canvas" in the build options. building tbird yourself is not an option to most "normal" tbird users (my target group), so i suggest to add a way (code & preference) for developers and/or users to enable the canvas (and maybe even SVG) elements (XUL, html:canvas) on the fly. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Doing it as a run-time pref wouldn't make any sense: we'd have to build and ship it, when the only reason I know of that it's disabled is to save the code bloat. But unless I failed to actually get it enabled when I was testing, for a Windows installer that code bloat looks like 11,472 bytes, which is insanely tiny for something that enables so much extension fun. I'll test again, and see how big it is in Mac and Linux, but that seems like a wonderful bargain for the size to me.
Status: UNCONFIRMED → NEW
Component: General → Build Config
Ever confirmed: true
QA Contact: general → build
Summary: add a way to enable canvas in tbird _after_ it was build (standard distributions) → Enable canvas in Thunderbird, for extension developers
Version: unspecified → Trunk
Attached patch Turn it onSplinter Review
Well, I don't have a convenient test to be sure it's enabled, but I certainly think this should do, and it bloats the Win exe by around 11KB, the Linux tar.bz2 by around 15KB, and the poor Mac dmg by around 25KB. Still quite cheap.
Assignee: nobody → philringnalda
Status: NEW → ASSIGNED
Attachment #277501 - Flags: review?(mscott)
When this gets turned on for Thunderbird, I think it would be really cool to prove that it works, by having someone copy what Firefox does when you visit a phishing site (http://www.mozilla.org/projects/bonecho/anti-phishing/its-a-trap.html) with a canvas element that dims the content area. In Firefox, that code happens roughly in here: http://mxr.mozilla.org/seamonkey/source/browser/components/safebrowsing/content/phishing-afterload-displayer.js#564 we can skip the warning overlay part and focus on just dimming the content pane...
Attachment #277501 - Flags: review?(mscott) → review+
mail/confvars.sh 1.4 mail/installer/windows/packages-static 1.74 Florian, if you happen to feel like doing a super-simple extension that just verifies that canvas is enabled and working, that would be fantastic, since a canvas overlay dimming the content area in Thunderbird probably won't work on the trunk, just like Firefox trunk is stuck with their phishing overlay hiding behind their content browser right now.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
I installed Thunderbrowse <http://thunderbrowse.com/> into version 3.0a1pre (2007082304) and then tried several SVG demos including <http://www.december.com/html/demo/hellosvg.html> but none of the <svg> elements were displayed.
Was there some reason you expected enabling canvas to enable SVG? But, if I were inclined to verify my own bugs, I'd be tempted to verify it based on installing Thunderbrowse, enabling script, and seeing that http://developer.mozilla.org/samples/raycaster/RayCaster.html runs, since I doubt it'd be possible to have it working in content but not chrome.
(In reply to comment #4) > > Florian, if you happen to feel like doing a super-simple extension that just > verifies that canvas is enabled and working, that would be fantastic, since a > canvas overlay dimming the content area in Thunderbird probably won't work on > the trunk, just like Firefox trunk is stuck with their phishing overlay hiding > behind their content browser right now. > since the bug got closed can i assume canvas is gonna be enabled by default in the future? if yes that's super great news to me! simple canvas check extension attached. adds a status message: "html:canvas [enabled]" .. or ".. [not enabled]". if canvas is enabled it adds a html:canvas to the messageviewer showing a little green animation. let me know if it works for you .. dimming? i never said anything about dimming ...
(In reply to comment #6) > Was there some reason you expected enabling canvas to enable SVG? > > But, if I were inclined to verify my own bugs, I'd be tempted to verify it > based on installing Thunderbrowse, enabling script, and seeing that > http://developer.mozilla.org/samples/raycaster/RayCaster.html runs, since I > doubt it'd be possible to have it working in content but not chrome. > I don't think Thunderbrowse offers anything more than the method I choose. Compose a message with: iframe style="margin-left: 5%;" marginheight="0" marginwidth="0" src="http://developer.mozilla.org/samples/raycaster/RayCaster.html" width="800" frameborder="0" height="600"></iframe> The canvas appears but the keys do not function. Error console: Warning: Key event not available on GTK2: key="a" modifiers="accel, shift" Source File: chrome://messenger/content/messageWindow.xul Line: 0
Keys WFM that way, too, for as long as I was willing to have javascript.allow.mailnews on, once I managed to click in a part of the iframe that gave it focus, or tabbed into the iframe, not just the message body. But since my real goal was enabling canvas in chrome for extensions, rather than in how good a browser we could make our email client, I'll take Florian's extension, which works beautifully, thank you, as verification enough.
Status: RESOLVED → VERIFIED
added a new version of my "super simple" test extension. it's a little nicer and has better mouse / key / resize event handling.
Attachment #277942 - Attachment is obsolete: true
Forgive me for sounding naive, but will this bug's fix land in TB2.0.0.8? I'm working on an extension that would very happily use this ability of canvas-in-chrome, if it were there. I'm trying to add a "thread arcs" visualization to the expandedHeaderView (see http://www.visophyte.org/examples/visterity/20071008-clicky/conv876.xml for an example, and http://www.research.ibm.com/remail/threadarcs.html for the source). Could be fun, certainly a fun use of the drawing elements... (BTW -- I wouldn't mind using SVG elements either -- and SVG might actually make the visualization work better, since it could be more easily interactive.)
> Forgive me for sounding naive, but will this bug's fix land in TB2.0.0.8? No.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: