aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/stylesheet_loader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/stylesheet_loader.rs')
-rw-r--r--components/script/stylesheet_loader.rs51
1 files changed, 27 insertions, 24 deletions
diff --git a/components/script/stylesheet_loader.rs b/components/script/stylesheet_loader.rs
index b7f47b1fcfd..d045f4b52df 100644
--- a/components/script/stylesheet_loader.rs
+++ b/components/script/stylesheet_loader.rs
@@ -2,22 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-use crate::document_loader::LoadType;
-use crate::dom::bindings::inheritance::Castable;
-use crate::dom::bindings::refcounted::Trusted;
-use crate::dom::bindings::reflector::DomObject;
-use crate::dom::bindings::root::DomRoot;
-use crate::dom::document::Document;
-use crate::dom::element::Element;
-use crate::dom::eventtarget::EventTarget;
-use crate::dom::globalscope::GlobalScope;
-use crate::dom::htmlelement::HTMLElement;
-use crate::dom::htmllinkelement::{HTMLLinkElement, RequestGenerationId};
-use crate::dom::node::{containing_shadow_root, document_from_node, window_from_node};
-use crate::dom::performanceresourcetiming::InitiatorType;
-use crate::dom::shadowroot::ShadowRoot;
-use crate::fetch::create_a_potential_cors_request;
-use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
+use std::mem;
+use std::sync::atomic::AtomicBool;
+use std::sync::Mutex;
+
use cssparser::SourceLocation;
use encoding_rs::UTF_8;
use ipc_channel::ipc;
@@ -27,22 +15,37 @@ use msg::constellation_msg::PipelineId;
use net_traits::request::{CorsSettings, Destination, Referrer, RequestBuilder};
use net_traits::{
FetchMetadata, FetchResponseListener, FilteredMetadata, Metadata, NetworkError, ReferrerPolicy,
+ ResourceFetchTiming, ResourceTimingType,
};
-use net_traits::{ResourceFetchTiming, ResourceTimingType};
use servo_arc::Arc;
-use servo_url::ImmutableOrigin;
-use servo_url::ServoUrl;
-use std::mem;
-use std::sync::atomic::AtomicBool;
-use std::sync::Mutex;
+use servo_url::{ImmutableOrigin, ServoUrl};
use style::media_queries::MediaList;
use style::parser::ParserContext;
use style::shared_lock::{Locked, SharedRwLock};
use style::stylesheets::import_rule::{ImportLayer, ImportSheet};
-use style::stylesheets::StylesheetLoader as StyleStylesheetLoader;
-use style::stylesheets::{CssRules, ImportRule, Origin, Stylesheet, StylesheetContents};
+use style::stylesheets::{
+ CssRules, ImportRule, Origin, Stylesheet, StylesheetContents,
+ StylesheetLoader as StyleStylesheetLoader,
+};
use style::values::CssUrl;
+use crate::document_loader::LoadType;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::element::Element;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmllinkelement::{HTMLLinkElement, RequestGenerationId};
+use crate::dom::node::{containing_shadow_root, document_from_node, window_from_node};
+use crate::dom::performanceresourcetiming::InitiatorType;
+use crate::dom::shadowroot::ShadowRoot;
+use crate::fetch::create_a_potential_cors_request;
+use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
+
pub trait StylesheetOwner {
/// Returns whether this element was inserted by the parser (i.e., it should
/// trigger a document-load-blocking load).