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"); |