| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 287 } |
| 288 | 288 |
| 289 KURL HTMLVideoElement::posterImageURL() const | 289 KURL HTMLVideoElement::posterImageURL() const |
| 290 { | 290 { |
| 291 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); | 291 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); |
| 292 if (url.isEmpty()) | 292 if (url.isEmpty()) |
| 293 return KURL(); | 293 return KURL(); |
| 294 return document().completeURL(url); | 294 return document().completeURL(url); |
| 295 } | 295 } |
| 296 | 296 |
| 297 KURL HTMLVideoElement::mediaPlayerPosterURL() | |
| 298 { | |
| 299 return posterImageURL(); | |
| 300 } | |
| 301 | |
| 302 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageMode mode
, SourceImageStatus* status) const | 297 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageMode mode
, SourceImageStatus* status) const |
| 303 { | 298 { |
| 304 if (!hasAvailableVideoFrame()) { | 299 if (!hasAvailableVideoFrame()) { |
| 305 *status = InvalidSourceImageStatus; | 300 *status = InvalidSourceImageStatus; |
| 306 return nullptr; | 301 return nullptr; |
| 307 } | 302 } |
| 308 | 303 |
| 309 IntSize intrinsicSize(videoWidth(), videoHeight()); | 304 IntSize intrinsicSize(videoWidth(), videoHeight()); |
| 310 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize); | 305 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize); |
| 311 if (!imageBuffer) { | 306 if (!imageBuffer) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 323 { | 318 { |
| 324 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); | 319 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); |
| 325 } | 320 } |
| 326 | 321 |
| 327 FloatSize HTMLVideoElement::elementSize() const | 322 FloatSize HTMLVideoElement::elementSize() const |
| 328 { | 323 { |
| 329 return FloatSize(videoWidth(), videoHeight()); | 324 return FloatSize(videoWidth(), videoHeight()); |
| 330 } | 325 } |
| 331 | 326 |
| 332 } // namespace blink | 327 } // namespace blink |
| OLD | NEW |