Index: Source/modules/imagebitmap/ImageBitmapFactories.cpp |
diff --git a/Source/modules/imagebitmap/ImageBitmapFactories.cpp b/Source/modules/imagebitmap/ImageBitmapFactories.cpp |
index d399668aab74882b0fd9dc82ebf5036366c28b0d..ad353de746110acd480b6ec254eed09a595d29c4 100644 |
--- a/Source/modules/imagebitmap/ImageBitmapFactories.cpp |
+++ b/Source/modules/imagebitmap/ImageBitmapFactories.cpp |
@@ -124,7 +124,7 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, |
// This variant does not work in worker threads. |
ASSERT(eventTarget.toDOMWindow()); |
- if (!video->player()) { |
+ if (!video->webMediaPlayer()) { |
acolwell GONE FROM CHROMIUM
2014/06/06 05:51:09
I don't think you will need this given that the <=
Srirama
2014/06/06 06:41:42
Done.
|
exceptionState.throwDOMException(InvalidStateError, "No player can be retrieved from the provided video element."); |
return ScriptPromise(); |
} |
@@ -132,7 +132,7 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, |
exceptionState.throwDOMException(InvalidStateError, "The provided element has not retrieved data."); |
return ScriptPromise(); |
} |
- if (video->player()->readyState() <= MediaPlayer::HaveMetadata) { |
+ if (video->webMediaPlayer()->readyState() <= blink::WebMediaPlayer::ReadyStateHaveMetadata) { |
acolwell GONE FROM CHROMIUM
2014/06/06 05:51:09
This doesn't seem right. I believe this code shoul
Srirama
2014/06/06 06:41:42
Done.
|
exceptionState.throwDOMException(InvalidStateError, "The provided element's player has no current data."); |
return ScriptPromise(); |
} |
@@ -144,7 +144,7 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, |
exceptionState.throwSecurityError("The source video contains image data from multiple origins."); |
return ScriptPromise(); |
} |
- if (!(video->webMediaPlayer() && video->webMediaPlayer()->didPassCORSAccessCheck()) |
+ if (!video->webMediaPlayer()->didPassCORSAccessCheck() |
&& eventTarget.toDOMWindow()->document()->securityOrigin()->taintsCanvas(video->currentSrc())) { |
exceptionState.throwSecurityError("Cross-origin access to the source video is denied."); |
return ScriptPromise(); |