Commit Graph

212 Commits

Author SHA1 Message Date
Geoff Brown
56ca134785 Bug 1579272 - Cleanup obviously fennec-centric test annotations; r=bc
Remove test manifest annotations that specifically target fennec,
or likely target the android 4.3 emulator.

Differential Revision: https://phabricator.services.mozilla.com/D45018

--HG--
extra : moz-landing-system : lando
2019-09-06 16:51:10 +00:00
Mark Banner
709c7ccf0c Bug 1577746 - Automatically enable more ESLint rules for dom/. r=baku
This enables:
- mozilla/no-useless-parameters
- mozilla/no-useless-run-test
- no-extra-boolean-cast
- no-unneeded-ternary

Depends on D44150

Differential Revision: https://phabricator.services.mozilla.com/D44151

--HG--
extra : moz-landing-system : lando
2019-09-02 11:23:26 +00:00
Mark Banner
acd70816c6 Bug 1577746 - Enable ESLint rule dot-notation for dom/. r=baku
Depends on D44149

Differential Revision: https://phabricator.services.mozilla.com/D44150

--HG--
extra : moz-landing-system : lando
2019-09-02 11:23:05 +00:00
Mark Banner
351d147e2f Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44149

--HG--
extra : moz-landing-system : lando
2019-09-02 11:22:27 +00:00
Kris Maglione
f93c2909dd Bug 1573254: Part 2 - Update tests to await snapshotWindow when necessary. r=mccr8
This fixes several tests which snapshot remote windows under Fission. It also
changes some other arbitrary tests that don't use remote windows, which I
changed before I gave up on having an always-async API.

Differential Revision: https://phabricator.services.mozilla.com/D41630

--HG--
extra : rebase_source : 6203b7065f7651e6ed4a2695ff2bd92daec70634
2019-08-12 12:56:25 -07:00
Emilio Cobos Álvarez
da047c3d7f Bug 1567191 - Move datetime input widget attribute handling code to HTMLInputElement. r=smaug
It's the only sound place now that we use Shadow DOM, since the widget exists
when we have no frames.

Differential Revision: https://phabricator.services.mozilla.com/D40509
2019-08-05 22:11:57 +02:00
Emilio Cobos Álvarez
84e7522250 Bug 1561787 - Make readonly date / time input clear button disabled. r=smaug
The time input widget was missing a call to updateEditAttributes which was
caught by the test, which can be seen without this patch by going to:

data:text/html,<input type="time" disabled value="20:40">

Toggling the 'disabled' attribute back and forth fixes the rendering.

Differential Revision: https://phabricator.services.mozilla.com/D40503
2019-08-05 22:11:56 +02:00
Emilio Cobos Álvarez
aef0223323 Bug 1461509 - Don't allow clearing fields in date / time inputs when using backspace if disabled or readonly. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40485
2019-08-05 22:11:55 +02:00
François Freitag
b81795066d Bug 1479708 - Hide required date time input reset button. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39315

--HG--
extra : moz-landing-system : lando
2019-07-25 10:28:52 +00:00
Andreea Pavel
442c23063f Backed out changeset a506f9517ba2 (bug 1479708) for failing test_input_datetime_reset_button.html on a CLOSED TREE 2019-07-25 12:44:04 +03:00
François Freitag
e66c63b690 Bug 1479708 - Hide required date time input reset button. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D38624

--HG--
extra : moz-landing-system : lando
2019-07-25 07:26:13 +00:00
Victor Porof
0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35951

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Mark Banner
201255ab84 Bug 1558485 - Turn on ESLint for all of dom/ disabling most of the failing rules. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34761

--HG--
extra : moz-landing-system : lando
2019-06-13 20:21:46 +00:00
Jonathan Kingston
a5ba216f93 Bug 1315460 - Removal of keygen element r=keeler,baku,jld,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D22810

--HG--
extra : moz-landing-system : lando
2019-06-13 08:58:07 +00:00
Olli Pettay
05d684ebd3 Bug 1558546, ensure range element has a frame before starting drag operation, r=hsivonen
This should be the minimal patch to fix the issue (should be safe for branches too).

Reusing an existing mouse/touch test for the crash testing.

Differential Revision: https://phabricator.services.mozilla.com/D34717

