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:
Manish Goregaokar 2014-11-23 08:28:05 +05:30
parent 03207dea81
commit 2ed9626f1a
2 changed files with 17 additions and 4 deletions

View file

@ -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