mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
CSSOM bits for @supports: CSSConditionRule and CSSSupportsRule, with conditionText attribute
This commit is contained in:
parent
1b0842e228
commit
b4a83b6cec
12 changed files with 199 additions and 5 deletions
|
@ -11,7 +11,7 @@ use error_reporting::ParseErrorReporter;
|
|||
#[cfg(feature = "gecko")]
|
||||
use gecko_bindings::sugar::refptr::{GeckoArcPrincipal, GeckoArcURI};
|
||||
use servo_url::ServoUrl;
|
||||
use stylesheets::Origin;
|
||||
use stylesheets::{MemoryHoleReporter, Origin};
|
||||
|
||||
/// Extra data that the style backend may need to parse stylesheets.
|
||||
#[cfg(not(feature = "gecko"))]
|
||||
|
@ -78,6 +78,11 @@ impl<'a> ParserContext<'a> {
|
|||
let extra_data = ParserContextExtraData::default();
|
||||
Self::new_with_extra_data(stylesheet_origin, base_url, error_reporter, extra_data)
|
||||
}
|
||||
|
||||
/// Create a parser context for on-the-fly parsing in CSSOM
|
||||
pub fn new_for_cssom(base_url: &'a ServoUrl) -> ParserContext<'a> {
|
||||
Self::new(Origin::User, base_url, Box::new(MemoryHoleReporter))
|
||||
}
|
||||
}
|
||||
|
||||
/// Defaults to a no-op.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue