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

Unified Diff: Source/core/rendering/RenderVideo.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/core/rendering/RenderVideo.cpp
diff --git a/Source/core/rendering/RenderVideo.cpp b/Source/core/rendering/RenderVideo.cpp
index 1dae5a6ab408c00d7b75498b507b7013aed93bfb..cb50065cfbefde03edaa7e86333dc06c364f8790 100644
--- a/Source/core/rendering/RenderVideo.cpp
+++ b/Source/core/rendering/RenderVideo.cpp
@@ -40,6 +40,7 @@
namespace WebCore {
using namespace HTMLNames;
+using blink::WebMediaPlayer;
acolwell GONE FROM CHROMIUM 2014/05/20 16:40:21 nit: Just use blink:: at the one location where yo
RenderVideo::RenderVideo(HTMLVideoElement* video)
: RenderMedia(video)
@@ -97,9 +98,9 @@ LayoutSize RenderVideo::calculateIntrinsicSize()
// The intrinsic height of a video element's playback area is the intrinsic height
// of the video resource, if that is available; otherwise it is the intrinsic
// height of the poster frame, if that is available; otherwise it is 150 CSS pixels.
- MediaPlayer* player = mediaElement()->player();
- if (player && video->readyState() >= HTMLVideoElement::HAVE_METADATA) {
- LayoutSize size = player->naturalSize();
+ WebMediaPlayer* webMediaPlayer = mediaElement()->webMediaPlayer();
+ if (webMediaPlayer && video->readyState() >= HTMLVideoElement::HAVE_METADATA) {
+ LayoutSize size = static_cast<IntSize>(webMediaPlayer->naturalSize());
acolwell GONE FROM CHROMIUM 2014/05/20 16:40:21 nit: If you make size an IntSize instead of a Layo
if (!size.isEmpty())
return size;
}

Powered by Google App Engine
This is Rietveld 408576698