mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
parent
ad6c511a5e
commit
791fa3757d
10 changed files with 106 additions and 9 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue