Index: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
index 85305738229ad20424e9be9fd690ea9ecc0be305..ab6d1484d6c2745d87b7cf773b5775d974c2d41b 100644 |
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp |
@@ -33,7 +33,6 @@ |
#include "core/events/MouseEvent.h" |
#include "core/frame/Settings.h" |
#include "core/html/HTMLMediaElement.h" |
-#include "core/html/MediaController.h" |
#include "core/html/track/TextTrackContainer.h" |
#include "core/layout/LayoutTheme.h" |
@@ -379,9 +378,9 @@ void MediaControls::updatePlayState() |
void MediaControls::beginScrubbing() |
{ |
- if (!mediaElement().togglePlayStateWillPlay()) { |
+ if (!mediaElement().paused()) { |
m_isPausedForScrubbing = true; |
- mediaElement().togglePlayState(); |
+ mediaElement().pause(); |
} |
} |
@@ -389,8 +388,8 @@ void MediaControls::endScrubbing() |
{ |
if (m_isPausedForScrubbing) { |
m_isPausedForScrubbing = false; |
- if (mediaElement().togglePlayStateWillPlay()) |
- mediaElement().togglePlayState(); |
+ if (mediaElement().paused()) |
+ mediaElement().play(); |
} |
} |
@@ -547,7 +546,7 @@ void MediaControls::defaultEventHandler(Event* event) |
if (event->type() == EventTypeNames::mouseover) { |
if (!containsRelatedTarget(event)) { |
m_isMouseOverControls = true; |
- if (!mediaElement().togglePlayStateWillPlay()) { |
+ if (!mediaElement().paused()) { |
makeOpaque(); |
if (shouldHideMediaControls()) |
startHideMediaControlsTimer(); |
@@ -580,7 +579,7 @@ void MediaControls::hideMediaControlsTimerFired(Timer<MediaControls>*) |
unsigned behaviorFlags = m_hideTimerBehaviorFlags | IgnoreFocus | IgnoreVideoHover; |
m_hideTimerBehaviorFlags = IgnoreNone; |
- if (mediaElement().togglePlayStateWillPlay()) |
+ if (mediaElement().paused()) |
return; |
if (!shouldHideMediaControls(behaviorFlags)) |