Adam Vandolder
1e9c502e31
Bug 1809689 - Activate first checkbox with activation behaviour. r=edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D166569
2023-01-16 15:32:17 +00:00
Zach Hoffman
54c46a0d93
Bug 1805105 - Drive-by: Remove an unused include leftover from D163780 r=emilio
...
Depends on D164424
Differential Revision: https://phabricator.services.mozilla.com/D164944
2022-12-19 13:06:50 +00:00
Tom Schuster
a93e3a2add
Bug 960984 - Implement the list attribute for <input type=color>. r=emilio,geckoview-reviewers,m_kato
...
UI support on Windows and Linux. macOS and Android are not supported.
Differential Revision: https://phabricator.services.mozilla.com/D163796
2022-12-14 18:17:59 +00:00
Adam Vandolder
354351ea87
Bug 1804270 - Sanitize multiple values in an email input correctly. r=edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D163965
2022-12-12 16:07:56 +00:00
Zach Hoffman
56a611456b
Bug 1803118 - Snap mouse to <input type=range> tick marks r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D163780
2022-12-08 12:27:22 +00:00
Stanca Serban
0310ad663a
Backed out changeset 4970c9b75aad (bug 1803118) for causing wpt failures on range-snap-to-tick-marks. CLOSED TREE
2022-12-08 10:22:52 +02:00
Zach Hoffman
515316f6d4
Bug 1803118 - Snap mouse to <input type=range> tick marks r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D163780
2022-12-08 04:01:28 +00:00
Zach Hoffman
955f66c74f
Bug 1803303 - Make HTMLInputElement::ValueIsStepMismatch() parameter constant r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D163760
2022-12-03 08:57:28 +00:00
Zach Hoffman
2079ccbe42
Bug 1803303 - Do not display input range tick marks that are step mismatches r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D163521
2022-12-02 16:48:40 +00:00
Zach Hoffman
6978315eec
Bug 841942 - Display tick marks for <input type=range> when @list/<datalist> is used r=emilio,credential-management-reviewers,sgalich
...
Differential Revision: https://phabricator.services.mozilla.com/D162882
2022-11-28 22:06:33 +00:00
Jonathan Kew
75c3be2a1e
Bug 1801380 - Don't call RecomputeDirectionality() if the element has dir=auto. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D162462
2022-11-19 21:06:04 +00:00
Jonathan Kew
06ebad6fd8
Bug 1665655 - Implement the HTML spec special-case of directionality for <input type=tel>. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D162133
2022-11-16 15:42:17 +00:00
Norisz Fay
8cfe1317c1
Backed out changeset 37b80bf4bf5a (bug 1665655) for causing multiple StyleSheet related failures CLOSED TREE
2022-11-16 16:57:27 +02:00
Jonathan Kew
03faf8f9cb
Bug 1665655 - Implement the HTML spec special-case of directionality for <input type=tel>. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D162133
2022-11-16 14:12:16 +00:00
Masayuki Nakano
f22596686b
Bug 1795620 - Make it work better to activate/inactivate checkboxes and radio buttons like the other browsers r=smaug
...
First, the test compares `document.querySelector(":active")` and a checkbox or
a radio button. However, Gecko activates ancestor elements too. Therefore,
Gecko returns `<html>` element or `null` for the selector. However, this is
an issue of CSS pseudo class compatibility which is **not** scope of the test.
Therefore, this patch makes it compare `document.querySelector("input:active")`
and a checkbox or a radio button instead.
Next, Gecko does not activate checkboxes and radio buttons when user presses
the space key, but the other browsers do it. Therefore, this patch makes
`HTMLInputElement::PostHandleEvent` do it and
`EventStateManager::PostHandleEvent` clear it at `keyup` of the space key.
Next, Gecko does not inactive active elements when it gets lost focus.
Therefore, this patch makes `nsFocusManager::NotifyFocusStateChange` do it
like the other browsers.
Finally, with manual testing of draft patches, I found some issues of
inactivating them when they are activated by `<label>`s. Therefore, I add new
tests in a separate file. Note that Chrome fails only in the cases testing
`<input type="radio">` with `<label>`.
Differential Revision: https://phabricator.services.mozilla.com/D160494
2022-11-11 13:55:14 +00:00
Adam Vandolder
f7d84f0ab3
Bug 1795887 - Fix IsValueMissing update for certain input types. r=edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D159592
2022-10-22 16:34:48 +00:00
Emilio Cobos Álvarez
d6826d19e4
Bug 1788698 - Force focus rings when focused input switches to text control. r=smaug
...
Seems somewhat reasonable to do this, if we wanted to, since
nsFocusManager also makes these always match :focus-visible.
If you think it's worth doing I can add a test quite trivially.
Differential Revision: https://phabricator.services.mozilla.com/D158186
2022-10-13 14:57:35 +00:00
Jan-Niklas Jaeschke
44ff67ed82
Bug 1679474 - Removed DispatchSelectEvent from HTMLInputElement::PostHandleEvent. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D154776
2022-08-24 09:23:39 +00:00
Adam Vandolder
141360cc00
Bug 1749677 - Do not trigger change, input, or focus events on untrusted keypress events for input elements. r=edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D154854
2022-08-18 13:15:12 +00:00
Emilio Cobos Álvarez
76c821a68d
Bug 1779348 - Clear FileList after files changed. r=smaug
...
This matches Chrome and Safari. Also add a test for FileList being
shareable between DataTransfer and input, which seems to be in the
intention of the spec and matches our pre-existing behavior, the
behavior of input-to-input FileList handling, and Safari, but not
Chrome.
Differential Revision: https://phabricator.services.mozilla.com/D152367
2022-07-21 11:06:18 +00:00
Emilio Cobos Álvarez
569a522d01
Bug 1771806 - Record last interactive value in TextControlState. r=masayuki
...
One unfortunate-ish thing of storing it in TextControlState is that we
can't preserve it across type changes, but that seems ok for now
according to my conversations with Serg.
In the future we might want to move the value to HTMLInputElement itself
or something, we'll see, but this should help folks fix some
long-standing quality issues in the password manager / autofill
implementation.
Differential Revision: https://phabricator.services.mozilla.com/D150148
2022-06-28 08:49:12 +00:00
Kagami Sascha Rosylight
e6f990030e
Bug 1774035 - Stop opening pickers from disabled input elements r=smaug,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D149157
2022-06-14 18:31:09 +00:00
Cristian Tuns
2d9984e456
Backed out changeset f7603664ef19 (bug 1774035) for causing wpt failures on spelling-markers-009.html CLOSED TREE
2022-06-14 13:59:02 -04:00
Kagami Sascha Rosylight
9976ecf87c
Bug 1774035 - Stop opening pickers from disabled input elements r=smaug,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D149157
2022-06-14 17:27:22 +00:00
Butkovits Atila
7b1c9fc461
Backed out changeset 84317cf0446c (bug 1774035) for causing crashes at mozilla::dom::HTMLInputElement. CLOSED TREE
2022-06-14 17:58:59 +03:00
Kagami Sascha Rosylight
7fc6a55ae2
Bug 1774035 - Stop opening pickers from disabled input elements r=smaug,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D149157
2022-06-14 14:14:21 +00:00
Emilio Cobos Álvarez
12bd84f0c5
Bug 1773070 - While at it rename ContentStateChanged to ElementStateChanged, and make it take elements. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D148553
2022-06-07 23:09:54 +00:00
Emilio Cobos Álvarez
47afabb81a
Bug 1773070 - While at it use some better names for some bits. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D148538
2022-06-07 23:09:53 +00:00
Emilio Cobos Álvarez
255763ef57
Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
...
Add a dom/base/rust crate called just "dom" where we can share these.
Most of the changes are automatic:
s/mozilla::EventStates/mozilla::dom::ElementState/
s/EventStates/ElementState/
s/NS_EVENT_STATE_/ElementState::/
s/NS_DOCUMENT_STATE_/DocumentState::/
And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.
Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Emilio Cobos Álvarez
72d2420c2b
Bug 1766395 - Remove dom.forms.datetime-local prefs. r=edgar
...
We shipped this a while ago.
Differential Revision: https://phabricator.services.mozilla.com/D144800
2022-04-27 14:10:27 +00:00
Tom Schuster
eed1aead2d
Bug 1745005 - Add showPicker() to <input> elements. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D142754
2022-04-22 18:43:48 +00:00
criss
1ce796a4ee
Backed out changeset fa6795d107b1 (bug 1745005) for causing multiple failures. CLOSED TREE
2022-04-13 13:23:03 +03:00
Tom Schuster
43b158ae1a
Bug 1745005 - Add showPicker() to <input> elements. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D142754
2022-04-13 07:35:57 +00:00
Edgar Chen
c82b0711e1
Bug 1760560 - Remove directory upload API; r=smaug
...
HTMLInputElement.getFilesAndDirectories is used for testing Directory API, so
still keep it but mark as chrome only.
Differential Revision: https://phabricator.services.mozilla.com/D142444
2022-04-04 09:54:34 +00:00
Emilio Cobos Álvarez
5101af9a94
Bug 1760709 - Take directionality into account when handling left/right on radios. r=smaug
...
We have similar code for range inputs. This matches Blink (but not
WebKit), but I think it's a better default.
The spec seems to leave this up to UAs, so for now landing a
moz-specific WPT. Should be trivial to upstream if we want.
Depends on D141705
Differential Revision: https://phabricator.services.mozilla.com/D141706
2022-03-22 11:10:54 +00:00
Emilio Cobos Álvarez
0b00fcf9fd
Bug 1760709 - Remove some useless namespacing in HTMLInputElement. r=smaug
...
Drive-by cleanups.
Differential Revision: https://phabricator.services.mozilla.com/D141705
2022-03-22 11:10:53 +00:00
Sylvestre Ledru
98949ee751
Bug 1754767 - Remove duplicate includes r=media-playback-reviewers,padenot
...
Differential Revision: https://phabricator.services.mozilla.com/D138441
2022-02-11 10:01:15 +00:00
Emilio Cobos Álvarez
fcbb87eb0f
Bug 1752651 - Clone indeterminateness of input elements. r=smaug
...
Matches other browsers and makes sense.
Differential Revision: https://phabricator.services.mozilla.com/D137442
2022-01-31 13:14:46 +00:00
Ting-Yu Lin
03683daeeb
Bug 1751473 Part 2 - Use CSSIntPoint instead of nsIntPoint in image event handling code. r=emilio
...
The old code operates in the CSS pixel coordinate, so we should use the type
system to express that. With this patch, nsImageControlFrame, nsImageFrame, and
nsImageMap now have no usage of nsIntPoint.
Differential Revision: https://phabricator.services.mozilla.com/D136647
2022-01-22 01:07:19 +00:00
Emilio Cobos Álvarez
8ce808ebbd
Bug 1743047 - Use "reveal" rather than show terminology consistently for the reveal password button. r=Gijs,fluent-reviewers
...
The pseudo-class and nsContextMenu context attribute were using reveal,
the pseudo-element and webidl attribute were using "show".
Use reveal consistently and update the accesskey so that there aren't
conflicts with existing commands. Also enable the feature in
browser_contextmenu_input.js so that this change is tested.
Differential Revision: https://phabricator.services.mozilla.com/D136086
2022-01-17 14:18:51 +00:00
Edgar Chen
8936a84092
Bug 1695636 - Part 3: Do not trigger form submission or click event for untrusted key event; r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D135464
2022-01-12 14:24:02 +00:00
Edgar Chen
a7a61c5630
Bug 1695636 - Part 2: Handle form submission for keypress event in a central place; r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D135675
2022-01-12 14:24:02 +00:00
Edgar Chen
6123594d4f
Bug 1695636 - Part 1: Remove nsresult return value from HTMLInputElement::MaybeSubmitForm; r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D135226
2022-01-12 14:24:01 +00:00
Emilio Cobos Álvarez
5d109f0749
Bug 1749590 - Don't do localization shenanigans for <input type=range>. r=edgar
...
It should never need to deal with a localized value, unlike
<input type=number>.
Differential Revision: https://phabricator.services.mozilla.com/D135673
2022-01-12 04:42:43 +00:00
Emilio Cobos Álvarez
d95d7abddc
Bug 1735076 - Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=smaug
...
Relevant calls are here:
https://searchfox.org/mozilla-central/rev/21a9b72545da06681db97c4b3a2a6be761f4aae5/toolkit/content/widgets/button.js#42-68
This makes sure to set the FLAG_BYKEY properly if needed, instead of passing
down raw flags to nsFocusManager. Clean up a bit while at it.
Let me know if you want a test for this, but we have tests for programmatic
focus and :focus-visible already, so my gut feeling is that testing this
particular XUL-specific change is not super-worth-it...
Differential Revision: https://phabricator.services.mozilla.com/D133690
2021-12-23 18:34:05 +00:00
Noemi Erli
70d14084ab
Backed out changeset 93b9da069dde (bug 1735076) for causing failures in browser_searchbar_openpopup.js CLOSED TREE
2021-12-21 21:53:42 +02:00
Emilio Cobos Álvarez
4a513d4585
Bug 1735076 - Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=smaug
...
Relevant calls are here:
https://searchfox.org/mozilla-central/rev/21a9b72545da06681db97c4b3a2a6be761f4aae5/toolkit/content/widgets/button.js#42-68
This makes sure to set the FLAG_BYKEY properly if needed, instead of passing
down raw flags to nsFocusManager. Clean up a bit while at it.
Let me know if you want a test for this, but we have tests for programmatic
focus and :focus-visible already, so my gut feeling is that testing this
particular XUL-specific change is not super-worth-it...
Differential Revision: https://phabricator.services.mozilla.com/D133690
2021-12-21 18:22:30 +00:00
championshuttler
5e9287bf89
Bug 1724706 - Remove Obsolete comment in HTMLInputElement::AfterSetFilesOrDirectories.r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D132394
2021-11-29 23:18:27 +00:00
Edgar Chen
531ef37175
Bug 1556364 - Part 2-1: Split nsGenericHTMLFormControlElement-only members from nsIConstraintValidation to a separated class; r=smaug
...
As ElementInternal has it own implmentation.
Differential Revision: https://phabricator.services.mozilla.com/D130259
2021-11-26 11:47:39 +00:00
Marian-Vasile Laza
807599b18f
Backed out 5 changesets (bug 1556364) for causing web-platform test failures. CLOSED TREE
...
Backed out changeset dabffbe71a31 (bug 1556364)
Backed out changeset 76fc30f27c39 (bug 1556364)
Backed out changeset f6f7f949551f (bug 1556364)
Backed out changeset c77ef41d43d4 (bug 1556364)
Backed out changeset 2c8c74e99e47 (bug 1556364)
2021-11-26 05:01:08 +02:00