Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Less messy namespace handling. #18142

Merged
merged 4 commits into from Aug 18, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

style: Fix namespace handling during keyframe parsing.

  • Loading branch information
emilio committed Aug 18, 2017
commit 62d42a090b796e2bb46f675d98f56d6c0144018e
@@ -214,12 +214,16 @@ impl Keyframe {
) -> Result<Arc<Locked<Self>>, 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);

@@ -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| {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.