⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246208 in webkit


Ignore:
Timestamp:
Jun 7, 2019, 10:57:12 AM (7 years ago)
Author:
bshafiei@apple.com
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

Location:
branches/safari-608.1.27-branch/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-608.1.27-branch/Source/WebCore/ChangeLog

    r246191 r246208  
     12019-06-07  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Cherry-pick r246205. rdar://problem/51345064
     4
     5    Limit simulated mouse events on Google Maps to entering Street View
     6    https://bugs.webkit.org/show_bug.cgi?id=198657
     7    <rdar://problem/51345064>
     8   
     9    Reviewed by Brent Fulgham.
     10   
     11    * page/Quirks.cpp:
     12    (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
     13    (WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const):
     14    * page/Quirks.h:
     15   
     16    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     17
     18    2019-06-07  Antoine Quint  <graouts@apple.com>
     19
     20            Limit simulated mouse events on Google Maps to entering Street View
     21            https://bugs.webkit.org/show_bug.cgi?id=198657
     22            <rdar://problem/51345064>
     23
     24            Reviewed by Brent Fulgham.
     25
     26            * page/Quirks.cpp:
     27            (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
     28            (WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const):
     29            * page/Quirks.h:
     30
    1312019-06-06  Babak Shafiei  <bshafiei@apple.com>
    232
  • branches/safari-608.1.27-branch/Source/WebCore/page/Quirks.cpp

    r246100 r246208  
    279279}
    280280
     281#if PLATFORM(IOS_FAMILY)
    281282bool Quirks::shouldDispatchSimulatedMouseEvents() const
    282283{
    283 #if PLATFORM(IOS_FAMILY)
    284284    if (!needsQuirks())
    285285        return false;
     
    314314    if (equalLettersIgnoringASCIICase(host, "naver.com") || host.endsWithIgnoringASCIICase(".naver.com"))
    315315        return true;
    316 #endif
    317     return false;
    318 }
     316    return false;
     317}
     318
     319bool Quirks::shouldDispatchSimulatedMouseEventsOnTarget(EventTarget* target) const
     320{
     321    if (!needsQuirks() || !shouldDispatchSimulatedMouseEvents())
     322        return false;
     323
     324    // On Google Maps, we want to limit simulated mouse events to dragging the little man that allows entering into Street View.
     325    auto& url = m_document->topDocument().url();
     326    auto host = url.host();
     327    if (equalLettersIgnoringASCIICase(host, "www.google.com") && url.path().startsWithIgnoringASCIICase("/maps/"))
     328        return is<Element>(target) && downcast<Element>(target)->getAttribute("class") == "widget-expand-button-pegman-icon";
     329    return true;
     330}
     331#endif
    319332
    320333bool Quirks::shouldDisablePointerEventsQuirk() const
  • branches/safari-608.1.27-branch/Source/WebCore/page/Quirks.h

    r245301 r246208  
    5050    bool hasBrokenEncryptedMediaAPISupportQuirk() const;
    5151    bool hasWebSQLSupportQuirk() const;
     52#if PLATFORM(IOS_FAMILY)
    5253    bool shouldDispatchSimulatedMouseEvents() const;
     54    bool shouldDispatchSimulatedMouseEventsOnTarget(EventTarget*) const;
     55#endif
    5356    bool shouldDisablePointerEventsQuirk() const;
    5457    bool needsInputModeNoneImplicitly(const HTMLElement&) const;
Note: See TracChangeset for help on using the changeset viewer.