mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Fix namespace handling during keyframe parsing.
This commit is contained in:
parent
a962c54928
commit
62d42a090b
2 changed files with 10 additions and 10 deletions
|
@ -214,12 +214,16 @@ impl Keyframe {
|
||||||
) -> Result<Arc<Locked<Self>>, ParseError<'i>> {
|
) -> Result<Arc<Locked<Self>>, ParseError<'i>> {
|
||||||
let url_data = parent_stylesheet_contents.url_data.read();
|
let url_data = parent_stylesheet_contents.url_data.read();
|
||||||
let error_reporter = NullReporter;
|
let error_reporter = NullReporter;
|
||||||
let context = ParserContext::new(parent_stylesheet_contents.origin,
|
let namespaces = parent_stylesheet_contents.namespaces.read();
|
||||||
&url_data,
|
let mut context = ParserContext::new(
|
||||||
&error_reporter,
|
parent_stylesheet_contents.origin,
|
||||||
Some(CssRuleType::Keyframe),
|
&url_data,
|
||||||
PARSING_MODE_DEFAULT,
|
&error_reporter,
|
||||||
parent_stylesheet_contents.quirks_mode);
|
Some(CssRuleType::Keyframe),
|
||||||
|
PARSING_MODE_DEFAULT,
|
||||||
|
parent_stylesheet_contents.quirks_mode
|
||||||
|
);
|
||||||
|
context.namespaces = Some(&*namespaces);
|
||||||
let mut input = ParserInput::new(css);
|
let mut input = ParserInput::new(css);
|
||||||
let mut input = Parser::new(&mut input);
|
let mut input = Parser::new(&mut input);
|
||||||
|
|
||||||
|
|
|
@ -1509,10 +1509,6 @@ pub extern "C" fn Servo_KeyframesRule_AppendRule(
|
||||||
let contents = StylesheetContents::as_arc(&contents);
|
let contents = StylesheetContents::as_arc(&contents);
|
||||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
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) {
|
match Keyframe::parse(css, &contents, &global_style_data.shared_lock) {
|
||||||
Ok(keyframe) => {
|
Ok(keyframe) => {
|
||||||
write_locked_arc(rule, |rule: &mut KeyframesRule| {
|
write_locked_arc(rule, |rule: &mut KeyframesRule| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue