00:12
<annevk>
hsivonen, I'm only aware of Firefox 3 but they turned it off
01:02
<Philip`>
Hmm, ImageData is all different to what I remember :-(
01:10
<Dashiva>
Philip`: And it's probably because of your own feedback ;)
01:17
<Philip`>
Dashiva: I'm not at all to blame for the fancy new things like dirty rects - I hardly even remember that that was discussed :-)
01:18
<Philip`>
Maybe I should have paid more attention
01:30
<Philip`>
You know, it'd be kind of nice if createImageData in WebKit didn't just use more and more memory each time you call it until it runs out of virtual memory and crashes
01:31
<Philip`>
Their implementation seems to limit the size of the ImageData you can create, but it's limited to about 400MB and you can call it lots of times
01:33
<takkaria>
heh
01:34
<Philip`>
but that's only a DOS bug so I assume nobody cares
01:36
<Philip`>
http://trac.webkit.org/browser/trunk/WebCore/html/CanvasRenderingContext2D.cpp#L1258 - "memset(data->data()->data().data(), ...)" - !
01:59
<MikeSmith>
so I see that Mozilla has added support for the registerProtocolHandler method
01:59
<MikeSmith>
http://starkravingfinkle.org/blog/2008/04/firefox-3-web-protocol-handlers/
02:00
<MikeSmith>
Mark Finkle's blog
05:09
<doublec>
does the displaying of the image in the 'poster' attribute of <video> result in the video element resizing to fit the image, same as <img>?
05:12
<doublec>
Also, I saw a demo of <video> from Safari 3.1 and it seems that it loads the first frame of the video for display. I do that too and thought it was correct behaviour but now I can't find it in the spec. Have I missed it somewhere?
05:12
<Hixie>
<video> never resizes iirc
05:12
<Hixie>
or did we change that
05:13
<doublec>
It was changed to autosize to fit content iirc
05:13
<doublec>
I'm just not sure if that includes poster content
05:13
<Hixie>
oh hm
05:13
<Hixie>
dunno
05:13
<doublec>
since the decision predated poster
05:14
<Hixie>
i can't figure it out right now but if you send feedback and let me know what timescale you want to know for (i.e. do you want to know for ff3 or is this a post-ff3 thing) then i'll get back to you asap
05:14
<othermaciej>
well if it didn't autosize, what size would it use?
05:15
<othermaciej>
using the video size would partly defeat the point of having a poster frame
05:15
<doublec>
yes
05:15
<doublec>
I'm assuming it autosizes
05:15
<doublec>
to the image size
05:15
<othermaciej>
and if explicit width and height is set, then the question does not arise
05:15
<doublec>
since we don't have the video data to know the size of it
05:16
<othermaciej>
(presumably the common case is to either set a specific size or have your poster frame the same size as the video)
05:16
<Hixie>
the concern i could see would be the resizing again when you get the video
05:16
<Hixie>
but yes
08:03
<MikeSmith>
takkaria: you around?
18:07
<davidb>
hi all
18:07
<davidb>
i have a question about http://www.whatwg.org/specs/web-apps/current-work/multipage/section-interaction.html#scrollintoview
18:08
<davidb>
shouldn't we add that, if the element is already in the view port, don't perform a scroll?
18:08
<davidb>
it could be jarring.
18:13
<Philip`>
davidb: Current UAs (at least IE6, FF2, O9.2) always perform the scroll to align the element with the top/bottom of the window, even when it's already visible
18:14
<davidb>
Philip`: is that good?
18:14
<Philip`>
davidb: It's interoperable behaviour, so it's good from that point of view :-)
18:14
<Philip`>
I don't know how many sites rely on it working that way
18:14
<davidb>
Philip`: fair enough, but in the world of rich interactive web apps, i think we could be creating a nasty experience potentially.
18:15
<davidb>
Philip`: since the ARIA spec is recommending a scrollIntoView for activedescendants... (like panes in an accordion widget)
18:17
<davidb>
Philip`: i guess if this is already engrained... i'm fighting an uphill battle
18:18
<davidb>
maybe i'll post to the list anyways
18:19
<Philip`>
davidb: http://lists.w3.org/Archives/Public/public-html/2007Nov/0188.html suggests adding a new method which only scrolls if necessary
18:19
<davidb>
Philip`: nice find. thanks.
18:19
<Philip`>
That sounds safer than changing the behaviour of the existing method
18:20
<davidb>
Philip`: is ensureElementIsVisible a new thing?
18:20
<Philip`>
davidb: It's in http://www.whatwg.org/issues/ dom-focus, though sadly that interface is rubbish and impossible to search
18:21
<Philip`>
davidb: ensureElementIsVisible doesn't exist at all, except as a suggestion in that email
18:21
<davidb>
ok
18:21
<davidb>
(looks like a XUl thing)
18:22
<Philip`>
Oh, okay, so it does exist :-)
18:22
<davidb>
heh
18:22
<davidb>
:)
18:22
<Philip`>
(but not in HTML, which is the only thing in the world that matters)
18:44
<annevk>
I think media queries make the most sense for the <link height/width> thing too...
18:44
<annevk>
media="(width:51px) and (height:50px)"
18:46
<Philip`>
Has someone said why it can't use .ico files with all the image sizes stored together?
18:48
<annevk>
Too much bandwidth I think
18:49
<annevk>
I'd add that it's too much trouble :)
18:57
<davidb>
Philip`: thanks for the chat, i posted something to the list
20:12
<BenMillard>
WCAG 2.0 progresses to Candidate Recommendation (CR): http://lists.w3.org/Archives/Public/w3c-wai-ig/2008AprJun/0045.html
20:26
<davidb>
BenMillard: thanks for the tip
20:50
<BenMillard>
forwarded to HTMLWG: http://lists.w3.org/Archives/Public/public-html/2008Apr/0801.html
21:34
<Philip`>
Does anyone happen to have a PNG decoder written in JavaScript?
21:34
<Hixie>
decoding to ImageData?
21:35
<Philip`>
Decoding to some kind of JS array, not relying on the browser implementing any graphical features correctly
21:36
<Hixie>
ah
21:37
<Philip`>
It'd be nice to test that toDataURL returns a correct PNG with the right colour values, but I'm not sure of any ways that aren't either impossible or insane
21:38
<Hixie>
ah yes
21:39
<Hixie>
i searched google for "png decoder in javascript"
21:39
<Hixie>
first hit is someone saying he couldn't find one
21:40
<Hixie>
second hit is you suggesting writing one...
21:47
<Philip`>
Oh, I thought it was an original idea but I beat myself to it :-(
21:47
<Hixie>
hah
21:50
Philip`
reads the PNG spec
21:51
<Philip`>
"Figure 7.1 — Integer representation in PNG"
21:51
<Philip`>
Apparently integers are represented as "XML parsing failed: syntax error (Line: 26, Character: 5). Error: undeclared XML namespace prefix used in attribute name"
21:52
<Hixie>
haha
21:52
<Philip`>
In Firefox, the diagrams that aren't YSODs are displayed as XML trees since they're missing the SVG namespace
21:53
<Philip`>
(in the version at http://www.mirrorservice.org/sites/www.libpng.org/pub/png/spec/iso/index-object.html )
21:54
<Philip`>
Anyway, I imagine deflate decompression would be the most painful thing, and I really don't want to look at that, though the rest of PNG isn't too complex
21:54
<Hixie>
deflate compression should be too bad for a 1px image, right?
21:59
<Philip`>
That's still a whole 32 bits being compressed, so I'd guess there's lots of ways you can compress them and the decoder would have to copy with anything
21:59
<Philip`>
Or I could assume everyone uses libpng and the compressed file is always going to be identical
22:00
<Philip`>
Probably much easier to just not automate this kind of test, and do it manually with proper tools instead of JS
22:00
<Hixie>
heh
22:00
<Hixie>
quitter!
22:00
<Hixie>
:-P
22:01
<Philip`>
I'm just trying to use my time less inefficiently :-)
22:04
<Philip`>
Also, I don't want to discriminate against sufficiently clever UAs that produce highly optimised 1-bit paletted images, or sufficiently high-end UAs that produce 64-bit images, and also I really really don't want to implement a PNG decoder with all those features :-)
22:05
<Philip`>
Sadly you can't do 0-bit palettes
22:06
<Hixie>
clearly you are too lazy
22:06
<Hixie>
or not lazy enough
22:06
<Hixie>
i'm not sure
22:40
<Philip`>
Hmm... toDataURL only takes a parameterless MIME type argument
22:40
<Philip`>
APNG doesn't have its own MIME type, it just hijacks image/png
22:41
<Philip`>
So how can a browser use toDataURL to capture the dynamic state of the canvas and save it as APNG? :-(
22:41
<Hixie>
apng is just png
22:41
<Philip`>
There's no way to distinguish where you want to create a static PNG or an APNG
22:41
<Philip`>
s/where/whether/
22:41
<Hixie>
there's no difference between a static png or apng
22:41
<Hixie>
apng only makes sense for images with more than one frame
22:41
<Philip`>
The difference is that static PNGs don't move, and APNGs do :-p
22:42
<Hixie>
toDataURL() doesn't generate moving images :-P
22:44
<Philip`>
CSS3 Color could be extended so you can say ctx.fillStyle = 'red; style=blink; freq=2.5', and then you'd be able to draw animated images onto the canvas, and then toDataURL would have to faithfully reproduce that
22:45
Philip`
is not at all convinced by his arguments, by the way