Commit graph

870 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
fcb7180d6f Bug 1898214 - Implement min/max-derived sizing for <input type=number>. r=smaug
See https://github.com/whatwg/html/issues/10390 for the spec issue.

Differential Revision: https://phabricator.services.mozilla.com/D212545
2024-06-06 17:38:26 +00:00
Stanca Serban
23e355d524 Backed out changeset cd09151a1c46 (bug 1898214) for causing OS X wpt failures in transform-input-014.html. 2024-06-05 18:46:28 +03:00
Emilio Cobos Álvarez
631a06aa55 Bug 1898214 - Implement min/max-derived sizing for <input type=number>. r=smaug
See https://github.com/whatwg/html/issues/10390 for the spec issue.

Differential Revision: https://phabricator.services.mozilla.com/D212545
2024-06-05 11:47:14 +00:00
Iulian Moraru
51e39ebc5a Backed out changeset a00be88f3708 (bug 1877969) for causing multiple failures. CLOSED TREE 2024-06-04 16:49:11 +03:00
Oliver Medhurst
9fb1089f58 Bug 1877969 - Consume user activation when showing any picker r=dom-core,edgar
Consume transient user activation when showing file/color picker
at any time. Do not open if there is no transent user activation.

Spec PR: https://github.com/whatwg/html/pull/10344

Differential Revision: https://phabricator.services.mozilla.com/D201096
2024-06-04 11:33:36 +00:00
Neil Deakin
1515db9b71 Bug 1849122, allowing getting and modifying the autofill state directly within the input and select elements, and reset this state when its value changes, r=webidl,emilio
Resetting the state when the value is modified is bug 1359355.

Differential Revision: https://phabricator.services.mozilla.com/D210999
2024-05-28 23:39:59 +00:00
Olli Pettay
c10f141eb1 Bug 1897194 - Form-associated custom elements shouldn't have special handling for :read-write, r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D210868
2024-05-21 12:53:14 +00:00
James Teh
51d57d627a Bug 1892529: Skip hidden radio buttons when determining which radio button to focus. r=smaug
This fixes two problems:
1. If no radio button is checked and the first radio button is hidden, tabbing will reach the first visible radio button in the group, rather than just skipping the group.
2. If you press down arrow or up arrow and the next/previous radio button is hidden, focus will move to the next/previous visible radio button in the group, rather than doing nothing.

Differential Revision: https://phabricator.services.mozilla.com/D208092
2024-05-09 00:14:55 +00:00
Emilio Cobos Álvarez
3b42787268 Bug 1895208 - Refactor IsFocusable checks to take flags rather than bool arguments. r=smaug
This doesn't change behavior on its own, but it's likely we want to make
the tab focusability more complicated in bug 1895184, and this will make
changes to this area less painful.

Differential Revision: https://phabricator.services.mozilla.com/D209525
2024-05-06 21:54:37 +00:00
Emilio Cobos Álvarez
50eb344091 Bug 1893532 - Improve error message of HTMLInputElement.stepUp/stepDown. r=dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D208671
2024-05-01 00:11:33 +00:00
Emilio Cobos Álvarez
21004d3133 Bug 1888595 - Auto directionality of non-value-associated form elements should always be LTR. r=smaug
https://html.spec.whatwg.org/#auto-directionality always returns null,
effectively, so should default to always LTR. Inheriting of the parent
directionality wouldn't be handled correctly because we stop the
inheritance on dir=auto boundaries.

