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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 } | 277 } |
278 | 278 |
279 KURL HTMLVideoElement::posterImageURL() const | 279 KURL HTMLVideoElement::posterImageURL() const |
280 { | 280 { |
281 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); | 281 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); |
282 if (url.isEmpty()) | 282 if (url.isEmpty()) |
283 return KURL(); | 283 return KURL(); |
284 return document().completeURL(url); | 284 return document().completeURL(url); |
285 } | 285 } |
286 | 286 |
287 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageStatus* s
tatus, AccelerationHint) const | 287 PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageStatus* s
tatus, AccelerationHint, SnapshotReason) const |
288 { | 288 { |
289 if (!hasAvailableVideoFrame()) { | 289 if (!hasAvailableVideoFrame()) { |
290 *status = InvalidSourceImageStatus; | 290 *status = InvalidSourceImageStatus; |
291 return nullptr; | 291 return nullptr; |
292 } | 292 } |
293 | 293 |
294 IntSize intrinsicSize(videoWidth(), videoHeight()); | 294 IntSize intrinsicSize(videoWidth(), videoHeight()); |
295 // FIXME: Not sure if we dhould we be doing anything with the AccelerationHi
nt argument here? | 295 // FIXME: Not sure if we dhould we be doing anything with the AccelerationHi
nt argument here? |
296 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize); | 296 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(intrinsicSize); |
297 if (!imageBuffer) { | 297 if (!imageBuffer) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 return ScriptPromise(); | 337 return ScriptPromise(); |
338 } | 338 } |
339 if (!sw || !sh) { | 339 if (!sw || !sh) { |
340 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s provided is 0.", sw ? "height" : "width")); | 340 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s provided is 0.", sw ? "height" : "width")); |
341 return ScriptPromise(); | 341 return ScriptPromise(); |
342 } | 342 } |
343 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat
e(this, IntRect(sx, sy, sw, sh), eventTarget.toDOMWindow()->document())); | 343 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat
e(this, IntRect(sx, sy, sw, sh), eventTarget.toDOMWindow()->document())); |
344 } | 344 } |
345 | 345 |
346 } // namespace blink | 346 } // namespace blink |
OLD | NEW |