--HG--
extra : moz-landing-system : lando
2019-06-12 15:53:48 +00:00
Mark Banner
ea1728721a Bug 1558527 - Fix various issues related to shadowing of variables in dom/ code. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D34588

--HG--
extra : moz-landing-system : lando
2019-06-12 08:29:58 +00:00
Emilio Cobos Álvarez
1e7b303431 Bug 1539469 - Make all input elements display: inline-block, for compat with other UAs. r=mats
See https://github.com/whatwg/html/issues/4082 for the data and some comments
from Boris and David.

I didn't look into fixing the font-inflation reftests, see bug 1540176 for that.

Differential Revision: https://phabricator.services.mozilla.com/D25566

--HG--
extra : moz-landing-system : lando
2019-06-04 15:39:47 +00:00
Makoto Kato
10d8e97c57 Bug 1556330 - Turn on test_input_number_l10n.html and test_input_number_validation.html on Android. r=smaug
This tests are passed since ICU is already turned on Android.

Differential Revision: https://phabricator.services.mozilla.com/D33463

--HG--
extra : moz-landing-system : lando
2019-06-03 09:53:57 +00:00
Andreea Pavel
f553e66590 Backed out 2 changesets (bug 1495363) for causing bug 1542912 a=backout
Backed out changeset 1d6b361c337a (bug 1495363)
Backed out changeset 7973453599bb (bug 1495363)

--HG--
extra : rebase_source : a229beaff397ed384109715ff3bf1a205a865d1d
2019-05-16 14:43:59 +03:00
Brian Grinstead
381332c51e Bug 1544051 - Part 3 - Scripted change to remove references to AddTask.js r=ahal
This was generated with the script at https://bug1544051.bmoattachments.org/attachment.cgi?id=9058672

Differential Revision: https://phabricator.services.mozilla.com/D27761

--HG--
extra : moz-landing-system : lando
2019-04-18 16:51:01 +00:00
Mirko Brodesser
c3de4ebcfa Bug 1057858: ensure all frames for '<input type="number">' are created before choosing the nested element to be focused. r=smaug
- Avoids undesired bluring and focusing of '<input type="number">' and its nested elements.

- Add tests for two scenarios where this could occur.

Differential Revision: https://phabricator.services.mozilla.com/D27684

--HG--
extra : moz-landing-system : lando
2019-04-17 07:01:34 +00:00
Brian Grinstead
0d460e3432 Bug 1544322 - Part 2.2 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in dom/ r=bzbarsky
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

Differential Revision: https://phabricator.services.mozilla.com/D27457

