Index: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
index 3a465f78369f13115332edf8a47c02b0622aa8a2..b83a6018955b9eb8afb3615648e7f4725bf1d7a9 100644 |
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
@@ -38,7 +38,6 @@ |
#include "core/events/MouseEvent.h" |
#include "core/frame/LocalFrame.h" |
#include "core/html/HTMLVideoElement.h" |
-#include "core/html/MediaController.h" |
#include "core/html/TimeRanges.h" |
#include "core/html/shadow/MediaControls.h" |
#include "core/input/EventHandler.h" |
@@ -296,7 +295,7 @@ void MediaControlPlayButtonElement::defaultEventHandler(Event* event) |
void MediaControlPlayButtonElement::updateDisplayType() |
{ |
- setDisplayType(mediaElement().togglePlayStateWillPlay() ? MediaPlayButton : MediaPauseButton); |
+ setDisplayType(mediaElement().paused() ? MediaPlayButton : MediaPauseButton); |
} |
// ---------------------------- |
@@ -317,8 +316,8 @@ PassRefPtrWillBeRawPtr<MediaControlOverlayPlayButtonElement> MediaControlOverlay |
void MediaControlOverlayPlayButtonElement::defaultEventHandler(Event* event) |
{ |
- if (event->type() == EventTypeNames::click && mediaElement().togglePlayStateWillPlay()) { |
- mediaElement().togglePlayState(); |
+ if (event->type() == EventTypeNames::click && mediaElement().paused()) { |
+ mediaElement().play(); |
updateDisplayType(); |
event->setDefaultHandled(); |
} |
@@ -326,7 +325,7 @@ void MediaControlOverlayPlayButtonElement::defaultEventHandler(Event* event) |
void MediaControlOverlayPlayButtonElement::updateDisplayType() |
{ |
- setIsWanted(mediaElement().shouldShowControls() && mediaElement().togglePlayStateWillPlay()); |
+ setIsWanted(mediaElement().shouldShowControls() && mediaElement().paused()); |
} |
bool MediaControlOverlayPlayButtonElement::keepEventInNode(Event* event) |
@@ -411,12 +410,8 @@ void MediaControlTimelineElement::defaultEventHandler(Event* event) |
if (event->type() == EventTypeNames::input) { |
// FIXME: This will need to take the timeline offset into consideration |
// once that concept is supported, see https://crbug.com/312699 |
- if (mediaElement().controller()) { |
- if (mediaElement().controller()->seekable()->contain(time)) |
- mediaElement().controller()->setCurrentTime(time); |
- } else if (mediaElement().seekable()->contain(time)) { |
- mediaElement().setCurrentTime(time, IGNORE_EXCEPTION); |
- } |
+ if (mediaElement().seekable()->contain(time)) |
+ mediaElement().setCurrentTime(time); |
} |
LayoutSlider* slider = toLayoutSlider(layoutObject()); |