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" |
35 #include "core/dom/shadow/ShadowRoot.h" | 36 #include "core/dom/shadow/ShadowRoot.h" |
36 #include "core/frame/Settings.h" | 37 #include "core/frame/Settings.h" |
37 #include "core/html/HTMLImageLoader.h" | 38 #include "core/html/HTMLImageLoader.h" |
38 #include "core/html/canvas/CanvasRenderingContext.h" | 39 #include "core/html/canvas/CanvasRenderingContext.h" |
39 #include "core/html/parser/HTMLParserIdioms.h" | 40 #include "core/html/parser/HTMLParserIdioms.h" |
40 #include "core/layout/LayoutImage.h" | 41 #include "core/layout/LayoutImage.h" |
41 #include "core/layout/LayoutVideo.h" | 42 #include "core/layout/LayoutVideo.h" |
42 #include "platform/UserGestureIndicator.h" | 43 #include "platform/UserGestureIndicator.h" |
43 #include "platform/graphics/GraphicsContext.h" | 44 #include "platform/graphics/GraphicsContext.h" |
44 #include "platform/graphics/ImageBuffer.h" | 45 #include "platform/graphics/ImageBuffer.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 void HTMLVideoElement::webkitEnterFullscreen(ExceptionState& exceptionState) | 233 void HTMLVideoElement::webkitEnterFullscreen(ExceptionState& exceptionState) |
233 { | 234 { |
234 if (isFullscreen()) | 235 if (isFullscreen()) |
235 return; | 236 return; |
236 | 237 |
237 if (!supportsFullscreen()) { | 238 if (!supportsFullscreen()) { |
238 exceptionState.throwDOMException(InvalidStateError, "This element does n
ot support fullscreen mode."); | 239 exceptionState.throwDOMException(InvalidStateError, "This element does n
ot support fullscreen mode."); |
239 return; | 240 return; |
240 } | 241 } |
241 | 242 |
242 enterFullscreen(); | 243 Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::PrefixedRe
quest); |
243 } | 244 } |
244 | 245 |
245 void HTMLVideoElement::webkitExitFullscreen() | 246 void HTMLVideoElement::webkitExitFullscreen() |
246 { | 247 { |
247 if (isFullscreen()) | 248 if (isFullscreen()) |
248 exitFullscreen(); | 249 Fullscreen::from(document()).exitFullscreen(); |
249 } | 250 } |
250 | 251 |
251 bool HTMLVideoElement::webkitSupportsFullscreen() | 252 bool HTMLVideoElement::webkitSupportsFullscreen() |
252 { | 253 { |
253 return supportsFullscreen(); | 254 return supportsFullscreen(); |
254 } | 255 } |
255 | 256 |
256 bool HTMLVideoElement::webkitDisplayingFullscreen() | 257 bool HTMLVideoElement::webkitDisplayingFullscreen() |
257 { | 258 { |
258 return isFullscreen(); | 259 return isFullscreen(); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 { | 319 { |
319 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); | 320 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); |
320 } | 321 } |
321 | 322 |
322 FloatSize HTMLVideoElement::elementSize() const | 323 FloatSize HTMLVideoElement::elementSize() const |
323 { | 324 { |
324 return FloatSize(videoWidth(), videoHeight()); | 325 return FloatSize(videoWidth(), videoHeight()); |
325 } | 326 } |
326 | 327 |
327 } | 328 } |
OLD | NEW |