Граф коммитов

57 Коммитов

Автор SHA1 Сообщение Дата
Ian Moody be1cc378ed Bug 1379466 - Make editor listen for auxclick mouse events. r=smaug,masayuki
Editable elements will no longer get click events for non-primary mouse buttons
since they are being unshipped from the web in favour of auxclick events.
Listen for auxclick as well so middle-click paste still works.
Don't stop propagation after middle-click paste, instead ignore clicks on
contenteditable elements in ClickHandlerChild.
Update test_middle_click_paste.html for the new behaviour.

Also remove the mNoContentDispatch overrides in HTMLInputElement and
HTMLTextAreaElement that were needed for middle-pasting.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 12:57:36 +00:00
Brian Grinstead ede8c44ef2 Bug 1544322 - Part 2.1 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in everything except for dom/ r=bzbarsky
This excludes dom/, otherwise 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/D27456

--HG--
extra : moz-landing-system : lando
2019-04-16 03:50:44 +00:00
championshuttler e97abf832d Bug 1521928 - Enable ESLint for widget (automatic changes). r=Standard8,jmathies
Differential Revision: https://phabricator.services.mozilla.com/D18579

--HG--
extra : moz-landing-system : lando
2019-02-14 20:20:20 +00:00
Masayuki Nakano 7bd2c26c2c Bug 1288640 - Make TextComposition not dispatch eCompositionChange events (DOM "text" event) in the default group of web content r=smaug
The usage of our specific "text" event is enough low (0.0003%).  So, let's
stop dispatching the event in the default group of web content.  Once we
release this new behavior, we can get rid of dispatching the event even in
chrome.  Then, we can optimize the event order for new specs.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 13:26:51 +00:00
Masayuki Nakano 1c1a60c08d Bug 1446253 - Make EventUtils.synthesizeComposition() dispatch keydown and keyup event in default r=smaug
We'll start to dispatch keydown event and keyup event even during composition.
So, for testing those events won't break our UI, we should make
EventUtils.synhtesizeComposition() and EventUtils.synthesizeCompositionChange()
dispatch keydown event and keyup event even if callers don't specify keyboard
event explicitly.

Typically, "keydown" event is marked as "processed by IME", i.e., keyCode
value is set to DOM_VK_PROCESSKEY and key is set to "Process", with our
widget which handles native IME and key input.  On the other hand, "keyup"
is NOT marked as so.

Therefore, this patch makes TextInputProcessor emulates this behavior without
any new special flags.  And for making possible to emulate special cases,
this patch adds two flags to nsITextInputProcessor.  One is
KEY_DONT_MARK_KEYDOWN_AS_PROCESSED.  The other is KEY_MARK_KEYUP_AS_PROCESSED.
Unfortunately, those flags have opposite meaning but this must be better than
making necessary to one flag for emulating usual keydown/keyup events.

Finally, this makes some tests specify better keyboard information to
synthesizeComposition() and synthesizeCompositionChange() to emulate
actual keyboard events during composition.

MozReview-Commit-ID: ItYaXILkNQE

--HG--
extra : rebase_source : e50cc77c1efbc12686d7ea334d41926c7392b30d
2018-03-16 22:35:07 +09:00
Masayuki Nakano 01d9c81bcf Bug 1440189 - part 2: Make test_assign_event_data.html aware of strict keypress event dispatching mode r=smaug
This a remaining issue of bug 1435180. We need to skip keypress event check of
non-printable key operation in the test.

MozReview-Commit-ID: InobZCbrzWL

--HG--
extra : rebase_source : 9f17cd04500f4ef31c3674087188ec6ee157173b
2018-02-26 18:30:29 +09:00
Florian Quèze 2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Stone Shih 39bc975ceb Bug 1421482 Part2: Replace test utility synthesizePointer with synthesizeMouse. r=smaug.
We should follow the real use cases to synthesize mouse or touch events to generate pointer events so that the related logic is covered by these test cases.

MozReview-Commit-ID: 9xSgjSL0Azt
2017-11-24 07:50:12 +08:00
Sebastian Hengst 9d920555ec Backed out 2 changesets (bug 1421482) for failing modified mochitest layout/base/tests/test_bug1078327.html. r=backout a=backout
Backed out changeset a8701e1bd012 (bug 1421482)
Backed out changeset d774f5fe6e94 (bug 1421482)
2017-12-12 19:03:49 +02:00
Stone Shih 841f50b537 Bug 1421482 Part2: Replace test utility synthesizePointer with synthesizeMouse. r=smaug.
We should follow the real use cases to synthesize mouse or touch events to generate pointer events so that the related logic is covered by these test cases.

