Re: [whatwg] api for fullscreen()

2010-02-03 Thread Smylers
Brian Campbell writes: I'm a bit concerned about when the fullscreen events and styles apply, though. If the page can tell whether or not the user has actually allowed it to enter fullscreen mode, it can refuse to display content until the user gives it permission to enter fullscreen mode.

[whatwg] Notification API

2010-02-03 Thread Henri Sivonen
I noticed that there's a Chromium-specific API for notifications: http://dev.chromium.org/developers/design-documents/desktop-notifications/api-specification Opera has an Opera Widgets-specific API: http://dev.opera.com/articles/view/opera-widgets-specification-fourth-ed/#wo_showNotification

Re: [whatwg] Notification API

2010-02-03 Thread Remco
On Wed, Feb 3, 2010 at 12:55, Henri Sivonen hsivo...@iki.fi wrote: It seems to me that Growl and NotifyOSD notifications have these things in common:  4) Ability to find out if the user clicked the notification. (Not yet in Karmic?) You can't click on a NotifyOSD notification by design.

[whatwg] Canvas size and double buffering.

2010-02-03 Thread Tim Hutt
Hi, I've been trying to use the HTML5 canvas to implement a slippy map. It works ( http://concentriclivers.com/ ), but there were a couple of issues I had for which there seems to be no good solution. 1. You can only set the size exactly in pixels. It is very hard to get a resizable canvas that

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Boris Zbarsky
On 2/3/10 9:05 AM, Tim Hutt wrote: 1. You can only set the size exactly in pixels. It is very hard to get a resizable canvas that fills the page. You *can* set the size in CSS, but it doesn't work very well (e.g. using left,right-margin: auto; to centre the canvas doesn't work. Also it scales

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Simon Fraser
On Feb 3, 2010, at 7:59 AM, Boris Zbarsky wrote: On 2/3/10 9:05 AM, Tim Hutt wrote: 1. You can only set the size exactly in pixels. It is very hard to get a resizable canvas that fills the page. You *can* set the size in CSS, but it doesn't work very well (e.g. using left,right-margin: auto;

Re: [whatwg] Notification API

2010-02-03 Thread John Gregg
The Webapps WG is working on a spec for a Web Notification API. You can see the current draft at http://dev.w3.org/2006/webapi/WebNotifications/publish/, and I would suggest sending comments to the public-webapps mailing list. That spec attempts to address the icon+title+text use case, and

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Tim Hutt
On 3 February 2010 16:50, Simon Fraser s...@me.com wrote: On Feb 3, 2010, at 7:59 AM, Boris Zbarsky wrote: On 2/3/10 9:05 AM, Tim Hutt wrote: 1. You can only set the size exactly in pixels. It is very hard to get a resizable canvas that fills the page. You *can* set the size in CSS, but it

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Boris Zbarsky
On 2/3/10 12:22 PM, Tim Hutt wrote: Yes it should be cleared and there should be a oncanvasresize() callback. What uses cases does this cover that are not covered by a general resize event? -Boris

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Boris Zbarsky
On 2/3/10 1:01 PM, Tim Hutt wrote: Good point, it would be better to call it 'onresize' for consistency. So my revised suggestion is: 1. Support more length specifiers for the width and height of a canvas(%, em, etc.). 2. Add an onresize event to the canvas tag. When the canvas is resized it is

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Tim Hutt
On 3 February 2010 17:45, Boris Zbarsky bzbar...@mit.edu wrote: On 2/3/10 12:22 PM, Tim Hutt wrote: Yes it should be cleared and there should be a oncanvasresize() callback. What uses cases does this cover that are not covered by a general resize event? Good point, it would be better to

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Oliver Hunt
On Feb 3, 2010, at 10:01 AM, Tim Hutt wrote: On 3 February 2010 17:45, Boris Zbarsky bzbar...@mit.edu wrote: On 2/3/10 12:22 PM, Tim Hutt wrote: Yes it should be cleared and there should be a oncanvasresize() callback. What uses cases does this cover that are not covered by a general

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Tim Hutt
On 3 February 2010 19:23, Oliver Hunt oli...@apple.com wrote: 1. Support more length specifiers for the width and height of a canvas(%, em, etc.). This doesn't really make sense for the backing buffer as it is logically defined in terms of pixel. The layout engine would decide how many

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Boris Zbarsky
On 2/3/10 2:54 PM, Tim Hutt wrote: a) Otherwise width:100% in CSS and width=100% in HTML would have different meanings. Confusing! I'm not suggesting that. I'm saying we keep supporting only integers in the width attribute and if you put width:100% in your CSS and the canvas resizes you can

