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

Unified Diff: Source/core/rendering/RenderMediaControls.cpp

Issue 214793005: Use HTMLMediaElement::togglePlayState() where appropriate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: documentation Created 6 years, 9 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 | « Source/core/html/shadow/MediaControls.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderMediaControls.cpp
diff --git a/Source/core/rendering/RenderMediaControls.cpp b/Source/core/rendering/RenderMediaControls.cpp
index 868cf6b7ced8ab91f3ba22f123db1084031dc83b..69c849b62da0259f200b1d179a44de295e1f22b5 100644
--- a/Source/core/rendering/RenderMediaControls.cpp
+++ b/Source/core/rendering/RenderMediaControls.cpp
@@ -106,7 +106,7 @@ static bool paintMediaPlayButton(RenderObject* object, const PaintInfo& paintInf
if (!hasSource(mediaElement))
return paintMediaButton(paintInfo.context, rect, mediaPlayDisabled);
- return paintMediaButton(paintInfo.context, rect, mediaElement->canPlay() ? mediaPlay : mediaPause);
+ return paintMediaButton(paintInfo.context, rect, mediaElement->togglePlayStateWillPlay() ? mediaPlay : mediaPause);
}
static bool paintMediaOverlayPlayButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
@@ -115,7 +115,7 @@ static bool paintMediaOverlayPlayButton(RenderObject* object, const PaintInfo& p
if (!mediaElement)
return false;
- if (!hasSource(mediaElement) || !mediaElement->canPlay())
+ if (!hasSource(mediaElement) || !mediaElement->togglePlayStateWillPlay())
return false;
static Image* mediaOverlayPlay = platformResource("mediaplayerOverlayPlay");
« no previous file with comments | « Source/core/html/shadow/MediaControls.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698