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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp

Issue 1373423003: Remove MediaController (already diabled by REF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update web-platform-tests expectations Created 5 years, 2 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
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());
« no previous file with comments | « third_party/WebKit/Source/core/html/MediaController.idl ('k') | third_party/WebKit/Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698