From 62d42a090b796e2bb46f675d98f56d6c0144018e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 18 Aug 2017 16:34:55 +0200 Subject: [PATCH] style: Fix namespace handling during keyframe parsing. --- components/style/stylesheets/keyframes_rule.rs | 16 ++++++++++------ ports/geckolib/glue.rs | 4 ---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/style/stylesheets/keyframes_rule.rs b/components/style/stylesheets/keyframes_rule.rs index 8f02f1ab77b..fd7117a2505 100644 --- a/components/style/stylesheets/keyframes_rule.rs +++ b/components/style/stylesheets/keyframes_rule.rs @@ -214,12 +214,16 @@ impl Keyframe { ) -> Result>, ParseError<'i>> { let url_data = parent_stylesheet_contents.url_data.read(); let error_reporter = NullReporter; - let context = ParserContext::new(parent_stylesheet_contents.origin, - &url_data, - &error_reporter, - Some(CssRuleType::Keyframe), - PARSING_MODE_DEFAULT, - parent_stylesheet_contents.quirks_mode); + let namespaces = parent_stylesheet_contents.namespaces.read(); + let mut context = ParserContext::new( + parent_stylesheet_contents.origin, + &url_data, + &error_reporter, + Some(CssRuleType::Keyframe), + PARSING_MODE_DEFAULT, + parent_stylesheet_contents.quirks_mode + ); + context.namespaces = Some(&*namespaces); let mut input = ParserInput::new(css); let mut input = Parser::new(&mut input); diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 15da0d78158..ddd46a84b83 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -1509,10 +1509,6 @@ pub extern "C" fn Servo_KeyframesRule_AppendRule( let contents = StylesheetContents::as_arc(&contents); let global_style_data = &*GLOBAL_STYLE_DATA; - // FIXME(emilio): What happens with namespaces here? - // - // We seem to ignore it, but someone could still set content: attr(..) from - // a declaration inside the keyframe block. match Keyframe::parse(css, &contents, &global_style_data.shared_lock) { Ok(keyframe) => { write_locked_arc(rule, |rule: &mut KeyframesRule| {