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

3879 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen 448e1644a0 Bug 1690897 - Get rid of `dom.formdata.event.enabled` pref; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D104103
2021-02-05 13:51:33 +00:00
Brindusan Cristian 13f57afb9c Backed out changeset 8e2eba3023da (bug 1690897) for build bustages at nsContentUtils.cpp. CLOSED TREE 2021-02-05 15:31:13 +02:00
Edgar Chen 7a0199c1a4 Bug 1690897 - Get rid of `dom.formdata.event.enabled` pref; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D104103
2021-02-04 22:05:19 +00:00
Stone Shih c8284bad50 Bug 1370630 - Untrusted submit event shouldn't trigger form submission; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D28070
2021-02-04 19:38:47 +00:00
Masayuki Nakano 9ede86a56a Bug 1541915 - part 2: Make `test_scroll_per_page.html` never timed out r=smaug
It waits a `scroll` event after synthesizing `PageDown` or `PageUp` key event
and it causes intermittent timeout if unexpected cases occurred randomly.
Therefore, we've not have enough hint to fix the existing intermittent timeout.

For making this bug forward, it should stop waiting a `scroll` event with a
`Promise`.  Instead, it should check whether a `scroll` event fired or not
with a few times retry.

Differential Revision: https://phabricator.services.mozilla.com/D103014
2021-02-02 03:05:07 +00:00
Masayuki Nakano fef8b70479 Bug 1541915 - part 1: Move scroll position tests from `layout/base/tests` to `dom/events/test` and disable async font loading in `dom/events/test` r=smaug,jfkthame
Asynchronous font loading occurs during scroll position tests, it resets
scroll positions to 0.  So, this causes intermittent failures in such tests.
Disabling the async font loading under `layout/base/tests` may not be proper
solution because some layout tests may work perfectly even if global reflow
may occur.

Therefore, this patch moves 2 tests which check scroll position to under
`dom/events/test` and disabling the async font loading since the global reflow
shouldn't be related to the tests under `dom/events`.

Differential Revision: https://phabricator.services.mozilla.com/D103013
2021-02-02 03:05:04 +00:00
Kartikaya Gupta b8be8cf94d Bug 1688475 - Robustify test_bug946632.html against some intermittent failures. r=botond
The sendWheelAndPaint call returns before it's done all its work. The way
this test uses the function, it can advance onto the next testcase before
the previous sendWheelAndPaint is done and the callback is invoked. This
can cause one testcase to pollute the next one which seems inadvisable.
Waiting for the sendWheelAndPaint callback to be triggered ensures that
all the work sendWheelAndPaint is going to do gets completed before the
next testcase is processed.

Differential Revision: https://phabricator.services.mozilla.com/D103122
2021-02-01 23:44:56 +00:00
Kartikaya Gupta c90dbb6eee Bug 1688475 - Remove usage of waitForApzFlushedRepaints from test_bug946632.html. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103121
2021-02-01 23:42:52 +00:00
Kartikaya Gupta a047004d0d Bug 1688475 - Trivial replacement of some waitForApzFlushedRepaints callers. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103117
2021-01-31 17:37:56 +00:00
Tom Schuster 0f69816f22 Bug 1688279 - Support strings as data in ClipboardItem r=nika
Differential Revision: https://phabricator.services.mozilla.com/D102791
2021-01-29 22:33:55 +00:00
Masayuki Nakano 5d24a92232 Bug 1689034 - part 3: Get rid of keyboard events on plugins r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103140
2021-01-28 07:48:15 +00:00
Edgar Chen c2c0ea7709 Bug 1672330 - Move pointer lock code to PointerLockManager; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101054
2021-01-27 16:38:29 +00:00
Edgar Chen b8a3cfd15d Bug 1648435 - Make dom/events/test/test_mouse_enterleave_iframe.html waiting apz stable before starting tests; r=smaug
This test uses synthesizeNativeMouseMove to synthesize mouse events, the synthesized
native events would go through apz, so wait apz getting stable before starting test
to avoid possible timing problem that causes intermittent failure.

