mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Some reorganization of activation code:
- Make method name apply to trait implementor better (When a user agent is to run post-click activation steps on an element, it must run the activation behavior defined for that element) - Mention invariants and conditions on authentic_click_activation
This commit is contained in:
parent
03207dea81
commit
2ed9626f1a
2 changed files with 17 additions and 4 deletions
|
@ -23,7 +23,7 @@ pub trait Activatable : Copy {
|
|||
fn canceled_activation(&self);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#run-post-click-activation-steps
|
||||
fn post_click_activation(&self);
|
||||
fn activation_behavior(&self);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#run-synthetic-click-activation-steps
|
||||
fn synthetic_click_activation(&self, ctrlKey: bool, shiftKey: bool, altKey: bool, metaKey: bool) {
|
||||
|
@ -52,7 +52,8 @@ pub trait Activatable : Copy {
|
|||
if event.DefaultPrevented() {
|
||||
self.canceled_activation();
|
||||
} else {
|
||||
self.post_click_activation();
|
||||
// post click activation
|
||||
self.activation_behavior();
|
||||
}
|
||||
|
||||
// Step 6
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue