Changeset 265437 in webkit
- Timestamp:
- Aug 10, 2020, 10:49:01 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
html/HTMLVideoElement.cpp (modified) (1 diff)
-
page/Quirks.cpp (modified) (2 diffs)
-
page/Quirks.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r265432 r265437 1 2020-08-10 Eric Carlson <eric.carlson@apple.com> 2 3 r262456 broke sites that expect webkitDisplayingFullscreen to be true almost immediately 4 https://bugs.webkit.org/show_bug.cgi?id=215240 5 <rdar://problem/66284042> 6 7 Reviewed by Darin Adler. 8 9 Add a quirk for sites that use the Akamai Media Player, which begins polling 10 `webkitDisplayingFullscreen` every 100ms immediately after entering video fullscreen 11 mode and exits fullscreen as soon as it returns false. r262456 changed the HTMLMediaPlayer 12 state machine so `webkitDisplayingFullscreen` doesn't return `true` until the fullscreen 13 window has been opened in the UI process. This was done to fix bugs triggered by 14 rapidly entering and exiting fullscreen and PiP and make our own fullscreen/PiP tests 15 less flakey, so instead of reverting the change universally do it as a quirk for sites 16 using the Akamai Media Player. 17 18 * html/HTMLVideoElement.cpp: 19 (WebCore::HTMLVideoElement::webkitDisplayingFullscreen): 20 * page/Quirks.cpp: 21 (WebCore::Quirks::needsAkamaiMediaPlayerQuirk const): 22 * page/Quirks.h: 23 1 24 2020-08-10 Antti Koivisto <antti@apple.com> 2 25 -
trunk/Source/WebCore/html/HTMLVideoElement.cpp
r264684 r265437 353 353 bool HTMLVideoElement::webkitDisplayingFullscreen() 354 354 { 355 if (document().quirks().needsAkamaiMediaPlayerQuirk(*this)) 356 return isFullscreen() || m_isChangingPresentationMode; 357 355 358 // This function starts to return true after the video element has entered 356 359 // fullscreen/picture-in-picture until it has exited fullscreen/picture-in-picture -
trunk/Source/WebCore/page/Quirks.cpp
r265167 r265437 39 39 #include "HTMLMetaElement.h" 40 40 #include "HTMLObjectElement.h" 41 #include "HTMLVideoElement.h" 41 42 #include "JSEventListener.h" 42 43 #include "LayoutUnit.h" … … 984 985 } 985 986 986 987 } 987 // FIXME: remove this once rdar://66739450 has been fixed. 988 bool Quirks::needsAkamaiMediaPlayerQuirk(const HTMLVideoElement& element) const 989 { 990 #if PLATFORM(IOS_FAMILY) 991 // Akamai Media Player begins polling `webkitDisplayingFullscreen` every 100ms immediately after calling 992 // `webkitEnterFullscreen` and exits fullscreen as soon as it returns false. r262456 changed the HTMLMediaPlayer state 993 // machine so `webkitDisplayingFullscreen` doesn't return true until the fullscreen window has been opened in the 994 // UI process, which causes Akamai Media Player to frequently exit fullscreen mode immediately. 995 996 static NeverDestroyed<const AtomString> akamaiHTML5(MAKE_STATIC_STRING_IMPL("akamai-html5")); 997 static NeverDestroyed<const AtomString> akamaiMediaElement(MAKE_STATIC_STRING_IMPL("akamai-media-element")); 998 999 if (!needsQuirks()) 1000 return false; 1001 1002 if (!element.hasClass()) 1003 return false; 1004 1005 auto& classNames = element.classNames(); 1006 return classNames.contains(akamaiHTML5) && classNames.contains(akamaiMediaElement); 1007 #else 1008 UNUSED_PARAM(element); 1009 return false; 1010 #endif 1011 } 1012 1013 } -
trunk/Source/WebCore/page/Quirks.h
r265167 r265437 111 111 bool needsVP9FullRangeFlagQuirk() const; 112 112 bool needsHDRPixelDepthQuirk() const; 113 114 bool needsAkamaiMediaPlayerQuirk(const HTMLVideoElement&) const; 113 115 114 116 private:
Note:
See TracChangeset
for help on using the changeset viewer.