-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Web fonts do not create resource timing entries #41660
Copy link
Copy link
Closed
Labels
A-content/scriptRelated to the script threadRelated to the script threadA-perf-measurementC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.
Description
All of the FetchResponseListener implementations in the script crate call submit_timing to record ResourceTiming entries for the request. Web fonts do not have any hooks for that right now:
servo/components/fonts/font_context.rs
Lines 1045 to 1053 in af2370e
| FetchResponseMsg::ProcessResponseEOF(_, response) => { | |
| trace!( | |
| "@font-face {} EOF={:?}", | |
| self.web_font_family_name, response | |
| ); | |
| if response.is_err() || !self.response_valid { | |
| return DownloaderResponseResult::Failure; | |
| } | |
| DownloaderResponseResult::Finished |
We should replicate how the font code hooks into the CSP violation reports (
servo/components/fonts/font_context.rs
Lines 1018 to 1023 in af2370e
| self.state | |
| .as_ref() | |
| .expect("must have download state before termination") | |
| .document_context | |
| .csp_handler | |
| .process_violations(violations); |
servo/components/script/dom/window.rs
Line 891 in af2370e
| pub(crate) fn web_font_context(&self) -> WebFontDocumentContext { |
This should show some test result changes in ./mach test-wpt tests/wpt/tests/preload/preload-resource-match.https.html.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-content/scriptRelated to the script threadRelated to the script threadA-perf-measurementC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.