| OLD | NEW |
| 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 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3179 | 3179 |
| 3180 bool HTMLMediaElement::isFullscreen() const | 3180 bool HTMLMediaElement::isFullscreen() const |
| 3181 { | 3181 { |
| 3182 return FullscreenElementStack::isActiveFullScreenElement(this); | 3182 return FullscreenElementStack::isActiveFullScreenElement(this); |
| 3183 } | 3183 } |
| 3184 | 3184 |
| 3185 void HTMLMediaElement::enterFullscreen() | 3185 void HTMLMediaElement::enterFullscreen() |
| 3186 { | 3186 { |
| 3187 WTF_LOG(Media, "HTMLMediaElement::enterFullscreen"); | 3187 WTF_LOG(Media, "HTMLMediaElement::enterFullscreen"); |
| 3188 | 3188 |
| 3189 if (document().settings() && document().settings()->fullScreenEnabled()) | 3189 FullscreenElementStack::from(document()).requestFullScreenForElement(this, 0
, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirement); |
| 3190 FullscreenElementStack::from(document()).requestFullScreenForElement(thi
s, 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirement); | |
| 3191 } | 3190 } |
| 3192 | 3191 |
| 3193 void HTMLMediaElement::exitFullscreen() | 3192 void HTMLMediaElement::exitFullscreen() |
| 3194 { | 3193 { |
| 3195 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen"); | 3194 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen"); |
| 3196 | 3195 |
| 3197 if (document().settings() && document().settings()->fullScreenEnabled() && i
sFullscreen()) | 3196 FullscreenElementStack::from(document()).webkitCancelFullScreen(); |
| 3198 FullscreenElementStack::from(document()).webkitCancelFullScreen(); | |
| 3199 } | 3197 } |
| 3200 | 3198 |
| 3201 void HTMLMediaElement::didBecomeFullscreenElement() | 3199 void HTMLMediaElement::didBecomeFullscreenElement() |
| 3202 { | 3200 { |
| 3203 if (hasMediaControls()) | 3201 if (hasMediaControls()) |
| 3204 mediaControls()->enteredFullscreen(); | 3202 mediaControls()->enteredFullscreen(); |
| 3205 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement(*this)) | 3203 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement(*this)) |
| 3206 document().renderView()->compositor()->setCompositingLayersNeedRebuild()
; | 3204 document().renderView()->compositor()->setCompositingLayersNeedRebuild()
; |
| 3207 } | 3205 } |
| 3208 | 3206 |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3654 { | 3652 { |
| 3655 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 3653 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
| 3656 } | 3654 } |
| 3657 | 3655 |
| 3658 bool HTMLMediaElement::isInteractiveContent() const | 3656 bool HTMLMediaElement::isInteractiveContent() const |
| 3659 { | 3657 { |
| 3660 return fastHasAttribute(controlsAttr); | 3658 return fastHasAttribute(controlsAttr); |
| 3661 } | 3659 } |
| 3662 | 3660 |
| 3663 } | 3661 } |
| OLD | NEW |