Differential Revision: https://phabricator.services.mozilla.com/D103192
2021-01-27 20:31:44 +00:00
Dorel Luca b5c5a81751 Backed out changeset 4e317086de97 (bug 1672330) for Mochitest failures in dom/tests/mochitest/pointerlock/test_pointerlock_focus.html. CLOSED TREE 2021-01-27 14:05:29 +02:00
Edgar Chen b81855eeb2 Bug 1672330 - Move pointer lock code to PointerLockManager; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101054
2021-01-27 10:08:29 +00:00
Edgar Chen b9bee2d7ae Bug 1509710 - Prevent dispatching pointermove events targeted at a slider frame to web content, if the scrollbar is being dragged; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102935
2021-01-27 09:42:19 +00:00
Edgar Chen 3642bf1c51 Bug 1683656 - Make dom/events/test/test_mouse_capture_iframe.html waiting for apz stable before starting tests; r=smaug
test.events.async.enabled is set to true in this test, the synthesized event
would be routed to apz, so wait apz getting stable before starting test to avoid
possible timing problem that causes intermittent failure.

Differential Revision: https://phabricator.services.mozilla.com/D103042
2021-01-26 21:51:18 +00:00
smolnar 1a5cfb81b8 Backed out changeset c2d9108fee93 (bug 1509710) for causing mochitest failures in test_pointermove_drag_scrollbar. CLOSED TREE 2021-01-26 15:34:58 +02:00
Edgar Chen 6ef8311735 Bug 1509710 - Prevent dispatching pointermove events targeted at a slider frame to web content, if the scrollbar is being dragged; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102935
2021-01-26 12:37:12 +00:00
Kartikaya Gupta 490f8b1b77 Bug 1686687 - Convert touch_action_helpers.js to async/await style. r=botond
I removed the setup functions since we want to avoid having long-lasting
touchend listeners, and instead added promiseTouchEnd calls to the touch-
synthesizing functions (touchScrollRight and touchScrollDown). Also I
moved the add_completion_callback stuff out of the setup functions. In
the case where the test function was using touchActionSetup, the
completion callback is triggered by clicking on the "btnComplete" button
in tapComplete, so I moved the completion promise in there. In the
remaining cases, where the test function was using touchActionSetupAndWaitTestDone,
it's usually the final scroll of the test that triggers the completion
callback, and so I just inlined the promise into the start of the
test function.

Differential Revision: https://phabricator.services.mozilla.com/D102861
2021-01-26 02:00:09 +00:00
Kartikaya Gupta 51a7aed234 Bug 1686687 - Simplify injectScript and callers. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D102860
2021-01-25 23:08:06 +00:00
Edgar Chen 48c01f0a8b Bug 1688105 - Part 2: Get rid of dom.w3c_pointer_events.enabled; r=smaug
Depends on D102668

Differential Revision: https://phabricator.services.mozilla.com/D102669
2021-01-25 16:22:44 +00:00
Tom Schuster c2e0e2cb11 Bug 1619947 - Reimplement navigator.clipboard.write to use ClipboardItem r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97859
2021-01-24 12:35:46 +00:00
Tom Schuster b73057479f Bug 1619947 - Implement ClipboardItem skeleton code r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97854
2021-01-24 12:35:46 +00:00
Steven MacLeod 918b6bd2da Bug 1656107 - remove FindContentForSubDocument use from EventStateManager. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D98617
2021-01-21 00:44:50 +00:00
Mats Palmgren b41a2b9d21 Bug 1687239 part 2 - Remove plugin support from layout/. r=emilio
Note that there's still a little plugin related code in
widget/ and gfx/ etc after this.  That can be removed
once we remove plugin support from dom/ etc.
The removal from layout/ should be pretty complete though.

Differential Revision: https://phabricator.services.mozilla.com/D102140
2021-01-25 11:53:49 +00:00
Mats Palmgren 3d6a897e41 Bug 1688089 - Add use counters for 'overflow'/'underflow' event listeners. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102646
2021-01-22 11:12:11 +00:00
nirmay 55420bffb0 Bug 1677643 - Replace nsIScrollableFrame::{HORIZONTAL, VERTICAL} with ScrollDirections. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D102087
2021-01-21 17:45:19 +00:00
Edgar Chen 4827c5658b Bug 1686037 - Part 3: Remove duplicated ImplicitlyReleasePointerCapture call in PresShell; r=smaug
EventStateManager::PostHandleEvent would do the same thing, but need to handle
the cases that PresShell is destroyed and frame is destroyed in
pointerup/pointercancel event listener.

The former case would be handled in D102403. For the latter case, we allow
EventStateManager::PostHandleEvent to handle pointerup/pointercancel event while
frame is no longer available in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D102404
2021-01-21 14:54:55 +00:00
Edgar Chen b615527436 Bug 1686037 - Part 2: Clean up pointer capture info when PresContext is destroyed; r=smaug
Found a possible leak from running layout/base/tests/test_bug993936.html after
enable implicit pointer capture for touch event. The test synthesize touchstart
and touchmove event, but no touchend, so we don't run the release steps and the
PointerCaptureInfo still hold a reference to Element which cause the leak.

