stylo: Use the improved version of Gecko_GetStyleContext()

This commit is contained in:
Emilio Cobos Álvarez 2016-08-11 22:00:22 -07:00
parent ad5fb58e07
commit d85a60e366
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 5 additions and 10 deletions

View file

@ -319,15 +319,10 @@ impl<'ln> TNode for GeckoNode<'ln> {
return None;
}
if pseudo.is_some() {
// FIXME(emilio): This makes us reconstruct frame for pseudos every
// restyle, add a FFI call to get the style context associated with
// a PE.
return None;
}
unsafe {
let context_ptr = Gecko_GetStyleContext(self.node);
let atom_ptr = pseudo.map(|p| p.as_atom().as_ptr())
.unwrap_or(ptr::null_mut());
let context_ptr = Gecko_GetStyleContext(self.node, atom_ptr);
context_ptr.as_ref()
}
}