font: Filter out downloaded web fonts before starting to download another web font#43382
Conversation
Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
mrobinson
left a comment
There was a problem hiding this comment.
Looks good, just some minor comments to address before landing.
|
🔨 Triggering try run (#23245177355) for Linux (WPT) |
|
@mrobinson Thanks for the review. This currently fails one WPT test. Let me address that first |
|
Test results for linux-wpt from try job (#23245177355): Flaky unexpected result (18)
Stable unexpected results that are known to be intermittent (21)
Stable unexpected results (1)
|
|
|
|
@mrobinson So the failed WPT test is this https://github.com/web-platform-tests/wpt/blob/master/css/css-fonts/format-specifiers-variations.html. The same web font is just loaded multiple times with different format. This can be easily address with changing the I'd like to see your opinion on this. Thanks :) |
|
Is the goal here to avoid unnecessary network traffic or something else? If it's to avoid traffic, maybe the right thing to do is to trigger a successful load when the font data we are trying to load from a URL is already in |
Thank you for the feedback. It's to avoid unnecessary network as well as unnecessary |
|
I think you still have to run On the other hand, I think we can add an early return path before the loader starts to download a URL that is already in the |
Would checking if the newly loaded font is associated with a new |
|
In the case that the font is associated with an existing |
If the font is associated with an existing |
|
Yes, perhaps so, as long as the new font family name and format are the same as the previous font family name and format. |
Sounds good. Let me give this a try |
Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
|
🔨 Triggering try run (#23423524954) for Linux (WPT) |
|
✨ Try run (#23423524954) succeeded. |
Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
|
🔨 Triggering try run (#23431444246) for Linux (WPT) |
|
Test results for linux-wpt from try job (#23431444246): Flaky unexpected result (27)
Stable unexpected results that are known to be intermittent (23)
|
|
✨ Try run (#23431444246) succeeded. |
|
🔨 Triggering try run (#23449493572) for Linux (WPT) |
|
Test results for linux-wpt from try job (#23449493572): Flaky unexpected result (27)
Stable unexpected results that are known to be intermittent (22)
|
|
✨ Try run (#23449493572) succeeded. |
Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
|
🔨 Triggering try run (#23471632869) for Linux (WPT) |
|
Test results for linux-wpt from try job (#23471632869): Flaky unexpected result (19)
Stable unexpected results that are known to be intermittent (21)
|
|
✨ Try run (#23471632869) succeeded. |
|
@mrobinson This should be ready to get merged. |
Checks the web font sources and filter out the ones that are already downloaded in the
FontContextbefore starting to load new onesTesting: Existing WPT tests.