OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |