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 da8ec30ecc8325fe06bea5076a10d156f4da9788..e4d3ae119dd97d6cbc5f204ecf3a6115a7e27d7a 100644 |
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp |
@@ -37,7 +37,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" |
@@ -282,7 +281,7 @@ void MediaControlPlayButtonElement::defaultEventHandler(Event* event) |
void MediaControlPlayButtonElement::updateDisplayType() |
{ |
- setDisplayType(mediaElement().togglePlayStateWillPlay() ? MediaPlayButton : MediaPauseButton); |
+ setDisplayType(mediaElement().paused() ? MediaPlayButton : MediaPauseButton); |
} |
// ---------------------------- |
@@ -303,8 +302,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(); |
} |
@@ -312,7 +311,7 @@ void MediaControlOverlayPlayButtonElement::defaultEventHandler(Event* event) |
void MediaControlOverlayPlayButtonElement::updateDisplayType() |
{ |
- setIsWanted(mediaElement().shouldShowControls() && mediaElement().togglePlayStateWillPlay()); |
+ setIsWanted(mediaElement().shouldShowControls() && mediaElement().paused()); |
} |
bool MediaControlOverlayPlayButtonElement::keepEventInNode(Event* event) |
@@ -397,12 +396,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()); |