forked from mirrors/gecko-dev
Bug 1481681: Fix Servo build and unit tests. r=me
This commit is contained in:
parent
ef6c33c8d4
commit
a8579f90d1
4 changed files with 5 additions and 4 deletions
|
|
@ -93,6 +93,7 @@ extern crate string_cache;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate style_derive;
|
extern crate style_derive;
|
||||||
extern crate style_traits;
|
extern crate style_traits;
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
extern crate thin_slice;
|
extern crate thin_slice;
|
||||||
extern crate time;
|
extern crate time;
|
||||||
extern crate uluru;
|
extern crate uluru;
|
||||||
|
|
|
||||||
|
|
@ -605,8 +605,9 @@ impl NonCustomPropertyId {
|
||||||
COLLECT_FUNCTIONS[self.0](f);
|
COLLECT_FUNCTIONS[self.0](f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Turns this `NonCustomPropertyId` into a `PropertyId`.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn to_property_id(self) -> PropertyId {
|
pub fn to_property_id(self) -> PropertyId {
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
if self.0 < ${len(data.longhands)} {
|
if self.0 < ${len(data.longhands)} {
|
||||||
return unsafe {
|
return unsafe {
|
||||||
|
|
@ -2412,7 +2413,7 @@ pub use gecko_properties::style_structs;
|
||||||
/// The module where all the style structs are defined.
|
/// The module where all the style structs are defined.
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
pub mod style_structs {
|
pub mod style_structs {
|
||||||
use fx::FxHasher;
|
use fxhash::FxHasher;
|
||||||
use super::longhands;
|
use super::longhands;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use logical_geometry::WritingMode;
|
use logical_geometry::WritingMode;
|
||||||
|
|
@ -4265,6 +4266,7 @@ pub enum AliasId {
|
||||||
|
|
||||||
#[derive(Clone, Copy, Eq, PartialEq)]
|
#[derive(Clone, Copy, Eq, PartialEq)]
|
||||||
enum AliasedPropertyId {
|
enum AliasedPropertyId {
|
||||||
|
#[allow(dead_code)] // Servo doesn't have aliased shorthands.
|
||||||
Shorthand(ShorthandId),
|
Shorthand(ShorthandId),
|
||||||
Longhand(LonghandId),
|
Longhand(LonghandId),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ use values::generics::box_::VerticalAlign as GenericVerticalAlign;
|
||||||
use values::specified::{AllowQuirks, Number};
|
use values::specified::{AllowQuirks, Number};
|
||||||
use values::specified::length::{LengthOrPercentage, NonNegativeLength};
|
use values::specified::length::{LengthOrPercentage, NonNegativeLength};
|
||||||
|
|
||||||
#[cfg(feature = "gecko")]
|
|
||||||
fn in_ua_or_chrome_sheet(context: &ParserContext) -> bool {
|
fn in_ua_or_chrome_sheet(context: &ParserContext) -> bool {
|
||||||
use stylesheets::Origin;
|
use stylesheets::Origin;
|
||||||
context.stylesheet_origin == Origin::UserAgent ||
|
context.stylesheet_origin == Origin::UserAgent ||
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@ fn test_parse_stylesheet() {
|
||||||
}),
|
}),
|
||||||
Component::AttributeInNoNamespace {
|
Component::AttributeInNoNamespace {
|
||||||
local_name: local_name!("type"),
|
local_name: local_name!("type"),
|
||||||
local_name_lower: local_name!("type"),
|
|
||||||
operator: AttrSelectorOperator::Equal,
|
operator: AttrSelectorOperator::Equal,
|
||||||
value: "hidden".to_owned(),
|
value: "hidden".to_owned(),
|
||||||
case_sensitivity: ParsedCaseSensitivity::AsciiCaseInsensitive,
|
case_sensitivity: ParsedCaseSensitivity::AsciiCaseInsensitive,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue