Title: [246208] branches/safari-608.1.27-branch/Source/WebCore
- Revision
- 246208
- Author
- [email protected]
- Date
- 2019-06-07 10:57:12 -0700 (Fri, 07 Jun 2019)
Log Message
Cherry-pick r246205. rdar://problem/51345064
Limit simulated mouse events on Google Maps to entering Street View
https://bugs.webkit.org/show_bug.cgi?id=198657
<rdar://problem/51345064>
Reviewed by Brent Fulgham.
* page/Quirks.cpp:
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
(WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const):
* page/Quirks.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-608.1.27-branch/Source/WebCore/ChangeLog (246207 => 246208)
--- branches/safari-608.1.27-branch/Source/WebCore/ChangeLog 2019-06-07 17:50:49 UTC (rev 246207)
+++ branches/safari-608.1.27-branch/Source/WebCore/ChangeLog 2019-06-07 17:57:12 UTC (rev 246208)
@@ -1,3 +1,33 @@
+2019-06-07 Babak Shafiei <[email protected]>
+
+ Cherry-pick r246205. rdar://problem/51345064
+
+ Limit simulated mouse events on Google Maps to entering Street View
+ https://bugs.webkit.org/show_bug.cgi?id=198657
+ <rdar://problem/51345064>
+
+ Reviewed by Brent Fulgham.
+
+ * page/Quirks.cpp:
+ (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
+ (WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const):
+ * page/Quirks.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-06-07 Antoine Quint <[email protected]>
+
+ Limit simulated mouse events on Google Maps to entering Street View
+ https://bugs.webkit.org/show_bug.cgi?id=198657
+ <rdar://problem/51345064>
+
+ Reviewed by Brent Fulgham.
+
+ * page/Quirks.cpp:
+ (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
+ (WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const):
+ * page/Quirks.h:
+
2019-06-06 Babak Shafiei <[email protected]>
Cherry-pick r246096. rdar://problem/51375055
Modified: branches/safari-608.1.27-branch/Source/WebCore/page/Quirks.cpp (246207 => 246208)
--- branches/safari-608.1.27-branch/Source/WebCore/page/Quirks.cpp 2019-06-07 17:50:49 UTC (rev 246207)
+++ branches/safari-608.1.27-branch/Source/WebCore/page/Quirks.cpp 2019-06-07 17:57:12 UTC (rev 246208)
@@ -278,9 +278,9 @@
return shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost(m_document->topDocument().url().host());
}
+#if PLATFORM(IOS_FAMILY)
bool Quirks::shouldDispatchSimulatedMouseEvents() const
{
-#if PLATFORM(IOS_FAMILY)
if (!needsQuirks())
return false;
@@ -313,10 +313,23 @@
return true;
if (equalLettersIgnoringASCIICase(host, "naver.com") || host.endsWithIgnoringASCIICase(".naver.com"))
return true;
-#endif
return false;
}
+bool Quirks::shouldDispatchSimulatedMouseEventsOnTarget(EventTarget* target) const
+{
+ if (!needsQuirks() || !shouldDispatchSimulatedMouseEvents())
+ return false;
+
+ // On Google Maps, we want to limit simulated mouse events to dragging the little man that allows entering into Street View.
+ auto& url = ""
+ auto host = url.host();
+ if (equalLettersIgnoringASCIICase(host, "www.google.com") && url.path().startsWithIgnoringASCIICase("/maps/"))
+ return is<Element>(target) && downcast<Element>(target)->getAttribute("class") == "widget-expand-button-pegman-icon";
+ return true;
+}
+#endif
+
bool Quirks::shouldDisablePointerEventsQuirk() const
{
#if PLATFORM(IOS_FAMILY)
Modified: branches/safari-608.1.27-branch/Source/WebCore/page/Quirks.h (246207 => 246208)
--- branches/safari-608.1.27-branch/Source/WebCore/page/Quirks.h 2019-06-07 17:50:49 UTC (rev 246207)
+++ branches/safari-608.1.27-branch/Source/WebCore/page/Quirks.h 2019-06-07 17:57:12 UTC (rev 246208)
@@ -49,7 +49,10 @@
bool shouldAutoplayForArbitraryUserGesture() const;
bool hasBrokenEncryptedMediaAPISupportQuirk() const;
bool hasWebSQLSupportQuirk() const;
+#if PLATFORM(IOS_FAMILY)
bool shouldDispatchSimulatedMouseEvents() const;
+ bool shouldDispatchSimulatedMouseEventsOnTarget(EventTarget*) const;
+#endif
bool shouldDisablePointerEventsQuirk() const;
bool needsInputModeNoneImplicitly(const HTMLElement&) const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes