Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Took out the special mouseover cancel case #25240

Merged
merged 2 commits into from Dec 11, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Took out the special mouseover cancel case

  • Loading branch information
pshaughn committed Dec 11, 2019
commit f35a870f5514d6a5aa5205d8926803767e1fa929
@@ -227,14 +227,13 @@ impl CompiledEventListener {
rooted!(in(*cx) let value = value);
let value = value.handle();

//Step 4
let should_cancel = match event.type_() {
atom!("mouseover") => {
value.is_boolean() && value.to_boolean() == true
},
_ => value.is_boolean() && value.to_boolean() == false,
};
//Step 5
let should_cancel = value.is_boolean() && value.to_boolean() == false;

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();
}
}
@@ -3,16 +3,3 @@
[beforeunload listener returning null cancels event]
bug: https://github.com/servo/servo/issues/10787
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

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.