Index: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
index afae0fe3ed0082bfbfc95cd9bc386b77148054df..91e2548ad227658206aba05657e307dd1f6c042b 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
@@ -341,16 +341,10 @@ ScriptPromise HTMLVideoElement::createImageBitmap(ScriptState* scriptState, Even |
exceptionState.throwDOMException(IndexSizeError, String::format("The source %s provided is 0.", sw ? "height" : "width")); |
return ScriptPromise(); |
} |
- if (!hasSingleSecurityOrigin()) { |
- exceptionState.throwSecurityError("The source video contains image data from multiple origins."); |
- return ScriptPromise(); |
- } |
- if (!webMediaPlayer()->didPassCORSAccessCheck() |
- && eventTarget.toDOMWindow()->document()->securityOrigin()->taintsCanvas(currentSrc())) { |
- exceptionState.throwSecurityError("Cross-origin access to the source video is denied."); |
- return ScriptPromise(); |
- } |
- return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::create(this, IntRect(sx, sy, sw, sh))); |
+ return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::create(this, IntRect(sx, sy, sw, sh), |
+ !(!hasSingleSecurityOrigin() |
+ || (!webMediaPlayer()->didPassCORSAccessCheck() |
+ && eventTarget.toDOMWindow()->document()->securityOrigin()->taintsCanvas(currentSrc()))))); |
} |
} // namespace blink |