Title: [255495] trunk/Source/WebCore
Revision
255495
Author
peng.l...@apple.com
Date
2020-01-31 07:44:40 -0800 (Fri, 31 Jan 2020)

Log Message

Media controls of the video player on nfl.com are not visible in fullscreen mode (iPad only)
https://bugs.webkit.org/show_bug.cgi?id=207020

Reviewed by Eric Carlson.

Add a quirk to disable the element fullscreen API support for nfl.com on iPads.

* dom/DocumentFullscreen.idl:
* dom/Element.idl:
* page/Quirks.cpp:
(WebCore::Quirks::shouldDisableElementFullscreenQuirk const):
* page/Quirks.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (255494 => 255495)


--- trunk/Source/WebCore/ChangeLog	2020-01-31 15:35:06 UTC (rev 255494)
+++ trunk/Source/WebCore/ChangeLog	2020-01-31 15:44:40 UTC (rev 255495)
@@ -1,3 +1,18 @@
+2020-01-31  Peng Liu  <peng.l...@apple.com>
+
+        Media controls of the video player on nfl.com are not visible in fullscreen mode (iPad only)
+        https://bugs.webkit.org/show_bug.cgi?id=207020
+
+        Reviewed by Eric Carlson.
+
+        Add a quirk to disable the element fullscreen API support for nfl.com on iPads.
+
+        * dom/DocumentFullscreen.idl:
+        * dom/Element.idl:
+        * page/Quirks.cpp:
+        (WebCore::Quirks::shouldDisableElementFullscreenQuirk const):
+        * page/Quirks.h:
+
 2020-01-31  Antti Koivisto  <an...@apple.com>
 
         Regression(r255359): imported/mozilla/svg/svg-integration/clipPath-html-06.xhtml is failing consistently on windows

Modified: trunk/Source/WebCore/dom/DocumentFullscreen.idl (255494 => 255495)


--- trunk/Source/WebCore/dom/DocumentFullscreen.idl	2020-01-31 15:35:06 UTC (rev 255494)
+++ trunk/Source/WebCore/dom/DocumentFullscreen.idl	2020-01-31 15:44:40 UTC (rev 255495)
@@ -26,6 +26,7 @@
 [
     Conditional=FULLSCREEN_API,
     EnabledBySetting=FullScreen,
+    DisabledByQuirk=shouldDisableElementFullscreen
 ] partial interface Document {
     // Extensions from FullScreen API (https://fullscreen.spec.whatwg.org/#api).
     // FIXME: Should probably be unprefixed.

Modified: trunk/Source/WebCore/dom/Element.idl (255494 => 255495)


--- trunk/Source/WebCore/dom/Element.idl	2020-01-31 15:35:06 UTC (rev 255494)
+++ trunk/Source/WebCore/dom/Element.idl	2020-01-31 15:44:40 UTC (rev 255495)
@@ -96,8 +96,8 @@
 
     // Extensions from Full Screen API (https://fullscreen.spec.whatwg.org/#api).
     // FIXME: Should we add unprefixed versions?
-    [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, ImplementedAs=webkitRequestFullscreen] void webkitRequestFullScreen(); // Prefixed Mozilla version.
-    [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] void webkitRequestFullscreen(); // Prefixed W3C version.
+    [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, ImplementedAs=webkitRequestFullscreen, DisabledByQuirk=shouldDisableElementFullscreen] void webkitRequestFullScreen(); // Prefixed Mozilla version.
+    [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, DisabledByQuirk=shouldDisableElementFullscreen] void webkitRequestFullscreen(); // Prefixed W3C version.
 
     // Extensions from Pointer Events API (https://w3c.github.io/pointerevents/#extensions-to-the-element-interface).
     [Conditional=POINTER_EVENTS, EnabledAtRuntime=PointerEvents, MayThrowException] void setPointerCapture(long pointerId);
@@ -126,8 +126,8 @@
     [NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend;
 
     // FIXME: These event handlers should only be on Document (https://fullscreen.spec.whatwg.org/#api).
-    [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] attribute EventHandler onwebkitfullscreenchange;
-    [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] attribute EventHandler onwebkitfullscreenerror;
+    [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, DisabledByQuirk=shouldDisableElementFullscreen] attribute EventHandler onwebkitfullscreenchange;
+    [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, DisabledByQuirk=shouldDisableElementFullscreen] attribute EventHandler onwebkitfullscreenerror;
 
     // FIXME: Cannot find those EventHandlers in the latest specification (https://w3c.github.io/uievents/#events-focus-types).
     [NotEnumerable] attribute EventHandler onfocusin;

Modified: trunk/Source/WebCore/page/Quirks.cpp (255494 => 255495)


--- trunk/Source/WebCore/page/Quirks.cpp	2020-01-31 15:35:06 UTC (rev 255494)
+++ trunk/Source/WebCore/page/Quirks.cpp	2020-01-31 15:44:40 UTC (rev 255495)
@@ -627,4 +627,23 @@
 }
 #endif
 
+bool Quirks::shouldDisableElementFullscreenQuirk() const
+{
+#if PLATFORM(IOS_FAMILY)
+    if (!needsQuirks())
+        return false;
+
+    if (m_shouldDisableElementFullscreenQuirk)
+        return m_shouldDisableElementFullscreenQuirk.value();
+
+    auto domain = m_document->securityOrigin().domain().convertToASCIILowercase();
+
+    m_shouldDisableElementFullscreenQuirk = domain == "nfl.com" || domain.endsWith(".nfl.com");
+
+    return m_shouldDisableElementFullscreenQuirk.value();
+#else
+    return false;
+#endif
 }
+
+}

Modified: trunk/Source/WebCore/page/Quirks.h (255494 => 255495)


--- trunk/Source/WebCore/page/Quirks.h	2020-01-31 15:35:06 UTC (rev 255494)
+++ trunk/Source/WebCore/page/Quirks.h	2020-01-31 15:44:40 UTC (rev 255495)
@@ -87,6 +87,8 @@
     bool shouldEnableLegacyGetUserMedia() const;
 #endif
 
+    bool shouldDisableElementFullscreenQuirk() const;
+
 private:
     bool needsQuirks() const;
 
@@ -104,6 +106,7 @@
     mutable Optional<bool> m_needsYouTubeOverflowScrollQuirk;
     mutable Optional<bool> m_needsPreloadAutoQuirk;
 #endif
+    mutable Optional<bool> m_shouldDisableElementFullscreenQuirk;
 };
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to