Bug 266932 - Mousemove event should be fired when the mouse stays in the document but there is no element
Summary: Mousemove event should be fired when the mouse stays in the document but ther...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-12-29 10:27 PST by Ahmad Saleem
Modified: 2024-06-01 12:13 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-12-29 10:27:02 PST
Hi Team,

While looking into Blink's commit, I came across another potential merge.

Blink Commit: https://src.chromium.org/viewvc/blink?view=revision&revision=182622

WebKit Source: https://github.com/WebKit/WebKit/blob/7883e9ca30c85590b7ac6f16a8b2bbec71fa9d51/Source/WebCore/rendering/RenderLayer.cpp#L4021

Following compiles:

LayoutPoint hitPoint = hitTestLocation.point();
        if (!request.isChildFrameHitTest() && ((request.active() || request.release()) || (request.move() && hitTestArea.contains(hitPoint.x(), hitPoint.y()))) && isRenderViewLayer()) {
        // if (!request.isChildFrameHitTest() && (request.active() || request.release()) && isRenderViewLayer()) {
            renderer().updateHitTestResult(result, downcast<RenderView>(renderer()).flipForWritingMode(hitTestLocation.point()));
            insideLayer = { this };
        }

___

We don't start to pass all tests from added but we do pass few more than before, if we merge this.

Just wanted to raise to get input.

Thanks!
Comment 1 Ahmad Saleem 2023-12-29 10:42:58 PST
With Patch (taking test from 'source.chromium.org' and modifying to use 'window.testRunner.dumpChildFramesAsText();'):

Tests that the mouse event is fired when the mouse pointer stays in document but there is no element

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS successfullyParsed is true

TEST COMPLETE


--------
Frame: '<!--frame1-->'
--------
POINTER
PASS events[0] is "mousemove"
FAIL targets[0] should be #document. Was BODY.
PASS events[1] is "mousemove"
FAIL targets[1] should be BODY. Was #document.
PASS events[2] is "mousemove"
FAIL targets[2] should be #document. Was BODY.
FAIL events[3] should be mouseover. Was mousemove.
PASS targets[3] is "#document"
PASS events[4] is "mouseover"
PASS targets[4] is "BODY"
PASS events[5] is "mouseover"
PASS targets[5] is "#document"
FAIL events[6] should be mouseout. Was mouseover.
FAIL targets[6] should be #document. Was BODY.
FAIL events[7] should be mouseout. Was mouseover.
FAIL targets[7] should be BODY. Was #document.
PASS events[8] is "mouseout"
FAIL targets[8] should be #document. Was BODY.
FAIL events[9] should be mouseenter. Was mouseout.
PASS targets[9] is "#document"
FAIL events[10] should be mouseleave. Was mouseout.
FAIL targets[10] should be #document. Was BODY.
FAIL events[11] should be mouseenter. Was mouseout.
PASS targets[11] is "#document"
PASS events[12] is "mouseenter"
PASS targets[12] is "BODY"
PASS events[13] is "mouseleave"
PASS targets[13] is "BODY"
FAIL events[14] should be mouseleave. Was mouseenter.
FAIL targets[14] should be #document. Was BODY.
PASS successfullyParsed is true
Some tests failed.

TEST COMPLETE
Comment 2 Ahmad Saleem 2023-12-29 10:49:00 PST
Using 'LayoutTests/fast/events/resources/mouse-events-within-no-element-iframe.html' from the Blink commit (rather than upstream):

With Patch:

POINTER
PASS events[0] is "mousemove"
PASS targets[0] is "#document"
PASS events[1] is "mousemove"
PASS targets[1] is "BODY"
PASS events[2] is "mousemove"
PASS targets[2] is "#document"
PASS events[3] is "mouseover"
PASS targets[3] is "#document"
PASS events[4] is "mouseover"
PASS targets[4] is "BODY"
PASS events[5] is "mouseover"
PASS targets[5] is "#document"
PASS events[6] is "mouseout"
PASS targets[6] is "#document"
PASS events[7] is "mouseout"
PASS targets[7] is "BODY"
PASS events[8] is "mouseout"
PASS targets[8] is "#document"
PASS events[9] is "mouseenter"
FAIL targets[9] should be #document. Was BODY.
PASS events[10] is "mouseleave"
FAIL targets[10] should be #document. Was BODY.
FAIL events[11] should be mouseenter (of type string). Was undefined (of type undefined).
FAIL targets[11] should be BODY (of type string). Was undefined (of type undefined).
FAIL events[12] should be mouseenter (of type string). Was undefined (of type undefined).
FAIL targets[12] should be #document (of type string). Was undefined (of type undefined).
FAIL events[13] should be mouseleave (of type string). Was undefined (of type undefined).
FAIL targets[13] should be BODY (of type string). Was undefined (of type undefined).
FAIL events[14] should be mouseleave (of type string). Was undefined (of type undefined).
FAIL targets[14] should be #document (of type string). Was undefined (of type undefined).
PASS successfullyParsed is true
Some tests failed.

TEST COMPLETE

__

Without Patch:

POINTER
PASS events[0] is "mousemove"
FAIL targets[0] should be #document. Was BODY.
PASS events[1] is "mousemove"
FAIL targets[1] should be BODY. Was #document.
FAIL events[2] should be mousemove. Was mouseover.
FAIL targets[2] should be #document. Was BODY.
PASS events[3] is "mouseover"
PASS targets[3] is "#document"
FAIL events[4] should be mouseover. Was mouseout.
PASS targets[4] is "BODY"
FAIL events[5] should be mouseover. Was mouseout.
PASS targets[5] is "#document"
FAIL events[6] should be mouseout. Was mouseenter.
FAIL targets[6] should be #document. Was BODY.
FAIL events[7] should be mouseout. Was mouseleave.
PASS targets[7] is "BODY"
FAIL events[8] should be mouseout (of type string). Was undefined (of type undefined).
FAIL targets[8] should be #document (of type string). Was undefined (of type undefined).
FAIL events[9] should be mouseenter (of type string). Was undefined (of type undefined).
FAIL targets[9] should be #document (of type string). Was undefined (of type undefined).
FAIL events[10] should be mouseleave (of type string). Was undefined (of type undefined).
FAIL targets[10] should be #document (of type string). Was undefined (of type undefined).
FAIL events[11] should be mouseenter (of type string). Was undefined (of type undefined).
FAIL targets[11] should be BODY (of type string). Was undefined (of type undefined).
FAIL events[12] should be mouseenter (of type string). Was undefined (of type undefined).
FAIL targets[12] should be #document (of type string). Was undefined (of type undefined).
FAIL events[13] should be mouseleave (of type string). Was undefined (of type undefined).
FAIL targets[13] should be BODY (of type string). Was undefined (of type undefined).
FAIL events[14] should be mouseleave (of type string). Was undefined (of type undefined).
FAIL targets[14] should be #document (of type string). Was undefined (of type undefined).
PASS successfullyParsed is true
Some tests failed.

TEST COMPLETE

___

So some progressions (if we use old test commit based test case).
Comment 3 Radar WebKit Bug Importer 2024-01-05 10:27:14 PST
<rdar://problem/120551245>
Comment 4 Ahmad Saleem 2024-01-31 17:51:13 PST
Follow-up to fix the mouseover - but it might not be 1-1 easily: https://src.chromium.org/viewvc/blink?view=revision&revision=192954