Title: [200988] trunk/Source/WebCore
Revision
200988
Author
commit-qu...@webkit.org
Date
2016-05-16 18:30:31 -0700 (Mon, 16 May 2016)

Log Message

Remove YouTube site-specific hack
https://bugs.webkit.org/show_bug.cgi?id=157776

Patch by Alex Christensen <achristen...@webkit.org> on 2016-05-16
Reviewed by Eric Carlson.

No new tests.  Youtube fullscreen seems to work without
http://trac.webkit.org/changeset/173533 now.

* dom/Document.cpp:
(WebCore::unwrapFullScreenRenderer):
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidEnterFullScreenForElement):
(WebCore::Document::webkitWillExitFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::setFullScreenRenderer):
(WebCore::hostIsYouTube): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (200987 => 200988)


--- trunk/Source/WebCore/ChangeLog	2016-05-17 01:17:56 UTC (rev 200987)
+++ trunk/Source/WebCore/ChangeLog	2016-05-17 01:30:31 UTC (rev 200988)
@@ -1,3 +1,22 @@
+2016-05-16  Alex Christensen  <achristen...@webkit.org>
+
+        Remove YouTube site-specific hack
+        https://bugs.webkit.org/show_bug.cgi?id=157776
+
+        Reviewed by Eric Carlson.
+
+        No new tests.  Youtube fullscreen seems to work without
+        http://trac.webkit.org/changeset/173533 now.
+
+        * dom/Document.cpp:
+        (WebCore::unwrapFullScreenRenderer):
+        (WebCore::Document::webkitWillEnterFullScreenForElement):
+        (WebCore::Document::webkitDidEnterFullScreenForElement):
+        (WebCore::Document::webkitWillExitFullScreenForElement):
+        (WebCore::Document::webkitDidExitFullScreenForElement):
+        (WebCore::Document::setFullScreenRenderer):
+        (WebCore::hostIsYouTube): Deleted.
+
 2016-05-16  Brent Fulgham  <bfulg...@apple.com>
 
         heap use-after-free at WebCore::TimerBase::heapPopMin()

Modified: trunk/Source/WebCore/dom/Document.cpp (200987 => 200988)


--- trunk/Source/WebCore/dom/Document.cpp	2016-05-17 01:17:56 UTC (rev 200987)
+++ trunk/Source/WebCore/dom/Document.cpp	2016-05-17 01:30:31 UTC (rev 200988)
@@ -5785,15 +5785,6 @@
         fullScreenElement->parentNode()->setNeedsStyleRecalc(ReconstructRenderTree);
 }
 
-static bool hostIsYouTube(const String& host)
-{
-    // Match .youtube.com, youtube.com, youtube.co.uk, and all two-letter country codes.
-    static NeverDestroyed<JSC::Yarr::RegularExpression> youtubePattern("(^|\\.)youtube.(com|co.uk|[a-z]{2})$", TextCaseInsensitive);
-    ASSERT(youtubePattern.get().isValid());
-
-    return youtubePattern.get().match(host);
-}
-
 void Document::webkitWillEnterFullScreenForElement(Element* element)
 {
     if (!hasLivingRenderTree() || inPageCache())
@@ -5836,9 +5827,6 @@
     m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true);
 
     recalcStyle(Style::Force);
-
-    if (settings() && settings()->needsSiteSpecificQuirks() && hostIsYouTube(url().host()))
-        fullScreenChangeDelayTimerFired();
 }
 
 void Document::webkitDidEnterFullScreenForElement(Element*)
@@ -5851,8 +5839,7 @@
 
     m_fullScreenElement->didBecomeFullscreenElement();
 
-    if (!settings() || !settings()->needsSiteSpecificQuirks() || !hostIsYouTube(url().host()))
-        m_fullScreenChangeDelayTimer.startOneShot(0);
+    m_fullScreenChangeDelayTimer.startOneShot(0);
 }
 
 void Document::webkitWillExitFullScreenForElement(Element*)
@@ -5889,13 +5876,7 @@
     bool eventTargetQueuesEmpty = m_fullScreenChangeEventTargetQueue.isEmpty() && m_fullScreenErrorEventTargetQueue.isEmpty();
     Document& exitingDocument = eventTargetQueuesEmpty ? topDocument() : *this;
 
-    // FIXME(136605): Remove this quirk once YouTube moves to relative widths and heights for
-    // fullscreen mode.
-    if (settings() && settings()->needsSiteSpecificQuirks() && hostIsYouTube(url().host()))
-        exitingDocument.fullScreenChangeDelayTimerFired();
-    else
-        exitingDocument.m_fullScreenChangeDelayTimer.startOneShot(0);
-
+    exitingDocument.m_fullScreenChangeDelayTimer.startOneShot(0);
 }
 
 void Document::setFullScreenRenderer(RenderFullScreen* renderer)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to