| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 m_timeline->setPosition(mediaElement().currentTime()); | 177 m_timeline->setPosition(mediaElement().currentTime()); |
| 178 | 178 |
| 179 if (!mediaElement().hasAudio()) | 179 if (!mediaElement().hasAudio()) |
| 180 m_volumeSlider->hide(); | 180 m_volumeSlider->hide(); |
| 181 else | 181 else |
| 182 m_volumeSlider->show(); | 182 m_volumeSlider->show(); |
| 183 updateVolume(); | 183 updateVolume(); |
| 184 | 184 |
| 185 refreshClosedCaptionsButtonVisibility(); | 185 refreshClosedCaptionsButtonVisibility(); |
| 186 | 186 |
| 187 if (mediaElement().hasVideo() && fullscreenIsSupported(document())) | 187 // Unconditionally allow the user to exit fullscreen if we are in it |
| 188 // now. Especially on android, when we might not yet know if |
| 189 // fullscreen is supported, we sometimes guess incorrectly and show |
| 190 // the button earlier, and we don't want to remove it here if the |
| 191 // user chose to enter fullscreen. crbug.com/500732 . |
| 192 if ((mediaElement().hasVideo() && fullscreenIsSupported(document())) |
| 193 || mediaElement().isFullscreen()) |
| 188 m_fullScreenButton->show(); | 194 m_fullScreenButton->show(); |
| 189 else | 195 else |
| 190 m_fullScreenButton->hide(); | 196 m_fullScreenButton->hide(); |
| 191 | 197 |
| 192 refreshCastButtonVisibility(); | 198 refreshCastButtonVisibility(); |
| 193 makeOpaque(); | 199 makeOpaque(); |
| 194 } | 200 } |
| 195 | 201 |
| 196 LayoutObject* MediaControls::layoutObjectForTextTrackLayout() | 202 LayoutObject* MediaControls::layoutObjectForTextTrackLayout() |
| 197 { | 203 { |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 visitor->trace(m_toggleClosedCaptionsButton); | 539 visitor->trace(m_toggleClosedCaptionsButton); |
| 534 visitor->trace(m_fullScreenButton); | 540 visitor->trace(m_fullScreenButton); |
| 535 visitor->trace(m_durationDisplay); | 541 visitor->trace(m_durationDisplay); |
| 536 visitor->trace(m_enclosure); | 542 visitor->trace(m_enclosure); |
| 537 visitor->trace(m_castButton); | 543 visitor->trace(m_castButton); |
| 538 visitor->trace(m_overlayCastButton); | 544 visitor->trace(m_overlayCastButton); |
| 539 HTMLDivElement::trace(visitor); | 545 HTMLDivElement::trace(visitor); |
| 540 } | 546 } |
| 541 | 547 |
| 542 } | 548 } |
| OLD | NEW |