| 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 f0c93fd8584c1bfad56cb8d4cb5ca9dc7dd233c4..90a86f6e9897604811faebcbd56eb3150fb0f959 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| @@ -54,13 +54,16 @@ namespace blink {
|
| using namespace HTMLNames;
|
|
|
| inline HTMLVideoElement::HTMLVideoElement(Document& document)
|
| - : HTMLMediaElement(videoTag, document),
|
| - m_customControlsFullscreenDetector(
|
| - new MediaCustomControlsFullscreenDetector(*this)) {
|
| + : HTMLMediaElement(videoTag, document) {
|
| if (document.settings()) {
|
| m_defaultPosterURL =
|
| AtomicString(document.settings()->getDefaultVideoPosterURL());
|
| }
|
| +
|
| + if (RuntimeEnabledFeatures::videoFullscreenDetectionEnabled()) {
|
| + m_customControlsFullscreenDetector =
|
| + new MediaCustomControlsFullscreenDetector(*this);
|
| + }
|
| }
|
|
|
| HTMLVideoElement* HTMLVideoElement::create(Document& document) {
|
| @@ -77,7 +80,9 @@ DEFINE_TRACE(HTMLVideoElement) {
|
| }
|
|
|
| void HTMLVideoElement::contextDestroyed(ExecutionContext* context) {
|
| - m_customControlsFullscreenDetector->contextDestroyed();
|
| + if (m_customControlsFullscreenDetector)
|
| + m_customControlsFullscreenDetector->contextDestroyed();
|
| +
|
| HTMLMediaElement::contextDestroyed(context);
|
| }
|
|
|
|
|