-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
script: Load and rasterize favicons before passing them to the embedder #38949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
8b4b9cd
to
5ba8cd0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I haven't had time to look at the script side part of this, but just had one comment about the API bits. Thanks for following the existing pattern for WebView properties!
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
5ba8cd0
to
1fafd28
Compare
link: Trusted::new(self), | ||
resource_timing: ResourceFetchTiming::new(ResourceTimingType::Resource), | ||
}; | ||
document.fetch_background(request, fetch_context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI I would expect some CSP WPT tests to pass such as https://wpt.fyi/results/content-security-policy/img-src/icon-blocked.sub.html?product=servo
🔨 Triggering try run (#17258343607) for Linux (WPT) |
Test results for linux-wpt from try job (#17258343607): Flaky unexpected result (25)
Stable unexpected results that are known to be intermittent (19)
Stable unexpected results (3)
|
|
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Currently the embedding API only provides the embedder with the URL for a favicon. This is not great, for multiple reasons:
With this change, servo fetches and rasterizes the icon to a bitmap which is then passed to the embedder.
Testing: I'm not sure how I can write tests for the embedding api. I've tested the correctness manually using #36680.
Prepares for #36680