Title: [173365] trunk/Source/WebCore
- Revision
- 173365
- Author
- [email protected]
- Date
- 2014-09-06 17:19:53 -0700 (Sat, 06 Sep 2014)
Log Message
[Fullscreen] Add a site-specific hack to work around "flash on exit" behavior of YouTube.com.
https://bugs.webkit.org/show_bug.cgi?id=136604
Reviewed by Eric Carlson.
YouTube.com will cause a "flash" of the full screen sized <video> element upon exiting full
screen because the "fullscreenchange" event is fired asynchronously after the exit animation
completes. Only YouTube sites and embeds, add a site-specific-quirk which runs the "fullscreenchange"
event synchronously at the end of the exit animation. This causes YouTube's video resizing logic
to run during the period of time where we've disabled screen updates, instead of immediately
after.
* dom/Document.cpp:
(WebCore::Document::webkitDidExitFullScreenForElement):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (173364 => 173365)
--- trunk/Source/WebCore/ChangeLog 2014-09-06 22:53:17 UTC (rev 173364)
+++ trunk/Source/WebCore/ChangeLog 2014-09-07 00:19:53 UTC (rev 173365)
@@ -1,3 +1,20 @@
+2014-09-06 Jer Noble <[email protected]>
+
+ [Fullscreen] Add a site-specific hack to work around "flash on exit" behavior of YouTube.com.
+ https://bugs.webkit.org/show_bug.cgi?id=136604
+
+ Reviewed by Eric Carlson.
+
+ YouTube.com will cause a "flash" of the full screen sized <video> element upon exiting full
+ screen because the "fullscreenchange" event is fired asynchronously after the exit animation
+ completes. Only YouTube sites and embeds, add a site-specific-quirk which runs the "fullscreenchange"
+ event synchronously at the end of the exit animation. This causes YouTube's video resizing logic
+ to run during the period of time where we've disabled screen updates, instead of immediately
+ after.
+
+ * dom/Document.cpp:
+ (WebCore::Document::webkitDidExitFullScreenForElement):
+
2014-09-06 Darin Adler <[email protected]>
Make updates suggested by new version of Xcode
Modified: trunk/Source/WebCore/dom/Document.cpp (173364 => 173365)
--- trunk/Source/WebCore/dom/Document.cpp 2014-09-06 22:53:17 UTC (rev 173364)
+++ trunk/Source/WebCore/dom/Document.cpp 2014-09-07 00:19:53 UTC (rev 173365)
@@ -5418,9 +5418,17 @@
// the exiting document.
bool eventTargetQueuesEmpty = m_fullScreenChangeEventTargetQueue.isEmpty() && m_fullScreenErrorEventTargetQueue.isEmpty();
Document& exitingDocument = eventTargetQueuesEmpty ? topDocument() : *this;
- exitingDocument.m_fullScreenChangeDelayTimer.startOneShot(0);
+
+ // FIXME(136605): Remove this quirk once YouTube moves to relative widths and heights for
+ // fullscreen mode.
+ String host = url().host();
+ if (settings() && settings()->needsSiteSpecificQuirks() && (host.endsWith(".youtube.com", false) || equalIgnoringCase("youtube.com", host)))
+ exitingDocument.fullScreenChangeDelayTimerFired(exitingDocument.m_fullScreenChangeDelayTimer);
+ else
+ exitingDocument.m_fullScreenChangeDelayTimer.startOneShot(0);
+
}
-
+
void Document::setFullScreenRenderer(RenderFullScreen* renderer)
{
if (renderer == m_fullScreenRenderer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes