WebKit Bugzilla
Attachment 372919 Details for
Bug 198999
: [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198999-20190626150238.patch (text/plain), 30.93 KB, created by
Antoine Quint
on 2019-06-26 06:02:40 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-06-26 06:02:40 PDT
Size:
30.93 KB
patch
obsolete
>Subversion Revision: 246781 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e54e326efc2bf11e128d7381707896b884fb7179..b044d41660136879576c60dfc80a4828318d6b92 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,55 @@ >+2019-06-26 Antoine Quint <graouts@apple.com> >+ >+ [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover >+ https://bugs.webkit.org/show_bug.cgi?id=198999 >+ <rdar://problem/51979477> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Up until now, we would not account for pointer capture (see âhttps://w3c.github.io/pointerevents/#pointer-capture) when dispatching >+ mouse boundary events (mouseover, mouseout, mouseenter, mouseleave) and their counterpart pointer events. We would also not account >+ for it when updating :hover styles. >+ >+ Now, when pointer capture changes for an element, we call setCapturingMouseEventsElement() on the EventHandler such that the element >+ that would naturally hit-test is overridden by the pointer capture element when identifying which target to use for the dispatch of >+ boundary mouse events. Additionally, when calling Document::prepareMouseEvent(), we also use the pointer capture element to >+ pass down to Document::updateHoverActiveState() such that :hover styles are applied to the correct element. >+ >+ * dom/Document.cpp: >+ (WebCore::Document::prepareMouseEvent): When a new event is going to be dispatched, we must run the Process Pending Capture Element >+ steps as mandated by the Pointer Events spec. Calling this will dispatch the appropriate pointer capture change events and also >+ required boundary events since EventHandler::setCapturingMouseEventsElement() calls into EventHandler::updateMouseEventTargetNode(). >+ Since this may update the capturing mouse events element, we ensure that we call updateHoverActiveState() with a flag that indicates that. >+ Finally, we use the capturing mouse events element instead of the hit-testing element to pass to updateHoverActiveState() to ensure >+ that is has :hover styles applied. >+ (WebCore::Document::updateHoverActiveState): Account for the new CaptureChange flag to force the invalidation of the :hover and :active >+ elements chain at all times when the capturing mouse events element changed. >+ * dom/Document.h: >+ * dom/PointerEvent.h: Update PointerEvent::createForPointerCapture() to take specific parameters rather than a single PointerEvent to >+ set the pointerId, isPrimary and pointerType properties of the generated event. This is required to call processPendingPointerCapture() >+ outside of PointerEvent dispatch logic since we now call it from Document::prepareMouseEvent() where we haven't yet generated such an >+ event. >+ * page/EventHandler.cpp: >+ (WebCore::EventHandler::setCapturingMouseEventsElement): If a new capturing mouse events element is set, call updateMouseEventTargetNode() >+ to ensure that boundary events are fired to indicate the pointer capture state change. >+ (WebCore::EventHandler::prepareMouseEvent): Keep track of the last PlatformMouseEvent used to prepare a mouse event so that we can use >+ it when setCapturingMouseEventsElement() is called. >+ * page/EventHandler.h: >+ * page/PointerCaptureController.cpp: >+ (WebCore::PointerCaptureController::pointerCaptureElement): Since Document::prepareMouseEvent() needs to know the current pointer capture >+ element, add a new public method that indicates the pointer capture element if that element is contained in the provided document. We need >+ to provide the document since PointerCaptureController is owned by the Page and may manage several documents. >+ (WebCore::PointerCaptureController::dispatchEvent): Only run the Process Pending Capture Element steps when dealing with a touch or pen >+ event since those steps are already ran for mouse events in Document::prepareMouseEvent(). Additionally, since the element target is already >+ set to be the pointer capture element with the changes made to processPendingPointerCapture(), and because on iOS pointer capture is always >+ active, we can remove the code that would retarget the event to the pointer capture element. >+ (WebCore::PointerCaptureController::pointerEventWasDispatched): >+ (WebCore::PointerCaptureController::cancelPointer): >+ (WebCore::PointerCaptureController::processPendingPointerCapture): We now call into EventHandler::setCapturingMouseEventsElement() when the >+ capture target element changes. We must be careful to call this method prior to dispatching the "gotpointercapture" event and after dispatching >+ the "lostpointercapture" event so that boundary events are fired at the right time. >+ * page/PointerCaptureController.h: >+ > 2019-06-24 Wenson Hsieh <wenson_hsieh@apple.com> > > [Text autosizing] [iPadOS] Revise our heuristics to determine idempotent text autosizing candidates >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 4457d13f81edaf7f20a872173ea71a1a6f205732..bb4c8d60eb3ca720d1d16b70d35d27ccf4a97916 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -320,6 +320,10 @@ > #include "GPUCanvasContext.h" > #endif > >+#if ENABLE(POINTER_EVENTS) >+#include "PointerCaptureController.h" >+#endif >+ > namespace WebCore { > > WTF_MAKE_ISO_ALLOCATED_IMPL(Document); >@@ -3732,8 +3736,29 @@ MouseEventWithHitTestResults Document::prepareMouseEvent(const HitTestRequest& r > HitTestResult result(documentPoint); > hitTest(request, result); > >- if (!request.readOnly()) >- updateHoverActiveState(request, result.targetElement()); >+ auto captureElementChanged = CaptureChange::No; >+ if (!request.readOnly()) { >+ auto targetElement = makeRefPtr(result.targetElement()); >+#if ENABLE(POINTER_EVENTS) >+ if (auto* page = this->page()) { >+ // Before we dispatch a new mouse event, we must run the Process Pending Capture Element steps as defined >+ // in https://w3c.github.io/pointerevents/#process-pending-pointer-capture. >+ auto& pointerCaptureController = page->pointerCaptureController(); >+ auto* previousCaptureElement = pointerCaptureController.pointerCaptureElement(this, event.pointerId()); >+ pointerCaptureController.processPendingPointerCapture(event.pointerId()); >+ auto* captureElement = pointerCaptureController.pointerCaptureElement(this, event.pointerId()); >+ // If the capture element has changed while running the Process Pending Capture Element steps then >+ // we need to indicate that when calling updateHoverActiveState to be sure that the :active and :hover >+ // element chains are updated. >+ if (previousCaptureElement != captureElement) >+ captureElementChanged = CaptureChange::Yes; >+ // If we have a capture element, we must target it instead of what would normally hit-test for this event. >+ if (captureElement) >+ targetElement = captureElement; >+ } >+#endif >+ updateHoverActiveState(request, targetElement.get(), captureElementChanged); >+ } > > return MouseEventWithHitTestResults(event, result); > } >@@ -6737,7 +6762,7 @@ static Element* findNearestCommonComposedAncestor(Element* elementA, Element* el > return nullptr; > } > >-void Document::updateHoverActiveState(const HitTestRequest& request, Element* innerElement) >+void Document::updateHoverActiveState(const HitTestRequest& request, Element* innerElement, CaptureChange captureElementChanged) > { > ASSERT(!request.readOnly()); > >@@ -6776,8 +6801,8 @@ void Document::updateHoverActiveState(const HitTestRequest& request, Element* in > > // If the mouse is down and if this is a mouse move event, we want to restrict changes in > // :hover/:active to only apply to elements that are in the :active chain that we froze >- // at the time the mouse went down. >- bool mustBeInActiveChain = request.active() && request.move(); >+ // at the time the mouse went down, unless the capture element changed. >+ bool mustBeInActiveChain = request.active() && request.move() && captureElementChanged == CaptureChange::No; > > RefPtr<Element> oldHoveredElement = WTFMove(m_hoveredElement); > >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 5ba7496601bb877b2b55d97d6725cd9e798260ff..8e92d80356500716525b4cfd141425f10c119179 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -760,7 +760,8 @@ public: > void hoveredElementDidDetach(Element&); > void elementInActiveChainDidDetach(Element&); > >- void updateHoverActiveState(const HitTestRequest&, Element*); >+ enum class CaptureChange : uint8_t { Yes, No }; >+ void updateHoverActiveState(const HitTestRequest&, Element*, CaptureChange = CaptureChange::No); > > // Updates for :target (CSS3 selector). > void setCSSTarget(Element*); >diff --git a/Source/WebCore/dom/PointerEvent.h b/Source/WebCore/dom/PointerEvent.h >index f9587fca1543b17e26355e667ab97618c5ce68c5..b26deb5eb56e7a13c2291e37400c043df88f6998 100644 >--- a/Source/WebCore/dom/PointerEvent.h >+++ b/Source/WebCore/dom/PointerEvent.h >@@ -61,13 +61,13 @@ public: > return adoptRef(*new PointerEvent(type, WTFMove(initializer))); > } > >- static Ref<PointerEvent> createForPointerCapture(const AtomString& type, const PointerEvent& pointerEvent) >+ static Ref<PointerEvent> createForPointerCapture(const AtomString& type, PointerID pointerId, bool isPrimary, String pointerType) > { > Init initializer; > initializer.bubbles = true; >- initializer.pointerId = pointerEvent.pointerId(); >- initializer.isPrimary = pointerEvent.isPrimary(); >- initializer.pointerType = pointerEvent.pointerType(); >+ initializer.pointerId = pointerId; >+ initializer.isPrimary = isPrimary; >+ initializer.pointerType = pointerType; > return adoptRef(*new PointerEvent(type, WTFMove(initializer))); > } > >diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp >index a30c9e9437e75a0b25ee7d8530855b25a54a08be..c8bd520cd88c3c9cc857755984df8047322c9b9f 100644 >--- a/Source/WebCore/page/EventHandler.cpp >+++ b/Source/WebCore/page/EventHandler.cpp >@@ -127,6 +127,10 @@ > #include "PointerLockController.h" > #endif > >+#if ENABLE(POINTER_EVENTS) >+#include "RuntimeEnabledFeatures.h" >+#endif >+ > namespace WebCore { > > using namespace HTMLNames; >@@ -2478,12 +2482,22 @@ void EventHandler::clearDragState() > > void EventHandler::setCapturingMouseEventsElement(Element* element) > { >+ if (m_capturingMouseEventsElement == element) >+ return; >+ > m_capturingMouseEventsElement = element; > m_eventHandlerWillResetCapturingMouseEventsElement = false; >+ >+#if ENABLE(POINTER_EVENTS) >+ // If we have a new capture element, we need to dispatch boundary mouse events. >+ if (RuntimeEnabledFeatures::sharedFeatures().pointerEventsEnabled()) >+ updateMouseEventTargetNode(element, m_lastPlatformMouseEvent, FireMouseOverOut::Yes); >+#endif > } > > MouseEventWithHitTestResults EventHandler::prepareMouseEvent(const HitTestRequest& request, const PlatformMouseEvent& mouseEvent) > { >+ m_lastPlatformMouseEvent = mouseEvent; > Ref<Frame> protectedFrame(m_frame); > ASSERT(m_frame.document()); > return m_frame.document()->prepareMouseEvent(request, documentPointForWindowPoint(m_frame, mouseEvent.position()), mouseEvent); >diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h >index 34149e11cbe5d26a42eb50ae805652d7f115b66c..57796e2d47ab7e72f4b435c3caa0ebbcbe8ae618 100644 >--- a/Source/WebCore/page/EventHandler.h >+++ b/Source/WebCore/page/EventHandler.h >@@ -592,6 +592,7 @@ private: > IntPoint m_mouseDownPos; // In our view's coords. > WallTime m_mouseDownTimestamp; > PlatformMouseEvent m_mouseDown; >+ PlatformMouseEvent m_lastPlatformMouseEvent; > > #if PLATFORM(COCOA) > NSView *m_mouseDownView { nullptr }; >diff --git a/Source/WebCore/page/PointerCaptureController.cpp b/Source/WebCore/page/PointerCaptureController.cpp >index 001b309298a1b36599983adcdfb5c40bf822704b..6d29667dfb49593336871d98540fd845c7a44af5 100644 >--- a/Source/WebCore/page/PointerCaptureController.cpp >+++ b/Source/WebCore/page/PointerCaptureController.cpp >@@ -48,6 +48,17 @@ PointerCaptureController::PointerCaptureController(Page& page) > reset(); > } > >+Element* PointerCaptureController::pointerCaptureElement(Document* document, PointerID pointerId) >+{ >+ auto iterator = m_activePointerIdsToCapturingData.find(pointerId); >+ if (iterator != m_activePointerIdsToCapturingData.end()) { >+ auto pointerCaptureElement = iterator->value.targetOverride; >+ if (pointerCaptureElement && &pointerCaptureElement->document() == document) >+ return pointerCaptureElement.get(); >+ } >+ return nullptr; >+} >+ > ExceptionOr<void> PointerCaptureController::setPointerCapture(Element* capturingTarget, PointerID pointerId) > { > // https://w3c.github.io/pointerevents/#setting-pointer-capture >@@ -271,15 +282,9 @@ void PointerCaptureController::dispatchEvent(PointerEvent& event, EventTarget* t > > // https://w3c.github.io/pointerevents/#firing-events-using-the-pointerevent-interface > // If the event is not gotpointercapture or lostpointercapture, run Process Pending Pointer Capture steps for this PointerEvent. >- processPendingPointerCapture(event); >- >- // If the pointer capture target override has been set for the pointer, set the target to pointer capture target override object. >- auto iterator = m_activePointerIdsToCapturingData.find(event.pointerId()); >- if (iterator != m_activePointerIdsToCapturingData.end()) { >- auto& capturingData = iterator->value; >- if (capturingData.targetOverride) >- target = capturingData.targetOverride.get(); >- } >+ // We only need to do this for non-mouse type since for mouse events this method will be called in Document::prepareMouseEvent(). >+ if (event.pointerType() != PointerEvent::mousePointerType()) >+ processPendingPointerCapture(event.pointerId()); > > pointerEventWillBeDispatched(event, target); > target->dispatchEvent(event); >@@ -340,7 +345,7 @@ void PointerCaptureController::pointerEventWasDispatched(const PointerEvent& eve > // https://w3c.github.io/pointerevents/#implicit-release-of-pointer-capture > if (event.type() == eventNames().pointerupEvent) { > capturingData.pendingTargetOverride = nullptr; >- processPendingPointerCapture(event); >+ processPendingPointerCapture(event.pointerId()); > } > > // If a mouse pointer has moved while it isn't pressed, make sure we reset the preventsCompatibilityMouseEvents flag since >@@ -399,14 +404,17 @@ void PointerCaptureController::cancelPointer(PointerID pointerId, const IntPoint > target->dispatchEvent(cancelEvent); > target->dispatchEvent(PointerEvent::create(eventNames().pointeroutEvent, pointerId, capturingData.pointerType, isPrimary)); > target->dispatchEvent(PointerEvent::create(eventNames().pointerleaveEvent, pointerId, capturingData.pointerType, isPrimary)); >- processPendingPointerCapture(WTFMove(cancelEvent)); >+ processPendingPointerCapture(pointerId); > } > >-void PointerCaptureController::processPendingPointerCapture(const PointerEvent& event) >+void PointerCaptureController::processPendingPointerCapture(PointerID pointerId) > { >- // https://w3c.github.io/pointerevents/#process-pending-pointer-capture >+ if (m_processingPendingPointerCapture) >+ return; > >- auto iterator = m_activePointerIdsToCapturingData.find(event.pointerId()); >+ m_processingPendingPointerCapture = true; >+ >+ auto iterator = m_activePointerIdsToCapturingData.find(pointerId); > if (iterator == m_activePointerIdsToCapturingData.end()) > return; > >@@ -415,19 +423,32 @@ void PointerCaptureController::processPendingPointerCapture(const PointerEvent& > // Cache the pending target override since it could be modified during the dispatch of events in this function. > auto pendingTargetOverride = capturingData.pendingTargetOverride; > >+ // https://w3c.github.io/pointerevents/#process-pending-pointer-capture > // 1. If the pointer capture target override for this pointer is set and is not equal to the pending pointer capture target override, > // then fire a pointer event named lostpointercapture at the pointer capture target override node. >- if (capturingData.targetOverride && capturingData.targetOverride->isConnected() && capturingData.targetOverride != pendingTargetOverride) >- capturingData.targetOverride->dispatchEvent(PointerEvent::createForPointerCapture(eventNames().lostpointercaptureEvent, event)); >+ if (capturingData.targetOverride && capturingData.targetOverride->isConnected() && capturingData.targetOverride != pendingTargetOverride) { >+ capturingData.targetOverride->dispatchEvent(PointerEvent::createForPointerCapture(eventNames().lostpointercaptureEvent, pointerId, capturingData.isPrimary, capturingData.pointerType)); >+ if (capturingData.pointerType == PointerEvent::mousePointerType()) { >+ if (auto* frame = capturingData.targetOverride->document().frame()) >+ frame->eventHandler().setCapturingMouseEventsElement(nullptr); >+ } >+ } > > // 2. If the pending pointer capture target override for this pointer is set and is not equal to the pointer capture target override, > // then fire a pointer event named gotpointercapture at the pending pointer capture target override. >- if (capturingData.pendingTargetOverride && capturingData.targetOverride != pendingTargetOverride) >- pendingTargetOverride->dispatchEvent(PointerEvent::createForPointerCapture(eventNames().gotpointercaptureEvent, event)); >+ if (capturingData.pendingTargetOverride && capturingData.targetOverride != pendingTargetOverride) { >+ if (capturingData.pointerType == PointerEvent::mousePointerType()) { >+ if (auto* frame = pendingTargetOverride->document().frame()) >+ frame->eventHandler().setCapturingMouseEventsElement(pendingTargetOverride.get()); >+ } >+ pendingTargetOverride->dispatchEvent(PointerEvent::createForPointerCapture(eventNames().gotpointercaptureEvent, pointerId, capturingData.isPrimary, capturingData.pointerType)); >+ } > > // 3. Set the pointer capture target override to the pending pointer capture target override, if set. Otherwise, clear the pointer > // capture target override. > capturingData.targetOverride = pendingTargetOverride; >+ >+ m_processingPendingPointerCapture = false; > } > > } // namespace WebCore >diff --git a/Source/WebCore/page/PointerCaptureController.h b/Source/WebCore/page/PointerCaptureController.h >index 3041e3a88d5a7851502506b314819466484efdd4..27c9cd83bead64184b4621f2f560383bca3e40f9 100644 >--- a/Source/WebCore/page/PointerCaptureController.h >+++ b/Source/WebCore/page/PointerCaptureController.h >@@ -41,6 +41,7 @@ class PointerCaptureController { > public: > explicit PointerCaptureController(Page&); > >+ Element* pointerCaptureElement(Document*, PointerID); > ExceptionOr<void> setPointerCapture(Element*, PointerID); > ExceptionOr<void> releasePointerCapture(Element*, PointerID); > bool hasPointerCapture(Element*, PointerID); >@@ -60,6 +61,7 @@ public: > bool preventsCompatibilityMouseEventsForIdentifier(PointerID); > void dispatchEvent(PointerEvent&, EventTarget*); > WEBCORE_EXPORT void cancelPointer(PointerID, const IntPoint&); >+ void processPendingPointerCapture(PointerID); > > private: > struct CapturingData { >@@ -75,13 +77,13 @@ private: > > void pointerEventWillBeDispatched(const PointerEvent&, EventTarget*); > void pointerEventWasDispatched(const PointerEvent&); >- void processPendingPointerCapture(const PointerEvent&); > > Page& m_page; > // While PointerID is defined as int32_t, we use int64_t here so that we may use a value outside of the int32_t range to have safe > // empty and removed values, allowing any int32_t to be provided through the API for lookup in this hashmap. > using PointerIdToCapturingDataMap = HashMap<int64_t, CapturingData, WTF::IntHash<int64_t>, WTF::SignedWithZeroKeyHashTraits<int64_t>>; > PointerIdToCapturingDataMap m_activePointerIdsToCapturingData; >+ bool m_processingPendingPointerCapture; > }; > > } // namespace WebCore >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 8a9fa8f70b0548514aa1cc78e2008761a3babf4b..8fda2ce1fa3fc42f6b63be3fca6be0b93fa934c3 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-26 Antoine Quint <graouts@apple.com> >+ >+ [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover >+ https://bugs.webkit.org/show_bug.cgi?id=198999 >+ <rdar://problem/51979477> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Update some WK1-specific expectations. >+ >+ * platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt: >+ * platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt: >+ > 2019-06-24 Wenson Hsieh <wenson_hsieh@apple.com> > > [Text autosizing] [iPadOS] Revise our heuristics to determine idempotent text autosizing candidates >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 3d32170ae4e9ffe844bc2db43f21b76bb61ccc68..6ec2148550ecaf64a3b0cda0ddde918e0880c1b2 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-26 Antoine Quint <graouts@apple.com> >+ >+ [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover >+ https://bugs.webkit.org/show_bug.cgi?id=198999 >+ <rdar://problem/51979477> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Mark the progressions in 3 WPT tests. >+ >+ * web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt: >+ * web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt: >+ * web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt: >+ > 2019-06-24 Antoine Quint <graouts@apple.com> > > [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt >index 02f6a828305a3776b5804d7aeda39347a21ae6f5..4fee7f2723a50ad7145bc6b4ad4a3f6cfe926adb 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt >@@ -1,10 +1,8 @@ > Pointer Event: Boundary event sequence at implicit capture release > >-Follow the test instructions with mouse. If you don't have the device skip it. >- > When a captured pointer is implicitly released after a click, the boundary events should follow the lostpointercapture event. > > Click on the black box with mouse and do not move the mouse after or during the click. > >-FAIL mouse Event sequence at implicit release on click assert_equals: expected "pointerout@target, pointerleave@target, pointerover@capture-target, pointerenter@capture-target, gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target, pointerout@capture-target, pointerleave@capture-target, pointerover@target, pointerenter@target" but got "gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target" >+PASS mouse Event sequence at implicit release on click > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt >index 8ae0fa221a4940a8fc2a5e64051530324b1b3e4e..199239c6611e4d05d71542fff18d673e4e655f33 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt >@@ -1,5 +1,5 @@ > >-FAIL Mouse down and capture to green. assert_array_equals: Received events: green received pointerover,green received pointerenter,green received pointermove,green received pointerdown,green received gotpointercapture,green received pointermove,green received pointerout,green received pointerleave,green received pointerover,green received pointerenter,green received pointermove lengths differ, expected 7 got 11 >-FAIL Mouse down at green and capture to blue. assert_array_equals: Received events: green received pointerout,green received pointerover,green received pointerenter,green received pointermove,green received pointermove,green received pointermove,green received pointermove lengths differ, expected 11 got 7 >-FAIL Mouse down and capture to green, move to blue and release capture assert_array_equals: Received events: green received pointerout,green received pointerover,green received pointerenter,green received pointermove,green received lostpointercapture,green received pointermove,green received pointerout,green received pointerleave,blue received pointerover,blue received pointerenter,blue received pointermove,blue received pointermove property 0, expected "green received pointerover" but got "green received pointerout" >+PASS Mouse down and capture to green. >+PASS Mouse down at green and capture to blue. >+PASS Mouse down and capture to green, move to blue and release capture > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt >index db8c51d0cddf8796a73a2713555c1eec9d785b19..36e040ea01bfc2e4de0fbc131b4ef56eb0e2f5a6 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt >@@ -16,14 +16,11 @@ Test complete: Scroll to Summary to view Pass/Fail Results. > > The following pointer types were detected: mouse. > >-The following events were logged: pointerover@target1, gotpointercapture@target0, pointerover@target0, pointerover@target0, lostpointercapture@target0. >+The following events were logged: pointerover@target1, pointerover@target0, gotpointercapture@target0, lostpointercapture@target0. > > Refresh the page to run the tests again with a different pointer type. > > >-Harness Error (FAIL), message = 1 duplicate test name: "relatedTarget should not be null even when the capture is set." >- > PASS pointerover shouldn't trigger for the purple rectangle while the black rectangle has capture > PASS relatedTarget should not be null even when the capture is set. >-PASS relatedTarget should not be null even when the capture is set. > >diff --git a/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt b/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt >index c93ebe6b894d139672f6a45b85fa8e3b3fe0bfac..147f41bab86a1d34b825b7eb1d129fc0956fe92b 100644 >--- a/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt >+++ b/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_boundary_events_at_implicit_release_hoverable_pointers-expected.txt >@@ -6,5 +6,5 @@ When a captured pointer is implicitly released after a click, the boundary event > > Click on the black box with mouse and do not move the mouse after or during the click. > >-FAIL mouse Event sequence at implicit release on click assert_equals: expected "pointerout@target, pointerleave@target, pointerover@capture-target, pointerenter@capture-target, gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target, pointerout@capture-target, pointerleave@capture-target, pointerover@target, pointerenter@target" but got "gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target, pointermove@target" >+FAIL mouse Event sequence at implicit release on click assert_equals: expected "pointerout@target, pointerleave@target, pointerover@capture-target, pointerenter@capture-target, gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target, pointerout@capture-target, pointerleave@capture-target, pointerover@target, pointerenter@target" but got "pointerout@target, pointerleave@target, pointerover@capture-target, pointerenter@capture-target, gotpointercapture@capture-target, pointerup@capture-target, lostpointercapture@capture-target, pointerout@capture-target, pointerleave@capture-target, pointerover@target, pointerenter@target, pointermove@target" > >diff --git a/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt b/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt >index 44e1be4b3b3ed81f2b4b28062b0afcda2172eedf..e392c18468e866c66c52a52bc835f987e96cf81f 100644 >--- a/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt >+++ b/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_setpointercapture_relatedtarget-expected.txt >@@ -16,14 +16,11 @@ Test complete: Scroll to Summary to view Pass/Fail Results. > > The following pointer types were detected: mouse. > >-The following events were logged: pointerover@target1, gotpointercapture@target0, pointerover@target0, pointerover@target0, lostpointercapture@target0, pointerover@target0. >+The following events were logged: pointerover@target1, pointerover@target0, gotpointercapture@target0, lostpointercapture@target0, pointerover@target0. > > Refresh the page to run the tests again with a different pointer type. > > >-Harness Error (FAIL), message = 1 duplicate test name: "relatedTarget should not be null even when the capture is set." >- > PASS pointerover shouldn't trigger for the purple rectangle while the black rectangle has capture > PASS relatedTarget should not be null even when the capture is set. >-PASS relatedTarget should not be null even when the capture is set. >
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 198999
:
372461
|
372463
|
372468
|
372472
|
372481
|
372551
|
372685
|
372695
|
372919
|
372923
|
372924
|
372931
|
372955