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

Unified Diff: Source/core/html/shadow/MediaControls.cpp

Issue 949203002: Separate the text track container from the media controls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address nits Created 5 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 | « Source/core/html/shadow/MediaControls.h ('k') | Source/core/html/track/TextTrackContainer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/MediaControls.cpp
diff --git a/Source/core/html/shadow/MediaControls.cpp b/Source/core/html/shadow/MediaControls.cpp
index 8f4a18196a0a0f59693607c94eb25488c7867d84..b411b80e28e62a5f41c61e35d84c76dae5cec4eb 100644
--- a/Source/core/html/shadow/MediaControls.cpp
+++ b/Source/core/html/shadow/MediaControls.cpp
@@ -51,7 +51,6 @@ MediaControls::MediaControls(HTMLMediaElement& mediaElement)
: HTMLDivElement(mediaElement.document())
, m_mediaElement(&mediaElement)
, m_panel(nullptr)
- , m_textTrackContainer(nullptr)
, m_overlayPlayButton(nullptr)
, m_overlayEnclosure(nullptr)
, m_playButton(nullptr)
@@ -84,8 +83,6 @@ PassRefPtrWillBeRawPtr<MediaControls> MediaControls::create(HTMLMediaElement& me
//
// MediaControls (-webkit-media-controls)
// +-MediaControlOverlayEnclosureElement (-webkit-media-controls-overlay-enclosure)
-// | +-TextTrackContainer (-webkit-media-text-track-container)
-// | | {when text tracks are enabled}
// | +-MediaControlOverlayPlayButtonElement (-webkit-media-controls-overlay-play-button)
// | | {if mediaControlsOverlayPlayButtonEnabled}
// | \-MediaControlCastButtonElement (-internal-media-controls-overlay-cast-button)
@@ -100,10 +97,6 @@ PassRefPtrWillBeRawPtr<MediaControls> MediaControls::create(HTMLMediaElement& me
// +-MediaControlToggleClosedCaptionsButtonElement (-webkit-media-controls-toggle-closed-captions-button)
// +-MediaControlCastButtonElement (-internal-media-controls-cast-button)
// \-MediaControlFullscreenButtonElement (-webkit-media-controls-fullscreen-button)
-//
-// Most of the structure is built by MediaControls::initializeControls() - the
-// exception being TextTrackContainer which is added on-demand by
-// MediaControls::textTrackContainer().
void MediaControls::initializeControls()
{
RefPtrWillBeRawPtr<MediaControlOverlayEnclosureElement> overlayEnclosure = MediaControlOverlayEnclosureElement::create(*this);
@@ -517,23 +510,10 @@ bool MediaControls::containsRelatedTarget(Event* event)
return contains(relatedTarget->toNode());
}
-TextTrackContainer* MediaControls::textTrackContainer()
-{
- if (!m_textTrackContainer) {
- RefPtrWillBeRawPtr<TextTrackContainer> textTrackContainer = TextTrackContainer::create(mediaElement().document());
- m_textTrackContainer = textTrackContainer.get();
-
- // Insert it before (behind) all other control elements.
- m_overlayEnclosure->insertBefore(textTrackContainer.release(), m_overlayEnclosure->firstChild());
- }
- return m_textTrackContainer.get();
-}
-
DEFINE_TRACE(MediaControls)
{
visitor->trace(m_mediaElement);
visitor->trace(m_panel);
- visitor->trace(m_textTrackContainer);
visitor->trace(m_overlayPlayButton);
visitor->trace(m_overlayEnclosure);
visitor->trace(m_playButton);
« no previous file with comments | « Source/core/html/shadow/MediaControls.h ('k') | Source/core/html/track/TextTrackContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698