MozReview-Commit-ID: 9xSgjSL0Azt
2017-11-24 07:50:12 +08:00
Stone Shih f6e7906317 Bug 1407839 - Various test permafails due to IsPointerEventEnabled(). f=RyanVM. r=smaug.
Push pointer event pref before testing test_assign_event_data.html and remove redundant assertions since the pushed pref will be restore after testing.

MozReview-Commit-ID: 22nTMLGoMFj
2017-10-12 09:25:10 +08:00
Stone Shih 55c5359fa6 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Stone Shih 665fb7cd54 Backed out changeset de4929e39b7e (bug 1351148) 2017-08-11 15:19:30 +08:00
Stone Shih b27577d8d6 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Carsten "Tomcat" Book 2ff6df9177 Backed out changeset 5198322f7a62 (bug 1351148) 2017-07-28 09:20:20 +02:00
Stone Shih a5bccae405 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Jim Chen e559b260ee Bug 1137567 - Make nsWindow for Android use TextEventDispatcher; r=esawin r=rbarker r=masayuki r=snorp
Bug 1137567 - 1. Allow dispatching key events during composition; r=esawin

We potentially dispatch key events during composition to provide
compatibility for pages that only listen to key events.

Bug 1137567 - 2. Allow keyboard events in DispatchInputEvent when not on APZ thread; r=rbarker

We use nsIWidget::DispatchInputEvent to dispatch our keyboard events on
the Gecko thread, which on Android is not the APZ controller thread. We
should allow these events to pass instead of crashing.

Bug 1137567 - 3. Add GeckoEditableSupport class to support TextEventDispatcher; r=masayuki

Add a separate GeckoEditableSupport class, which implements
TextEventDispatcherListener and uses TextEventDispatcher for IME
operations. The new class is entirely separate from nsWindow to allow it
to be independently used in content processes as well.

Most of the code is copied from nsWindow::GeckoViewSupport, and adapted
to use TextEventDispatcher.

Bug 1137567 - 4. Make nsWindow::WindowPtr available for outside classes; r=snorp

Make nsWindow::WindowPtr available not just for classes inside nsWindow
but for outside classes as well. Also, add support for RefPtr native
objects to nsWindow::NativePtr.

Bug 1137567 - 5. Use GeckoEditableSupport in nsWindow; r=esawin

Use the new GeckoEditableSupport class in nsWindow to replace the
previous code in nsWindow::GeckoViewSupport. GeckoEditable native
methods now go to GeckoEditableSupport instead of GeckoViewSupport.

Several native methods in GeckoEditable are changed from
dispatchTo="proxy" to dispatchTo="gecko", because we no longer need the
special nsWindow::WindowEvent wrapper for our native calls.

Bug 1137567 - 6. Use pushPrefEnv in test_assign_event_data.html; r=masayuki

