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
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
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
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
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
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
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
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
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
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
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
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