Differential Revision: https://phabricator.services.mozilla.com/D206236
2024-04-02 17:38:03 +00:00
James Teh
2732325a2d Bug 1267488: If no HTML input radio in a group is checked, only make the first radio in the group tabbable instead of all of them. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D202681
2024-03-08 07:03:28 +00:00
pstanciu
fb35bf7f98 Backed out changeset cb88e52676eb (bug 1267488) for causing bc failures on browser_quicksuggest_onboardingDialog.js. CLOSED TREE 2024-03-07 10:52:55 +02:00
James Teh
ca3d111fc5 Bug 1267488: If no HTML input radio in a group is checked, only make the first radio in the group tabbable instead of all of them. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D202681
2024-03-07 05:27:32 +00:00
Cristian Tuns
00c185526c Backed out changeset 1d4643ee0900 (bug 1267488) for causing mochitest failures in test_focus.xhtml CLOSED TREE 2024-03-05 23:24:53 -05:00
James Teh
476b707508 Bug 1267488: If no HTML input radio in a group is checked, only make the first radio in the group tabbable instead of all of them. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D202681
2024-03-05 23:51:48 +00:00
Gregory Pappas
3ea20569e6 Bug 1881845 - Remove nsContentCID.h r=smaug,media-playback-reviewers,karlt
All of these components have been converted to static registration, making this
file unneeded.

Differential Revision: https://phabricator.services.mozilla.com/D202633
2024-03-04 23:41:05 +00:00
Gregory Pappas
91cace0cc3 Bug 1878401 - part 1 - Pass BrowsingContext to nsIFilePicker::Init instead of mozIDOMWindow r=geckoview-reviewers,win-reviewers,emilio,nika,m_kato,rkraesig
This will improve the situation in bug 1878336

Differential Revision: https://phabricator.services.mozilla.com/D200546
2024-02-28 21:29:37 +00:00
Sandor Molnar
3951121cc6 Backed out 8 changesets (bug 1878401, bug 1879041) for causing build bustages on widget/nsBaseFilePicker.cpp CLOSED TREE
Backed out changeset 2e2b8df3bdd6 (bug 1879041)
Backed out changeset 6d6952f9df2c (bug 1878401)
Backed out changeset 30b5bb590d3e (bug 1878401)
Backed out changeset 9a4b830334b9 (bug 1878401)
Backed out changeset 3c3d67f1fcb7 (bug 1878401)
Backed out changeset c83ba4026822 (bug 1878401)
Backed out changeset 6bcb670ce475 (bug 1878401)
Backed out changeset f263b196df96 (bug 1878401)
2024-02-28 17:56:48 +02:00
Gregory Pappas
3a68e28b52 Bug 1878401 - part 1 - Pass BrowsingContext to nsIFilePicker::Init instead of mozIDOMWindow r=geckoview-reviewers,win-reviewers,emilio,nika,m_kato,rkraesig
This will improve the situation in bug 1878336

Differential Revision: https://phabricator.services.mozilla.com/D200546
2024-02-28 15:07:44 +00:00
Emilio Cobos Álvarez
8925ee2d3d Bug 1881011 - Refactor UnbindFromTree to take a context argument. r=smaug
Much like BindToTree.

This will be useful because I need to pass more information through
UnbindFromTree() to speed up dir=auto for bug 1874040.

Differential Revision: https://phabricator.services.mozilla.com/D202215
2024-02-20 15:05:40 +00:00
Edgar Chen
2cf6a52b74 Bug 1871424 - Make input checkbox/radio in link element work again; r=vhilla,dom-core,smaug
The root cause of issue is that the link elements have not yet adopted the
activation behavior defined in the specification. The appropriate  behavior/model
for links is still under discussion, https://github.com/whatwg/html/issues/1576.
For now, we aim for making it consistent with other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D197393
2024-01-30 09:24:45 +00:00
Greg Stoll
0e786b6070 Bug 1872179 - Part 3: File picker file uploads consult content analysis r=rkraesig,win-reviewers
File picker upload operations check with any connected content analysis
tool before giving access to the web page.

Differential Revision: https://phabricator.services.mozilla.com/D198456
2024-01-22 13:56:07 +00:00
Emilio Cobos Álvarez
71838e2f11 Bug 1850295 - Update :user-{valid,invalid} to follow the spec. r=smaug
(Modulo open spec issues linked in comments)

