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

Unified Diff: Source/core/frame/ImageBitmap.cpp

Issue 291873002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated as per the review comments 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
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/ImageBitmap.cpp
diff --git a/Source/core/frame/ImageBitmap.cpp b/Source/core/frame/ImageBitmap.cpp
index f2bb539b1b361fc3adca9ba245725b58cb258434..fabe5e39db7b86aa441c4e89dea8700605a4ec06 100644
--- a/Source/core/frame/ImageBitmap.cpp
+++ b/Source/core/frame/ImageBitmap.cpp
@@ -59,7 +59,12 @@ ImageBitmap::ImageBitmap(HTMLVideoElement* video, const IntRect& cropRect)
, m_cropRect(cropRect)
, m_bitmapOffset(IntPoint())
{
- IntRect videoRect = IntRect(IntPoint(), video->player()->naturalSize());
+ IntSize playerSize;
+
+ if (video->webMediaPlayer())
+ playerSize = video->webMediaPlayer()->naturalSize();
+
+ IntRect videoRect = IntRect(IntPoint(), playerSize);
IntRect srcRect = intersection(cropRect, videoRect);
IntRect dstRect(IntPoint(), srcRect.size());
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698