--HG--
extra : moz-landing-system : lando
2019-04-16 03:53:28 +00:00
Brian Grinstead
6515f97bcb Bug 1544322 - Part 1 - Remove the [type] attribute for one-liner <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 1` argument.

Differential Revision: https://phabricator.services.mozilla.com/D26812

--HG--
extra : moz-landing-system : lando
2019-04-15 20:56:58 +00:00
Masayuki Nakano
ba2e73ec4f Bug 1539172 - Make nsContentUtils::DispatchInputEvent() notify content of valid state change of input element r=smaug
When `nsContentUtils::DispatchInputEvent()` dispatches `input` event, the
editor's value was changed by somebody.  In this case, it needs to update
the valid state **and** notify to update the style.

(Note that I'm not sure whether this is right approach.)

Differential Revision: https://phabricator.services.mozilla.com/D25029

--HG--
extra : moz-landing-system : lando
2019-03-28 23:40:18 +00:00
Mirko Brodesser
7558681ee9 Bug 1446722: set default value for 'mFocusedValue' for the html input elements 'date' and 'time'. r=smaug
In order to trigger the 'onchange' event when resetting the 'date' or
'time' html input elements.

Differential Revision: https://phabricator.services.mozilla.com/D24206

--HG--
extra : moz-landing-system : lando
2019-03-22 10:52:06 +00:00
Emilio Cobos Álvarez
cc63c03558 Bug 1535438 - Remove Shadow DOM v0 APIs. r=smaug
Looks like these three APIs slipped through when shipping v1, but no other
vendor supports them, so no reason to be here.

I don't think there's any harm in letting the implementations keep living in
DocumentOrShadowRoot, but let me know if you think otherwise and I'll move them
to Document.

Differential Revision: https://phabricator.services.mozilla.com/D23577

--HG--
extra : moz-landing-system : lando
2019-03-16 00:14:57 +00:00
James Willcox
61ca9441b1 Bug 1525959 - Skip some mochitests tests under GeckoView r=geckoview-reviewers,esawin
There are few things that are either Fennec-specific or don't work
currently under GeckoView w/ e10s under TestRunnerActivity. Disable
these so we can get some testing going in automation.

This also replaces 'isFennec' with the more correct 'is_fennec'.

Differential Revision: https://phabricator.services.mozilla.com/D19016

--HG--
extra : moz-landing-system : lando
2019-02-27 15:01:43 +00:00
Masayuki Nakano
474225038e Bug 998941 - part 2-2: Make HTMLEditor set InputEvent.dataTransfer when InputEvent.inputType is "insertFromPaste", "insertFromDrop" or "insertReplacementText" r=smaug,m_kato
InputEvent.dataTransfer should be set to non-null when InputEvent.inputType
is "insertFromPaste", "insertFromDrop" or "insertReplacementText" and
editor is an HTMLEditor instance:
https://rawgit.com/w3c/input-events/v1/index.html#dfn-data
https://w3c.github.io/input-events/#dfn-data

("insertTranspose" and "insertFromYank" are not currently supported on Gecko.)

This patch makes nsContentUtils::DispatchInputEvent() take dataTransfer value
and EditorBase set it via AutoEditActionDataSetter like data value.

However, we need to create other constructors of DataTransfer to create its
read-only instances initialized with nsITransferable or nsAString.  This will
be implemented by the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D19297

--HG--
extra : moz-landing-system : lando
2019-02-19 06:33:42 +00:00
Masayuki Nakano
2eaf64e594 Bug 998941 - part 1-3: Make TextEditor (only when not HTMLEditor instance) set InputEvent.data to inserting string when InputEvent.inputType is "insertFromPaste", "insertFromDrop" or "insertReplacementText" r=smaug,m_kato
https://rawgit.com/w3c/input-events/v1/index.html#dfn-data
https://w3c.github.io/input-events/#dfn-data

Both Input Events Level 1 and Level 2 declare that InputEvent.data should be
set to inserting string only on TextEditor when InputEvent.inputType is
"insertFromPaste", "insertFromPasteAsQuotation", "insertFromDrop",
"insertTranspose", "insertReplacementText" or "insertFromYank".

Currently, we support only "insertFromPaste", "insertFromDrop",
"insertReplacementText".  Therefore, this patch makes TextEditor set
EditorBase::mEditActionData::mData only for them (and the instance is not
HTMLEditor's).

Differential Revision: https://phabricator.services.mozilla.com/D19287

--HG--
extra : moz-landing-system : lando
2019-02-19 06:28:57 +00:00
Masayuki Nakano
a3484e40c0 Bug 998941 - part 1-2: Make editor set InputEvent.data to inserting text when it sets InputEvent.inputType to "insertText" or "insertCompositionText" r=smaug,m_kato
This patch makes nsContentUtils::DispatchInputEvent() support to set
InputEvent.data.  Whether the its value should be null or DOMString depends
on InputEvent.inputType value.

- https://rawgit.com/w3c/input-events/v1/index.html#overview
- https://rawgit.com/w3c/input-events/v1/index.html#dfn-data
- https://w3c.github.io/input-events/#overview
- https://w3c.github.io/input-events/#dfn-data

According to the draft specs, InputEvent.data should be always inserting text
when inputType is "insertText" or "insertCompositionText" (or
"insertFromCompoition" if Level 2 support is enabled).

Differential Revision: https://phabricator.services.mozilla.com/D19286

--HG--
extra : moz-landing-system : lando
2019-02-19 06:28:19 +00:00
Andreea Pavel
7b1605af56 Backed out 3 changesets (bug 1525959, bug 1526002) for failing android
Backed out changeset de0efca1118e (bug 1526002)
Backed out changeset 503cbc86e442 (bug 1525959)
Backed out changeset 33ea61c54aea (bug 1525959)
2019-02-12 23:53:05 +02:00
James Willcox
c7a8bf9699 Bug 1526002 - Replace 'isFennec' with 'is_fennec' in mochitest.ini r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D19038

--HG--
extra : moz-landing-system : lando
2019-02-10 19:07:57 +00:00
James Willcox
228b5844d5 Bug 1525959 - Skip some mochitests tests under GeckoView r=geckoview-reviewers,esawin
There are few things that are either Fennec-specific or don't work
currently under GeckoView w/ e10s under TestRunnerActivity. Disable
these so we can get some testing going in automation.

Differential Revision: https://phabricator.services.mozilla.com/D19016

--HG--
extra : moz-landing-system : lando
2019-02-12 15:15:28 +00:00
Masayuki Nakano
da6598c374 Bug 1524212 - Make nsContentUtils::DispatchInputEvent() update HTMLInputElement.validationMessage before dispatching "input" event r=smaug
"input" event listener may want to check HTMLInputElement.validationMessage.
However, due to moving "input" event dispatcher from
HTMLInputElement::SetUserInput() to editor, HTMLInputElement::SetValueInternal()
updates it **after** dispatching "input" event.

This patch makes nsContentUtils::DispatchInputEvent() guarantees to update
validationMessage value before dispatching every event.  On the other hand,
SetValueInternal() may be called without "input" event dispatchers.  Therefore,
it needs to keep updating validationMessage value in such cases.

Differential Revision: https://phabricator.services.mozilla.com/D19126

--HG--
extra : moz-landing-system : lando
2019-02-08 22:17:10 +00:00
Ting-Yu Lin
ceee0ec744 Bug 1524893 - Prevent Label and Summary elements from handling click event if clicking on interactive html content. r=smaug
This patch fix label element when
1. clicking on an interactive content in the shadow tree, or
2. clicking on non-interactive content in the shadow tree, but the
   shadow root's parent is interactive.

The fix for summary element is similar to label element.

Differential Revision: https://phabricator.services.mozilla.com/D18791

--HG--
rename : dom/html/test/forms/test_interactive_content_in_label.html => dom/html/test/forms/test_interactive_content_in_summary.html
extra : moz-landing-system : lando
2019-02-07 23:23:45 +00:00
Sebastian Hengst
725402f21f Merge mozilla-central to autoland. CLOSED TREE 2019-01-29 02:05:49 +02:00
Timothy Guan-tin Chien
ccf133638c Bug 1507895 - Part II, Remove the datetimebox binding r=smaug
This patch removes the datetimebox binding and always use
UA Widget for the job.

Depends on D17571

Differential Revision: https://phabricator.services.mozilla.com/D17572

--HG--
extra : moz-landing-system : lando
2019-01-28 18:32:39 +00:00
Cosmin Sabou
c84511bdd7 Bug 1520674 - Disable dom/html/test/forms/test_bug1495363.html on linux qr. r=jmaher 2019-01-26 15:16:00 +02:00
arthur.iakab
2890552407 Backed out changeset b4dbd3d276f6 (bug 1521884)for frequent test verify and mochi test failures on test_input_time_key_events.xhtml CLOSED TREE 2019-01-24 16:13:31 +02:00
Emilio Cobos Álvarez
94914a9d17 Bug 1521884 - Make test_input_time_key an xhtml file to get test coverage for this. r=smaug
Also remove an assertion that doesn't really hold at all, and doesn't seem
relevant to the function anyway.

Differential Revision: https://phabricator.services.mozilla.com/D17359

--HG--
extra : moz-landing-system : lando
2019-01-23 21:27:41 +00:00
Andrea Marchesini
24ceacee0e Bug 1495363 - Abort the previous request, if a form is submitted twice - tests, r=smaug 2019-01-16 22:51:17 +01:00
Matthew Noorenberghe
9fd4c34227 Bug 1477798 - Expose whether a fieldName should be automatically persisted on getAutocompleteInfo(). r=baku
This allows us to centralize the logic about which field names are "sensitive" and shouldn't be saved in things like form history or session history.

Differential Revision: https://phabricator.services.mozilla.com/D16128

--HG--
extra : moz-landing-system : lando
2019-01-10 18:48:39 +00:00
Masayuki Nakano
ed2040ac16 Bug 1447239 - Implement InputEvent.inputType r=smaug
This patch implements InputType.inputType which is declared by Input Events.
The attribute has already been implemented by Chrome and Safari.  Chrome
implements Input Events Level 1, but Safari implements Input Events Level 2.
 Difference between them is only whether it supports "insertFromComposition",
"deleteByComposition" and "deleteCompositionText".  This patch makes the
level switchable with pref and takes Level 1 by default because Level 2 is
still unstable around event order with composition events.

For reducing string copy cost at dispatching "input" event, this patch
makes EditorInternalInputEvent store valid input-type as enum class,
EditorInputType and resolves it to string value when
dom::InputEvent::GetInputType() is called.  Note that the reason why
this patch names the enum class as EditorInputType is, there is InputType
enum class already for avoiding conflict the name, this appends "Editor"
prefix because "input" and "beforeinput" events are fired only when an
editor has focus.

Differential Revision: https://phabricator.services.mozilla.com/D14128

--HG--
extra : moz-landing-system : lando
2019-01-07 10:10:57 +00:00
Timothy Guan-tin Chien
28b5c3416c Bug 1514040 - Dispatch events to hidden datetimebox UA Widget r=smaug
The XBL binding implementation relied on nsDateTimeControlFrame to call into
its nsIDateTimeInputArea implementation. This is correct because the XBL binding
is only constructed when the element has a frame. If the value is set while the
element is hidden, the XBL binding will pick up the correct value during construction.

That is not the case for UA Widget. As it is constructed when the DOM is attached,
relying on nsDateTimeControlFrame to send an event when attributes change means
the event won't be sent to the already constructed UA Widget.

This patch fixes that by moving the event dispatching calls originating from
HTMLInputElement out of nsDateTimeControlFrame, so they will behave correctly in
the absence of the frame.

I've also moved the gut of nsDateTimeControlFrame::HasBadInput() to
DateTimeInputTypeBase::HasBadInput(). Content script should be allowed to validate
the input without the frame.

Sadly this means the XBL implementation and the UA Widget implementation
have further diverged. The complexity should go away when we could finally
remove the XBL implementation.

nsDateTimeControlFrame still dispatches a few events to UA Widget, in
AttributeChanged() and SyncDisabledState(), as they are originated from the layout.

The name of the events in AttributeChanged() are incorrect though -- I am correcting
that in this patch too.

Differential Revision: https://phabricator.services.mozilla.com/D15601

--HG--
extra : moz-landing-system : lando
2019-01-04 21:53:51 +00:00
Matthew Noorenberghe
40455b7a34 Bug 1330228 - Use HasBeenTypePassword to skip saving to presentation state. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D15148

--HG--
extra : moz-landing-system : lando
2018-12-21 16:44:37 +00:00
Matthew Noorenberghe
9ce78727ba Bug 1330228 - Test input.hasBeenTypePassword. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D15147

--HG--
rename : dom/html/test/forms/test_mozistextfield.html => dom/html/test/forms/test_input_hasBeenTypePassword.html
extra : moz-landing-system : lando
2018-12-21 16:47:33 +00:00
Cristina Coroiu
3aeca11e88 Bug 1484442 - disable test_input_number_mouse_events.html on mac debug for frequent failures r=jmaher 2018-12-18 13:51:00 +02:00
Sebastian Hengst
af010f2097 Bug 1509378 - Make test_input_number_mouse_events.html refer evt in checkInputEvent() rather than window.event r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D13226

--HG--
extra : moz-landing-system : lando
2018-11-28 10:39:59 +00:00
Masayuki Nakano
246db85d46 Bug 1509378 - Make test_input_event.html refer aEvent in checkIfInputIsEvent() rather than window.event r=smaug
This is an idiot mistake.  It refers window.event accidentally and it's still
disabled on Beta and Release channel.  Therefore, we should make it refer
aEvent instead.

On the other hand, it might be better to make our lint check whether test
refers window.event directly or not because it may check odd result
accidentally.

Differential Revision: https://phabricator.services.mozilla.com/D12870

--HG--
extra : moz-landing-system : lando
2018-11-26 15:46:43 +00:00
Coroiu Cristina
ecebb3cfcd Merge mozilla-central to inbound a=merge on a CLOSED TREE 2018-11-21 23:50:57 +02:00