| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "core/html/HTMLVideoElement.h" | 27 #include "core/html/HTMLVideoElement.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/ExceptionState.h" | 29 #include "bindings/core/v8/ExceptionState.h" |
| 30 #include "core/CSSPropertyNames.h" | 30 #include "core/CSSPropertyNames.h" |
| 31 #include "core/HTMLNames.h" | 31 #include "core/HTMLNames.h" |
| 32 #include "core/dom/Attribute.h" | 32 #include "core/dom/Attribute.h" |
| 33 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
| 34 #include "core/dom/ExceptionCode.h" | 34 #include "core/dom/ExceptionCode.h" |
| 35 #include "core/dom/Fullscreen.h" | |
| 36 #include "core/dom/shadow/ShadowRoot.h" | 35 #include "core/dom/shadow/ShadowRoot.h" |
| 37 #include "core/frame/Settings.h" | 36 #include "core/frame/Settings.h" |
| 38 #include "core/html/HTMLImageLoader.h" | 37 #include "core/html/HTMLImageLoader.h" |
| 39 #include "core/html/canvas/CanvasRenderingContext.h" | 38 #include "core/html/canvas/CanvasRenderingContext.h" |
| 40 #include "core/html/parser/HTMLParserIdioms.h" | 39 #include "core/html/parser/HTMLParserIdioms.h" |
| 41 #include "core/layout/LayoutImage.h" | 40 #include "core/layout/LayoutImage.h" |
| 42 #include "core/layout/LayoutVideo.h" | 41 #include "core/layout/LayoutVideo.h" |
| 43 #include "platform/UserGestureIndicator.h" | 42 #include "platform/UserGestureIndicator.h" |
| 44 #include "platform/graphics/GraphicsContext.h" | 43 #include "platform/graphics/GraphicsContext.h" |
| 45 #include "platform/graphics/ImageBuffer.h" | 44 #include "platform/graphics/ImageBuffer.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 void HTMLVideoElement::webkitEnterFullscreen(ExceptionState& exceptionState) | 236 void HTMLVideoElement::webkitEnterFullscreen(ExceptionState& exceptionState) |
| 238 { | 237 { |
| 239 if (isFullscreen()) | 238 if (isFullscreen()) |
| 240 return; | 239 return; |
| 241 | 240 |
| 242 if (!supportsFullscreen()) { | 241 if (!supportsFullscreen()) { |
| 243 exceptionState.throwDOMException(InvalidStateError, "This element does n
ot support fullscreen mode."); | 242 exceptionState.throwDOMException(InvalidStateError, "This element does n
ot support fullscreen mode."); |
| 244 return; | 243 return; |
| 245 } | 244 } |
| 246 | 245 |
| 247 Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::PrefixedRe
quest); | 246 enterFullscreen(); |
| 248 } | 247 } |
| 249 | 248 |
| 250 void HTMLVideoElement::webkitExitFullscreen() | 249 void HTMLVideoElement::webkitExitFullscreen() |
| 251 { | 250 { |
| 252 if (isFullscreen()) | 251 if (isFullscreen()) |
| 253 Fullscreen::from(document()).exitFullscreen(); | 252 exitFullscreen(); |
| 254 } | 253 } |
| 255 | 254 |
| 256 bool HTMLVideoElement::webkitSupportsFullscreen() | 255 bool HTMLVideoElement::webkitSupportsFullscreen() |
| 257 { | 256 { |
| 258 return supportsFullscreen(); | 257 return supportsFullscreen(); |
| 259 } | 258 } |
| 260 | 259 |
| 261 bool HTMLVideoElement::webkitDisplayingFullscreen() | 260 bool HTMLVideoElement::webkitDisplayingFullscreen() |
| 262 { | 261 { |
| 263 return isFullscreen(); | 262 return isFullscreen(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 { | 322 { |
| 324 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); | 323 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); |
| 325 } | 324 } |
| 326 | 325 |
| 327 FloatSize HTMLVideoElement::elementSize() const | 326 FloatSize HTMLVideoElement::elementSize() const |
| 328 { | 327 { |
| 329 return FloatSize(videoWidth(), videoHeight()); | 328 return FloatSize(videoWidth(), videoHeight()); |
| 330 } | 329 } |
| 331 | 330 |
| 332 } // namespace blink | 331 } // namespace blink |
| OLD | NEW |