mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Took out the special mouseover cancel case
This commit is contained in:
parent
b19b778fef
commit
f35a870f55
2 changed files with 6 additions and 20 deletions
|
@ -227,14 +227,13 @@ impl CompiledEventListener {
|
||||||
rooted!(in(*cx) let value = value);
|
rooted!(in(*cx) let value = value);
|
||||||
let value = value.handle();
|
let value = value.handle();
|
||||||
|
|
||||||
//Step 4
|
//Step 5
|
||||||
let should_cancel = match event.type_() {
|
let should_cancel = value.is_boolean() && value.to_boolean() == false;
|
||||||
atom!("mouseover") => {
|
|
||||||
value.is_boolean() && value.to_boolean() == true
|
|
||||||
},
|
|
||||||
_ => value.is_boolean() && value.to_boolean() == false,
|
|
||||||
};
|
|
||||||
if should_cancel {
|
if should_cancel {
|
||||||
|
// spec says to set the cancelled flag directly
|
||||||
|
// here, not just to prevent default;
|
||||||
|
// can that ever make a difference?
|
||||||
event.PreventDefault();
|
event.PreventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,3 @@
|
||||||
[beforeunload listener returning null cancels event]
|
[beforeunload listener returning null cancels event]
|
||||||
bug: https://github.com/servo/servo/issues/10787
|
bug: https://github.com/servo/servo/issues/10787
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[mouseover listener returning false cancels event (using Event)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[mouseover listener returning false cancels event (using MouseEvent)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[mouseover listener returning true doesn't cancel event (using Event)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[mouseover listener returning true doesn't cancel event (using MouseEvent)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue