mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Add Helper method for creating new WebFontDocumentContext
Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
This commit is contained in:
parent
e9e360edef
commit
8ac9dfcde6
4 changed files with 17 additions and 36 deletions
|
@ -4918,15 +4918,7 @@ impl Document {
|
|||
|
||||
if self.has_browsing_context() {
|
||||
// Construct WebFontDocumentContext for font fetching
|
||||
let document_context = WebFontDocumentContext {
|
||||
policy_container: self.window.global().policy_container(),
|
||||
document_url: self.window.global().api_base_url(),
|
||||
has_trustworthy_ancestor_origin: self
|
||||
.window
|
||||
.global()
|
||||
.has_trustworthy_ancestor_origin(),
|
||||
insecure_requests_policy: self.window.global().insecure_requests_policy(),
|
||||
};
|
||||
let document_context = self.window.new_document_context();
|
||||
|
||||
self.window.layout_mut().add_stylesheet(
|
||||
sheet.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue