diff --git a/components/style/gecko_selector_impl.rs b/components/style/gecko_selector_impl.rs index 7002483e95b..d78349af2aa 100644 --- a/components/style/gecko_selector_impl.rs +++ b/components/style/gecko_selector_impl.rs @@ -34,7 +34,7 @@ pub struct PseudoElement(Atom, bool); impl PseudoElement { #[inline] - fn as_atom(&self) -> &Atom { + pub fn as_atom(&self) -> &Atom { &self.0 } diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 95cc6de7cb3..d8697e7611a 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -455,7 +455,7 @@ impl Clone for ${style_struct.gecko_struct_name} { impl Debug for ${style_struct.gecko_struct_name} { // FIXME(bholley): Generate this. fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "GECKO STYLE STRUCT") + write!(f, "Gecko style struct: ${style_struct.gecko_struct_name}") } } %else: diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs index 62fc84a36fe..5d35acf6ef7 100644 --- a/ports/geckolib/wrapper.rs +++ b/ports/geckolib/wrapper.rs @@ -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() } }