Changeset 244240 in webkit


Ignore:
Timestamp:
Apr 13, 2019 1:00:44 AM (5 years ago)
Author:
graouts@webkit.org
Message:

Provide a quirk to disable Pointer Events
https://bugs.webkit.org/show_bug.cgi?id=196877
<rdar://problem/49863470>

Reviewed by Dean Jackson.

Add a quirk to disable Pointer Events. We also opt a website that has compatibility issues with Pointer Events into this new quirk.

  • dom/PointerEvent.idl:
  • page/Quirks.cpp:

(WebCore::Quirks::shouldDisablePointerEventsQuirk const):

  • page/Quirks.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244239 r244240  
     12019-04-12  Antoine Quint  <graouts@apple.com>
     2
     3        Provide a quirk to disable Pointer Events
     4        https://bugs.webkit.org/show_bug.cgi?id=196877
     5        <rdar://problem/49863470>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Add a quirk to disable Pointer Events. We also opt a website that has compatibility issues with Pointer Events into this new quirk.
     10
     11        * dom/PointerEvent.idl:
     12        * page/Quirks.cpp:
     13        (WebCore::Quirks::shouldDisablePointerEventsQuirk const):
     14        * page/Quirks.h:
     15        * page/scrolling/ScrollingCoordinator.cpp:
     16        (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
     17        * style/StyleTreeResolver.cpp:
     18        (WebCore::Style::TreeResolver::resolveElement):
     19
    1202019-04-12  Wenson Hsieh  <wenson_hsieh@apple.com>
    221
  • trunk/Source/WebCore/dom/PointerEvent.idl

    r240201 r244240  
    4040    Conditional=POINTER_EVENTS,
    4141    EnabledAtRuntime=PointerEvents,
     42    DisabledByQuirk=shouldDisablePointerEvents,
    4243    Constructor(DOMString type, optional PointerEventInit eventInitDict),
    4344    Exposed=Window
  • trunk/Source/WebCore/page/Quirks.cpp

    r244218 r244240  
    229229}
    230230
    231 }
     231bool Quirks::shouldDisablePointerEventsQuirk() const
     232{
     233#if PLATFORM(IOS_FAMILY)
     234    if (!needsQuirks())
     235        return false;
     236
     237    auto& url = m_document->topDocument().url();
     238    auto host = url.host();
     239    if (equalLettersIgnoringASCIICase(host, "mailchimp.com") || host.endsWithIgnoringASCIICase(".mailchimp.com"))
     240        return true;
     241#endif
     242    return false;
     243}
     244
     245}
  • trunk/Source/WebCore/page/Quirks.h

    r244218 r244240  
    4747    bool hasWebSQLSupportQuirk() const;
    4848    bool shouldDispatchSimulatedMouseEvents() const;
     49    bool shouldDisablePointerEventsQuirk() const;
    4950
    5051    WEBCORE_EXPORT bool isTouchBarUpdateSupressedForHiddenContentEditable() const;
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r243855 r244240  
    112112
    113113#if ENABLE(POINTER_EVENTS)
    114     if (RuntimeEnabledFeatures::sharedFeatures().pointerEventsEnabled()) {
     114    if (!document->quirks().shouldDisablePointerEventsQuirk() && RuntimeEnabledFeatures::sharedFeatures().pointerEventsEnabled()) {
    115115        if (auto* touchActionElements = frame.document()->touchActionElements()) {
    116116            auto& touchActionData = eventTrackingRegions.touchActionData;
  • trunk/Source/WebCore/style/StyleTreeResolver.cpp

    r243444 r244240  
    4343#include "Page.h"
    4444#include "PlatformStrategies.h"
     45#include "Quirks.h"
    4546#include "RenderElement.h"
    4647#include "RenderStyle.h"
     
    239240
    240241#if ENABLE(POINTER_EVENTS) && PLATFORM(IOS_FAMILY)
    241     if (RuntimeEnabledFeatures::sharedFeatures().pointerEventsEnabled())
     242    if (!m_document.quirks().shouldDisablePointerEventsQuirk() && RuntimeEnabledFeatures::sharedFeatures().pointerEventsEnabled())
    242243        m_document.updateTouchActionElements(element, *update.style.get());
    243244#endif
Note: See TracChangeset for help on using the changeset viewer.