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

Side by Side Diff: Source/core/html/shadow/MediaControlElements.cpp

Issue 1159593006: Revert of Remove the allowfullscreen exemption for the video-specific fullscreen API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 15 matching lines...) Expand all
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #include "config.h" 30 #include "config.h"
31 #include "core/html/shadow/MediaControlElements.h" 31 #include "core/html/shadow/MediaControlElements.h"
32 32
33 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 33 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
34 #include "core/InputTypeNames.h" 34 #include "core/InputTypeNames.h"
35 #include "core/dom/DOMTokenList.h" 35 #include "core/dom/DOMTokenList.h"
36 #include "core/dom/Fullscreen.h"
37 #include "core/dom/shadow/ShadowRoot.h" 36 #include "core/dom/shadow/ShadowRoot.h"
38 #include "core/events/MouseEvent.h" 37 #include "core/events/MouseEvent.h"
39 #include "core/frame/LocalFrame.h" 38 #include "core/frame/LocalFrame.h"
40 #include "core/html/HTMLVideoElement.h" 39 #include "core/html/HTMLVideoElement.h"
41 #include "core/html/MediaController.h" 40 #include "core/html/MediaController.h"
42 #include "core/html/TimeRanges.h" 41 #include "core/html/TimeRanges.h"
43 #include "core/html/shadow/MediaControls.h" 42 #include "core/html/shadow/MediaControls.h"
44 #include "core/layout/LayoutSlider.h" 43 #include "core/layout/LayoutSlider.h"
45 #include "core/layout/LayoutTheme.h" 44 #include "core/layout/LayoutTheme.h"
46 #include "core/layout/LayoutVideo.h" 45 #include "core/layout/LayoutVideo.h"
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 button->ensureUserAgentShadowRoot(); 511 button->ensureUserAgentShadowRoot();
513 button->setType(InputTypeNames::button); 512 button->setType(InputTypeNames::button);
514 button->setShadowPseudoId(AtomicString("-webkit-media-controls-fullscreen-bu tton", AtomicString::ConstructFromLiteral)); 513 button->setShadowPseudoId(AtomicString("-webkit-media-controls-fullscreen-bu tton", AtomicString::ConstructFromLiteral));
515 button->hide(); 514 button->hide();
516 return button.release(); 515 return button.release();
517 } 516 }
518 517
519 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) 518 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event)
520 { 519 {
521 if (event->type() == EventTypeNames::click) { 520 if (event->type() == EventTypeNames::click) {
522 Fullscreen& fullscreen = Fullscreen::from(document());
523 if (mediaElement().isFullscreen()) 521 if (mediaElement().isFullscreen())
524 fullscreen.exitFullscreen(); 522 mediaElement().exitFullscreen();
525 else 523 else
526 fullscreen.requestFullscreen(mediaElement(), Fullscreen::InternalVid eoRequest); 524 mediaElement().enterFullscreen();
527 event->setDefaultHandled(); 525 event->setDefaultHandled();
528 } 526 }
529 HTMLInputElement::defaultEventHandler(event); 527 HTMLInputElement::defaultEventHandler(event);
530 } 528 }
531 529
532 void MediaControlFullscreenButtonElement::setIsFullscreen(bool isFullscreen) 530 void MediaControlFullscreenButtonElement::setIsFullscreen(bool isFullscreen)
533 { 531 {
534 setDisplayType(isFullscreen ? MediaExitFullscreenButton : MediaEnterFullscre enButton); 532 setDisplayType(isFullscreen ? MediaExitFullscreenButton : MediaEnterFullscre enButton);
535 } 533 }
536 534
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 } 611 }
614 612
615 PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> MediaControlCurren tTimeDisplayElement::create(MediaControls& mediaControls) 613 PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> MediaControlCurren tTimeDisplayElement::create(MediaControls& mediaControls)
616 { 614 {
617 RefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> element = adoptRef WillBeNoop(new MediaControlCurrentTimeDisplayElement(mediaControls)); 615 RefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> element = adoptRef WillBeNoop(new MediaControlCurrentTimeDisplayElement(mediaControls));
618 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display", AtomicString::ConstructFromLiteral)); 616 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display", AtomicString::ConstructFromLiteral));
619 return element.release(); 617 return element.release();
620 } 618 }
621 619
622 } // namespace blink 620 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698