| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 return Fullscreen::fullscreenEnabled(document()); | 242 return Fullscreen::fullscreenEnabled(document()); |
| 243 } | 243 } |
| 244 | 244 |
| 245 bool HTMLVideoElement::webkitDisplayingFullscreen() | 245 bool HTMLVideoElement::webkitDisplayingFullscreen() |
| 246 { | 246 { |
| 247 return isFullscreen(); | 247 return isFullscreen(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 bool HTMLVideoElement::usesOverlayFullscreenVideo() const | 250 bool HTMLVideoElement::usesOverlayFullscreenVideo() const |
| 251 { | 251 { |
| 252 return overlayFullscreenVideoMode() != WebMediaPlayer::OverlayFullscreenVide
oMode::Disabled; |
| 253 } |
| 254 |
| 255 WebMediaPlayer::OverlayFullscreenVideoMode HTMLVideoElement::overlayFullscreenVi
deoMode() const |
| 256 { |
| 252 if (RuntimeEnabledFeatures::forceOverlayFullscreenVideoEnabled()) | 257 if (RuntimeEnabledFeatures::forceOverlayFullscreenVideoEnabled()) |
| 253 return true; | 258 return WebMediaPlayer::OverlayFullscreenVideoMode::VideoLayerInvisible; |
| 254 | 259 |
| 255 return webMediaPlayer() && webMediaPlayer()->supportsOverlayFullscreenVideo(
); | 260 return webMediaPlayer() ? webMediaPlayer()->getOverlayFullscreenVideoMode()
: WebMediaPlayer::OverlayFullscreenVideoMode::Disabled; |
| 256 } | 261 } |
| 257 | 262 |
| 258 void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument) | 263 void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument) |
| 259 { | 264 { |
| 260 if (m_imageLoader) | 265 if (m_imageLoader) |
| 261 m_imageLoader->elementDidMoveToNewDocument(); | 266 m_imageLoader->elementDidMoveToNewDocument(); |
| 262 HTMLMediaElement::didMoveToNewDocument(oldDocument); | 267 HTMLMediaElement::didMoveToNewDocument(oldDocument); |
| 263 } | 268 } |
| 264 | 269 |
| 265 unsigned HTMLVideoElement::webkitDecodedFrameCount() const | 270 unsigned HTMLVideoElement::webkitDecodedFrameCount() const |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 return ScriptPromise(); | 344 return ScriptPromise(); |
| 340 } | 345 } |
| 341 if (!sw || !sh) { | 346 if (!sw || !sh) { |
| 342 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s provided is 0.", sw ? "height" : "width")); | 347 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s provided is 0.", sw ? "height" : "width")); |
| 343 return ScriptPromise(); | 348 return ScriptPromise(); |
| 344 } | 349 } |
| 345 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat
e(this, IntRect(sx, sy, sw, sh), eventTarget.toLocalDOMWindow()->document(), opt
ions)); | 350 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat
e(this, IntRect(sx, sy, sw, sh), eventTarget.toLocalDOMWindow()->document(), opt
ions)); |
| 346 } | 351 } |
| 347 | 352 |
| 348 } // namespace blink | 353 } // namespace blink |
| OLD | NEW |