Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: Source/modules/imagebitmap/ImageBitmapFactories.cpp

Issue 291873002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed one more unused method Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}

Powered by Google App Engine
This is Rietveld 408576698