Changeset 255495 in webkit


Ignore:
Timestamp:
Jan 31, 2020 7:44:40 AM (4 years ago)
Author:
Peng Liu
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:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r255490 r255495  
     12020-01-31  Peng Liu  <peng.liu6@apple.com>
     2
     3        Media controls of the video player on nfl.com are not visible in fullscreen mode (iPad only)
     4        https://bugs.webkit.org/show_bug.cgi?id=207020
     5
     6        Reviewed by Eric Carlson.
     7
     8        Add a quirk to disable the element fullscreen API support for nfl.com on iPads.
     9
     10        * dom/DocumentFullscreen.idl:
     11        * dom/Element.idl:
     12        * page/Quirks.cpp:
     13        (WebCore::Quirks::shouldDisableElementFullscreenQuirk const):
     14        * page/Quirks.h:
     15
    1162020-01-31  Antti Koivisto  <antti@apple.com>
    217
  • trunk/Source/WebCore/dom/DocumentFullscreen.idl

    r244440 r255495  
    2727    Conditional=FULLSCREEN_API,
    2828    EnabledBySetting=FullScreen,
     29    DisabledByQuirk=shouldDisableElementFullscreen
    2930] partial interface Document {
    3031    // Extensions from FullScreen API (https://fullscreen.spec.whatwg.org/#api).
  • trunk/Source/WebCore/dom/Element.idl

    r251425 r255495  
    9797    // Extensions from Full Screen API (https://fullscreen.spec.whatwg.org/#api).
    9898    // FIXME: Should we add unprefixed versions?
    99     [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, ImplementedAs=webkitRequestFullscreen] void webkitRequestFullScreen(); // Prefixed Mozilla version.
    100     [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] void webkitRequestFullscreen(); // Prefixed W3C version.
     99    [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, ImplementedAs=webkitRequestFullscreen, DisabledByQuirk=shouldDisableElementFullscreen] void webkitRequestFullScreen(); // Prefixed Mozilla version.
     100    [Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, DisabledByQuirk=shouldDisableElementFullscreen] void webkitRequestFullscreen(); // Prefixed W3C version.
    101101
    102102    // Extensions from Pointer Events API (https://w3c.github.io/pointerevents/#extensions-to-the-element-interface).
     
    127127
    128128    // FIXME: These event handlers should only be on Document (https://fullscreen.spec.whatwg.org/#api).
    129     [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] attribute EventHandler onwebkitfullscreenchange;
    130     [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen] attribute EventHandler onwebkitfullscreenerror;
     129    [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, DisabledByQuirk=shouldDisableElementFullscreen] attribute EventHandler onwebkitfullscreenchange;
     130    [NotEnumerable, Conditional=FULLSCREEN_API, EnabledBySetting=FullScreen, DisabledByQuirk=shouldDisableElementFullscreen] attribute EventHandler onwebkitfullscreenerror;
    131131
    132132    // FIXME: Cannot find those EventHandlers in the latest specification (https://w3c.github.io/uievents/#events-focus-types).
  • trunk/Source/WebCore/page/Quirks.cpp

    r255469 r255495  
    628628#endif
    629629
    630 }
     630bool Quirks::shouldDisableElementFullscreenQuirk() const
     631{
     632#if PLATFORM(IOS_FAMILY)
     633    if (!needsQuirks())
     634        return false;
     635
     636    if (m_shouldDisableElementFullscreenQuirk)
     637        return m_shouldDisableElementFullscreenQuirk.value();
     638
     639    auto domain = m_document->securityOrigin().domain().convertToASCIILowercase();
     640
     641    m_shouldDisableElementFullscreenQuirk = domain == "nfl.com" || domain.endsWith(".nfl.com");
     642
     643    return m_shouldDisableElementFullscreenQuirk.value();
     644#else
     645    return false;
     646#endif
     647}
     648
     649}
  • trunk/Source/WebCore/page/Quirks.h

    r254574 r255495  
    8888#endif
    8989
     90    bool shouldDisableElementFullscreenQuirk() const;
     91
    9092private:
    9193    bool needsQuirks() const;
     
    105107    mutable Optional<bool> m_needsPreloadAutoQuirk;
    106108#endif
     109    mutable Optional<bool> m_shouldDisableElementFullscreenQuirk;
    107110};
    108111
Note: See TracChangeset for help on using the changeset viewer.