style: Fix servo build.

This commit is contained in:
Emilio Cobos Álvarez 2018-06-23 19:57:44 +02:00
parent 82db42390d
commit 26720e10a9
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 7 additions and 12 deletions

View file

@ -55,7 +55,7 @@ impl Stylesheet {
/// ///
/// Takes care of decoding the network bytes and forwards the resulting /// Takes care of decoding the network bytes and forwards the resulting
/// string to `Stylesheet::from_str`. /// string to `Stylesheet::from_str`.
pub fn from_bytes<R>( pub fn from_bytes(
bytes: &[u8], bytes: &[u8],
url_data: UrlExtraData, url_data: UrlExtraData,
protocol_encoding_label: Option<&str>, protocol_encoding_label: Option<&str>,
@ -64,12 +64,9 @@ impl Stylesheet {
media: MediaList, media: MediaList,
shared_lock: SharedRwLock, shared_lock: SharedRwLock,
stylesheet_loader: Option<&StylesheetLoader>, stylesheet_loader: Option<&StylesheetLoader>,
error_reporter: &R, error_reporter: Option<&ParseErrorReporter>,
quirks_mode: QuirksMode, quirks_mode: QuirksMode,
) -> Stylesheet ) -> Stylesheet {
where
R: ParseErrorReporter,
{
let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding); let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding);
Stylesheet::from_str( Stylesheet::from_str(
&string, &string,
@ -86,17 +83,15 @@ impl Stylesheet {
/// Updates an empty stylesheet with a set of bytes that reached over the /// Updates an empty stylesheet with a set of bytes that reached over the
/// network. /// network.
pub fn update_from_bytes<R>( pub fn update_from_bytes(
existing: &Stylesheet, existing: &Stylesheet,
bytes: &[u8], bytes: &[u8],
protocol_encoding_label: Option<&str>, protocol_encoding_label: Option<&str>,
environment_encoding: Option<&'static encoding_rs::Encoding>, environment_encoding: Option<&'static encoding_rs::Encoding>,
url_data: UrlExtraData, url_data: UrlExtraData,
stylesheet_loader: Option<&StylesheetLoader>, stylesheet_loader: Option<&StylesheetLoader>,
error_reporter: &R, error_reporter: Option<&ParseErrorReporter>,
) where ) {
R: ParseErrorReporter,
{
let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding); let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding);
Self::update_from_str( Self::update_from_str(
existing, existing,

View file

@ -24,7 +24,7 @@ use values::computed::font::FontSize;
/// is displayed in. /// is displayed in.
/// ///
/// This is the struct against which media queries are evaluated. /// This is the struct against which media queries are evaluated.
#[derive(MallocSizeOf)] #[derive(Debug, MallocSizeOf)]
pub struct Device { pub struct Device {
/// The current media type used by de device. /// The current media type used by de device.
media_type: MediaType, media_type: MediaType,