Chromium Code Reviews| Index: Source/modules/imagebitmap/ImageBitmapFactories.cpp |
| diff --git a/Source/modules/imagebitmap/ImageBitmapFactories.cpp b/Source/modules/imagebitmap/ImageBitmapFactories.cpp |
| index 4819ac0f44507fa548d5b885ee2eb584b6117f68..692c5c21a64da3a3fa2fd88d8b89201f77267116 100644 |
| --- a/Source/modules/imagebitmap/ImageBitmapFactories.cpp |
| +++ b/Source/modules/imagebitmap/ImageBitmapFactories.cpp |
| @@ -51,6 +51,8 @@ |
| namespace WebCore { |
| +using blink::WebMediaPlayer; |
|
acolwell GONE FROM CHROMIUM
2014/05/20 16:40:21
nit: no need for a using since you only reference
|
| + |
| static LayoutSize sizeFor(HTMLImageElement* image) |
| { |
| if (ImageResource* cachedImage = image->cachedImage()) |
| @@ -60,8 +62,8 @@ static LayoutSize sizeFor(HTMLImageElement* image) |
| static IntSize sizeFor(HTMLVideoElement* video) |
| { |
| - if (MediaPlayer* player = video->player()) |
| - return player->naturalSize(); |
| + if (WebMediaPlayer* webMediaPlayer = video->webMediaPlayer()) |
| + return webMediaPlayer->naturalSize(); |
| return IntSize(); |
| } |
| @@ -143,7 +145,8 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, |
| exceptionState.throwSecurityError("The source video contains image data from multiple origins."); |
| return ScriptPromise(); |
| } |
| - if (!video->player()->didPassCORSAccessCheck() && eventTarget.toDOMWindow()->document()->securityOrigin()->taintsCanvas(video->currentSrc())) { |
| + if (!(video->webMediaPlayer() && video->webMediaPlayer()->didPassCORSAccessCheck()) |
| + && eventTarget.toDOMWindow()->document()->securityOrigin()->taintsCanvas(video->currentSrc())) { |
| exceptionState.throwSecurityError("Cross-origin access to the source video is denied."); |
| return ScriptPromise(); |
| } |