LibWeb/HTML: Make disabled items immutable & fix disabled activations #3120
+11
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follows
HTMLInputElement::activation_behavior
closer to specifications.Previously, these disabled form input elements wouldn't be able to be activated via user interaction, but they would be able to be activated via JavaScript (at least in some conditions).
As for the changes in
FormAssociatedTextControlElement::is_mutable
, it seems to me that it makes sense for disabled input items to also not be mutable, though I didn't personally find the spec entirely clear in that regard. Afterwards, as a sanity check, I looked at what Firefox and WebKit do, and they seem to also register a form input element as immutable if it is disabled, I believe for all form input types, thus I believe this change is correct.Fixes 3 WPT tests.