setAndObserveCompositionPref in test_assign_event_data.html does not
invoke the callback if the pref is already set. This patch changes it to
use SpecialPowers.pushPrefEnv so the callback is always invoked.
2017-03-01 15:29:30 -05:00
Drew Willcoxon fcfc071a48 Bug 1253479 - [e10s] Make widget/tests/test_assign_event_data.html work under e10s. r=masayuki 2016-03-10 16:56:13 -08:00
Maksim Lebedev 71409e1dc3 Bug 974305 - Add a test for WidgetPointerEvent::AssignPointerEventData(). r=smaug 2015-04-22 16:09:10 +09:00
Robert O'Callahan 843379803a Bug 69787. Implement MouseEvent.offsetX/Y. r=mats,smaug
--HG--
extra : rebase_source : 0120fa29fb94c1c2f992b4e3bae63c5120b90f4b
2015-03-14 00:50:10 +13:00
Anish 45de248a8b Bug 1056851 - Change existing callers of SpecialPowers.setBoolPref/setIntPref/setCharPref to SpecialPowers.pushPrefEnv. r=jmaher,mwargers 2015-02-19 11:53:01 -05:00
Carsten "Tomcat" Book c0d53e2918 Backed out changeset 6885e993936a (bug 1056851) for crashtest failures 2015-02-19 15:02:05 +01:00
Anish e7006d8a59 Bug 1056851 - Change existing callers of SpecialPowers.setBoolPref/setIntPref/setCharPref to SpecialPowers.pushPrefEnv. r=jmaher 2015-02-19 07:26:41 -05:00
Masayuki Nakano 26f706d27e Bug 1119609 part.13 EventUtils.synthesizeComposition() and synthesizeCompositionChange() should take KeyboardEvent for emulating composition state change caused by a key operation rs=smaug 2015-02-19 15:50:20 +09:00
Masayuki Nakano 7a85c69f66 Bug 917322 part.16 Rename COMPOSITION_ATTR_* in EventUtils.js with new constants of nsITextInputProcessor r=smaug 2015-01-28 15:27:33 +09:00
Masayuki Nakano afb256c118 Bug 917322 part.10 Remove unnecessary synthesizeComposition(compositionstart) from all tests r=smaug 2015-01-28 15:27:32 +09:00
Masayuki Nakano 9f491a5703 Bug 1077345 part.7 Use synthesizeComposition({"compositioncommit") in the tests r=smaug 2014-11-25 14:02:32 +09:00
Masayuki Nakano c56c9a574f Bug 1077345 part.5 Use synthesizeComposition({"compositioncommitasis") in the tests r=smaug 2014-11-25 14:02:31 +09:00
Masayuki Nakano 17d8fb7e4a Bug 960871 part.11 Rename EventUtils.synthesizeText() to EventUtils.synthesizeCompositionChange() r=smaug 2014-10-07 19:01:50 +09:00
Masayuki Nakano 5825b07b8e Bug 975383 part.9 Remove compositionupdate event dispatchers from all tests r=smaug 2014-10-03 15:33:50 +09:00
Masayuki Nakano ecab2beca9 Bug 993253 Implement DOM InputEvent interface with isComposing attribute r=smaug+ehsan 2014-04-10 16:11:37 +09:00
Masayuki Nakano 023a9dda6e Bug 993234 part.2 Add tests for KeyboardEvent.isComposing r=smaug 2014-04-10 16:11:37 +09:00
Boris Zbarsky 2ab672042c Bug 972312 part 2. Get rid of InternalScriptErrorEvent and just use mozilla::dom::ErrorEvent for the cases that used to use it. r=smaug,khuey 2014-02-23 00:01:12 -05:00
Masayuki Nakano 722e315e04 Bug 930374 part.2 Fix test_assign_event_data.html for new defaultPrevented behavior and make it a chrome test r=smaug 2013-12-09 00:51:16 +09:00
Masayuki Nakano 5d9700ad8e Bug 930900 part.2 Fix event class names in test_assign_event_data.html r=smaug 2013-10-29 13:14:43 +09:00
Masayuki Nakano ac184b22c5 Bug 930900 part.1 Add new key name index which means KeyboardEvent.key should refer stored string (not implemented yet) r=smaug 2013-10-29 13:14:42 +09:00
Masayuki Nakano 776acd167e Bug 912956 part.1 Rename all event stuff in mozilla::widget to mozilla::* r=roc 2013-09-14 11:39:41 +09:00
Masayuki Nakano 7cf113d44d Bug 910978 part.19 Implement nsMutationEvent::AssignMutationEventData() r=smaug 2013-09-03 20:45:30 +09:00
Masayuki Nakano 2617307439 Bug 910978 part.18 Implement nsAnimationEvent::AssignAnimationEventData() r=smaug 2013-09-03 20:45:30 +09:00
Masayuki Nakano 2c54be8896 Bug 910978 part.17 Implement nsTransitionEvent::AssignTransitionEventData() r=smaug 2013-09-03 20:45:30 +09:00
Masayuki Nakano ea85699bf2 Bug 910978 part.16 Implement nsSimpleGestureEvent::AssignSimpleGestureEventData() r=smaug 2013-09-03 20:45:30 +09:00
Masayuki Nakano e8b636382b Bug 910978 part.15 Implement nsFocusEvent::AssignFocusEventData() r=smaug 2013-09-03 20:45:29 +09:00
Masayuki Nakano 28c40b5168 Bug 910978 part.14 Implement nsUIEvent::AssignUIEventData() r=smaug 2013-09-03 20:45:29 +09:00
Masayuki Nakano 92eeafbf0c Bug 910978 part.13 Implement nsClipboardEvent::AssignClipboardEventData() r=smaug 2013-09-03 20:45:29 +09:00
Masayuki Nakano c526ae0d7d Bug 910978 part.12 Implement nsCommandEvent::AssignCommandEventData() r=smaug 2013-09-03 20:45:29 +09:00
Masayuki Nakano 4ac6b2750d Bug 910978 part.11 Implement nsFormEvent::AssignFormEventData() r=smaug 2013-09-03 20:45:29 +09:00
Masayuki Nakano 07a0012553 Bug 910978 part.10 Implement nsTouchEvent::AssignTouchEventData() r=smaug 2013-09-03 20:45:29 +09:00
Masayuki Nakano aeee25cf0b Bug 910978 part.9 Implement widget::WheelEvent::AssignWheelEventData() r=smaug 2013-09-03 20:45:29 +09:00
Masayuki Nakano 2ce0c3d82d Bug 910978 part.8 Implement nsMouseScrollEvent::AssignMouseScrollEventData() r=smaug 2013-09-03 20:45:29 +09:00
Masayuki Nakano f2b7ea09af Bug 910978 part.7 Implement nsCompositionEvent::AssignCompositionEventData() r=smaug 2013-09-03 20:45:29 +09:00