Re: [whatwg] Notification API

2010-02-03 Thread Robert O'Callahan
On Thu, Feb 4, 2010 at 6:17 AM, John Gregg john...@google.com wrote: The Webapps WG is working on a spec for a Web Notification API. You can see the current draft at http://dev.w3.org/2006/webapi/WebNotifications/publish/, and I would suggest sending comments to the public-webapps mailing

Re: [whatwg] Notification API

2010-02-03 Thread John Gregg
On Wed, Feb 3, 2010 at 12:27 PM, Robert O'Callahan rob...@ocallahan.orgwrote: On Thu, Feb 4, 2010 at 6:17 AM, John Gregg john...@google.com wrote: The Webapps WG is working on a spec for a Web Notification API. You can see the current draft at

Re: [whatwg] Notification API

2010-02-03 Thread Drew Wilson
BTW, I would highly recommend that we move this conversation to the public-webapps list. I'm not sure about the best way to do this other than to stop posting here, starting...um...right after my reply :) Anyhow, your question below outlines is why there are two exposed notification APIs - one is

Re: [whatwg] api for fullscreen()

2010-02-03 Thread Brian Campbell
On Feb 3, 2010, at 5:04 AM, Smylers wrote: Brian Campbell writes: I'm a bit concerned about when the fullscreen events and styles apply, though. If the page can tell whether or not the user has actually allowed it to enter fullscreen mode, it can refuse to display content until the user

Re: [whatwg] Notification API

2010-02-03 Thread Jonas Sicking
On Wed, Feb 3, 2010 at 1:00 PM, John Gregg john...@google.com wrote: On Wed, Feb 3, 2010 at 12:27 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Thu, Feb 4, 2010 at 6:17 AM, John Gregg john...@google.com wrote: The Webapps WG is working on a spec for a Web Notification API.  You can

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Oliver Hunt
On Feb 3, 2010, at 11:54 AM, Tim Hutt wrote: On 3 February 2010 19:23, Oliver Hunt oli...@apple.com wrote: 1. Support more length specifiers for the width and height of a canvas(%, em, etc.). This doesn't really make sense for the backing buffer as it is logically defined in terms of

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Oliver Hunt
On Feb 3, 2010, at 11:54 AM, Tim Hutt wrote: On 3 February 2010 19:23, Oliver Hunt oli...@apple.com wrote: 1. Support more length specifiers for the width and height of a canvas(%, em, etc.). This doesn't really make sense for the backing buffer as it is logically defined in terms of

Re: [whatwg] [hybi] Websocket algorithmic specification

2010-02-03 Thread Greg Wilkins
Jamie Lokier wrote: Greg Wilkins wrote: send the following bytes to the remote server 47 45 54 20 A literal reading of the spec would interpret that as meaning that the bytes actually have to be sent, while any sane implementation is going to append the bytes to a buffer to be

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Brian Campbell
On Feb 3, 2010, at 3:14 PM, Boris Zbarsky wrote: On 2/3/10 2:54 PM, Tim Hutt wrote: Well, yes it would be good to have onresize for all elements. Which is why it's being worked on anyway. I'm curious; where is this being worked on? Discussed here on this list? On another list? Or is it

Re: [whatwg] Notification API

2010-02-03 Thread Drew Wilson
Apps on the iphone using SQL data storage might disagree with you about the value of optional web features :) But I do understand your point, and perhaps there's a better way to achieve the goals of the notification API. The goals as I understand them are: 1) Support simple text + icon

Re: [whatwg] api for fullscreen()

2010-02-03 Thread Kit Grose
Another scenario applies to most video player sites. Almost all video player sites using Flash have a full screen button. Many of them do not have a full window button, however. If a user wishes to view content scaled up to fill the window, without the distractions of navigational links,

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Boris Zbarsky
On 2/3/10 5:27 PM, Brian Campbell wrote: I'm curious; where is this being worked on? Discussed here on this list? On another list? I believe it's been discussed on public-webapps. It's also implemented in IE, to some extent. -Boris

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Tim Hutt
On 3 February 2010 20:14, Boris Zbarsky bzbar...@mit.edu wrote: Yep.  canvas.width = canvas.getBoundingClientRect().width; Ah yes that works nicely, with one minor caveat: it seems to include the width of the border if there is one, so you have to take that into account. You're right, this is a

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Boris Zbarsky
On 2/3/10 6:12 PM, Tim Hutt wrote: Ah yes that works nicely, with one minor caveat: it seems to include the width of the border if there is one, so you have to take that into account. You're right, this is a better solution. Ah, yes. Padding too. You could instead ask for the computed style