Differential Revision: https://phabricator.services.mozilla.com/D196986
2024-01-16 11:09:01 +00:00
Emilio Cobos Álvarez
9231eae657 Bug 1856156 - Make Directionality an enum class. r=smaug
A bit neater this way.

Differential Revision: https://phabricator.services.mozilla.com/D198590
2024-01-15 19:35:44 +00:00
Emilio Cobos Álvarez
72ccddb050 Bug 1856156 - Recompute auto directionality on input type changes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D198588
2024-01-15 19:35:43 +00:00
Narcis Beleuzu
56eab566cd Backed out changeset 5431daa798c7 (bug 1871424) for causing Bug 1873472 2024-01-12 11:52:07 +02:00
Edgar Chen
f9dcb72748 Bug 1871424 - Make input checkbox/radio in link element work again; r=vhilla,dom-core
The root cause of issue is that the link elements have not yet adopted the
activation behavior defined in the specification. This patch add a hacky way to
avoid link elements perform activation behavior if it has a child input element
which will perform activation behavior. This patch introduces new flags instead of
reusing the exiting ones, allowing us to uplift this patch more safely.

Differential Revision: https://phabricator.services.mozilla.com/D197393
2024-01-02 15:52:25 +00:00
Vincent Hilla
d83fd88bed Bug 1858084 - Make dir=auto and dirname apply to more input types. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D194878
2023-12-19 18:17:22 +00:00
Makoto Kato
e6f195490f Bug 1853797 - HTMLInputElement.showPicker should show the picker on GeckoView even if type is month or week. r=geckoview-reviewers,emilio,ohall
This seems to be a regression by bug 1824323. If we turn on
`dom.forms.datetime.others=true`, we should dispatch `MozOpenDateTimePicker`
event simply.

Differential Revision: https://phabricator.services.mozilla.com/D194760
2023-12-06 02:46:30 +00:00
Masayuki Nakano
4bb761eb3e Bug 1863759 - Make IMEStateManager recreate IMEContentObserver if the active one is not observing editable content of focused element r=smaug,m_kato
The test case is a special case that changes focused element from a text control
to an editing host.  Therefore, without a focus change, focused editor is
changed from a `TextEditor` to `HTMLEditor`.  At this time, `IMEContentObserver`
needs to switch the observing target from the anonymous content if `<input>` to
children of it.

However, the editable content becomes completely changed without a focus change
in the DOM.  Therefore, `IMEStateManager` needs to synthesize a fake focus move
for IME.  Therefore, this patch make `IMEStateManager` recreate
`IMEContentObserver` if active one is not observing editable content for the
focused element under "current" conditions at checking it.  (When
`IMEContentObserver` is being destroyed, it sends "blur" notification to IME
and the new `IMEContentObserver` instance posts "focus" notification with
all editable content data.  I.e., recreating `IMEContentObserver` generates
a fake focus move from IME point of view.)

Additionally, there is the opposite case, that is, editing host of an `<input>`
whose type is not a text control may become a text control.  Therefore, this
adds new WPTs to check the handler is the text editor for the text control or
the HTML editor.  The tests passed on Firefox and Chrome at least.

