fonts: Create resource timing entries when loading web fonts (#41660)#41784
fonts: Create resource timing entries when loading web fonts (#41660)#41784jdm merged 6 commits intoservo:mainfrom
Conversation
…1660) Add a callback on `WebFontDocumentContext` to create resource timing entries, this callback is then used to call `submit_timing`, using a shim listener, as this function requires a listener. Fixes servo#41660 Signed-off-by: lumi <[email protected]>
|
Oh, I understand what you mean about FetchResponseListener now! What happens if you remove that requirement from the generic type for submit_timing? |
Looks like the I changed the initiator type to |
|
I haven't yet found the actual spec text for this, but I assume it expects a "css" initiator type. You can add that to https://doc.servo.org/script/dom/performance/performanceresourcetiming/enum.InitiatorType.html based on https://fetch.spec.whatwg.org/#request-initiator-type |
|
https://drafts.csswg.org/css-fonts-4/#font-fetching-requirements is where I would expect to find it, but it's not there. |
|
Looking around a bit, https://www.w3.org/TR/resource-timing/#dom-performanceresourcetiming-initiatortype specifically says that it should be I've added Should I squash these commits? |
Good find! Also, this is a really bizarre way for that behaviour to be specified. One more thing about the performance/resource timing specifications to add to my list of grumbles.
It will be squashed automatically when merging. I don't mind reviewing individual commits like how they're currently structured! |
Signed-off-by: lumi <[email protected]>
Signed-off-by: lumi <[email protected]>
Signed-off-by: lumi <[email protected]>
…tchListener` Signed-off-by: lumi <[email protected]>
b5d6544 to
1c56971
Compare
|
🔨 Triggering try run (#20837499413) for Linux (WPT) |
|
The changes look great! Let's see what the tests say now. |
|
Test results for linux-wpt from try job (#20837499413): Flaky unexpected result (42)
Stable unexpected results that are known to be intermittent (30)
Stable unexpected results (9)
|
|
|
|
Love those results! You can update the expected results with |
Signed-off-by: lumi <[email protected]>
|
I've committed the results. Some of these configuration changes are in areas that seem unrelated to the changes or add |
Nope—there's a lot of tests that previously didn't get a chance to run, and now they do and they fail. This happens when a test involving a font face timed out because no resource timing information was ever recorded. |
|
Ah, got it! Thanks for the help! :) |
Add a callback on
WebFontDocumentContextto create resource timing entries, this callback is then used to callsubmit_timing, using a shim listener, as this function requires a listener.Testing: Using
./mach test-wpt tests/wpt/tests/preload/preload-resource-match.https.htmlFixes: #41660