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

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

Issue 1058783006: Remove the allowfullscreen exemption for the video-specific fullscreen API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: consistent quotes Created 5 years, 8 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"
36 #include "core/dom/shadow/ShadowRoot.h" 37 #include "core/dom/shadow/ShadowRoot.h"
37 #include "core/events/MouseEvent.h" 38 #include "core/events/MouseEvent.h"
38 #include "core/frame/LocalFrame.h" 39 #include "core/frame/LocalFrame.h"
39 #include "core/html/HTMLVideoElement.h" 40 #include "core/html/HTMLVideoElement.h"
40 #include "core/html/MediaController.h" 41 #include "core/html/MediaController.h"
41 #include "core/html/TimeRanges.h" 42 #include "core/html/TimeRanges.h"
42 #include "core/html/shadow/MediaControls.h" 43 #include "core/html/shadow/MediaControls.h"
43 #include "core/layout/LayoutSlider.h" 44 #include "core/layout/LayoutSlider.h"
44 #include "core/layout/LayoutTheme.h" 45 #include "core/layout/LayoutTheme.h"
45 #include "core/layout/LayoutVideo.h" 46 #include "core/layout/LayoutVideo.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 button->ensureUserAgentShadowRoot(); 506 button->ensureUserAgentShadowRoot();
506 button->setType(InputTypeNames::button); 507 button->setType(InputTypeNames::button);
507 button->setShadowPseudoId(AtomicString("-webkit-media-controls-fullscreen-bu tton", AtomicString::ConstructFromLiteral)); 508 button->setShadowPseudoId(AtomicString("-webkit-media-controls-fullscreen-bu tton", AtomicString::ConstructFromLiteral));
508 button->hide(); 509 button->hide();
509 return button.release(); 510 return button.release();
510 } 511 }
511 512
512 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) 513 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event)
513 { 514 {
514 if (event->type() == EventTypeNames::click) { 515 if (event->type() == EventTypeNames::click) {
516 Fullscreen& fullscreen = Fullscreen::from(document());
515 if (mediaElement().isFullscreen()) 517 if (mediaElement().isFullscreen())
516 mediaElement().exitFullscreen(); 518 fullscreen.exitFullscreen();
517 else 519 else
518 mediaElement().enterFullscreen(); 520 fullscreen.requestFullscreen(mediaElement(), Fullscreen::InternalVid eoRequest);
519 event->setDefaultHandled(); 521 event->setDefaultHandled();
520 } 522 }
521 HTMLInputElement::defaultEventHandler(event); 523 HTMLInputElement::defaultEventHandler(event);
522 } 524 }
523 525
524 void MediaControlFullscreenButtonElement::setIsFullscreen(bool isFullscreen) 526 void MediaControlFullscreenButtonElement::setIsFullscreen(bool isFullscreen)
525 { 527 {
526 setDisplayType(isFullscreen ? MediaExitFullscreenButton : MediaEnterFullscre enButton); 528 setDisplayType(isFullscreen ? MediaExitFullscreenButton : MediaEnterFullscre enButton);
527 } 529 }
528 530
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 } 607 }
606 608
607 PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> MediaControlCurren tTimeDisplayElement::create(MediaControls& mediaControls) 609 PassRefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> MediaControlCurren tTimeDisplayElement::create(MediaControls& mediaControls)
608 { 610 {
609 RefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> element = adoptRef WillBeNoop(new MediaControlCurrentTimeDisplayElement(mediaControls)); 611 RefPtrWillBeRawPtr<MediaControlCurrentTimeDisplayElement> element = adoptRef WillBeNoop(new MediaControlCurrentTimeDisplayElement(mediaControls));
610 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display", AtomicString::ConstructFromLiteral)); 612 element->setShadowPseudoId(AtomicString("-webkit-media-controls-current-time -display", AtomicString::ConstructFromLiteral));
611 return element.release(); 613 return element.release();
612 } 614 }
613 615
614 } // namespace blink 616 } // 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