WebKit Bugzilla
Attachment 370857 Details for
Bug 198338
: [Pointer Events] toElement and fromElement should be null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198338-20190529190600.patch (text/plain), 5.96 KB, created by
Antoine Quint
on 2019-05-29 10:06:01 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-05-29 10:06:01 PDT
Size:
5.96 KB
patch
obsolete
>Subversion Revision: 245848 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8e69cea76eafa8618c7773cc85d1c631fb4cbd8e..83bc168d51ea3114fff6bb09c900ade5a76313f4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,13 @@ >+2019-05-29 Antoine Quint <graouts@apple.com> >+ >+ [Pointer Events] toElement and fromElement should be null >+ https://bugs.webkit.org/show_bug.cgi?id=198338 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * dom/MouseEvent.h: >+ * dom/PointerEvent.h: >+ > 2019-05-28 Yacine Bandou <yacine.bandou@softathome.com> > > [MSE][GStreamer] update the readyState correctly in MediaPlayerPrivateGStreamerMSE >diff --git a/Source/WebCore/dom/MouseEvent.h b/Source/WebCore/dom/MouseEvent.h >index 257f8c0e9b08b381c9e71a7960004831e304453c..719a41c7c634e13caaa41b9892213fbc275cd608 100644 >--- a/Source/WebCore/dom/MouseEvent.h >+++ b/Source/WebCore/dom/MouseEvent.h >@@ -75,8 +75,8 @@ public: > double force() const { return m_force; } > void setForce(double force) { m_force = force; } > >- WEBCORE_EXPORT RefPtr<Node> toElement() const; >- WEBCORE_EXPORT RefPtr<Node> fromElement() const; >+ WEBCORE_EXPORT virtual RefPtr<Node> toElement() const; >+ WEBCORE_EXPORT virtual RefPtr<Node> fromElement() const; > > DataTransfer* dataTransfer() const { return isDragEvent() ? m_dataTransfer.get() : nullptr; } > >diff --git a/Source/WebCore/dom/PointerEvent.h b/Source/WebCore/dom/PointerEvent.h >index 3da0f93253c1f369608199770ef5e6e526b2af7c..9b603b6f1095149675a86daeb76d4f858651b348 100644 >--- a/Source/WebCore/dom/PointerEvent.h >+++ b/Source/WebCore/dom/PointerEvent.h >@@ -28,6 +28,7 @@ > #if ENABLE(POINTER_EVENTS) > > #include "MouseEvent.h" >+#include "Node.h" > #include "PointerID.h" > #include <wtf/text/WTFString.h> > >@@ -101,6 +102,14 @@ public: > > bool isPointerEvent() const final { return true; } > >+ // https://w3c.github.io/pointerevents/#attributes-and-default-actions >+ // Many user agents expose non-standard attributes fromElement and toElement in MouseEvents to >+ // support legacy content. In those user agents, the values of those (inherited) attributes in >+ // PointerEvents must be null to encourage the use of the standardized alternates (i.e. target >+ // and relatedTarget). >+ RefPtr<Node> toElement() const final { return nullptr; } >+ RefPtr<Node> fromElement() const final { return nullptr; } >+ > EventInterface eventInterface() const override; > > private: >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index f001fe33fba913b80c836fffb1611b9eb6690848..5b15e70530f04eea502af515e75f9cc38f5caafe 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,15 @@ >+2019-05-29 Antoine Quint <graouts@apple.com> >+ >+ [Pointer Events] toElement and fromElement should be null >+ https://bugs.webkit.org/show_bug.cgi?id=198338 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Mark WPT progressions now that we return the correct values for toElement and fromElement. >+ >+ * web-platform-tests/pointerevents/pointerevent_pointerenter_does_not_bubble-expected.txt: >+ * web-platform-tests/pointerevents/pointerevent_pointerleave_does_not_bubble-expected.txt: >+ > 2019-05-28 Shawn Roberts <sroberts@apple.com> > > Unreviewed, rolling out r245475. >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerenter_does_not_bubble-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerenter_does_not_bubble-expected.txt >index 44705ed10cfd818b875e359cb8fb30d1e5f72265..6dd52e742d243261d5c468dbe7fa3fdf88c6e1af 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerenter_does_not_bubble-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerenter_does_not_bubble-expected.txt >@@ -47,7 +47,7 @@ PASS mouse pointerenter.fromElement value is null. > PASS mouse pointerenter.toElement attribute exists > PASS mouse pointerenter.toElement is readonly > PASS mouse pointerenter.toElement IDL type object (JS type was object) >-FAIL mouse pointerenter.toElement value is null. assert_equals: toElement attribute value expected null but got Element node <div id="target0"></div> >+PASS mouse pointerenter.toElement value is null. > PASS mouse pointerenter.pressure value is valid > PASS mouse pointerenter properties for pointerType = mouse > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_does_not_bubble-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_does_not_bubble-expected.txt >index 3e4fe7fc38ce1a9e3ddc94e06bd27c828c907788..ad019e182d0fe53829ee0cc29813776cf257dded 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_does_not_bubble-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointerleave_does_not_bubble-expected.txt >@@ -43,12 +43,11 @@ PASS mouse pointerleave.detail value is 0. > PASS mouse pointerleave.fromElement attribute exists > PASS mouse pointerleave.fromElement is readonly > PASS mouse pointerleave.fromElement IDL type object (JS type was object) >-FAIL mouse pointerleave.fromElement value is null. assert_equals: fromElement attribute value expected null but got Element node <html><head> >- <title>Pointer Event: The pointerlea... >+PASS mouse pointerleave.fromElement value is null. > PASS mouse pointerleave.toElement attribute exists > PASS mouse pointerleave.toElement is readonly > PASS mouse pointerleave.toElement IDL type object (JS type was object) >-FAIL mouse pointerleave.toElement value is null. assert_equals: toElement attribute value expected null but got Element node <div id="target0"></div> >+PASS mouse pointerleave.toElement value is null. > PASS mouse pointerleave.pressure value is valid > PASS mouse pointerleave properties for pointerType = mouse >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198338
: 370857