This could also possible happens in real world, for example, user touch a page
with finger that triggers pointer capture, and then tab get closed before touch
is released.

Differential Revision: https://phabricator.services.mozilla.com/D102403
2021-01-21 16:38:59 +00:00
Edgar Chen f43f83b1a9 Bug 1686037 - Part 1: Move nsGenericHTMLElement::GetPresContext to Element; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102321
2021-01-21 14:19:57 +00:00
Edgar Chen dc442f6bea Bug 1556703 - Part 2: Convert new added WPT into mochitest test; r=smaug
Geckodriver doesn't support touch input yet, so convert new added the touch tests
into mochitest, these mochitest wpt could be removed once we could pass the
corresponding tests in wpt.

Depends on D101667

Differential Revision: https://phabricator.services.mozilla.com/D102044
2021-01-18 21:05:59 +00:00
Edgar Chen fcbd3d2887 Bug 1556703 - Part 1: Update active pointer state properly; r=smaug
Calling setPointerCapture or releasePointerCapture in pointerup event handler would
throw error due to the active pointer is removed in PreHandlerEvent which is too
early. So defer removing active pointer to PostHandeEvent to make the active pointer
available in pointerup or pointercancel event handler.

This patch adds WPTs which has been verified on Chrome. geckodriver doesn't support
touch input yet, so mark tests for touch as expected ERROR for now.

Differential Revision: https://phabricator.services.mozilla.com/D101667
2021-01-18 22:14:39 +00:00
Edgar Chen 59f2cc6232 Bug 1687069 - Part 2: Remove test_wpt_pointerevent_setpointercapture_to_same_element_twice-manual.html; r=masayuki
As the wpt is not longer a manual test, and we could pass the wpt one.

Depends on D102070

Differential Revision: https://phabricator.services.mozilla.com/D102071
2021-01-18 07:06:52 +00:00
Edgar Chen 1c65254657 Bug 1687068 - Part 2: Remove test_wpt_pointerevent_setpointercapture_override_pending_capture_element-manual.html; r=masayuki
As the wpt is not longer a manual test, and we could pass the wpt one.

Depends on D102068

Differential Revision: https://phabricator.services.mozilla.com/D102069
2021-01-18 07:05:18 +00:00
Edgar Chen ddbdc9a935 Bug 1687066 - Part 2: Remove test_wpt_pointerevent_releasepointercapture_release_right_after_capture-manual.html; r=masayuki
As it is not longer a manual test in wpt, and we could pass the wpt one.

Differential Revision: https://phabricator.services.mozilla.com/D102059
2021-01-18 07:04:50 +00:00
Edgar Chen 79d4538dcb Bug 1687062 - Part 2: Remove test_wpt_pointerevent_element_haspointercapture_release_pending_capture-manual.html; r=masayuki
As it is not longer a manual test in wpt, and we could pass the wpt one.

Differential Revision: https://phabricator.services.mozilla.com/D102057
2021-01-18 06:58:21 +00:00
Edgar Chen a7eb9d0cb4 Bug 1687052 - Part 5: Remove test_wpt_pointerevent_capture_suppressing_mouse-manual.html; r=masayuki
pointerevent_capture_suppressing_mouse-manual.html are no longer a manual test
in wpt after using web-driver, and we could pass most of test in wpt one,
- https://wpt.fyi/results/pointerevents/pointerevent_capture_suppressing_mouse.html?label=experimental&label=master&aligned

Depends on D102050

Differential Revision: https://phabricator.services.mozilla.com/D102051
2021-01-15 23:35:45 +00:00
Edgar Chen 1173ded146 Bug 1687052 - Part 4: Remove test_wpt_pointerevent_pointerenter_does_not_bubble-manual.html; r=masayuki
pointerevent_pointerenter_does_not_bubble-manual.html are no longer a manual test
in wpt after using web-driver, and we could pass most of test in wpt one,
- https://wpt.fyi/results/pointerevents/pointerevent_pointerenter_does_not_bubble.html?label=experimental&label=master&aligned

Depends on D102049

