Changeset 261261 in webkit
- Timestamp:
- May 6, 2020, 5:18:02 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r261258 r261261 1 2020-05-06 Zalan Bujtas <zalan@apple.com> 2 3 [ContentObservation] Shutterstock search bar is not activated on the first tap 4 https://bugs.webkit.org/show_bug.cgi?id=211529 5 <rdar://problem/58843932> 6 7 Reviewed by Simon Fraser. 8 9 * page/Quirks.cpp: 10 (WebCore::Quirks::shouldIgnoreContentObservationForSyntheticClick const): 11 * page/Quirks.h: 12 1 13 2020-05-06 Jack Lee <shihchieh_lee@apple.com> 2 14 -
trunk/Source/WebCore/page/Quirks.cpp
r261013 r261261 800 800 } 801 801 802 } 802 bool Quirks::shouldIgnoreContentObservationForSyntheticClick(bool isFirstSyntheticClickOnPage) const 803 { 804 if (!needsQuirks()) 805 return false; 806 807 auto host = m_document->url().host(); 808 return isFirstSyntheticClickOnPage && (equalLettersIgnoringASCIICase(host, "shutterstock.com") || host.endsWithIgnoringASCIICase(".shutterstock.com")); 809 } 810 811 } -
trunk/Source/WebCore/page/Quirks.h
r260524 r261261 76 76 WEBCORE_EXPORT bool shouldIgnoreAriaForFastPathContentObservationCheck() const; 77 77 WEBCORE_EXPORT bool shouldLayOutAtMinimumWindowWidthWhenIgnoringScalingConstraints() const; 78 WEBCORE_EXPORT bool shouldIgnoreContentObservationForSyntheticClick(bool isFirstSyntheticClickOnPage) const; 78 79 79 80 WEBCORE_EXPORT bool needsYouTubeMouseOutQuirk() const; -
trunk/Source/WebKit/ChangeLog
r261259 r261261 1 2020-05-06 Zalan Bujtas <zalan@apple.com> 2 3 [ContentObservation] Shutterstock search bar is not activated on the first tap 4 https://bugs.webkit.org/show_bug.cgi?id=211529 5 <rdar://problem/58843932> 6 7 Reviewed by Simon Fraser. 8 9 Shutterstock has a “initial click” action which converts some “actionable” elements (<a>) to some other “actionable” elements (<button>). 10 If this initial click also happens to be on an element that triggers content observation (input), we see those changes as actionable content and not proceed with the click event (stay at hover). 11 Any subsequent click works as expected. 12 It’s very difficult to eliminate such false positives since all we see is that some "actionable" content is going away while some "actionable" content is being created. 13 This quirk ensures that the first tap on the page does not trigger content observation. (It also means that any hover menu gets submitted on the first tap, but apparently 14 the Shutterstock top menu bar works fine with click events.) 15 16 * WebProcess/WebPage/WebPage.cpp: 17 (WebKit::WebPage::didStartPageTransition): 18 * WebProcess/WebPage/WebPage.h: 19 * WebProcess/WebPage/ios/WebPageIOS.mm: 20 (WebKit::WebPage::handleSyntheticClick): 21 1 22 2020-05-06 Wenson Hsieh <wenson_hsieh@apple.com> 2 23 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r261252 r261261 3299 3299 #if PLATFORM(IOS_FAMILY) 3300 3300 m_isShowingInputViewForFocusedElement = false; 3301 // This is used to enable a first-tap quirk. 3302 m_hasHandledSyntheticClick = false; 3301 3303 #endif 3302 3304 } -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r261252 r261261 1968 1968 1969 1969 bool m_isShowingInputViewForFocusedElement { false }; 1970 bool m_hasHandledSyntheticClick { false }; 1970 1971 1971 1972 enum SelectionAnchor { Start, End }; -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r261246 r261261 711 711 void WebPage::handleSyntheticClick(Node& nodeRespondingToClick, const WebCore::FloatPoint& location, OptionSet<WebEvent::Modifier> modifiers, WebCore::PointerID pointerId) 712 712 { 713 if (!nodeRespondingToClick.document().settings().contentChangeObserverEnabled()) { 713 auto& respondingDocument = nodeRespondingToClick.document(); 714 auto isFirstSyntheticClickOnPage = !m_hasHandledSyntheticClick; 715 m_hasHandledSyntheticClick = true; 716 717 if (!respondingDocument.settings().contentChangeObserverEnabled() || respondingDocument.quirks().shouldIgnoreContentObservationForSyntheticClick(isFirstSyntheticClickOnPage)) { 714 718 completeSyntheticClick(nodeRespondingToClick, location, modifiers, WebCore::OneFingerTap, pointerId); 715 719 return; 716 720 } 717 721 718 auto& respondingDocument = nodeRespondingToClick.document();719 722 auto& contentChangeObserver = respondingDocument.contentChangeObserver(); 720 723 auto targetNodeWentFromHiddenToVisible = contentChangeObserver.hiddenTouchTarget() == &nodeRespondingToClick && ContentChangeObserver::isConsideredVisible(nodeRespondingToClick);
Note:
See TracChangeset
for help on using the changeset viewer.