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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 , m_isPausedForScrubbing(false) 121 , m_isPausedForScrubbing(false)
122 , m_panelWidthChangedTimer(this, &MediaControls::panelWidthChangedTimerFired ) 122 , m_panelWidthChangedTimer(this, &MediaControls::panelWidthChangedTimerFired )
123 , m_panelWidth(0) 123 , m_panelWidth(0)
124 , m_allowHiddenVolumeControls(RuntimeEnabledFeatures::newMediaPlaybackUiEnab led()) 124 , m_allowHiddenVolumeControls(RuntimeEnabledFeatures::newMediaPlaybackUiEnab led())
125 { 125 {
126 } 126 }
127 127
128 PassRefPtrWillBeRawPtr<MediaControls> MediaControls::create(HTMLMediaElement& me diaElement) 128 PassRefPtrWillBeRawPtr<MediaControls> MediaControls::create(HTMLMediaElement& me diaElement)
129 { 129 {
130 RefPtrWillBeRawPtr<MediaControls> controls = adoptRefWillBeNoop(new MediaCon trols(mediaElement)); 130 RefPtrWillBeRawPtr<MediaControls> controls = adoptRefWillBeNoop(new MediaCon trols(mediaElement));
131 controls->setShadowPseudoId(AtomicString("-webkit-media-controls", AtomicStr ing::ConstructFromLiteral)); 131 controls->setShadowPseudoId(AtomicString("-webkit-media-controls"));
132 controls->initializeControls(); 132 controls->initializeControls();
133 return controls.release(); 133 return controls.release();
134 } 134 }
135 135
136 // The media controls DOM structure looks like: 136 // The media controls DOM structure looks like:
137 // 137 //
138 // MediaControls (-webkit-media-controls) 138 // MediaControls (-webkit-media-controls)
139 // +-MediaControlOverlayEnclosureElement (-webkit-media-controls-o verlay-enclosure) 139 // +-MediaControlOverlayEnclosureElement (-webkit-media-controls-o verlay-enclosure)
140 // | +-MediaControlOverlayPlayButtonElement (-webkit-media-controls-o verlay-play-button) 140 // | +-MediaControlOverlayPlayButtonElement (-webkit-media-controls-o verlay-play-button)
141 // | | {if mediaControlsOverlayPlayButtonEnabled} 141 // | | {if mediaControlsOverlayPlayButtonEnabled}
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 visitor->trace(m_toggleClosedCaptionsButton); 751 visitor->trace(m_toggleClosedCaptionsButton);
752 visitor->trace(m_fullScreenButton); 752 visitor->trace(m_fullScreenButton);
753 visitor->trace(m_durationDisplay); 753 visitor->trace(m_durationDisplay);
754 visitor->trace(m_enclosure); 754 visitor->trace(m_enclosure);
755 visitor->trace(m_castButton); 755 visitor->trace(m_castButton);
756 visitor->trace(m_overlayCastButton); 756 visitor->trace(m_overlayCastButton);
757 HTMLDivElement::trace(visitor); 757 HTMLDivElement::trace(visitor);
758 } 758 }
759 759
760 } // namespace blink 760 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698