freenode :: #whatwg

16 Mar 2017
07:58mkwsttobie: You're in a reasonable time zone, right? :) Do you have a few minutes to help me out with some IDLish questions?
07:59Ms2gerMorning
07:59tobiemkwst: I can give it a try.
07:59mkwstMorning!
08:00tobiemkwst: I've got a flu, so bear with me if I'm slow at understanding things. :)
08:00mkwsttobie: I'm trying to do a better job explaining the extension model of https://w3c.github.io/webappsec-credential-management/. Today, it does very hand-wavey things in https://w3c.github.io/webappsec-credential-management/#request-credential (step 5 and beyond).
08:01mkwstI'd like them to be less hand-wavey.
08:01mkwstAs a short explanation:
08:02mkwst`get()` accepts a dictionary that specifies what kind of objects the developer wants. `{ type1: true, type2: { long: 'list', of: 'filters' } }`.
08:03mkwstThe current spec converts from the dictionary keys to interfaces more or less by fiat.
08:03mkwstAnd then does some weird things about walking the ancestor tree to figure out whether it can service a request for `type1` and `type2` at the same time.
08:03mkwstAnd then switches on an interface type, which I'm not sure we can actually do. ;)
08:04mkwsthttps://w3c.github.io/webappsec-credential-management/base.html attempts to clarify.
08:04mkwsthttps://w3c.github.io/webappsec-credential-management/base.html#credential-internal-methods defines some internal methods on the interface object exposed by the IDL interface.
08:05mkwstAnd https://w3c.github.io/webappsec-credential-management/base.html#algorithm-request tries to map the dictionary keys to interfaces by walking the interface objects.
08:05mkwststep 5ish.
08:06mkwst(Sorry to everyone else in the channel who's probably not interested. ;) )
08:08annevkmkwst: you can let IDL handle the initial parsing, and then you need to parse again based on the type parameter
08:08annevkmkwst: permissions has a similar setup
08:09annevkmkwst: maybe if enough copycats emerge the whole pattern can be uplifted to IDL somehow
08:10annevk(Also personally I take interest in all things #whatwg :-p)
08:12tobiemkwst: sounds like you got all the info you needed and I can go back to sleep.
08:17mkwstannevk: I'm skimming through the permissions spec. It doesn't seem terribly clear to me.
08:18annevkmkwst: https://w3c.github.io/permissions/#permissions-interface is the bit I think
08:18annevkmkwst: I recommend asking jyasskin
08:18mkwstI'll poke him. Thanks!
08:34tobiemkwst: if you file an issue somewhere, I'm happy to give it a look too once my cognitive functions are back to normal.
10:23MikeSmithzcorpan: I dont understand https://github.com/html5lib/html5lib-tests/issues/89#issuecomment-287013694
10:24MikeSmithisnt the content string just some internal thing used for html5lib-tests?
10:24zcorpanMikeSmith: there should be a line `| content` after <template>
10:24MikeSmithper spec?
10:24MikeSmithoh the serializer?
10:24MikeSmithor what?
10:25zcorpanwell there is no actual spec for this. but i thought part of the point of parsetree was that it could be copy-pasted into html5lib-tests .dat files
10:25MikeSmithah
10:25MikeSmithyeah I guess thats true
10:25MikeSmithmake sense
10:25MikeSmithso yeah I can add that
10:25zcorpanthanks :-)
10:41hsivonenzcorpan: sad external legacy Windows software is sad
10:41hsivonenzcorpan: I don&#39;t have anything smart to say to the node folks about that
10:41hsivonenzcorpan: thanks
10:42zcorpanhsivonen: yeah. i still don&#39;t understand why he prefers utf-16 with BOM over utf-8 with BOM, though
10:42hsivonenzcorpan: does the external legacy thing grok UTF-8 with BOM?
10:44zcorpanhsivonen: he said that utf-8 without BOM is decoded as &quot;Ansi&quot;, but didn&#39;t say anything about utf-8 with BOM. It appears he saw the &quot;Unicode&quot; label and decided to stick to that option
10:44hsivonenzcorpan: I commented after all
10:45* hsivonen goes back to removing UTF-16 output capability from Gecko
10:55annevkzcorpan: pointer to this node issue?
10:56zcorpanannevk: https://github.com/nodejs/node/issues/11767
11:00annevkmkwst: we have a few HTTP auth tests for XMLHttpRequest
11:00annevkmkwst: if you actually remove that functionality those will all have to be adjusted somehow
11:00annevkmkwst: I&#39;d be somewhat surprised though if nobody relies on it in the wild
11:01mkwstHrm?
11:01mkwstannevk: Sorry, I&#39;m missing context.
11:02annevkmkwst: I thought you were planning on making the user/password arguments to open() useless
11:02annevkmkwst: per https://github.com/whatwg/fetch/pull/465
11:03annevkmkwst: I just posted a web-platform-tests PR fixing some authentication-related tests that uses that functionality, figured I&#39;d let you know
11:03mkwstGot it, sorry. Yes, I am planning to do that. Yes, it will require adjustments to tests. Yes, it might break things. The metrics look low enough that it&#39;s worth trying.
11:03mkwstJust took me a minute to page that back in, sorry. :)
11:04mkwstThe stable version of Chrome that&#39;s rolling out now has a deprecation message in the console for that kind of usage. Let&#39;s see who comes at me with pitchforks.
11:16hsivonenannevk: Mozilla&#39;s old tree management tools relied on it. TreeHerder doesn&#39;t, IIRC.
11:26noxzcorpan: Around?
11:26zcorpannox: yes
11:26noxzcorpan: https://github.com/html5lib/html5lib-tests/pull/87/files#diff-80f44ad8658d9cc87ce967f7514ebf8dR227
11:26noxzcorpan: How come the template element ends up with a plaintext child?
11:27zcorpannox: https://github.com/html5lib/html5lib-tests/issues/89
11:27noxzcorpan: Thanks!
11:27noxzcorpan: Somehow couldn&#39;t find it.
11:30MikeSmithzcorpan: I am wondering if should I emit content even for <template></template>
11:31zcorpanMikeSmith: https://github.com/html5lib/html5lib-tests/blob/27724be8d27a1232a8809a55f9c37b69706cb03e/tree-construction/template.dat#L33
11:32MikeSmithah OK good that makes things easier
11:32MikeSmiththanks
11:55MikeSmithzcorpan: https://checker.html5.org/parsetree/?parser=html5&content=%3C%21doctype+html%3E%3Ctemplate%3E%3Cplaintext%3Ea%3C%2Ftemplate%3Eb&submit=Print+Tree
11:56zcorpanMikeSmith: sweet, thank you
11:56MikeSmiththanks for the heads-up
12:08MikeSmithannevk: hsivonen you may find https://github.com/bspammer/vimcryption entertaining
13:30annevkMikeSmith: heh
14:25jochen__hum, so this stash thing in wptserve appears to be super unreliable
14:25jochen__when I load a stylesheet that references and image that stashes something
14:26jochen__and in the onload handler for the stylesheet (after checking via getComputedStyle to make sure the image was really loaded), and load the image via an xhr again, every few tries, it can&#39;t find anything stashed in the server
14:33zcorpanjgraham: ^
14:34jgrahamjochen__: Can you make a testcase for me to look at? We have some tests using it that I don&#39;t think are unreliable, but it could be broken
15:27jyasskinmkwst: Sorry permissions wasn&#39;t clear.
15:27mkwstjyasskin: Sorry I&#39;m dumb! :)
15:28mkwstIt looks like it&#39;s binding things to strings, and it&#39;s just not clear to me how that&#39;s expected to work from a spec perspective.
15:28mkwstBut I read it quickly, so I likely missed something important.
15:29jyasskinmkwst: Permissions says, here&#39;s a mapping of strings to dictionary types. The mapping is held in the base standard, but the dictionaries may be defined in the extension standards.
15:30jyasskinmkwst: That&#39;s to make it easier to read: you don&#39;t have to divine the entire universe of extensions to understand the code. You have the whole set in one place.
15:31jyasskini.e. &quot;the set of interfaces whose inherited interfaces contain Credential.&quot; is a clever way to do the same thing, but I think it&#39;ll make the spec harder to follow.
15:31jochen__jgraham: https://github.com/w3c/web-platform-tests/pull/5160
15:32jyasskinThe downside of the Permissions approach is that we have to keep updating the core spec, which is less compatible with the W3C&#39;s processes.
15:32mkwstjyasskin: In my head, it&#39;s simpler, because it&#39;s pointing at concepts that exist in IDL, and I wanted to avoid making the spec a registry.
15:32mkwstRight, that.
15:33jyasskinI think your wording is effective, but it&#39;s a COMEFROM label, which I try to avoid. :)
15:34jyasskinmkwst: Also, today&#39;s my day off for baby care, so I&#39;ll be around irregularly.
15:34jochen__eh, if intercal can do it, it&#39;s ok
15:35mkwstjyasskin: I guess I see it as an implicit registry, but I totally get that it&#39;s confusing (and I&#39;m not sure I&#39;m using the right IDL language anyway).
15:35mkwstjyasskin: Also also, go take care of a baby! They&#39;re cuter than me and need more attention. :)
15:36jyasskinWe don&#39;t have a *good* way to do registries yet, so each author gets to pick their least-bad way.
15:41jgrahamjochen__: OK, ,I&#39;ll take a look. Thanks
16:15jgrahamjochen__: /referrer-policy/css-integration/external-stylesheet.html doesn&#39;t exist in that PR?
16:16jochen__meh
16:35jochen__jgraham: updated the PR
17:03jgrahamjochen__: Isn&#39;t the problem here just that images aren&#39;t critical subresources of stylesheets
17:03jgrahamSo when the load event fires the image hasn&#39;t necessarily put anything in the stash yet
17:04jgrahamSo your test is racy?
17:04jochen__if you look at the console output, you&#39;ll see that the heightof the background-image is known before I even start the XHR
17:04jochen__that means that the part of image.py the stashes (which happens before I even generate the image) should have completed
17:09jgrahamjochen__: And yet the logging I have shows
17:09jgrahamTook data from stash
17:09jgrahamapplication/json
17:09jgrahamPut data in stash
17:09jgrahamGenerated image
17:09gsneddersjochen__: that only means it knows the height of the div, not that it has loaded or painted the image
17:09jgrahamRight, it&#39;s probably telling you your font size * line height
17:11gsneddersthe computed height of the div is totally unrelated to the image I&#39;m pretty sure
17:11jochen__hum
17:11jochen__zcorpan suggested to use that :)
17:12jochen__is there a good way to wait for the image to be loaded?
17:12jgrahamI agree that gives you a good prior, but even zcorpan is wrong occasionally (it is rumored)
17:12* gsnedders isn&#39;t entirely sure about behaviour around `content` property here
17:12jgrahamWell and ::before is an extra layer of complexity
17:12gsneddersso the content property makes it a replaced element, but pending the load of the image it has no intrinsic width/height
17:13gsneddersso, uh, idk
17:14jgrahamAnyway the server logs don&#39;t support the idea that the loads happen in the order you think
17:23annevkThis is where you use test.step_yolo
17:23annevkI mean test.step_timeout
17:26jgrahamtest.make_intermittent would have been a good and accurate name
17:27annevktest.step_on_jugglinmike
21:45DomenicWhat the what https://bugs.webkit.org/show_bug.cgi?id=25893
21:45Domenic(tales from the crypt of time)
22:26noahannevk: food for thought, maybe... we have this new library for parsing and canonicalizing urls, and one of the things it does is pull apart parsing and canonicalization into separate steps... i wonder if you think that might be a good idea for the whatwg spec, or if conversely there&#39;s some reason why that approach is incorrect
22:26noahsee https://github.com/iipc/urlcanon/blob/master/python/urlcanon/parse.py and https://github.com/iipc/urlcanon/blob/master/python/urlcanon/canon.py
23:43JakeAannevk: Is there anything particular you want us to tackle at the service worker f2f in terms of fetch? I&#39;m going to &#39;present&#39; the fetch control/cancelation stuff.
17 Mar 2017
No messages
   
Last message: 100 days and 14 hours ago