Changeset 246728 in webkit


Ignore:
Timestamp:
Jun 24, 2019 3:00:59 AM (5 years ago)
Author:
graouts@webkit.org
Message:

[Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
https://bugs.webkit.org/show_bug.cgi?id=198999
<rdar://problem/52005663>

Reviewed by Dean Jackson.

We should only set the mouse events capturing element in EventHandler if we're dealing with mouse-originated Pointer Events (part 2).

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::releasePointerCapture):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246725 r246728  
     12019-06-23  Antoine Quint  <graouts@apple.com>
     2
     3        [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
     4        https://bugs.webkit.org/show_bug.cgi?id=198999
     5        <rdar://problem/52005663>
     6
     7        Reviewed by Dean Jackson.
     8
     9        We should only set the mouse events capturing element in EventHandler if we're dealing with mouse-originated Pointer Events (part 2).
     10
     11        * page/PointerCaptureController.cpp:
     12        (WebCore::PointerCaptureController::releasePointerCapture):
     13
    1142019-06-23  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/Source/WebCore/page/PointerCaptureController.cpp

    r246716 r246728  
    105105
    106106    // 3. For the specified pointerId, clear the pending pointer capture target override, if set.
    107     iterator->value.pendingTargetOverride = nullptr;
     107    auto& capturingData = iterator->value;
     108    capturingData.pendingTargetOverride = nullptr;
    108109
    109110    // Since we may not call processPendingPointerCapture() until the dispatch of the next event,
    110111    // we must reset EventHandler's capturing mouse element right now so that the next event processed
    111112    // does not use it as an overriding target.
    112     m_page.mainFrame().eventHandler().setCapturingMouseEventsElement(nullptr);
     113    if (capturingData.pointerType == PointerEvent::mousePointerType())
     114        m_page.mainFrame().eventHandler().setCapturingMouseEventsElement(nullptr);
    113115
    114116    return { };
Note: See TracChangeset for help on using the changeset viewer.