WebKit Bugzilla
Attachment 371584 Details for
Bug 198657
: Limit simulated mouse events on Google Maps to entering Street View
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198657-20190607143618.patch (text/plain), 2.48 KB, created by
Antoine Quint
on 2019-06-07 05:36:19 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-06-07 05:36:19 PDT
Size:
2.48 KB
patch
obsolete
>Subversion Revision: 246189 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 113371e117e3afbe137b55c8d62cd769512fe95c..eb43f321d952ac54ad66010674a93e5ef19d2591 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-07 Antoine Quint <graouts@apple.com> >+ >+ 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 NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * page/Quirks.cpp: >+ (WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const): >+ * page/Quirks.h: >+ > 2019-06-06 Chris Dumez <cdumez@apple.com> > > RELEASE_ASSERT hit in CachedFrame constructor >diff --git a/Source/WebCore/page/Quirks.cpp b/Source/WebCore/page/Quirks.cpp >index 2aaa07113a1bebb0b5d327c0342ba0a487ef141b..9c7552a808a45f3135ff7eed4b780cfed123ad96 100644 >--- a/Source/WebCore/page/Quirks.cpp >+++ b/Source/WebCore/page/Quirks.cpp >@@ -321,6 +321,22 @@ bool Quirks::shouldDispatchSimulatedMouseEvents() const > return false; > } > >+bool Quirks::shouldDispatchSimulatedMouseEventsOnTarget(EventTarget* target) const >+{ >+#if PLATFORM(IOS_FAMILY) >+ 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 = m_document->topDocument().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 >+ return false; >+} >+ > bool Quirks::shouldDisablePointerEventsQuirk() const > { > #if PLATFORM(IOS_FAMILY) >diff --git a/Source/WebCore/page/Quirks.h b/Source/WebCore/page/Quirks.h >index 6b1f1bb9537a5d033d957e851e9b4c15f3f1b194..f6adc3e58c90f76f1c681c92cca2da2b47ceb466 100644 >--- a/Source/WebCore/page/Quirks.h >+++ b/Source/WebCore/page/Quirks.h >@@ -50,6 +50,7 @@ public: > bool hasBrokenEncryptedMediaAPISupportQuirk() const; > bool hasWebSQLSupportQuirk() const; > bool shouldDispatchSimulatedMouseEvents() const; >+ bool shouldDispatchSimulatedMouseEventsOnTarget(EventTarget*) const; > bool shouldDisablePointerEventsQuirk() const; > bool needsInputModeNoneImplicitly(const HTMLElement&) const; >
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 198657
:
371584
|
371585