mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #9930 - rebstar6:htmlclick, r=jdm
Remove activatable element filter within HTMLElement#click() Address https://github.com/servo/servo/issues/6542 Ensure that click() calls are not limited to activatable elements. Also makes the isTrusted attribute false when synthetic click activation are called from a click() method (as per spec). <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9930) <!-- Reviewable:end -->
This commit is contained in:
commit
f2f6787189
9 changed files with 95 additions and 66 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use caseless::compatibility_caseless_match_str;
|
||||
use dom::activation::Activatable;
|
||||
use dom::activation::{Activatable, ActivationSource, synthetic_click_activation};
|
||||
use dom::attr::{Attr, AttrValue};
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
|
||||
|
@ -1091,7 +1091,12 @@ impl Activatable for HTMLInputElement {
|
|||
match submit_button {
|
||||
Some(ref button) => {
|
||||
if button.is_instance_activatable() {
|
||||
button.synthetic_click_activation(ctrlKey, shiftKey, altKey, metaKey)
|
||||
synthetic_click_activation(button.as_element(),
|
||||
ctrlKey,
|
||||
shiftKey,
|
||||
altKey,
|
||||
metaKey,
|
||||
ActivationSource::NotFromClick)
|
||||
}
|
||||
}
|
||||
None => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue