Title: [269846] trunk/Source
Revision
269846
Author
[email protected]
Date
2020-11-16 03:28:40 -0800 (Mon, 16 Nov 2020)

Log Message

[iPad] nhl.com cannot select new video to play while video is playing with desktop UA
https://bugs.webkit.org/show_bug.cgi?id=218868
<rdar://problem/67823088>

Reviewed by Antoine Quint.

The desktop "version" of this site uses custom media controls that don't work well on iOS
because they rely on mouse events (which is why it was quirked in r255592). The mobile
"version" uses the default/native media controls, so there is no issue.

Currently, when tapping on another video with a desktop UA, the site uses its touch event
handlers for mouse events. These handlers call `Event.prototype.preventDefault` if the event
is not a touch event, meaning that `"click"` is not fired. This prevents new videos from
being played.

Rather than limit the quirk based on some DOM state (which is fragile if the site changes),
just have the entire site default to a mobile UA.

Source/WebCore:

* page/Quirks.cpp:
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

Source/WebKit:

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::desktopClassBrowsingRecommendedForRequest):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (269845 => 269846)


--- trunk/Source/WebCore/ChangeLog	2020-11-16 11:16:31 UTC (rev 269845)
+++ trunk/Source/WebCore/ChangeLog	2020-11-16 11:28:40 UTC (rev 269846)
@@ -1,3 +1,26 @@
+2020-11-16  Devin Rousso  <[email protected]>
+
+        [iPad] nhl.com cannot select new video to play while video is playing with desktop UA
+        https://bugs.webkit.org/show_bug.cgi?id=218868
+        <rdar://problem/67823088>
+
+        Reviewed by Antoine Quint.
+
+        The desktop "version" of this site uses custom media controls that don't work well on iOS
+        because they rely on mouse events (which is why it was quirked in r255592). The mobile
+        "version" uses the default/native media controls, so there is no issue.
+
+        Currently, when tapping on another video with a desktop UA, the site uses its touch event
+        handlers for mouse events. These handlers call `Event.prototype.preventDefault` if the event
+        is not a touch event, meaning that `"click"` is not fired. This prevents new videos from
+        being played.
+
+        Rather than limit the quirk based on some DOM state (which is fragile if the site changes),
+        just have the entire site default to a mobile UA.
+
+        * page/Quirks.cpp:
+        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
+
 2020-11-16  Zan Dobersek  <[email protected]>
 
         PlatformDisplayLibWPE: use eglGetPlatformDisplay when possible

Modified: trunk/Source/WebCore/page/Quirks.cpp (269845 => 269846)


--- trunk/Source/WebCore/page/Quirks.cpp	2020-11-16 11:16:31 UTC (rev 269845)
+++ trunk/Source/WebCore/page/Quirks.cpp	2020-11-16 11:28:40 UTC (rev 269846)
@@ -376,8 +376,6 @@
             return true;
         if (host == "naver.com")
             return true;
-        if (host == "nhl.com" || (host.endsWith(".nhl.com") && !host.startsWith("account.")))
-            return true;
         if (host == "nba.com" || host.endsWith(".nba.com"))
             return true;
         if (host.endsWith(".naver.com")) {

Modified: trunk/Source/WebKit/ChangeLog (269845 => 269846)


--- trunk/Source/WebKit/ChangeLog	2020-11-16 11:16:31 UTC (rev 269845)
+++ trunk/Source/WebKit/ChangeLog	2020-11-16 11:28:40 UTC (rev 269846)
@@ -1,3 +1,26 @@
+2020-11-16  Devin Rousso  <[email protected]>
+
+        [iPad] nhl.com cannot select new video to play while video is playing with desktop UA
+        https://bugs.webkit.org/show_bug.cgi?id=218868
+        <rdar://problem/67823088>
+
+        Reviewed by Antoine Quint.
+
+        The desktop "version" of this site uses custom media controls that don't work well on iOS
+        because they rely on mouse events (which is why it was quirked in r255592). The mobile
+        "version" uses the default/native media controls, so there is no issue.
+
+        Currently, when tapping on another video with a desktop UA, the site uses its touch event
+        handlers for mouse events. These handlers call `Event.prototype.preventDefault` if the event
+        is not a touch event, meaning that `"click"` is not fired. This prevents new videos from
+        being played.
+
+        Rather than limit the quirk based on some DOM state (which is fragile if the site changes),
+        just have the entire site default to a mobile UA.
+
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::desktopClassBrowsingRecommendedForRequest):
+
 2020-11-16  Zan Dobersek  <[email protected]>
 
         [CoordinatedGraphics] Adjust client resizing, render-scope notifying in ThreadedCompositor::renderLayerTree()

Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (269845 => 269846)


--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2020-11-16 11:16:31 UTC (rev 269845)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2020-11-16 11:28:40 UTC (rev 269846)
@@ -1418,6 +1418,9 @@
             return RecommendDesktopClassBrowsingForRequest::No;
     }
 
+    if (equalLettersIgnoringASCIICase(host, "nhl.com") || host.endsWithIgnoringASCIICase(".nhl.com"))
+        return RecommendDesktopClassBrowsingForRequest::No;
+
     // FIXME: Remove this quirk when <rdar://problem/59480381> is complete.
     if (equalLettersIgnoringASCIICase(host, "fidelity.com") || host.endsWithIgnoringASCIICase(".fidelity.com"))
         return RecommendDesktopClassBrowsingForRequest::No;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to