| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } | 197 } |
| 198 | 198 |
| 199 bool HTMLVideoElement::hasAvailableVideoFrame() const | 199 bool HTMLVideoElement::hasAvailableVideoFrame() const |
| 200 { | 200 { |
| 201 if (!player()) | 201 if (!player()) |
| 202 return false; | 202 return false; |
| 203 | 203 |
| 204 return player()->hasVideo() && player()->readyState() >= MediaPlayer::HaveCu
rrentData; | 204 return player()->hasVideo() && player()->readyState() >= MediaPlayer::HaveCu
rrentData; |
| 205 } | 205 } |
| 206 | 206 |
| 207 void HTMLVideoElement::webkitEnterFullscreen(ExceptionState& es) | 207 void HTMLVideoElement::webkitEnterFullscreen(ExceptionState& exceptionState) |
| 208 { | 208 { |
| 209 if (isFullscreen()) | 209 if (isFullscreen()) |
| 210 return; | 210 return; |
| 211 | 211 |
| 212 // Generate an exception if this isn't called in response to a user gesture,
or if the | 212 // Generate an exception if this isn't called in response to a user gesture,
or if the |
| 213 // element does not support fullscreen. | 213 // element does not support fullscreen. |
| 214 if ((userGestureRequiredForFullscreen() && !UserGestureIndicator::processing
UserGesture()) || !supportsFullscreen()) { | 214 if ((userGestureRequiredForFullscreen() && !UserGestureIndicator::processing
UserGesture()) || !supportsFullscreen()) { |
| 215 es.throwUninformativeAndGenericDOMException(InvalidStateError); | 215 exceptionState.throwUninformativeAndGenericDOMException(InvalidStateErro
r); |
| 216 return; | 216 return; |
| 217 } | 217 } |
| 218 | 218 |
| 219 enterFullscreen(); | 219 enterFullscreen(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void HTMLVideoElement::webkitExitFullscreen() | 222 void HTMLVideoElement::webkitExitFullscreen() |
| 223 { | 223 { |
| 224 if (isFullscreen()) | 224 if (isFullscreen()) |
| 225 exitFullscreen(); | 225 exitFullscreen(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 KURL HTMLVideoElement::posterImageURL() const | 261 KURL HTMLVideoElement::posterImageURL() const |
| 262 { | 262 { |
| 263 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); | 263 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); |
| 264 if (url.isEmpty()) | 264 if (url.isEmpty()) |
| 265 return KURL(); | 265 return KURL(); |
| 266 return document().completeURL(url); | 266 return document().completeURL(url); |
| 267 } | 267 } |
| 268 | 268 |
| 269 } | 269 } |
| OLD | NEW |