-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
5 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters