03:49
<hober>
yes
05:35
<user_>
i just lost my irc virginity
05:35
<user_>
wtf
08:28
<Hixie>
given a MouseEvent whose target is a <canvas>, how do I find the coordinate of the mouse relative to the canvas?
08:29
<benschwarz>
Hixie: there?
08:29
<Hixie>
yup
08:35
<benschwarz>
there is nothing to say we can't use it on the main spec
09:52
<annevk>
Hixie, offsetX/offsetY I think, but they're not cross-browser (yet); see e.g. http://annevankesteren.nl/2006/08-paintr21
10:00
<Ms2ger>
annevk, seems like the Save it button works in Fx here
10:02
<annevk>
in my URLs dates have meaning
10:02
<Ms2ger>
Ha
10:05
<annevk>
so with mutation events off the table
10:05
<annevk>
is there anything we want to do before publishing again?
10:06
<annevk>
a) adding ElementTraversal b) making the historical section somewhat more complete
10:06
<annevk>
I'm not sure about: events loop and event handlers
10:07
<annevk>
oh, and I recently learned that ele.className in SVG does not return a string!
10:07
<annevk>
so I guess we cannot generalize className :/
10:12
<annevk>
childElementCount grmbl
10:15
<Ms2ger>
Ooh, and it has tests
10:16
<Ms2ger>
"The result of this test is a pass! Srsly."
10:30
Ms2ger
imports those tests
11:05
<annevk>
hmm
11:06
<annevk>
shepazu did not include childElementCount in http://dev.w3.org/2006/webapi/DOM4Core/DOM4Core.html
11:06
<annevk>
I wonder if the idea is to get rid of it again...
11:10
<Ms2ger>
Seems unlikely we could
11:11
<annevk>
that's for jgraham to say
11:12
<hsivonen>
Dear lazy IRC, how do I horizontally center an element whose width is non-auto and whose vertical position is given by absolute positioning?
11:12
<hsivonen>
without calc
11:13
<hsivonen>
I now have right: -moz-calc(50% - 412px);
11:13
<hsivonen>
(without calc because I'm trying to be nice to Other Browsers)
11:14
<annevk>
why not margin:0 auto?
11:14
<Rik`>
right: 50%
11:14
<annevk>
oh, and if it's absolutely positioned you could add left:0 / right:0
11:14
<Rik`>
margin-right: -412px
11:14
<annevk>
then margin:auto should work
11:15
<annevk>
Rik`, that goes wrong with narrow viewports
11:15
<hsivonen>
annevk: right: 0; moves it to the right edge of the view port
11:15
<hsivonen>
annevk: margin: auto; does not seem to work with absolute positioning
11:16
<Ms2ger>
<div style="top:20px;left:0;right:0;border:thin solid;width:412px;margin:0 auto">a</div>
11:17
<Ms2ger>
WFM
11:18
<hsivonen>
Rik`'s solution works.
11:18
<hsivonen>
let's try Ms2ger's solution again
11:19
<hsivonen>
Ms2ger wins. Thanks!
11:19
<Ms2ger>
annevk wins :)
11:19
<annevk>
hmm, that was what I suggested
11:20
<hsivonen>
annevk: oh. right. I thought left: 0 / right: 0 meant either one of them
11:26
<annevk>
for now I commented out childElementCount
11:26
<annevk>
I guess I should also refactor the spec to use "Trees"
11:31
<annevk>
so we still lack a replacement for DOM Traversal
11:32
<annevk>
is that the only DOM spec that is not obsoleted yet aside from the various event definitions in DOM Events?
11:32
<annevk>
or has a replacement
11:33
<Ms2ger>
http://www.w3.org/DOM/DOMTR
11:33
<Ms2ger>
Looks like it
11:35
<annevk>
oh, XPath
11:36
<annevk>
never became a REC, but is used and all
12:02
<annevk>
Ms2ger, do we really need to use "context node"?
12:03
<annevk>
Ms2ger, e.g. "Events" does not have a similar concept and many other specifications do not either
12:03
<annevk>
that is, it's implicit in the definition
12:03
<Ms2ger>
I guess context object makes more sense
12:05
<annevk>
you don't think we can just say "the y attribute must return the x"
12:08
<Ms2ger>
That would probably work as long as there's only one object around
12:47
<annevk>
I guess I'll wait a bit with making that change, but I think I'll just go ahead in due course
13:13
<annevk>
tried updating the history section
13:13
<annevk>
https://bitbucket.org/ms2ger/dom-core
14:04
<annevk>
so baseURI
14:04
<annevk>
I guess we need "document base URL" and "element base URL"
14:04
<annevk>
have the parsing specs set them
14:04
<annevk>
and have it return null for non element/document objects
14:05
<annevk>
should we try moving it away from Node?
14:05
<annevk>
guess I'll leave it an open issue for now
14:09
<Ms2ger>
Text.baseURI and friends should probably be their parent's baseURI
14:12
<annevk>
oh okay
14:12
<annevk>
yeah :/
14:13
<annevk>
crappy API
14:14
<annevk>
time to get to the station
20:09
<annevk>
can people take a look at http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#historical ?
20:10
<annevk>
just a single line useful/useless would already help
20:14
<AryehGregor>
annevk, history is useful IMO.
20:14
<AryehGregor>
Also interesting.
20:16
<annevk>
Ms2ger, why does http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domimplementation-hasfeature still look broken?
20:17
<Ms2ger>
Fixed
20:17
<annevk>
oh, I guess the fix wasn't pushed to W3C space, doh
21:12
<AryehGregor>
I have rebelled against Anolis and created a new preprocessor that I stick before Anolis in my pipeline.
21:13
<AryehGregor>
Before: <p>The <dfn>first node</dfn> of a <code data-anolis-spec=domrange>Range</code> is its <span data-anolis-spec=domrange title=concept-range-start>start</span> <span data-anolis-spec=domrange title=concept-boundary-point-node>node</span>, if that is a <code data-anolis-spec=domcore>Text</code>, <code data-anolis-spec=domcore>Comment</code>, or <code data-anolis-spec=domcore>ProcessingInstruction</code> node; or else the child of its <spa
21:13
<AryehGregor>
n data-anolis-spec=domrange title=concept-range-start>start</span> <span data-anolis-spec=domrange title=concept-boundary-point-node>node</span> with <span data-anolis-spec=domrange title=concept-indexof>index</span> equal to the <span data-anolis-spec=domrange title=concept-range-start>start</span> <span data-anolis-spec=domrange title=concept-boundary-point-offset>offset</span>, if that exists; or else its <span data-anolis-spec=domrange ti
21:13
<AryehGregor>
tle=concept-range-start>start</span> <span data-anolis-spec=domrange title=concept-boundary-point-node>node</span>.
21:13
<AryehGregor>
After: <p>The <dfn>first node</dfn> of a [[range]] is its [[rangestart]] [[bpnode]], if that is a [[text]], [[comment]], or [[processinginstruction]] node; or else the child of its [[rangestart]] [[bpnode]] with [[index]] equal to the [[rangestart]] [[bpoffset]], if that exists; or else its [[rangestart]] [[bpnode]].
21:14
<AryehGregor>
Now I will not have to want to kill something every time I write a simple sentence with cross-spec xrefs.
21:17
<AryehGregor>
Probably hacking Anolis so it can automatically convert <code>Range</code> into <code data-anolis-spec=domrange>Range</code> and so on would have done the trick too.
21:18
<AryehGregor>
Although HTML really is a pretty nasty language to write by hand if you don't go really light on the markup.
21:36
<uf0>
what are your guys thoughts on language like HAML?
22:02
<Hixie>
is mouseout unreliable? i'm having trouble getting it to work with a weirdly positioned canvas but can't work out if it's a browser-specific bug with chrome or if it's known to be unreliable in general
22:13
<annevk>
Hixie, they might fire on a bit of a delay so if you move it out of the browser window quickly and then back in again it might not dispatch at all
23:16
<annevk>
I guess DOM Features should also be a top-level section
23:17
<annevk>
maybe as "Features (deprecated)"
23:19
<annevk>
or maybe bury it somewhere alongside DOMImplementation...
23:22
<zewt>
annevk: regarding the subtle event dispatch difference between dom-core and dom-events (stopPropagation/preventDefault called before dispatch); should that be mentioned in 8.1? it's an obscure difference, but maybe important to make note of for that reason alone (easy to miss)
23:29
<annevk>
yeah, should probably do that
23:29
<annevk>
though it's really a bug in DOM Events I think
23:30
<annevk>
because otherwise if you create an event yourself and invoke stopPropagation on it and then dispatch it... nothing happens
23:31
<zewt>
I can't think of any reason to call stopPropagation before dispatch anyway, so for that case I think either definition is good enough
23:32
<zewt>
maybe I could contrive a really weird case where being able to call preventDefault before dispatch would be useful, but I'd have to really try, heh
23:32
<annevk>
hmm, that is actually what happens in browsers
23:33
<annevk>
for stopPropagation that is
23:34
<annevk>
well
23:34
<zewt>
it seems like the dom events way requires having a separate hidden state, separating whether to continue propagation from the defaultPrevented attribute
23:34
<zewt>
which is lame heh
23:34
<annevk>
it's not what happens in browsers
23:34
<annevk>
because if you call stopPropagation
23:34
<annevk>
dispatch twice
23:35
<annevk>
it doesn't dispatch
23:35
<zewt>
do browsers just not clear it at all?
23:35
<annevk>
oh, Gecko does, Chrome doesn't
23:35
<annevk>
Opera is like Chrome
23:36
<annevk>
I wonder why DOM Events cites backwards compatibility as a reason here...
23:36
<zewt>
yuck: "... and determine whether an event has been canceled through the Event.defaultPrevented attribute while the object is being dispatched"
23:37
<zewt>
suggesting DOM L3's defaultPrevented was only thinking of that attribute being used during dispatch, and not by the dispatcher after the event returns
23:37
<zewt>
in which case what L3 does makes sense
23:38
<annevk>
but that's not what's actually implemented
23:38
<zewt>
yeah
23:38
<annevk>
I like my model better :p
23:39
<zewt>
so Chrome doesn't clear the flag at all, and you can effectively only dispatch an event once?
23:39
<zewt>
i mean, if it's prevented
23:39
<zewt>
er, stopPropagation'd
23:40
<annevk>
well either my model or we make initEvent() reset it I suppose
23:41
<annevk>
anyway bedtime
23:41
<annevk>
nn
23:41
<zewt>
later