Chromium Code Reviews| Index: Source/core/html/HTMLVideoElement.cpp |
| diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp |
| index a4e2c608f0bcc3b3d96c955f0e557763541993c6..ea3085a2b396840e2904bb8bb785544546d35b53 100644 |
| --- a/Source/core/html/HTMLVideoElement.cpp |
| +++ b/Source/core/html/HTMLVideoElement.cpp |
| @@ -126,7 +126,7 @@ bool HTMLVideoElement::supportsFullscreen() const |
| if (!document().page()) |
| return false; |
| - if (!player()) |
| + if (!webMediaPlayer()) |
|
acolwell GONE FROM CHROMIUM
2014/05/22 01:06:06
Doesn't this cause a subtle script visible change
Srirama
2014/05/22 06:06:04
You are right, there will be a difference if we ac
|
| return false; |
| return true; |
| @@ -134,16 +134,16 @@ bool HTMLVideoElement::supportsFullscreen() const |
| unsigned HTMLVideoElement::videoWidth() const |
| { |
| - if (!player()) |
| + if (!webMediaPlayer()) |
| return 0; |
| - return player()->naturalSize().width(); |
| + return static_cast<IntSize>(webMediaPlayer()->naturalSize()).width(); |
|
acolwell GONE FROM CHROMIUM
2014/05/22 01:06:06
Why do you need the cast to IntSize here?
Srirama
2014/05/22 06:06:04
This gives me error without cast, because webMedia
acolwell GONE FROM CHROMIUM
2014/05/22 14:47:46
WebSize is a struct with public width & height mem
|
| } |
| unsigned HTMLVideoElement::videoHeight() const |
| { |
| - if (!player()) |
| + if (!webMediaPlayer()) |
| return 0; |
| - return player()->naturalSize().height(); |
| + return static_cast<IntSize>(webMediaPlayer()->naturalSize()).height(); |
|
acolwell GONE FROM CHROMIUM
2014/05/22 01:06:06
Why do you need the cast to IntSize here?
Srirama
2014/05/22 06:06:04
ditto
|
| } |
| bool HTMLVideoElement::isURLAttribute(const Attribute& attribute) const |
| @@ -204,10 +204,10 @@ bool HTMLVideoElement::copyVideoTextureToPlatformTexture(blink::WebGraphicsConte |
| bool HTMLVideoElement::hasAvailableVideoFrame() const |
| { |
| - if (!player()) |
| + if (!webMediaPlayer()) |
| return false; |
| - return player()->hasVideo() && player()->readyState() >= MediaPlayer::HaveCurrentData; |
| + return webMediaPlayer()->hasVideo() && webMediaPlayer()->readyState() >= blink::WebMediaPlayer::ReadyStateHaveCurrentData; |
| } |
| void HTMLVideoElement::webkitEnterFullscreen(ExceptionState& exceptionState) |
| @@ -248,18 +248,18 @@ void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument) |
| unsigned HTMLVideoElement::webkitDecodedFrameCount() const |
| { |
| - if (!player()) |
| + if (!webMediaPlayer()) |
| return 0; |
| - return player()->decodedFrameCount(); |
| + return webMediaPlayer()->decodedFrameCount(); |
| } |
| unsigned HTMLVideoElement::webkitDroppedFrameCount() const |
| { |
| - if (!player()) |
| + if (!webMediaPlayer()) |
| return 0; |
| - return player()->droppedFrameCount(); |
| + return webMediaPlayer()->droppedFrameCount(); |
| } |
| KURL HTMLVideoElement::posterImageURL() const |
| @@ -297,7 +297,7 @@ PassRefPtr<Image> HTMLVideoElement::getSourceImageForCanvas(SourceImageMode mode |
| bool HTMLVideoElement::wouldTaintOrigin(SecurityOrigin* destinationSecurityOrigin) const |
| { |
| - return !hasSingleSecurityOrigin() || (!(player() && player()->didPassCORSAccessCheck()) && destinationSecurityOrigin->taintsCanvas(currentSrc())); |
| + return !hasSingleSecurityOrigin() || (!(webMediaPlayer() && webMediaPlayer()->didPassCORSAccessCheck()) && destinationSecurityOrigin->taintsCanvas(currentSrc())); |
| } |
| FloatSize HTMLVideoElement::sourceSize() const |