| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "core/page/Page.h" | 59 #include "core/page/Page.h" |
| 60 #include "core/page/Settings.h" | 60 #include "core/page/Settings.h" |
| 61 #include "core/platform/ContentType.h" | 61 #include "core/platform/ContentType.h" |
| 62 #include "core/platform/Language.h" | 62 #include "core/platform/Language.h" |
| 63 #include "core/platform/Logging.h" | 63 #include "core/platform/Logging.h" |
| 64 #include "core/platform/MIMETypeFromURL.h" | 64 #include "core/platform/MIMETypeFromURL.h" |
| 65 #include "core/platform/MIMETypeRegistry.h" | 65 #include "core/platform/MIMETypeRegistry.h" |
| 66 #include "core/platform/NotImplemented.h" | 66 #include "core/platform/NotImplemented.h" |
| 67 #include "core/platform/graphics/InbandTextTrackPrivate.h" | 67 #include "core/platform/graphics/InbandTextTrackPrivate.h" |
| 68 #include "core/platform/graphics/MediaPlayer.h" | 68 #include "core/platform/graphics/MediaPlayer.h" |
| 69 #include "core/rendering/RenderLayerCompositor.h" |
| 69 #include "core/rendering/RenderVideo.h" | 70 #include "core/rendering/RenderVideo.h" |
| 71 #include "core/rendering/RenderView.h" |
| 70 #include "modules/mediastream/MediaStreamRegistry.h" | 72 #include "modules/mediastream/MediaStreamRegistry.h" |
| 71 #include "public/platform/Platform.h" | 73 #include "public/platform/Platform.h" |
| 72 #include "weborigin/SecurityOrigin.h" | 74 #include "weborigin/SecurityOrigin.h" |
| 73 #include "wtf/CurrentTime.h" | 75 #include "wtf/CurrentTime.h" |
| 74 #include "wtf/MathExtras.h" | 76 #include "wtf/MathExtras.h" |
| 75 #include "wtf/NonCopyingSort.h" | 77 #include "wtf/NonCopyingSort.h" |
| 76 #include "wtf/Uint8Array.h" | 78 #include "wtf/Uint8Array.h" |
| 77 #include "wtf/text/CString.h" | 79 #include "wtf/text/CString.h" |
| 78 #include <limits> | 80 #include <limits> |
| 79 | 81 |
| (...skipping 3483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3563 LOG(Media, "HTMLMediaElement::exitFullscreen"); | 3565 LOG(Media, "HTMLMediaElement::exitFullscreen"); |
| 3564 | 3566 |
| 3565 if (document().settings() && document().settings()->fullScreenEnabled() && i
sFullscreen()) | 3567 if (document().settings() && document().settings()->fullScreenEnabled() && i
sFullscreen()) |
| 3566 FullscreenElementStack::from(&document())->webkitCancelFullScreen(); | 3568 FullscreenElementStack::from(&document())->webkitCancelFullScreen(); |
| 3567 } | 3569 } |
| 3568 | 3570 |
| 3569 void HTMLMediaElement::didBecomeFullscreenElement() | 3571 void HTMLMediaElement::didBecomeFullscreenElement() |
| 3570 { | 3572 { |
| 3571 if (hasMediaControls()) | 3573 if (hasMediaControls()) |
| 3572 mediaControls()->enteredFullscreen(); | 3574 mediaControls()->enteredFullscreen(); |
| 3575 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isVideo()) |
| 3576 document().renderView()->compositor()->setCompositingLayersNeedRebuild(t
rue); |
| 3573 } | 3577 } |
| 3574 | 3578 |
| 3575 void HTMLMediaElement::willStopBeingFullscreenElement() | 3579 void HTMLMediaElement::willStopBeingFullscreenElement() |
| 3576 { | 3580 { |
| 3577 if (hasMediaControls()) | 3581 if (hasMediaControls()) |
| 3578 mediaControls()->exitedFullscreen(); | 3582 mediaControls()->exitedFullscreen(); |
| 3583 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isVideo()) |
| 3584 document().renderView()->compositor()->setCompositingLayersNeedRebuild(t
rue); |
| 3579 } | 3585 } |
| 3580 | 3586 |
| 3581 WebKit::WebLayer* HTMLMediaElement::platformLayer() const | 3587 WebKit::WebLayer* HTMLMediaElement::platformLayer() const |
| 3582 { | 3588 { |
| 3583 return m_player ? m_player->platformLayer() : 0; | 3589 return m_player ? m_player->platformLayer() : 0; |
| 3584 } | 3590 } |
| 3585 | 3591 |
| 3586 bool HTMLMediaElement::hasClosedCaptions() const | 3592 bool HTMLMediaElement::hasClosedCaptions() const |
| 3587 { | 3593 { |
| 3588 if (RuntimeEnabledFeatures::videoTrackEnabled() && m_textTracks) { | 3594 if (RuntimeEnabledFeatures::videoTrackEnabled() && m_textTracks) { |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3996 { | 4002 { |
| 3997 m_restrictions = NoRestrictions; | 4003 m_restrictions = NoRestrictions; |
| 3998 } | 4004 } |
| 3999 | 4005 |
| 4000 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() | 4006 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() |
| 4001 { | 4007 { |
| 4002 scheduleLayerUpdate(); | 4008 scheduleLayerUpdate(); |
| 4003 } | 4009 } |
| 4004 | 4010 |
| 4005 } | 4011 } |
| OLD | NEW |