aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_interface.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-03-16 09:54:56 -0600
committerbors-servo <metajack+bors@gmail.com>2015-03-16 09:54:56 -0600
commit660ea05ddb3b17b0bb914cb09968cbcf7c6b1aec (patch)
tree3ad9c92ccaf65c4dde575fa588654969fedc84bb /components/script/layout_interface.rs
parent1e1c97adb3cb44351df913daf8265de2edc74704 (diff)
parent51ceaed0d04783387dd8a99a75c7e4eadc9e50b9 (diff)
downloadservo-660ea05ddb3b17b0bb914cb09968cbcf7c6b1aec.tar.gz
servo-660ea05ddb3b17b0bb914cb09968cbcf7c6b1aec.zip
auto merge of #5173 : cyndis/servo/media-attr, r=jdm
Don't add a stylesheet if the current device does not match the media query specified in a link or style tag. Cheers, cyndis
Diffstat (limited to 'components/script/layout_interface.rs')
-rw-r--r--components/script/layout_interface.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs
index 5b83c471b73..e6e448dd800 100644
--- a/components/script/layout_interface.rs
+++ b/components/script/layout_interface.rs
@@ -17,6 +17,7 @@ use std::any::Any;
use std::sync::mpsc::{channel, Receiver, Sender};
use std::boxed::BoxAny;
use style::stylesheets::Stylesheet;
+use style::media_queries::MediaQueryList;
use url::Url;
pub use dom::node::TrustedNodeAddress;
@@ -24,10 +25,10 @@ pub use dom::node::TrustedNodeAddress;
/// Asynchronous messages that script can send to layout.
pub enum Msg {
/// Adds the given stylesheet to the document.
- AddStylesheet(Stylesheet),
+ AddStylesheet(Stylesheet, MediaQueryList),
/// Adds the given stylesheet to the document.
- LoadStylesheet(Url),
+ LoadStylesheet(Url, MediaQueryList),
/// Puts a document into quirks mode, causing the quirks mode stylesheet to be loaded.
SetQuirksMode,