Unreviewed, rolling out r135819.
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.cpp
index ecf3dd1955ef770e61bba69d81185b8dc1d1838d..154458bc74aa764f7fd4448a291de01395d276d8 100644 (file)
@@ -364,7 +364,6 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
     m_drawingArea->setPaintingEnabled(true);
     
     setMediaVolume(parameters.mediaVolume);
-    m_mayStartMediaWhenInWindow = parameters.mayStartMediaWhenInWindow;
 
     WebProcess::shared().addMessageReceiver(Messages::WebPage::messageReceiverName(), m_pageID, this);
 
@@ -1894,9 +1893,7 @@ void WebPage::setIsInWindow(bool isInWindow)
         // Defer the call to Page::setCanStartMedia() since it ends up sending a syncrhonous messages to the UI process
         // in order to get plug-in connections, and the UI process will be waiting for the Web process to update the backing
         // store after moving the view into a window, until it times out and paints white. See <rdar://problem/9242771>.
-        if (m_mayStartMediaWhenInWindow)
-            m_setCanStartMediaTimer.startOneShot(0);
-
+        m_setCanStartMediaTimer.startOneShot(0);
         m_page->didMoveOnscreen();
     }
 }
@@ -3321,16 +3318,6 @@ void WebPage::setMediaVolume(float volume)
     m_page->setMediaVolume(volume);
 }
 
-void WebPage::setMayStartMediaWhenInWindow(bool mayStartMedia)
-{
-    if (mayStartMedia == m_mayStartMediaWhenInWindow)
-        return;
-
-    m_mayStartMediaWhenInWindow = mayStartMedia;
-    if (m_mayStartMediaWhenInWindow && m_page->isOnscreen())
-        m_setCanStartMediaTimer.startOneShot(0);
-}
-
 void WebPage::runModal()
 {
     if (m_isClosed)