FYI: I guess that in this case, we need to kick `focus` event listener of the
`HTMLEditor`, but anyway, users cannot change the content because it's the
case that an atomic content is the editing host.  Therefore, I don't touch
about that in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D193262
2023-12-05 02:33:18 +00:00
Issam Mani
9335c0b54b Bug 1864379 - P3. Remove obsolete PWMGR_PASSWORD_INPUT_IN_FORM telemetry probe. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D194770
2023-12-04 11:39:20 +00:00
Issam Mani
1149ca2518 Bug 1864379 - P1. Don't dispatch LoginManager DOM events for disconnected input elements. r=dimi,emilio
Differential Revision: https://phabricator.services.mozilla.com/D194768
2023-12-04 11:39:19 +00:00
Olli Pettay
3b643c8c3a Bug 1832026, create TextControlState lazily, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D195383
2023-12-04 10:59:34 +00:00
Stanca Serban
7e0c99b7ee Backed out 3 changesets (bug 1851970) for causing mochitests failures in browser_aboutNetError_csp_iframe.js.
Backed out changeset a2536c6c6c23 (bug 1851970)
Backed out changeset 23ddc229d1a1 (bug 1851970)
Backed out changeset b99a620a535c (bug 1851970)
2023-11-28 18:43:55 +02:00
Vincent Hilla
55400d97a2 Bug 1851970 - Part 2: Activation behavior method for links. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D183991
2023-11-28 14:09:02 +00:00
Sandor Molnar
b7fe69a4ab Backed out changeset 4c7dab5cb50c (bug 1864291) for causing multiple failures on test_input_color_picker_popup.html / forms/browser_selectpopup_invoke.js CLOSED TREE 2023-11-15 19:44:05 +02:00
Luke Warlow
ed12e0d2d0 Bug 1864291 - Implements HandleInvokeInternal for select and input elements. r=smaug
Implements invoketarget defaults for select and input element, as specified in the open-ui "Invokers explainer".

(https://open-ui.org/components/invokers.explainer/)

Differential Revision: https://phabricator.services.mozilla.com/D193363
2023-11-15 14:20:48 +00:00
keithamus
c9c6527520 Bug 1857887 - Add invoketarget & invoketarget action attributes r=smaug
This adds support for the experimental `invoketarget` and `invokeaction`
attributes, as specified in the open-ui "Invokers" explainer.

(https://open-ui.org/components/invokers.explainer/)

The `invoketarget` attribute maps to the IDL `invokeTargetElement`,
similar to `popoverTargetElement`, and the `invokeaction` is a freeform
string.

The Button behaviour checks for `invokeTargetElement` in its activation
behaviour, and dispatches an `InvokeEvent` if there is one.

This also adds some basic scaffolding for `handleInvokeInternal` which
will allow elements to provide their own invocation action algorithms.

Differential Revision: https://phabricator.services.mozilla.com/D190449
2023-11-08 13:41:51 +00:00
Vincent Hilla
3f852adf17 Bug 1855633 - Part 2: Activation behavior method for button element. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D183989
2023-10-30 09:39:27 +00:00
Vincent Hilla
b88dc29857 Bug 1855633 - Part 1: Use activation behavior for submit and image input type. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D187185
2023-10-30 09:39:26 +00:00
Emilio Cobos Álvarez
0eefa79090 Bug 1861346 - Update indeterminate state when getting added or removed from a radio group. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D191949
2023-10-27 15:30:45 +00:00
Emilio Cobos Álvarez
ac4f977dc8 Bug 1857506 - Localize final value if needed for input value setter. r=edgar
This restores pre-existing behavior, and adds tests.

Differential Revision: https://phabricator.services.mozilla.com/D190581
2023-10-10 15:12:10 +00:00
Jan Varga
c458754592 Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189226
2023-09-28 20:46:07 +00:00
Adam Vandolder
3198d33ca2 Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162349
2023-09-28 15:47:11 +00:00
Natalia Csoregi
1497f6f44d Backed out changeset 8f8492410799 (bug 1685926) for causing bustage on SVGAnimatedPathSegList.cpp. CLOSED TREE 2023-09-28 10:40:31 +03:00
Adam Vandolder
226c8aba6a Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162349
2023-09-28 06:35:44 +00:00
Cristian Tuns
8ce555ea94 Backed out changeset 37ade77d181e (bug 1685926) for causing build bustages in PerformanceEventTiming.cpp CLOSED TREE 2023-09-25 12:40:22 -04:00
Adam Vandolder
190df7c40c Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162349
2023-09-25 14:39:08 +00:00
Vincent Hilla
dfde72b50b Bug 1658996 - Part 2: Activation behavior method for non-form submission input elements. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D183988
2023-09-07 09:33:51 +00:00