[webkit-changes] [WebKit/WebKit] dd9d40: pointerevent_movementxy.html?mouse WPT is failing
Abrar Rahman Protyasha
noreply at github.com
Mon Jul 3 12:11:52 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dd9d402d27a3e47ddc81f38df4e81617a6960d48
https://github.com/WebKit/WebKit/commit/dd9d402d27a3e47ddc81f38df4e81617a6960d48
Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
Date: 2023-07-03 (Mon, 03 Jul 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_movementxy_mouse-expected.txt
M Source/WebCore/dom/Event.cpp
M Source/WebCore/dom/Event.h
M Source/WebCore/dom/MouseRelatedEvent.cpp
M Source/WebCore/dom/MouseRelatedEvent.h
Log Message:
-----------
pointerevent_movementxy.html?mouse WPT is failing
https://bugs.webkit.org/show_bug.cgi?id=258780
rdar://111635046
Reviewed by Wenson Hsieh.
Currently, we are failing the pointerevent_movementxy.html?mouse WPT
variant with the error "FAIL mouse pointerevent attributes
assert_equals: movementX should be 0 for event other than pointermove.
expected 0 but got 20". We fail this assertion because events that are
not of the pointermove type have non-zero movementX/Y values.
We address said issue in this commit by:
- Making sure that any event which isn't of type (mouse/pointer/touch)move
does not have non-zero movementX/movementY fields.
- Hardening against accidentally assigning movementX/movementY fields
outside of initialization, by making said fields private.
- Adjusting the expected result for the now passing WPT.
This commit also introduces some additional state into the
WebCore::Event class, through which we can consult if the Event was
constructed using an EventInit dictionary. We need this information
because the attribute values assigned from the EventInit dictionary
receive priority over other rules dictating the Event attribute.
* LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_movementxy_mouse-expected.txt:
* Source/WebCore/dom/Event.cpp:
* Source/WebCore/dom/Event.h:
(WebCore::Event::isConstructedFromInitializer const):
* Source/WebCore/dom/MouseRelatedEvent.cpp:
(WebCore::isMoveEventType):
(WebCore::MouseRelatedEvent::init):
* Source/WebCore/dom/MouseRelatedEvent.h:
Canonical link: https://commits.webkit.org/265730@main
More information about the webkit-changes
mailing list