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

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

Issue 359453002: Let FullscreenElementStack methods take references where possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/HTMLMediaElement.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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 RefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> button = adoptRefWil lBeNoop(new MediaControlFullscreenButtonElement(mediaControls)); 485 RefPtrWillBeRawPtr<MediaControlFullscreenButtonElement> button = adoptRefWil lBeNoop(new MediaControlFullscreenButtonElement(mediaControls));
486 button->ensureUserAgentShadowRoot(); 486 button->ensureUserAgentShadowRoot();
487 button->setType("button"); 487 button->setType("button");
488 button->hide(); 488 button->hide();
489 return button.release(); 489 return button.release();
490 } 490 }
491 491
492 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event) 492 void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event)
493 { 493 {
494 if (event->type() == EventTypeNames::click) { 494 if (event->type() == EventTypeNames::click) {
495 if (FullscreenElementStack::isActiveFullScreenElement(&mediaElement())) 495 if (FullscreenElementStack::isActiveFullScreenElement(mediaElement()))
496 FullscreenElementStack::from(document()).webkitCancelFullScreen(); 496 FullscreenElementStack::from(document()).webkitCancelFullScreen();
497 else 497 else
498 FullscreenElementStack::from(document()).requestFullScreenForElement (&mediaElement(), 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirem ent); 498 FullscreenElementStack::from(document()).requestFullScreenForElement (mediaElement(), 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequireme nt);
499 event->setDefaultHandled(); 499 event->setDefaultHandled();
500 } 500 }
501 HTMLInputElement::defaultEventHandler(event); 501 HTMLInputElement::defaultEventHandler(event);
502 } 502 }
503 503
504 const AtomicString& MediaControlFullscreenButtonElement::shadowPseudoId() const 504 const AtomicString& MediaControlFullscreenButtonElement::shadowPseudoId() const
505 { 505 {
506 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-fullscreen-bu tton", AtomicString::ConstructFromLiteral)); 506 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-fullscreen-bu tton", AtomicString::ConstructFromLiteral));
507 return id; 507 return id;
508 } 508 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 float fontSize = smallestDimension * 0.05f; 676 float fontSize = smallestDimension * 0.05f;
677 if (fontSize != m_fontSize) { 677 if (fontSize != m_fontSize) {
678 m_fontSize = fontSize; 678 m_fontSize = fontSize;
679 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX); 679 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX);
680 } 680 }
681 } 681 }
682 682
683 // ---------------------------- 683 // ----------------------------
684 684
685 } // namespace WebCore 685 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698