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

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: 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
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 IntRect MediaControls::absoluteRectForTextTracks()
197 {
198 if (LayoutObject* layoutObject = m_panel->layoutObject())
199 return layoutObject->absoluteBoundingBoxRect();
200 return IntRect();
201 }
202
196 void MediaControls::show() 203 void MediaControls::show()
197 { 204 {
198 makeOpaque(); 205 makeOpaque();
199 m_panel->setIsDisplayed(true); 206 m_panel->setIsDisplayed(true);
200 m_panel->show(); 207 m_panel->show();
201 if (m_overlayPlayButton) 208 if (m_overlayPlayButton)
202 m_overlayPlayButton->updateDisplayType(); 209 m_overlayPlayButton->updateDisplayType();
203 } 210 }
204 211
205 void MediaControls::mediaElementFocused() 212 void MediaControls::mediaElementFocused()
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 visitor->trace(m_toggleClosedCaptionsButton); 531 visitor->trace(m_toggleClosedCaptionsButton);
525 visitor->trace(m_fullScreenButton); 532 visitor->trace(m_fullScreenButton);
526 visitor->trace(m_durationDisplay); 533 visitor->trace(m_durationDisplay);
527 visitor->trace(m_enclosure); 534 visitor->trace(m_enclosure);
528 visitor->trace(m_castButton); 535 visitor->trace(m_castButton);
529 visitor->trace(m_overlayCastButton); 536 visitor->trace(m_overlayCastButton);
530 HTMLDivElement::trace(visitor); 537 HTMLDivElement::trace(visitor);
531 } 538 }
532 539
533 } 540 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698