mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Store raw string for prop decl in @supports
This commit is contained in:
parent
4616f4ae77
commit
adee1e403c
2 changed files with 26 additions and 31 deletions
|
@ -30,7 +30,11 @@ impl CSS {
|
|||
|
||||
/// https://drafts.csswg.org/css-conditional/#dom-css-supports
|
||||
pub fn Supports(win: &Window, property: DOMString, value: DOMString) -> bool {
|
||||
let decl = Declaration { prop: property.into(), val: value.into() };
|
||||
let mut decl = String::new();
|
||||
serialize_identifier(&property, &mut decl).unwrap();
|
||||
decl.push_str(": ");
|
||||
decl.push_str(&value);
|
||||
let decl = Declaration(decl);
|
||||
let url = win.Document().url();
|
||||
let context = ParserContext::new_for_cssom(&url, win.css_error_reporter(), Some(CssRuleType::Supports),
|
||||
PARSING_MODE_DEFAULT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue