diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2014-08-12 21:41:45 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2014-08-16 08:31:23 +0100 |
commit | 6a5fed0471566812f417789070db31f58739c077 (patch) | |
tree | 921305f87dc8b443c3dd6263029c376c4dca2c46 | |
parent | 0945bd9fb4e01c7c23213e658602d6944bba972a (diff) | |
download | servo-6a5fed0471566812f417789070db31f58739c077.tar.gz servo-6a5fed0471566812f417789070db31f58739c077.zip |
Dissallow !important in @font-face
-rw-r--r-- | src/components/style/font_face.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/style/font_face.rs b/src/components/style/font_face.rs index f46ad635dcb..2c3771ebbcc 100644 --- a/src/components/style/font_face.rs +++ b/src/components/style/font_face.rs @@ -54,8 +54,11 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_ match item { DeclAtRule(rule) => log_css_error( rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()), - Declaration(Declaration{ location: location, name: name, value: value, important: _}) => { - + Declaration(Declaration{ location, name, value, important }) => { + if important { + log_css_error(location, "!important is not allowed on @font-face descriptors"); + continue + } let name_lower = name.as_slice().to_ascii_lower(); match name_lower.as_slice() { "font-family" => { |