Implement the :focus pseudo-class selector

Fixes #5460. This supports for simple focusable elements that are their own
DOM anchors, like text `input` fields.
This commit is contained in:
Matt Brubeck 2015-03-30 10:39:13 -07:00
parent ad6c511a5e
commit 791fa3757d
10 changed files with 106 additions and 9 deletions

View file

@ -581,6 +581,14 @@ impl<'le> TElement<'le> for LayoutElement<'le> {
}
}
#[inline]
fn get_focus_state(self) -> bool {
unsafe {
let node: &Node = NodeCast::from_actual(self.element);
node.get_focus_state_for_layout()
}
}
#[inline]
fn get_id(self) -> Option<Atom> {
unsafe {