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

Side by Side Diff: Source/core/html/shadow/MediaControls.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/shadow/MediaControls.h ('k') | Source/core/html/track/TextTrackContainer.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) 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 if (mediaElement().hasVideo() && fullscreenIsSupported(document())) 187 if (mediaElement().hasVideo() && fullscreenIsSupported(document()))
188 m_fullScreenButton->show(); 188 m_fullScreenButton->show();
189 else 189 else
190 m_fullScreenButton->hide(); 190 m_fullScreenButton->hide();
191 191
192 refreshCastButtonVisibility(); 192 refreshCastButtonVisibility();
193 makeOpaque(); 193 makeOpaque();
194 } 194 }
195 195
196 LayoutObject* MediaControls::layoutObjectForTextTrackLayout()
197 {
198 return m_panel->layoutObject();
199 }
200
196 void MediaControls::show() 201 void MediaControls::show()
197 { 202 {
198 makeOpaque(); 203 makeOpaque();
204 m_panel->show();
199 m_panel->setIsDisplayed(true); 205 m_panel->setIsDisplayed(true);
200 m_panel->show();
201 if (m_overlayPlayButton) 206 if (m_overlayPlayButton)
202 m_overlayPlayButton->updateDisplayType(); 207 m_overlayPlayButton->updateDisplayType();
203 } 208 }
204 209
205 void MediaControls::mediaElementFocused() 210 void MediaControls::mediaElementFocused()
206 { 211 {
207 if (mediaElement().shouldShowControls()) { 212 if (mediaElement().shouldShowControls()) {
208 show(); 213 show();
209 resetHideMediaControlsTimer(); 214 resetHideMediaControlsTimer();
210 } 215 }
211 } 216 }
212 217
213 void MediaControls::hide() 218 void MediaControls::hide()
214 { 219 {
220 m_panel->hide();
215 m_panel->setIsDisplayed(false); 221 m_panel->setIsDisplayed(false);
216 m_panel->hide();
217 if (m_overlayPlayButton) 222 if (m_overlayPlayButton)
218 m_overlayPlayButton->hide(); 223 m_overlayPlayButton->hide();
219 } 224 }
220 225
221 void MediaControls::makeOpaque() 226 void MediaControls::makeOpaque()
222 { 227 {
223 m_panel->makeOpaque(); 228 m_panel->makeOpaque();
224 } 229 }
225 230
226 void MediaControls::makeTransparent() 231 void MediaControls::makeTransparent()
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 visitor->trace(m_toggleClosedCaptionsButton); 529 visitor->trace(m_toggleClosedCaptionsButton);
525 visitor->trace(m_fullScreenButton); 530 visitor->trace(m_fullScreenButton);
526 visitor->trace(m_durationDisplay); 531 visitor->trace(m_durationDisplay);
527 visitor->trace(m_enclosure); 532 visitor->trace(m_enclosure);
528 visitor->trace(m_castButton); 533 visitor->trace(m_castButton);
529 visitor->trace(m_overlayCastButton); 534 visitor->trace(m_overlayCastButton);
530 HTMLDivElement::trace(visitor); 535 HTMLDivElement::trace(visitor);
531 } 536 }
532 537
533 } 538 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControls.h ('k') | Source/core/html/track/TextTrackContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698