// https://fullscreen.spec.whatwg.org/#fully-exit-fullscreen void Fullscreen::fullyExitFullscreen(Document& document) { // To fully exit fullscreen, run these steps: // 1. Let |doc| be the top-level browsing context's document. // // Since the top-level browsing context's document might be unavailable in // OOPIF scenarios (i.e., when the top frame is remote), this actually uses // the Document of the topmost local ancestor frame. Without OOPIF, this // will be the top frame's document. With OOPIF, each renderer process for // the current page will separately call fullyExitFullscreen to cover all // local frames in each process. Document& doc = topmostLocalAncestor(document); // 2. If |doc|'s fullscreen element stack is empty, terminate these steps. if (!fullscreenElementFrom(doc)) return; // 3. Remove elements from |doc|'s fullscreen element stack until only the top // element is left. size_t stackSize = from(doc).m_fullscreenElementStack.size(); from(doc).m_fullscreenElementStack.remove(0, stackSize - 1); DCHECK_EQ(from(doc).m_fullscreenElementStack.size(), 1u); // 4. Act as if the exitFullscreen() method was invoked on |doc|. exitFullscreen(doc); }
GStreamerGWorld::~GStreamerGWorld() { exitFullscreen(); GRefPtr<GstBus> bus = webkitGstPipelineGetBus(GST_PIPELINE(m_pipeline)); g_signal_handlers_disconnect_by_func(bus.get(), reinterpret_cast<gpointer>(gstGWorldSyncMessageCallback), this); #ifndef GST_API_VERSION_1 gst_bus_set_sync_handler(bus.get(), 0, this); #else gst_bus_set_sync_handler(bus.get(), 0, this, 0); #endif m_pipeline = 0; }
void DisplayGroupController::_showFullscreen(ContentWindowPtr window, const bool oneToOne) { exitFullscreen(); window->backupModeAndZoom(); const auto target = ContentWindowController::Coordinates::FULLSCREEN; ContentWindowController controller(*window, _group, target); controller.adjustSize(oneToOne ? SIZE_FULLSCREEN_1TO1 : SIZE_FULLSCREEN); window->setMode(ContentWindow::WindowMode::FULLSCREEN); _group.setFullscreenWindow(window); }
void PluginProcessProxy::didClose(IPC::Connection*) { #if PLATFORM(MAC) if (m_modalWindowIsShowing) endModal(); if (m_fullscreenWindowIsShowing) exitFullscreen(); #endif const Vector<WebContext*>& contexts = WebContext::allContexts(); for (size_t i = 0; i < contexts.size(); ++i) contexts[i]->sendToAllProcesses(Messages::PluginProcessConnectionManager::PluginProcessCrashed(m_pluginProcessToken)); // This will cause us to be deleted. pluginProcessCrashedOrFailedToLaunch(); }
void Fullscreen::elementRemoved(Element& oldNode) { // Whenever the removing steps run with an |oldNode| and |oldNode| is in its // node document's fullscreen element stack, run these steps: // 1. If |oldNode| is at the top of its node document's fullscreen element // stack, act as if the exitFullscreen() method was invoked on that document. if (fullscreenElement() == &oldNode) { exitFullscreen(oldNode.document()); return; } // 2. Otherwise, remove |oldNode| from its node document's fullscreen element // stack. for (size_t i = 0; i < m_fullscreenElementStack.size(); ++i) { if (m_fullscreenElementStack[i].first.get() == &oldNode) { m_fullscreenElementStack.remove(i); return; } } // NOTE: |oldNode| was not in the fullscreen element stack. }
MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase() { g_signal_handler_disconnect(m_webkitVideoSink.get(), m_repaintHandler); #if GLIB_CHECK_VERSION(2, 31, 0) g_mutex_clear(m_bufferMutex); WTF::fastDelete(m_bufferMutex); #else g_mutex_free(m_bufferMutex); #endif if (m_buffer) gst_buffer_unref(m_buffer); m_buffer = 0; m_player = 0; if (m_muteTimerHandler) g_source_remove(m_muteTimerHandler); if (m_volumeTimerHandler) g_source_remove(m_volumeTimerHandler); if (m_volumeSignalHandler) { g_signal_handler_disconnect(m_volumeElement.get(), m_volumeSignalHandler); m_volumeSignalHandler = 0; } if (m_muteSignalHandler) { g_signal_handler_disconnect(m_volumeElement.get(), m_muteSignalHandler); m_muteSignalHandler = 0; } #if USE(NATIVE_FULLSCREEN_VIDEO) if (m_fullscreenVideoController) exitFullscreen(); #endif }
void WebVideoFullscreenManager::exitFullscreenForNode(Node*) { exitFullscreen(); setMediaElement(nullptr); }
GStreamerGWorld::~GStreamerGWorld() { exitFullscreen(); m_pipeline = 0; }