mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Issue 12343: Add pref-gated methods and test for activatable element states
This commit is contained in:
parent
8cd4b772e9
commit
a9de84ab49
6 changed files with 98 additions and 0 deletions
|
@ -2087,6 +2087,27 @@ impl ElementMethods for Element {
|
|||
// Step 4.
|
||||
self.insert_adjacent(position, fragment.upcast()).map(|_| ())
|
||||
}
|
||||
|
||||
// check-tidy: no specs after this line
|
||||
fn EnterFormalActivationState(&self) -> ErrorResult {
|
||||
match self.as_maybe_activatable() {
|
||||
Some(a) => {
|
||||
a.enter_formal_activation_state();
|
||||
return Ok(());
|
||||
},
|
||||
None => return Err(Error::NotSupported)
|
||||
}
|
||||
}
|
||||
|
||||
fn ExitFormalActivationState(&self) -> ErrorResult {
|
||||
match self.as_maybe_activatable() {
|
||||
Some(a) => {
|
||||
a.exit_formal_activation_state();
|
||||
return Ok(());
|
||||
},
|
||||
None => return Err(Error::NotSupported)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn fragment_affecting_attributes() -> [Atom; 3] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue