Chromium Code Reviews| 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(); |