Bug 1481681: Fix Servo build and unit tests. r=me

This commit is contained in:
Emilio Cobos Álvarez 2018-08-08 01:10:03 +02:00
Родитель ef6c33c8d4
Коммит a8579f90d1
4 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -93,6 +93,7 @@ extern crate string_cache;
#[macro_use]
extern crate style_derive;
extern crate style_traits;
#[cfg(feature = "gecko")]
extern crate thin_slice;
extern crate time;
extern crate uluru;

Просмотреть файл

@ -605,8 +605,9 @@ impl NonCustomPropertyId {
COLLECT_FUNCTIONS[self.0](f);
}
/// Turns this `NonCustomPropertyId` into a `PropertyId`.
#[inline]
fn to_property_id(self) -> PropertyId {
pub fn to_property_id(self) -> PropertyId {
use std::mem::transmute;
if self.0 < ${len(data.longhands)} {
return unsafe {
@ -2412,7 +2413,7 @@ pub use gecko_properties::style_structs;
/// The module where all the style structs are defined.
#[cfg(feature = "servo")]
pub mod style_structs {
use fx::FxHasher;
use fxhash::FxHasher;
use super::longhands;
use std::hash::{Hash, Hasher};
use logical_geometry::WritingMode;
@ -4265,6 +4266,7 @@ pub enum AliasId {
#[derive(Clone, Copy, Eq, PartialEq)]
enum AliasedPropertyId {
#[allow(dead_code)] // Servo doesn't have aliased shorthands.
Shorthand(ShorthandId),
Longhand(LonghandId),
}

Просмотреть файл

@ -19,7 +19,6 @@ use values::generics::box_::VerticalAlign as GenericVerticalAlign;
use values::specified::{AllowQuirks, Number};
use values::specified::length::{LengthOrPercentage, NonNegativeLength};
#[cfg(feature = "gecko")]
fn in_ua_or_chrome_sheet(context: &ParserContext) -> bool {
use stylesheets::Origin;
context.stylesheet_origin == Origin::UserAgent ||

Просмотреть файл

@ -98,7 +98,6 @@ fn test_parse_stylesheet() {
}),
Component::AttributeInNoNamespace {
local_name: local_name!("type"),
local_name_lower: local_name!("type"),
operator: AttrSelectorOperator::Equal,
value: "hidden".to_owned(),
case_sensitivity: ParsedCaseSensitivity::AsciiCaseInsensitive,