From 26720e10a96fea750f3f83ea37787bdd240b910d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 23 Jun 2018 19:57:44 +0200 Subject: [PATCH] style: Fix servo build. --- components/style/encoding_support.rs | 17 ++++++----------- components/style/servo/media_queries.rs | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/components/style/encoding_support.rs b/components/style/encoding_support.rs index eadcfa4c159..7aec18bee2c 100644 --- a/components/style/encoding_support.rs +++ b/components/style/encoding_support.rs @@ -55,7 +55,7 @@ impl Stylesheet { /// /// Takes care of decoding the network bytes and forwards the resulting /// string to `Stylesheet::from_str`. - pub fn from_bytes( + pub fn from_bytes( bytes: &[u8], url_data: UrlExtraData, protocol_encoding_label: Option<&str>, @@ -64,12 +64,9 @@ impl Stylesheet { media: MediaList, shared_lock: SharedRwLock, stylesheet_loader: Option<&StylesheetLoader>, - error_reporter: &R, + error_reporter: Option<&ParseErrorReporter>, quirks_mode: QuirksMode, - ) -> Stylesheet - where - R: ParseErrorReporter, - { + ) -> Stylesheet { let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding); Stylesheet::from_str( &string, @@ -86,17 +83,15 @@ impl Stylesheet { /// Updates an empty stylesheet with a set of bytes that reached over the /// network. - pub fn update_from_bytes( + pub fn update_from_bytes( existing: &Stylesheet, bytes: &[u8], protocol_encoding_label: Option<&str>, environment_encoding: Option<&'static encoding_rs::Encoding>, url_data: UrlExtraData, stylesheet_loader: Option<&StylesheetLoader>, - error_reporter: &R, - ) where - R: ParseErrorReporter, - { + error_reporter: Option<&ParseErrorReporter>, + ) { let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding); Self::update_from_str( existing, diff --git a/components/style/servo/media_queries.rs b/components/style/servo/media_queries.rs index 2ab4edca611..336971f98df 100644 --- a/components/style/servo/media_queries.rs +++ b/components/style/servo/media_queries.rs @@ -24,7 +24,7 @@ use values::computed::font::FontSize; /// is displayed in. /// /// This is the struct against which media queries are evaluated. -#[derive(MallocSizeOf)] +#[derive(Debug, MallocSizeOf)] pub struct Device { /// The current media type used by de device. media_type: MediaType,