| 01:01 | <EveryOS> | When I put licenses on my code, I use my username instead of my legal name. I really hope that never comes back to hunt me |
| 07:15 | <noamr> | Morning zcorpan and annevk, I'm trying to dig into an old irritating issue called MouseEvent.offsetX... thought you might be able to shed some light on it. |
| 07:17 | <noamr> | ... seems like Blink/WebKit are doing something different from Gecko, which matches the spec, especially in terms of inline elements. Trying to see how to remedy this without causing major compatibility issues |
| 07:33 | <annevk> | noamr: I only recall that I thought we should define those directly in UI events |
| 07:34 | <annevk> | noamr: other steps that come to mind: looking if there are existing bug reports against browsers, spec issues, and tests, and organize all that a bit (and complete test coverage if incomplete) |
| 07:38 | <noamr> | That's what I've done so far, annevk. The response I got from both WebKit & Blink folks is caution due to backwards compatibility |
| 07:39 | <annevk> | noamr: and Gecko has no existing bugs due to this? |
| 07:40 | <annevk> | noamr: if that's the case I guess for Gecko to change we'd want some telemetry and perhaps look at some usage in HTTP Archive or GitHub (code search) to see what the results might be; then if that looks okay roll it out to Nightly/Beta for a bit and then Release |
| 07:42 | <noamr> | annevk you mean roll out something like conforming Gecko to the Blink/WebKit behavior? |
| 07:42 | <annevk> | noamr: yeah |
| 07:44 | <noamr> | I actually think the Gecko/spec behavior makes a lot more sense, but consistency would be better than what we have now... let me see what I can dig in terms of http archive etc. thanks for now annevk |
| 07:46 | <annevk> | It might be worth seeing what their requirements are for changing this to get past the unease, but without might insight into this particular situation it seems more challenging to get them to change |
| 08:15 | <noamr> | I think it's similar requirements... to see how it's used in the wild. apparently the strange behavior in inline elements is an inheritance from IE |
| 09:41 | <zcorpan> | noamr: what is the behavior difference? |
| 09:42 | <noamr> | zcorpan: the main one is with inline elements. In Gecko & the spec, offsetX is the offset from the target (inline) element. In WebKit/Blink/previously-in-IE, offsetX is the offset from the nearest block ancestor |
| 09:44 | <annevk> | noamr: does offsetParent play a role on this? |
| 09:44 | <annevk> | the CSSOM has a lot of somewhat sad APIs :-( |
| 09:44 | <noamr> | No. offsetParent is the nearest positioned ancestor, while the behvior is the nearest block ancestor |
| 09:45 | <zcorpan> | noamr: ok. it might be hard to find interesting cases through code search. But you could maybe add a use counter in chromium. It's possible to query for use counter matches in httparchive (but you'll need to wait until it's in stable + the next httparchive run) |
| 09:45 | <noamr> | Yes, which later creates even sadder performance problems as devs use getBoundingClientRect() as a solution and cause layout-thrashing |
| 09:46 | <noamr> | I think a UseCounter for using offsetX/offsetY on an inline element would be an interesting one |
| 09:51 | <noamr> | Another more subtle difference is that Firefox computes offsetXY when the even is dispatched, and Blink/WebKit compute it when it's first requested, which could be after additional layouts have happened. But I think that can be fixed without a big effect on compatibility |
| 09:53 | <annevk> | noamr: so right, another thing to test is the values of those properties for synthetic events |
| 09:53 | <annevk> | noamr: I think the current spec might not really account for those |
| 09:57 | <noamr> | Actually it does! synthetic events get offsetX/offsetY = 0 |
| 10:07 | <annevk> | noamr: but that's wrong, right? https://software.hixie.ch/utilities/js/live-dom-viewer/saved/8635 |
| 10:11 | <noamr> | Possibly. Will add that to my research |
| 10:20 | <annevk> | I mean, that logs -8 in all browsers for me |
| 10:21 | <annevk> | Another interesting test might be moving the element and then checking the property again; it kinda seems like it's just computed on the fly |
| 10:24 | <zcorpan> | noamr: I found https://www.w3.org/Bugs/Public/show_bug.cgi?id=16673 |
| 11:05 | <noamr> | annevk: It's computed on the fly, but cached after the first time. unintuitive IMO |
| 11:06 | <annevk> | oh wow, that's pretty bad |
| 11:14 | <noamr> | it's for "performance" but can actually create performance bottlenecks by creating unexpected layout thrashing |
| 13:20 | <noamr> | annevk: re. the synthetic test event, clientX/clientY are 0, and offsetX is derived from that (in this case it's 8 due to the body margin) |
| 13:23 | <annevk> | noamr: so it seems there are Gecko bugs btw, such as https://bugzilla.mozilla.org/show_bug.cgi?id=1359440 |
| 13:23 | <annevk> | There's also various open issues at https://github.com/w3c/csswg-drafts/issues?q=is%3Aissue+is%3Aopen+offsetX |
| 13:25 | <noamr> | annevk: yes, I've recently opened one of them, I think the SVG one is similar, and there is another issue there that I've mentioned before (re. timing of the event) |
| 13:27 | <annevk> | Ah, https://github.com/w3c/uievents/issues/24 is a continuation of a bug I filed in 2014 |
| 18:05 | <annevk> | Domenic: where is the whatbot code? |
| 18:05 | <Domenic> | annevk: https://github.com/whatwg/participate.whatwg.org |
| 18:05 | <Domenic> | annevk: mostly https://github.com/whatwg/participate.whatwg.org/blob/master/lib/pr-webhook.js |
| 18:06 | <annevk> | Oh so I was looking there but grepping for whatbot yielded nothing |
| 18:06 | <annevk> | Thanks! |
| 18:06 | <Domenic> | it logs in using https://github.com/whatwg/participate.whatwg.org/blob/master/lib/helpers/github.js#L6-L8 |
| 19:13 | <EveryOS> | I can see that using the argument as a function is preferred over using the argument's `handleEvent` as a function. Where exactly is this precedence defined? The spec only says `It can be implemented by any object, as described`, I can't find where it defines the precedence. https://usercontent.irccloud-cdn.com/file/4wekvbW2/image.png |
| 19:14 | <Domenic> | EveryOS: https://heycam.github.io/webidl/#call-a-user-objects-operation |
| 19:17 | <EveryOS> | Domenic: Thanks, I had been looking at section 2.4, which has the same name as section 3.11. Didn't realize it was specified further down. |