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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 1018593004: Implement <video controls> dodging for text track layout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: braces 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/HTMLMediaElement.h ('k') | Source/core/html/shadow/MediaControlElements.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index ad0c827b1aab852e0650d3e655230bb38807da11..237fdde0e1d0bd7b657796f0368964d5884a5204 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -3226,7 +3226,18 @@ void HTMLMediaElement::updateTextTrackDisplay()
{
WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay(%p)", this);
- ensureTextTrackContainer().updateDisplay(*this);
+ ensureTextTrackContainer().updateDisplay(*this, TextTrackContainer::DidNotStartExposingControls);
+}
+
+void HTMLMediaElement::mediaControlsDidBecomeVisible()
+{
+ WTF_LOG(Media, "HTMLMediaElement::mediaControlsDidBecomeVisible(%p)", this);
+
+ // When the user agent starts exposing a user interface for a video element,
+ // the user agent should run the rules for updating the text track rendering
+ // of each of the text tracks in the video element's list of text tracks ...
+ if (isHTMLVideoElement() && closedCaptionsVisible())
+ ensureTextTrackContainer().updateDisplay(*this, TextTrackContainer::DidStartExposingControls);
}
void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible)
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/shadow/MediaControlElements.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698