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

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

Issue 2758233003: Fix the conditions when fullscreen detector listeners are registered (Closed)
Patch Set: 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..d5bf83fd45bfdd6f11d67ef53d1000e5fb7af0bf 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 (insertionPoint->inActiveDocument() && m_customControlsFullscreenDetector)
mlamouri (slow - plz ping) 2017/03/20 17:05:25 OOC, why are you adding this? I did not really und
Zhiqiang Zhang (Slow) 2017/03/20 17:14:22 The check is to see if the node was connected to a
+ m_customControlsFullscreenDetector->detach();
+}
+
void HTMLVideoElement::contextDestroyed(ExecutionContext* context) {
if (m_customControlsFullscreenDetector)
m_customControlsFullscreenDetector->contextDestroyed();

Powered by Google App Engine
This is Rietveld 408576698