mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Issue 8719: Add basic support for :active selector
This commit is contained in:
parent
80cb0cf821
commit
421c354d44
5 changed files with 63 additions and 2 deletions
|
@ -2519,8 +2519,13 @@ impl Element {
|
|||
self.state.get().contains(IN_ACTIVE_STATE)
|
||||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#concept-selector-active
|
||||
pub fn set_active_state(&self, value: bool) {
|
||||
self.set_state(IN_ACTIVE_STATE, value)
|
||||
self.set_state(IN_ACTIVE_STATE, value);
|
||||
|
||||
if let Some(parent) = self.upcast::<Node>().GetParentElement() {
|
||||
parent.set_active_state(value);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn focus_state(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue