Title: [248629] branches/safari-608-branch/Source/WebCore
Revision
248629
Author
[email protected]
Date
2019-08-13 13:08:27 -0700 (Tue, 13 Aug 2019)

Log Message

Cherry-pick r248499. rdar://problem/54237800

    Can’t sort videos on a YouTube channel page on iPad
    https://bugs.webkit.org/show_bug.cgi?id=200573
    <rdar://problem/53415195>

    Reviewed by Darin Adler.

    Add a quirk to make touch events non-cancelable (preventDefault() does nothing).

    * page/Quirks.cpp:
    (WebCore::Quirks::shouldMakeTouchEventNonCancelableForTarget const):
    * page/Quirks.h:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248499 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (248628 => 248629)


--- branches/safari-608-branch/Source/WebCore/ChangeLog	2019-08-13 20:08:23 UTC (rev 248628)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog	2019-08-13 20:08:27 UTC (rev 248629)
@@ -1,5 +1,38 @@
 2019-08-13  Alan Coon  <[email protected]>
 
+        Cherry-pick r248499. rdar://problem/54237800
+
+    Can’t sort videos on a YouTube channel page on iPad
+    https://bugs.webkit.org/show_bug.cgi?id=200573
+    <rdar://problem/53415195>
+    
+    Reviewed by Darin Adler.
+    
+    Add a quirk to make touch events non-cancelable (preventDefault() does nothing).
+    
+    * page/Quirks.cpp:
+    (WebCore::Quirks::shouldMakeTouchEventNonCancelableForTarget const):
+    * page/Quirks.h:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-10  Antti Koivisto  <[email protected]>
+
+            Can’t sort videos on a YouTube channel page on iPad
+            https://bugs.webkit.org/show_bug.cgi?id=200573
+            <rdar://problem/53415195>
+
+            Reviewed by Darin Adler.
+
+            Add a quirk to make touch events non-cancelable (preventDefault() does nothing).
+
+            * page/Quirks.cpp:
+            (WebCore::Quirks::shouldMakeTouchEventNonCancelableForTarget const):
+            * page/Quirks.h:
+
+2019-08-13  Alan Coon  <[email protected]>
+
         Cherry-pick r248513. rdar://problem/54237806
 
     Accessibility client cannot navigate to internal links targets on iOS.

Modified: branches/safari-608-branch/Source/WebCore/page/Quirks.cpp (248628 => 248629)


--- branches/safari-608-branch/Source/WebCore/page/Quirks.cpp	2019-08-13 20:08:23 UTC (rev 248628)
+++ branches/safari-608-branch/Source/WebCore/page/Quirks.cpp	2019-08-13 20:08:27 UTC (rev 248629)
@@ -371,6 +371,26 @@
 
     return Event::IsCancelable::Yes;
 }
+
+bool Quirks::shouldMakeTouchEventNonCancelableForTarget(EventTarget* target) const
+{
+    if (!needsQuirks())
+        return false;
+
+    auto host = m_document->topDocument().url().host();
+
+    if (equalLettersIgnoringASCIICase(host, "www.youtube.com")) {
+        if (is<Element>(target)) {
+            unsigned depth = 3;
+            for (auto* element = downcast<Element>(target); element && depth; element = element->parentElement(), --depth) {
+                if (element->localName() == "paper-item" && element->classList().contains("yt-dropdown-menu"))
+                    return true;
+            }
+        }
+    }
+
+    return false;
+}
 #endif
 
 bool Quirks::shouldAvoidResizingWhenInputViewBoundsChange() const

Modified: branches/safari-608-branch/Source/WebCore/page/Quirks.h (248628 => 248629)


--- branches/safari-608-branch/Source/WebCore/page/Quirks.h	2019-08-13 20:08:23 UTC (rev 248628)
+++ branches/safari-608-branch/Source/WebCore/page/Quirks.h	2019-08-13 20:08:27 UTC (rev 248629)
@@ -54,6 +54,7 @@
     bool shouldDispatchSimulatedMouseEvents() const;
     bool shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented(EventTarget*) const;
     Optional<Event::IsCancelable> simulatedMouseEventTypeForTarget(EventTarget*) const;
+    bool shouldMakeTouchEventNonCancelableForTarget(EventTarget*) const;
 #endif
     bool shouldDisablePointerEventsQuirk() const;
     bool shouldIgnoreContentChange(const Element&) const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to