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/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/shadow/MediaControlElements.h » ('j') | 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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 3208 matching lines...) Expand 10 before | Expand all | Expand 10 after
3219 3219
3220 assertShadowRootChildren(shadowRoot); 3220 assertShadowRootChildren(shadowRoot);
3221 3221
3222 return *textTrackContainer; 3222 return *textTrackContainer;
3223 } 3223 }
3224 3224
3225 void HTMLMediaElement::updateTextTrackDisplay() 3225 void HTMLMediaElement::updateTextTrackDisplay()
3226 { 3226 {
3227 WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay(%p)", this); 3227 WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay(%p)", this);
3228 3228
3229 ensureTextTrackContainer().updateDisplay(*this); 3229 ensureTextTrackContainer().updateDisplay(*this, TextTrackContainer::DidNotSt artExposingControls);
3230 }
3231
3232 void HTMLMediaElement::mediaControlsDidBecomeVisible()
3233 {
3234 WTF_LOG(Media, "HTMLMediaElement::mediaControlsDidBecomeVisible(%p)", this);
3235
3236 // When the user agent starts exposing a user interface for a video element,
3237 // the user agent should run the rules for updating the text track rendering
3238 // of each of the text tracks in the video element's list of text tracks ...
3239 if (isHTMLVideoElement() && closedCaptionsVisible())
3240 ensureTextTrackContainer().updateDisplay(*this, TextTrackContainer::DidS tartExposingControls);
3230 } 3241 }
3231 3242
3232 void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible) 3243 void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible)
3233 { 3244 {
3234 WTF_LOG(Media, "HTMLMediaElement::setClosedCaptionsVisible(%p, %s)", this, b oolString(closedCaptionVisible)); 3245 WTF_LOG(Media, "HTMLMediaElement::setClosedCaptionsVisible(%p, %s)", this, b oolString(closedCaptionVisible));
3235 3246
3236 if (!m_player || !hasClosedCaptions()) 3247 if (!m_player || !hasClosedCaptions())
3237 return; 3248 return;
3238 3249
3239 m_closedCaptionsVisible = closedCaptionVisible; 3250 m_closedCaptionsVisible = closedCaptionVisible;
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
3650 3661
3651 #if ENABLE(WEB_AUDIO) 3662 #if ENABLE(WEB_AUDIO)
3652 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3663 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3653 { 3664 {
3654 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 3665 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
3655 audioSourceProvider()->setClient(nullptr); 3666 audioSourceProvider()->setClient(nullptr);
3656 } 3667 }
3657 #endif 3668 #endif
3658 3669
3659 } 3670 }
OLDNEW
« 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