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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp

Issue 2754523004: Remove dynamic MediaControlCastButtonElement::shadowPseudoId. (Closed)
Patch Set: Modify attrs after constructor. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/MediaControlElements.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
index 778de8c35b26e1d3b9a18b4cebafb1de41965db5..56f2ac372f8d6d4c522ac91ddad70933705e95f9 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
@@ -991,6 +991,9 @@ MediaControlCastButtonElement* MediaControlCastButtonElement::create(
MediaControlCastButtonElement* button =
new MediaControlCastButtonElement(mediaControls, isOverlayButton);
button->ensureUserAgentShadowRoot();
+ button->setShadowPseudoId(isOverlayButton
+ ? "-internal-media-controls-overlay-cast-button"
+ : "-internal-media-controls-cast-button");
button->setType(InputTypeNames::button);
return button;
}
@@ -1017,14 +1020,6 @@ void MediaControlCastButtonElement::defaultEventHandler(Event* event) {
MediaControlInputElement::defaultEventHandler(event);
}
-const AtomicString& MediaControlCastButtonElement::shadowPseudoId() const {
- DEFINE_STATIC_LOCAL(AtomicString, id_nonOverlay,
- ("-internal-media-controls-cast-button"));
- DEFINE_STATIC_LOCAL(AtomicString, id_overlay,
- ("-internal-media-controls-overlay-cast-button"));
- return m_isOverlayButton ? id_overlay : id_nonOverlay;
-}
-
void MediaControlCastButtonElement::setIsPlayingRemotely(
bool isPlayingRemotely) {
if (isPlayingRemotely) {
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/MediaControlElements.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698