| Index: Source/core/html/shadow/MediaControlElements.cpp
|
| diff --git a/Source/core/html/shadow/MediaControlElements.cpp b/Source/core/html/shadow/MediaControlElements.cpp
|
| index ce1a5e1e5d02e0ab31af09a13e70e4901e044b12..36e83d44f6f78a892e2b287c0952df1faa999bb4 100644
|
| --- a/Source/core/html/shadow/MediaControlElements.cpp
|
| +++ b/Source/core/html/shadow/MediaControlElements.cpp
|
| @@ -483,7 +483,7 @@ PassRefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> MediaControlFullscre
|
| RefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> button = adoptRefWillBeRefCountedGarbageCollected(new MediaControlFullscreenButtonElement(mediaControls));
|
| button->ensureUserAgentShadowRoot();
|
| button->setType("button");
|
| - button->hide();
|
| +// button->hide();
|
| return button.release();
|
| }
|
|
|
| @@ -512,6 +512,44 @@ void MediaControlFullscreenButtonElement::setIsFullscreen(bool isFullscreen)
|
|
|
| // ----------------------------
|
|
|
| +MediaControlCastOffButtonElement::MediaControlCastOffButtonElement(MediaControls& mediaControls)
|
| + : MediaControlInputElement(mediaControls, MediaCastOffButton)
|
| +{
|
| +}
|
| +
|
| +PassRefPtrWillBeRawPtr<MediaControlCastOffButtonElement> MediaControlCastOffButtonElement::create(MediaControls& mediaControls)
|
| +{
|
| + RefPtrWillBeRawPtr<MediaControlCastOffButtonElement> button = adoptRefWillBeRefCountedGarbageCollected(new MediaControlCastOffButtonElement(mediaControls));
|
| + button->ensureUserAgentShadowRoot();
|
| + button->setType("button");
|
| + return button.release();
|
| +}
|
| +
|
| +void MediaControlCastOffButtonElement::defaultEventHandler(Event* event)
|
| +{
|
| + if (event->type() == EventTypeNames::click) {
|
| +// if (FullscreenElementStack::isActiveFullScreenElement(&mediaElement()))
|
| +// FullscreenElementStack::from(document()).webkitCancelFullScreen();
|
| +// else
|
| +// FullscreenElementStack::from(document()).requestFullScreenForElement(&mediaElement(), 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirement);
|
| +// event->setDefaultHandled();
|
| + }
|
| + HTMLInputElement::defaultEventHandler(event);
|
| +}
|
| +
|
| +const AtomicString& MediaControlCastOffButtonElement::shadowPseudoId() const
|
| +{
|
| + DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-cast-off-button", AtomicString::ConstructFromLiteral));
|
| + return id;
|
| +}
|
| +
|
| +void MediaControlCastOffButtonElement::setIsCasting(bool isCasting)
|
| +{
|
| + setDisplayType(isCasting ? MediaCastOnButton : MediaCastOffButton);
|
| +}
|
| +
|
| +// ----------------------------
|
| +
|
| MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement(MediaControls& mediaControls)
|
| : MediaControlTimeDisplayElement(mediaControls, MediaTimeRemainingDisplay)
|
| {
|
|
|