Re: [whatwg] Notification API

2010-02-03 Thread Robert O'Callahan
On Thu, Feb 4, 2010 at 11:34 AM, Drew Wilson atwil...@google.com wrote: 2) Allow more full-featured HTML notifications on the overwhelming majority of platforms that support them. Given that Mac and Linux don't support HTML notifications, what platforms are those? Rob -- He was pierced for

Re: [whatwg] Notification API

2010-02-03 Thread Jonas Sicking
On Wed, Feb 3, 2010 at 3:18 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Thu, Feb 4, 2010 at 11:34 AM, Drew Wilson atwil...@google.com wrote: 2) Allow more full-featured HTML notifications on the overwhelming majority of platforms that support them. Given that Mac and Linux don't

Re: [whatwg] Notification API

2010-02-03 Thread David Levin
On Wed, Feb 3, 2010 at 3:25 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Feb 3, 2010 at 3:18 PM, Robert O'Callahan rob...@ocallahan.org wrote: On Thu, Feb 4, 2010 at 11:34 AM, Drew Wilson atwil...@google.com wrote: 2) Allow more full-featured HTML notifications on the overwhelming

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Tim Hutt
On 3 February 2010 23:16, Boris Zbarsky bzbar...@mit.edu wrote: On 2/3/10 6:12 PM, Tim Hutt wrote: Ah yes that works nicely Hmm maybe I spoke too soon. The interaction of the CSS size and the canvas.width/height is confounding! It seems if you set a CSS width of, say 80% then that is that and

Re: [whatwg] api for fullscreen()

2010-02-03 Thread Smylers
Brian Campbell writes: As I understand it, the risk with full-screen view is that a malicous site may spoof browser chrome, such as the URL bar, thereby tricking a user who isn't aware the site is full-screen. This is addressing a different scenario; not malicious sites per-se, but

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Boris Zbarsky
On 2/3/10 7:00 PM, Tim Hutt wrote: http://concentriclivers.com/canvas.html (the source is nicely formatted and very short) So you want a canvas that takes 80% of the horizontal space but has an integer width in pixels? Which of those constraints do you really want to relax? Presumably the

Re: [whatwg] Drag-and-drop feedback

2010-02-03 Thread Ian Hickson
On Sat, 23 Jan 2010, Eduard Pascual wrote: Would it be possible to provide a list of drag items (to call them somehow) instead of, or in addition to, the current info provided by the DataTransfer object? That's a pretty good idea. I think we should probably do this when we add more types

Re: [whatwg] api for fullscreen()

2010-02-03 Thread Brian Campbell
On Feb 3, 2010, at 7:19 PM, Smylers wrote: Brian Campbell writes: As I understand it, the risk with full-screen view is that a malicous site may spoof browser chrome, such as the URL bar, thereby tricking a user who isn't aware the site is full-screen. This is addressing a different

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Brian Campbell
On Feb 3, 2010, at 7:00 PM, Tim Hutt wrote: On 3 February 2010 23:16, Boris Zbarsky bzbar...@mit.edu wrote: On 2/3/10 6:12 PM, Tim Hutt wrote: Ah yes that works nicely Hmm maybe I spoke too soon. The interaction of the CSS size and the canvas.width/height is confounding! It seems if you

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Robert O'Callahan
On Thu, Feb 4, 2010 at 6:50 PM, Brian Campbell lam...@continuation.orgwrote: I think the most reasonable approach would be to say that the getBoundingClientRect().width or height is rounded to the nearest pixel. Boxes are displayed rounded to the nearest pixel, with no fractional pixels being

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Robert O'Callahan
On Thu, Feb 4, 2010 at 1:00 PM, Tim Hutt tdh...@gmail.com wrote: http://concentriclivers.com/canvas.html (the source is nicely formatted and very short) canvas.style.width = ww; canvas.style.height = hh; Perhaps you meant ww +

Re: [whatwg] Canvas size and double buffering.

2010-02-03 Thread Robert O'Callahan
In general, keeping the canvas buffer size matching its rendered size so that no resampling occurs requires clearing and repainting the canvas during browser zoom changes as well as layout changes (and possibly during other changes such as changes to the transforms of ancestors). It also requires