Title: [244240] trunk/Source/WebCore
- Revision
- 244240
- Author
- [email protected]
- Date
- 2019-04-13 01:00:44 -0700 (Sat, 13 Apr 2019)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (244239 => 244240)
--- trunk/Source/WebCore/ChangeLog 2019-04-13 03:54:10 UTC (rev 244239)
+++ trunk/Source/WebCore/ChangeLog 2019-04-13 08:00:44 UTC (rev 244240)
@@ -1,3 +1,22 @@
+2019-04-12 Antoine Quint <[email protected]>
+
+ 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):
+
2019-04-12 Wenson Hsieh <[email protected]>
Enable modern compatibility mode by default in WKWebView on some devices
Modified: trunk/Source/WebCore/dom/PointerEvent.idl (244239 => 244240)
--- trunk/Source/WebCore/dom/PointerEvent.idl 2019-04-13 03:54:10 UTC (rev 244239)
+++ trunk/Source/WebCore/dom/PointerEvent.idl 2019-04-13 08:00:44 UTC (rev 244240)
@@ -39,6 +39,7 @@
[
Conditional=POINTER_EVENTS,
EnabledAtRuntime=PointerEvents,
+ DisabledByQuirk=shouldDisablePointerEvents,
Constructor(DOMString type, optional PointerEventInit eventInitDict),
Exposed=Window
] interface PointerEvent : MouseEvent {
Modified: trunk/Source/WebCore/page/Quirks.cpp (244239 => 244240)
--- trunk/Source/WebCore/page/Quirks.cpp 2019-04-13 03:54:10 UTC (rev 244239)
+++ trunk/Source/WebCore/page/Quirks.cpp 2019-04-13 08:00:44 UTC (rev 244240)
@@ -228,4 +228,18 @@
return false;
}
+bool Quirks::shouldDisablePointerEventsQuirk() const
+{
+#if PLATFORM(IOS_FAMILY)
+ if (!needsQuirks())
+ return false;
+
+ auto& url = ""
+ auto host = url.host();
+ if (equalLettersIgnoringASCIICase(host, "mailchimp.com") || host.endsWithIgnoringASCIICase(".mailchimp.com"))
+ return true;
+#endif
+ return false;
}
+
+}
Modified: trunk/Source/WebCore/page/Quirks.h (244239 => 244240)
--- trunk/Source/WebCore/page/Quirks.h 2019-04-13 03:54:10 UTC (rev 244239)
+++ trunk/Source/WebCore/page/Quirks.h 2019-04-13 08:00:44 UTC (rev 244240)
@@ -46,6 +46,7 @@
bool hasBrokenEncryptedMediaAPISupportQuirk() const;
bool hasWebSQLSupportQuirk() const;
bool shouldDispatchSimulatedMouseEvents() const;
+ bool shouldDisablePointerEventsQuirk() const;
WEBCORE_EXPORT bool isTouchBarUpdateSupressedForHiddenContentEditable() const;
WEBCORE_EXPORT bool isNeverRichlyEditableForTouchBar() const;
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (244239 => 244240)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2019-04-13 03:54:10 UTC (rev 244239)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2019-04-13 08:00:44 UTC (rev 244240)
@@ -111,7 +111,7 @@
auto eventTrackingRegions = document->eventTrackingRegions();
#if ENABLE(POINTER_EVENTS)
- if (RuntimeEnabledFeatures::sharedFeatures().pointerEventsEnabled()) {
+ if (!document->quirks().shouldDisablePointerEventsQuirk() && RuntimeEnabledFeatures::sharedFeatures().pointerEventsEnabled()) {
if (auto* touchActionElements = frame.document()->touchActionElements()) {
auto& touchActionData = eventTrackingRegions.touchActionData;
for (const auto& element : *touchActionElements) {
Modified: trunk/Source/WebCore/style/StyleTreeResolver.cpp (244239 => 244240)
--- trunk/Source/WebCore/style/StyleTreeResolver.cpp 2019-04-13 03:54:10 UTC (rev 244239)
+++ trunk/Source/WebCore/style/StyleTreeResolver.cpp 2019-04-13 08:00:44 UTC (rev 244240)
@@ -42,6 +42,7 @@
#include "NodeRenderStyle.h"
#include "Page.h"
#include "PlatformStrategies.h"
+#include "Quirks.h"
#include "RenderElement.h"
#include "RenderStyle.h"
#include "RenderView.h"
@@ -238,7 +239,7 @@
auto afterUpdate = resolvePseudoStyle(element, update, PseudoId::After);
#if ENABLE(POINTER_EVENTS) && PLATFORM(IOS_FAMILY)
- if (RuntimeEnabledFeatures::sharedFeatures().pointerEventsEnabled())
+ if (!m_document.quirks().shouldDisablePointerEventsQuirk() && RuntimeEnabledFeatures::sharedFeatures().pointerEventsEnabled())
m_document.updateTouchActionElements(element, *update.style.get());
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes