| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "platform/graphics/GraphicsContext.h" | 47 #include "platform/graphics/GraphicsContext.h" |
| 48 #include "platform/graphics/ImageBuffer.h" | 48 #include "platform/graphics/ImageBuffer.h" |
| 49 #include "platform/graphics/gpu/Extensions3DUtil.h" | 49 #include "platform/graphics/gpu/Extensions3DUtil.h" |
| 50 #include "public/platform/WebCanvas.h" | 50 #include "public/platform/WebCanvas.h" |
| 51 | 51 |
| 52 namespace blink { | 52 namespace blink { |
| 53 | 53 |
| 54 using namespace HTMLNames; | 54 using namespace HTMLNames; |
| 55 | 55 |
| 56 inline HTMLVideoElement::HTMLVideoElement(Document& document) | 56 inline HTMLVideoElement::HTMLVideoElement(Document& document) |
| 57 : HTMLMediaElement(videoTag, document), | 57 : HTMLMediaElement(videoTag, document) { |
| 58 m_customControlsFullscreenDetector( | |
| 59 new MediaCustomControlsFullscreenDetector(*this)) { | |
| 60 if (document.settings()) { | 58 if (document.settings()) { |
| 61 m_defaultPosterURL = | 59 m_defaultPosterURL = |
| 62 AtomicString(document.settings()->getDefaultVideoPosterURL()); | 60 AtomicString(document.settings()->getDefaultVideoPosterURL()); |
| 63 } | 61 } |
| 62 |
| 63 if (RuntimeEnabledFeatures::videoFullscreenDetectionEnabled()) { |
| 64 m_customControlsFullscreenDetector = |
| 65 new MediaCustomControlsFullscreenDetector(*this); |
| 66 } |
| 64 } | 67 } |
| 65 | 68 |
| 66 HTMLVideoElement* HTMLVideoElement::create(Document& document) { | 69 HTMLVideoElement* HTMLVideoElement::create(Document& document) { |
| 67 HTMLVideoElement* video = new HTMLVideoElement(document); | 70 HTMLVideoElement* video = new HTMLVideoElement(document); |
| 68 video->ensureUserAgentShadowRoot(); | 71 video->ensureUserAgentShadowRoot(); |
| 69 video->suspendIfNeeded(); | 72 video->suspendIfNeeded(); |
| 70 return video; | 73 return video; |
| 71 } | 74 } |
| 72 | 75 |
| 73 DEFINE_TRACE(HTMLVideoElement) { | 76 DEFINE_TRACE(HTMLVideoElement) { |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 return ScriptPromise(); | 380 return ScriptPromise(); |
| 378 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) | 381 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) |
| 379 return ScriptPromise(); | 382 return ScriptPromise(); |
| 380 return ImageBitmapSource::fulfillImageBitmap( | 383 return ImageBitmapSource::fulfillImageBitmap( |
| 381 scriptState, | 384 scriptState, |
| 382 ImageBitmap::create(this, cropRect, | 385 ImageBitmap::create(this, cropRect, |
| 383 eventTarget.toLocalDOMWindow()->document(), options)); | 386 eventTarget.toLocalDOMWindow()->document(), options)); |
| 384 } | 387 } |
| 385 | 388 |
| 386 } // namespace blink | 389 } // namespace blink |
| OLD | NEW |