mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Resolves #4183 - Implemementing context-based MIME type sniffing
The version of the standard is not finalized at the time of this writing. Specifications may be found here: https://mimesniff.spec.whatwg.org/#context-specific-sniffing .
This commit is contained in:
parent
66c8aa8cda
commit
1e81b8c133
18 changed files with 226 additions and 93 deletions
|
@ -5,7 +5,7 @@
|
|||
use font_template::{FontTemplate, FontTemplateDescriptor};
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use net_traits::{AsyncResponseTarget, PendingAsyncLoad, ResourceTask, ResponseAction};
|
||||
use net_traits::{AsyncResponseTarget, LoadContext, PendingAsyncLoad, ResourceTask, ResponseAction};
|
||||
use platform::font_context::FontContextHandle;
|
||||
use platform::font_list::for_each_available_family;
|
||||
use platform::font_list::for_each_variation;
|
||||
|
@ -156,7 +156,8 @@ impl FontCache {
|
|||
match src {
|
||||
Source::Url(ref url_source) => {
|
||||
let url = &url_source.url;
|
||||
let load = PendingAsyncLoad::new(self.resource_task.clone(),
|
||||
let load = PendingAsyncLoad::new(LoadContext::Font,
|
||||
self.resource_task.clone(),
|
||||
url.clone(),
|
||||
None);
|
||||
let (data_sender, data_receiver) = ipc::channel().unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue