зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1488172 - Fix Servo and unit tests build. r=me
This commit is contained in:
Родитель
09b97d9474
Коммит
90fb0f988a
|
@ -378,10 +378,11 @@ ${helpers.predefined_type(
|
|||
"offset-path",
|
||||
"OffsetPath",
|
||||
"computed::OffsetPath::none()",
|
||||
products="gecko",
|
||||
animation_value_type="none",
|
||||
gecko_pref="layout.css.motion-path.enabled",
|
||||
flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
|
||||
spec="https://drafts.fxtf.org/motion-1/#offset-path-property"
|
||||
spec="https://drafts.fxtf.org/motion-1/#offset-path-property",
|
||||
)}
|
||||
|
||||
// CSSOM View Module
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
use Atom;
|
||||
use cssparser::{Parser as CssParser, ParserInput};
|
||||
use element_state::ElementState;
|
||||
use selectors::parser::SelectorList;
|
||||
use std::fmt::{self, Debug, Write};
|
||||
use string_cache::Atom;
|
||||
use style_traits::{CssWriter, ParseError, ToCss};
|
||||
use stylesheets::{Namespaces, Origin, UrlExtraData};
|
||||
use values::serialize_atom_identifier;
|
||||
|
|
|
@ -135,6 +135,10 @@ impl PseudoElement {
|
|||
self.is_before() || self.is_after()
|
||||
}
|
||||
|
||||
/// Whether this is an unknown ::-webkit- pseudo-element.
|
||||
#[inline]
|
||||
pub fn is_unknown_webkit_pseudo_element(&self) -> bool { false }
|
||||
|
||||
/// Whether this pseudo-element is the ::before pseudo.
|
||||
#[inline]
|
||||
pub fn is_before(&self) -> bool {
|
||||
|
|
|
@ -1948,7 +1948,7 @@ pub struct CascadeData {
|
|||
/// to avoid taking element snapshots when an irrelevant attribute changes.
|
||||
/// (We don't bother storing the namespace, since namespaced attributes are
|
||||
/// rare.)
|
||||
attribute_dependencies: PrecomputedHashSet<Atom>,
|
||||
attribute_dependencies: PrecomputedHashSet<LocalName>,
|
||||
|
||||
/// The element state bits that are relied on by selectors. Like
|
||||
/// `attribute_dependencies`, this is used to avoid taking element snapshots
|
||||
|
@ -1964,7 +1964,7 @@ pub struct CascadeData {
|
|||
/// hence in our selector maps). Used to determine when sharing styles is
|
||||
/// safe: we disallow style sharing for elements whose id matches this
|
||||
/// filter, and hence might be in one of our selector maps.
|
||||
mapped_ids: PrecomputedHashSet<LocalName>,
|
||||
mapped_ids: PrecomputedHashSet<Atom>,
|
||||
|
||||
/// Selectors that require explicit cache revalidation (i.e. which depend
|
||||
/// on state that is not otherwise visible to the cache, like attributes or
|
||||
|
|
|
@ -19,9 +19,15 @@ where F: for<'t> Fn(&ParserContext, &mut Parser<'static, 't>) -> Result<T, Parse
|
|||
fn parse_input<'i: 't, 't, T, F>(f: F, input: &'t mut ParserInput<'i>) -> Result<T, ParseError<'i>>
|
||||
where F: Fn(&ParserContext, &mut Parser<'i, 't>) -> Result<T, ParseError<'i>> {
|
||||
let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap();
|
||||
let context = ParserContext::new(Origin::Author, &url, Some(CssRuleType::Style),
|
||||
ParsingMode::DEFAULT,
|
||||
QuirksMode::NoQuirks, None);
|
||||
let context = ParserContext::new(
|
||||
Origin::Author,
|
||||
&url,
|
||||
Some(CssRuleType::Style),
|
||||
ParsingMode::DEFAULT,
|
||||
QuirksMode::NoQuirks,
|
||||
None,
|
||||
None,
|
||||
);
|
||||
let mut parser = Parser::new(input);
|
||||
f(&context, &mut parser)
|
||||
}
|
||||
|
|
|
@ -24,9 +24,15 @@ where
|
|||
F: Fn(&ParserContext, &mut Parser<'i, 't>) -> Result<T, ParseError<'i>>,
|
||||
{
|
||||
let url = ::servo_url::ServoUrl::parse("http://localhost").unwrap();
|
||||
let context = ParserContext::new(Origin::Author, &url, Some(CssRuleType::Style),
|
||||
ParsingMode::DEFAULT,
|
||||
QuirksMode::NoQuirks, None);
|
||||
let context = ParserContext::new(
|
||||
Origin::Author,
|
||||
&url,
|
||||
Some(CssRuleType::Style),
|
||||
ParsingMode::DEFAULT,
|
||||
QuirksMode::NoQuirks,
|
||||
None,
|
||||
None,
|
||||
);
|
||||
let mut parser = Parser::new(input);
|
||||
f(&context, &mut parser)
|
||||
}
|
||||
|
|
|
@ -301,9 +301,15 @@ fn multiple_stylesheets_cascading() {
|
|||
#[test]
|
||||
fn constrain_viewport() {
|
||||
let url = ServoUrl::parse("http://localhost").unwrap();
|
||||
let context = ParserContext::new(Origin::Author, &url, Some(CssRuleType::Viewport),
|
||||
ParsingMode::DEFAULT,
|
||||
QuirksMode::NoQuirks, None);
|
||||
let context = ParserContext::new(
|
||||
Origin::Author,
|
||||
&url,
|
||||
Some(CssRuleType::Viewport),
|
||||
ParsingMode::DEFAULT,
|
||||
QuirksMode::NoQuirks,
|
||||
None,
|
||||
None,
|
||||
);
|
||||
|
||||
macro_rules! from_css {
|
||||
($css:expr) => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче