08:36
<annevk>
Domenic: when can you review https://github.com/whatwg/html/pull/4350?
10:13
<nox>
annevk: Currently doing my style test, will push a bunch of commits soon to wpt.
10:21
<nox>
annevk: It seems like only Firefox postpones style sheet creation.
10:23
<nox>
Wait no, it's worse than that.
10:25
<annevk>
nox: be sure to thank it if it doesn't spark joy
10:26
<nox>
annevk: Wait for it 😎
10:27
<nox>
annevk: https://github.com/web-platform-tests/wpt/pull/15264/commits/5082ab66dbe7c24b3a62f86251fc1ba81de79690#diff-e454c28d2f53c313161aa05dbdeca653R36
10:27
<nox>
This is what my new prose unexpectedly requires, and what Firefox actually does.
10:28
<annevk>
nox: seems reasonable
10:29
<nox>
annevk: You think so? I literally wrote the opposite assertion at first because I was thinking "surely browsers don't do that".
10:31
<nox>
annevk: Chrome fails at the first assertion because it already created a style sheet when the script starts executing,
10:31
<nox>
and it does so for both tests, it doesn't matter whether the element are inserted from a div or from a fragment.
10:32
<nox>
Same for Safari in the case of inserting from a div.
10:33
<annevk>
nox: so they create the style sheet at insertion time?
10:33
<nox>
annevk: Yes, contrary to Firefox.
10:33
<annevk>
nox: that might also be okay? I don't know if there's a problem with that?
10:33
<annevk>
nox: something to ask bz
10:33
<nox>
Yeah.
10:33
<nox>
annevk: I just thought from reading the various issues that it was common behaviour among all browsers. Clearly I misread.
10:35
<nox>
annevk: https://github.com/whatwg/dom/pull/576#issuecomment-368598457
10:35
<nox>
That should read "Except in Edge and in Chrome" I think :)
10:39
<nox>
annevk: So I should ping bz on the HTML PR no?
10:39
<annevk>
nox: yeah let's do that
10:40
<annevk>
nox: I've also tried to add some more cross linking, but haven't dug up all the DOM issues yet
10:40
<nox>
annevk: The postponing itself is why Firefox recreates a stylesheet for no reason in my latest test,
10:40
<nox>
so if we stop doing that, we also fix that "problem".
10:44
<nox>
annevk: https://github.com/whatwg/html/pull/4354/files#r255897129 Done
10:44
<annevk>
nox: still curious about the multiple script case where s1 modifies s2
10:45
<nox>
annevk: I added that
10:45
<annevk>
oh
10:45
<nox>
annevk: https://github.com/web-platform-tests/wpt/pull/15264/commits/ba850650821a4b0d28c1c8b623a262abc346403f
10:45
<nox>
annevk: I already had a similar one for scripts inserted from a div, the document fragment isn't that much different.
10:45
<nox>
Mostly differs in Safari given it inserts nodes from fragments one by one.
10:46
<annevk>
nox: I guess this does indicate the modification affects order, but it doesn't demonstrate it affects what gets executed
10:46
<nox>
annevk: I don't understand what you mean.
10:46
<nox>
annevk: Oh you mean I shouldn't add an empty string but some more code?
10:46
<annevk>
nox: say the script was first "y = 1" and then it got changed to "y = 2"
10:46
<annevk>
nox: aya
10:46
<annevk>
uh
10:47
<annevk>
aye
10:47
<nox>
annevk: I'll append s3Ran = true then.
10:47
<annevk>
sg
10:49
<nox>
annevk: Done.
10:50
<nox>
annevk: I forgot one
10:52
<nox>
annevk: Inserting a script in a script, and make it change its parent script.
11:01
<nox>
annevk: Ouch, my spec is wrong when it comes to that case.
11:03
<annevk>
aww
11:05
<nox>
annevk: Ok, indeed we need to split prepare a script in two.
11:07
<nox>
annevk: Or maybe not!
11:09
<nox>
Everyone is wrong and all in their own way.
11:09
<nox>
annevk: https://github.com/web-platform-tests/wpt/pull/15264/commits/f8fef1d7127b7559aa9e19a9ebec07f169f9055e
11:10
<annevk>
[so close.jpg]
11:10
annevk
looks
11:10
<nox>
So this test shows two things:
11:10
<nox>
Safari and Chrome start executing the code inserted in s1 and fail at assert_true(s2Started, "s2 did not start");
11:11
<nox>
Firefox starts executing the code in s2 and fail at assert_true(s1Started, "s1 did not start");
11:12
<nox>
So Safari and Chrome don't seem to follow the current spec which states: 'the user agent must immediately prepare the script element: (…) The script element is connected and a node or document fragment is inserted into the script element, *after any script elements inserted at that time.*'
11:12
<nox>
And Firefox may or may not be following that bit of the spec, depending on how you read it.
11:13
<nox>
I personally expected s1 to be ran when s2 modifies it.
11:13
<annevk>
Running s1 then s2 does not seem too bad to me
11:13
<nox>
Now I wonder which order is used for a nested script inside a script inside a div inserted in a document.
11:14
<nox>
annevk: So making s2 impossible to change s1 then?
11:14
<nox>
(Given scripts are executed only once)
11:16
<nox>
annevk: I would prefer running s1 then s2 too, because that keeps evaluation in tree order.
11:16
<nox>
It is a bit at odds with my test with three scripts where the first one changes the third one, though.
11:16
<nox>
Ah no it's not at odds never mind.
11:18
<nox>
s1 then s2 is current Chrome behaviour
12:01
<gsnedders>
nox: ah, as I thought .mailmap doesn't affect `git log` by default :/
12:02
<nox>
gsnedders: GH uses it AFAIR
12:02
<nox>
Ah right I forgot that my local config enables it https://github.com/nox/dotfiles/blob/master/config/git/config#L44
12:12
<yoav>
annevk: Would appreciate your thoughts on https://github.com/w3c/resource-timing/issues/202. Basically, if a user goes to page A.COM which loads a CORS-enabled resource from b.com, and the resource contains `ACAO: a.com\r\nTAO: a.com`, what's expected to happen?
12:12
<yoav>
would the origin serialization keep the origin as "A.COM"?
12:15
<annevk>
yoav: assuming that's ASCII, no
12:15
<yoav>
oh, so there's a lowercasing phase that I missed? Can you point me to it?
12:15
<yoav>
(assuming ASCII indeed)
12:16
<annevk>
yoav: URL parser
12:18
<yoav>
ok. So in the example above, TAO and ACAO will pass checks
12:18
<yoav>
OTOH, `ACAO: A.COM` will never pass
12:18
<yoav>
is that correct?
12:18
<annevk>
yoav: aye
12:18
<yoav>
cool
12:19
<annevk>
(you also need a scheme there, but I guess that's clear)
12:20
<yoav>
yeah
14:49
<nox>
annevk: How can a script element be connected and have text contents and still not be executed?
14:50
<nox>
annevk: Forget that question I misread something.
14:51
<nox>
annevk: I'll patch my HTML patch to make it always execute the script in which we just added contents be evaluated first, given that's what Chrome seem to do and what I think is the most logical.
14:53
<nox>
annevk: Shouldn't we ping someone working on Chrome too?
14:55
<annevk>
nox: tkent-google might be able to help here
14:56
<nox>
annevk: Ok.
14:56
<nox>
annevk: At least, the DOM changes are solid, and if we end up preparing scripts in tree order (with the one in which we added stuff prepared first), we can even simplify "children added steps" to not use deferredStepsQueue.
15:19
<smaug____>
wanderview: you might know... any service worker heavy web sites, especially sites which use service workers heavily during page load?
15:38
<wanderview>
smaug____: some large sites using service worker FetchEvent are mobile.twitter.com, photos.google.com, m.uber.com
15:39
<wanderview>
smaug____: for sites that are hitting performance problems, though, they often gate on navigationPreload (not implemented in FF yet) or have not launched their FetchEvent support yet
15:39
<smaug____>
wanderview: anything using fetch()
15:40
<smaug____>
given how SW is implemented in Gecko
15:40
<smaug____>
but aha, photos
15:40
<smaug____>
that could be something for desktop
15:40
smaug____
tests
15:40
<wanderview>
the photos one may be mainly a fallback to network
15:41
<wanderview>
I can't recall
15:41
<wanderview>
smaug____: do you mean a case where the site is doing something like evt.respondWith(fetch(evt.request)) in their service worker?
15:42
<smaug____>
something like that
15:42
<smaug____>
anything where SW controls the network connection
15:42
<wanderview>
ok... "anything where SW controls the network connection" does not require fetch() to be used... so not sure what you meant by that
15:43
<smaug____>
or uses Cache
15:44
<smaug____>
wanderview: ok, in practice heavy use of Cache API or fetch()
15:44
<wanderview>
smaug____: this is the URL use of ThrottledTaskQueue you mentioned in that bug?
15:44
<smaug____>
looks like photos.google.com at least uses cache
15:44
<smaug____>
yes
15:45
<wanderview>
I'm doubtful that is significant, but I guess measuring is always a good idea
15:46
<smaug____>
it is definitely very significant
15:46
<smaug____>
there are profiles showing that
15:47
<smaug____>
during page load normal prio queue is very busy
15:48
<smaug____>
but ok thanks, photos.google.com is a good example for desktop
15:48
<wanderview>
I thought MT URL parsing was no longer necessary anyways
17:04
<annevk>
nox: counter to bz would also be iframe or some such
17:05
<annevk>
nox: I hope this works out as it seems the resulting model is not that complex
17:06
<nox>
Yeah
17:15
<wanderview>
smaug____: btw, if you just want to stress service worker subresource loading paths, then JakeA's site here is good: https://jakearchibald.github.io/service-worker-benchmark/
17:15
<wanderview>
sorry I didn't think of that initially
17:16
<smaug____>
wanderview: great, thanks! I'm so noob with service worker stuff
17:17
<wanderview>
smaug____: word of warning, you have to be careful not to trigger image cache with that site... I find opening in a new tab is better than a reload
23:12
<TabAtkins>
Hmm, wondering what APIs might be invoking CSS's "parse a component value" algorithm. I find that Manifests is, in parsing theme-color, but that's hard to test. Anyone know of another that I can invoke more easily?