Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp

Issue 2758233003: Fix the conditions when fullscreen detector listeners are registered (Closed)
Patch Set: addressed mlamouri's comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
index 90a86f6e9897604811faebcbd56eb3150fb0f959..1d625b7b581df69f0afa97b5314731e010df7487 100644
--- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
@@ -79,6 +79,21 @@ DEFINE_TRACE(HTMLVideoElement) {
HTMLMediaElement::trace(visitor);
}
+Node::InsertionNotificationRequest HTMLVideoElement::insertedInto(
+ ContainerNode* insertionPoint) {
+ if (insertionPoint->isConnected() && m_customControlsFullscreenDetector)
+ m_customControlsFullscreenDetector->attach();
+
+ return HTMLMediaElement::insertedInto(insertionPoint);
+}
+
+void HTMLVideoElement::removedFrom(ContainerNode* insertionPoint) {
+ HTMLMediaElement::removedFrom(insertionPoint);
+
+ if (m_customControlsFullscreenDetector)
+ m_customControlsFullscreenDetector->detach();
+}
+
void HTMLVideoElement::contextDestroyed(ExecutionContext* context) {
if (m_customControlsFullscreenDetector)
m_customControlsFullscreenDetector->contextDestroyed();

Powered by Google App Engine
This is Rietveld 408576698