Differential Revision: https://phabricator.services.mozilla.com/D102050
2021-01-15 23:35:09 +00:00
Edgar Chen bc26284dab Bug 1687052 - Part 3: Remove test_wpt_pointerevent_pointerleave_does_not_bubble-manual.html; r=masayuki
pointerevent_pointerleave_does_not_bubble-manual.html are no longer a manual test
in wpt after using web-driver, and we could pass most of test in wpt one,
- https://wpt.fyi/results/pointerevents/pointerevent_pointerleave_does_not_bubble.html?label=experimental&label=master&aligned

Depends on D102048

Differential Revision: https://phabricator.services.mozilla.com/D102049
2021-01-15 23:34:27 +00:00
Edgar Chen a1cdfafa0c Bug 1687052 - Part 2: Remove test_wpt_pointerevent_releasepointercapture_onpointerup_mouse-manual.html; r=masayuki
pointerevent_releasepointercapture_onpointerup_mouse-manual.html are no longer a
manual test in wpt after using web-driver, and we could pass the wpt one,
- https://wpt.fyi/results/pointerevents/pointerevent_releasepointercapture_onpointerup_mouse.html?label=experimental&label=master&aligned

Depends on D102047

Differential Revision: https://phabricator.services.mozilla.com/D102048
2021-01-15 23:33:59 +00:00
Edgar Chen 16481bafe5 Bug 1687052 - Part 1: Remove test_wpt_test_pointerevent_suppress_compat_events_on_*; r=masayuki
pointerevent_suppress_compat_events_on_* are no longer a manual test in wpt after
using web-driver, and we could pass the wpt one,
- https://wpt.fyi/results/pointerevents/pointerevent_suppress_compat_events_on_click.html?label=experimental&label=master&aligned
- https://wpt.fyi/results/pointerevents/pointerevent_suppress_compat_events_on_drag_mouse.html?label=experimental&label=master&aligned

Differential Revision: https://phabricator.services.mozilla.com/D102047
2021-01-15 23:32:10 +00:00
Olli Pettay b6bb80bd47 Bug 1686716 - Calling event.preventDefault in drop event handler causes a crash after target iframe has been removed, r=masayuki
Outerwindow implements nsIScriptObjectPrincipal.

Differential Revision: https://phabricator.services.mozilla.com/D101774
2021-01-15 10:04:50 +00:00
Edgar Chen abee684546 Bug 1686722 - Part 2: Move wpt resources to wpt/; r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D101820
2021-01-15 01:09:07 +00:00
Edgar Chen cb33f7db53 Bug 1686722 - Part 1: Rename mochitest tests that run wpt to test_wpt_*; r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D101819
2021-01-15 01:01:32 +00:00
Mirko Brodesser f6f7a6f1aa Bug 1685303: part 8) Annotate `nsFrameSelection::SetDragState` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101467
2021-01-14 13:24:16 +00:00
Bogdan Tara 0700454a9e Backed out 4 changesets (bug 1685303) for bustage complaining about offsets CLOSED TREE
Backed out changeset a4640aac6619 (bug 1685303)
Backed out changeset bd2020c26531 (bug 1685303)
Backed out changeset 3f2e96b93f19 (bug 1685303)
Backed out changeset 8cf49a7677c9 (bug 1685303)
2021-01-14 12:58:25 +02:00
Mirko Brodesser 353996bf27 Bug 1685303: part 8) Annotate `nsFrameSelection::SetDragState` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101467
2021-01-14 10:20:30 +00:00
Edgar Chen 00dc0793aa Bug 1686045 - Part 1: Rewrite popup blocker tests for mouse/pointer event; r=smaug
And add more tests for different button value.

Differential Revision: https://phabricator.services.mozilla.com/D101507
2021-01-13 23:33:10 +00:00
Masayuki Nakano 4b218fc374 Bug 1357365 - part 2: Make `TypeInState::OnSelectionChange()` stop inserting new content into the link if clicked outside it r=m_kato
When mouse button is clicked outside a link element but caret is positioned
start or end of the link, our traditional behavior keeps inserting new content
into the link.  But this is different from the other browsers, and it does
not make sense to treat such selection change is intended to keep typing in
the link element.

Therefore, this patch makes `TypeInState::OnSelectionChange()` handle
selection change reason is `mousedown` and `mouseup` cases.  However,
it cannot know whether the event was fired in the parent link element or
not.  Therefore, this patch makes `HTMLEditorEventListener` notifies
`TypeInState` of mouse events via `HTMLEditor`.

Differential Revision: https://phabricator.services.mozilla.com/D101001
2021-01-13 01:55:27 +00:00