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 11 matching lines...) Expand all Loading... | |
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #include "core/html/shadow/MediaControls.h" | 27 #include "core/html/shadow/MediaControls.h" |
28 | 28 |
29 #include "bindings/core/v8/ExceptionState.h" | 29 #include "bindings/core/v8/ExceptionState.h" |
30 #include "core/dom/ClientRect.h" | 30 #include "core/dom/ClientRect.h" |
31 #include "core/dom/Fullscreen.h" | 31 #include "core/dom/Fullscreen.h" |
32 #include "core/dom/ResizeObserver.h" | |
33 #include "core/dom/ResizeObserverCallback.h" | |
34 #include "core/dom/ResizeObserverEntry.h" | |
32 #include "core/dom/TaskRunnerHelper.h" | 35 #include "core/dom/TaskRunnerHelper.h" |
33 #include "core/events/MouseEvent.h" | 36 #include "core/events/MouseEvent.h" |
34 #include "core/frame/Settings.h" | 37 #include "core/frame/Settings.h" |
35 #include "core/html/HTMLMediaElement.h" | 38 #include "core/html/HTMLMediaElement.h" |
36 #include "core/html/HTMLVideoElement.h" | 39 #include "core/html/HTMLVideoElement.h" |
37 #include "core/html/shadow/MediaControlsMediaEventListener.h" | 40 #include "core/html/shadow/MediaControlsMediaEventListener.h" |
38 #include "core/html/shadow/MediaControlsOrientationLockDelegate.h" | 41 #include "core/html/shadow/MediaControlsOrientationLockDelegate.h" |
39 #include "core/html/shadow/MediaControlsWindowEventListener.h" | 42 #include "core/html/shadow/MediaControlsWindowEventListener.h" |
40 #include "core/html/track/TextTrackContainer.h" | 43 #include "core/html/track/TextTrackContainer.h" |
41 #include "core/html/track/TextTrackList.h" | 44 #include "core/html/track/TextTrackList.h" |
42 #include "core/layout/LayoutObject.h" | 45 #include "core/layout/LayoutObject.h" |
43 #include "core/layout/LayoutTheme.h" | 46 #include "core/layout/LayoutTheme.h" |
44 #include "platform/EventDispatchForbiddenScope.h" | 47 #include "platform/EventDispatchForbiddenScope.h" |
45 | 48 |
46 namespace blink { | 49 namespace blink { |
47 | 50 |
51 namespace { | |
52 constexpr int kOverlayPlayButtonWidth = 48; | |
53 constexpr int kOverlayPlayButtonHeight = 48; | |
54 constexpr int kOverlayBottomMargin = 10; | |
55 constexpr int kAndroidMediaPanelHeight = 48; | |
whywhat
2017/02/24 00:57:41
nit: what does Android mean here? if this is an An
steimel
2017/02/27 15:39:22
On desktop, the media control panel height is 32px
| |
56 | |
57 constexpr int kMinWidthForOverlayPlayButton = kOverlayPlayButtonWidth; | |
58 constexpr int kMinHeightForOverlayPlayButton = kOverlayPlayButtonHeight + | |
59 (2 * kAndroidMediaPanelHeight) + | |
60 (2 * kOverlayBottomMargin); | |
61 } // namespace | |
62 | |
48 // If you change this value, then also update the corresponding value in | 63 // If you change this value, then also update the corresponding value in |
49 // LayoutTests/media/media-controls.js. | 64 // LayoutTests/media/media-controls.js. |
50 static const double timeWithoutMouseMovementBeforeHidingMediaControls = 3; | 65 static const double timeWithoutMouseMovementBeforeHidingMediaControls = 3; |
51 | 66 |
52 static bool shouldShowFullscreenButton(const HTMLMediaElement& mediaElement) { | 67 static bool shouldShowFullscreenButton(const HTMLMediaElement& mediaElement) { |
53 // Unconditionally allow the user to exit fullscreen if we are in it | 68 // Unconditionally allow the user to exit fullscreen if we are in it |
54 // now. Especially on android, when we might not yet know if | 69 // now. Especially on android, when we might not yet know if |
55 // fullscreen is supported, we sometimes guess incorrectly and show | 70 // fullscreen is supported, we sometimes guess incorrectly and show |
56 // the button earlier, and we don't want to remove it here if the | 71 // the button earlier, and we don't want to remove it here if the |
57 // user chose to enter fullscreen. crbug.com/500732 . | 72 // user chose to enter fullscreen. crbug.com/500732 . |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 } | 122 } |
108 | 123 |
109 private: | 124 private: |
110 Member<MediaControls> m_controls; | 125 Member<MediaControls> m_controls; |
111 static int s_batchDepth; | 126 static int s_batchDepth; |
112 }; | 127 }; |
113 | 128 |
114 // Count of number open batches for controls visibility. | 129 // Count of number open batches for controls visibility. |
115 int MediaControls::BatchedControlUpdate::s_batchDepth = 0; | 130 int MediaControls::BatchedControlUpdate::s_batchDepth = 0; |
116 | 131 |
132 class MediaControls::MediaControlsResizeObserverCallback | |
133 : public ResizeObserverCallback { | |
134 public: | |
135 explicit MediaControlsResizeObserverCallback(MediaControls* controls) | |
136 : m_controls(controls) { | |
137 DCHECK(controls); | |
138 } | |
139 ~MediaControlsResizeObserverCallback() override = default; | |
140 | |
141 void handleEvent(const HeapVector<Member<ResizeObserverEntry>>& entries, | |
142 ResizeObserver* observer) override { | |
143 DCHECK_EQ(1u, entries.size()); | |
144 DCHECK_EQ(entries[0]->target(), m_controls->m_mediaElement); | |
145 ClientRect* contentRect = entries[0]->contentRect(); | |
146 m_controls->notifyElementSizeChanged(contentRect->width(), | |
147 contentRect->height()); | |
148 } | |
149 | |
150 DEFINE_INLINE_TRACE() { | |
151 visitor->trace(m_controls); | |
152 ResizeObserverCallback::trace(visitor); | |
153 } | |
154 | |
155 private: | |
156 Member<MediaControls> m_controls; | |
157 }; | |
158 | |
117 MediaControls::MediaControls(HTMLMediaElement& mediaElement) | 159 MediaControls::MediaControls(HTMLMediaElement& mediaElement) |
118 : HTMLDivElement(mediaElement.document()), | 160 : HTMLDivElement(mediaElement.document()), |
119 m_mediaElement(&mediaElement), | 161 m_mediaElement(&mediaElement), |
120 m_overlayEnclosure(nullptr), | 162 m_overlayEnclosure(nullptr), |
121 m_overlayPlayButton(nullptr), | 163 m_overlayPlayButton(nullptr), |
122 m_overlayCastButton(nullptr), | 164 m_overlayCastButton(nullptr), |
123 m_enclosure(nullptr), | 165 m_enclosure(nullptr), |
124 m_panel(nullptr), | 166 m_panel(nullptr), |
125 m_playButton(nullptr), | 167 m_playButton(nullptr), |
126 m_timeline(nullptr), | 168 m_timeline(nullptr), |
(...skipping 12 matching lines...) Expand all Loading... | |
139 this, | 181 this, |
140 WTF::bind(&MediaControls::hideAllMenus, wrapWeakPersistent(this)))), | 182 WTF::bind(&MediaControls::hideAllMenus, wrapWeakPersistent(this)))), |
141 m_orientationLockDelegate(nullptr), | 183 m_orientationLockDelegate(nullptr), |
142 m_hideMediaControlsTimer(TaskRunnerHelper::get(TaskType::UnspecedTimer, | 184 m_hideMediaControlsTimer(TaskRunnerHelper::get(TaskType::UnspecedTimer, |
143 &mediaElement.document()), | 185 &mediaElement.document()), |
144 this, | 186 this, |
145 &MediaControls::hideMediaControlsTimerFired), | 187 &MediaControls::hideMediaControlsTimerFired), |
146 m_hideTimerBehaviorFlags(IgnoreNone), | 188 m_hideTimerBehaviorFlags(IgnoreNone), |
147 m_isMouseOverControls(false), | 189 m_isMouseOverControls(false), |
148 m_isPausedForScrubbing(false), | 190 m_isPausedForScrubbing(false), |
149 m_panelWidthChangedTimer(TaskRunnerHelper::get(TaskType::UnspecedTimer, | 191 m_resizeObserver(ResizeObserver::create( |
150 &mediaElement.document()), | 192 mediaElement.document(), |
151 this, | 193 new MediaControlsResizeObserverCallback(this))), |
152 &MediaControls::panelWidthChangedTimerFired), | 194 m_sizingInitialized(false), |
153 m_panelWidth(0), | 195 m_elementSizeChangedTimer(TaskRunnerHelper::get(TaskType::UnspecedTimer, |
154 m_keepShowingUntilTimerFires(false) {} | 196 &mediaElement.document()), |
197 this, | |
198 &MediaControls::elementSizeChangedTimerFired), | |
199 m_effectiveWidth(0), | |
200 m_effectiveHeight(0), | |
201 m_keepShowingUntilTimerFires(false) { | |
202 m_resizeObserver->observe(m_mediaElement); | |
203 } | |
155 | 204 |
156 MediaControls* MediaControls::create(HTMLMediaElement& mediaElement, | 205 MediaControls* MediaControls::create(HTMLMediaElement& mediaElement, |
157 ShadowRoot& shadowRoot) { | 206 ShadowRoot& shadowRoot) { |
158 MediaControls* controls = new MediaControls(mediaElement); | 207 MediaControls* controls = new MediaControls(mediaElement); |
159 controls->setShadowPseudoId(AtomicString("-webkit-media-controls")); | 208 controls->setShadowPseudoId(AtomicString("-webkit-media-controls")); |
160 controls->initializeControls(); | 209 controls->initializeControls(); |
161 controls->reset(); | 210 controls->reset(); |
162 | 211 |
163 // Initialize the orientation lock when going fullscreen feature. | 212 // Initialize the orientation lock when going fullscreen feature. |
164 if (RuntimeEnabledFeatures::videoFullscreenOrientationLockEnabled() && | 213 if (RuntimeEnabledFeatures::videoFullscreenOrientationLockEnabled() && |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
781 stopHideMediaControlsTimer(); | 830 stopHideMediaControlsTimer(); |
782 startHideMediaControlsTimer(); | 831 startHideMediaControlsTimer(); |
783 } | 832 } |
784 | 833 |
785 void MediaControls::onExitedFullscreen() { | 834 void MediaControls::onExitedFullscreen() { |
786 m_fullscreenButton->setIsFullscreen(false); | 835 m_fullscreenButton->setIsFullscreen(false); |
787 stopHideMediaControlsTimer(); | 836 stopHideMediaControlsTimer(); |
788 startHideMediaControlsTimer(); | 837 startHideMediaControlsTimer(); |
789 } | 838 } |
790 | 839 |
791 void MediaControls::notifyPanelWidthChanged(const LayoutUnit& newWidth) { | 840 void MediaControls::notifyElementSizeChanged(int newWidth, int newHeight) { |
792 // Don't bother to do any work if this matches the most recent panel | |
793 // width, since we're called after layout. | |
794 // Note that this code permits a bad frame on resize, since it is | 841 // Note that this code permits a bad frame on resize, since it is |
795 // run after the relayout / paint happens. It would be great to improve | 842 // run after the relayout / paint happens. It would be great to improve |
796 // this, but it would be even greater to move this code entirely to | 843 // this, but it would be even greater to move this code entirely to |
797 // JS and fix it there. | 844 // JS and fix it there. |
798 m_panelWidth = newWidth.toInt(); | |
799 | 845 |
800 // Adjust for effective zoom. | 846 // Adjust for effective zoom. |
801 if (!m_panel->layoutObject() || !m_panel->layoutObject()->style()) | 847 if (!m_panel->layoutObject() || !m_panel->layoutObject()->style()) |
802 return; | 848 return; |
803 m_panelWidth = | |
804 ceil(m_panelWidth / m_panel->layoutObject()->style()->effectiveZoom()); | |
805 | 849 |
806 m_panelWidthChangedTimer.startOneShot(0, BLINK_FROM_HERE); | 850 int oldWidth = m_effectiveWidth; |
851 int oldHeight = m_effectiveHeight; | |
852 m_effectiveWidth = | |
853 ceil(newWidth / m_panel->layoutObject()->style()->effectiveZoom()); | |
854 m_effectiveHeight = newHeight; | |
855 | |
856 // Don't bother to do any work if this matches the most recent size. | |
857 if (oldWidth != m_effectiveWidth || oldHeight != m_effectiveHeight) | |
858 m_elementSizeChangedTimer.startOneShot(0, BLINK_FROM_HERE); | |
807 } | 859 } |
808 | 860 |
809 void MediaControls::panelWidthChangedTimerFired(TimerBase*) { | 861 void MediaControls::elementSizeChangedTimerFired(TimerBase*) { |
810 computeWhichControlsFit(); | 862 computeWhichControlsFit(); |
811 } | 863 } |
812 | 864 |
813 void MediaControls::computeWhichControlsFit() { | 865 void MediaControls::computeWhichControlsFit() { |
814 // Hide all controls that don't fit, and show the ones that do. | 866 // Hide all controls that don't fit, and show the ones that do. |
815 // This might be better suited for a layout, but since JS media controls | 867 // This might be better suited for a layout, but since JS media controls |
816 // won't benefit from that anwyay, we just do it here like JS will. | 868 // won't benefit from that anwyay, we just do it here like JS will. |
817 | 869 |
818 // Controls that we'll hide / show, in order of decreasing priority. | 870 // Controls that we'll hide / show, in order of decreasing priority. |
819 MediaControlElement* elements[] = { | 871 MediaControlElement* elements[] = { |
820 // Exclude m_overflowMenu; we handle it specially. | 872 // Exclude m_overflowMenu; we handle it specially. |
821 m_playButton.get(), | 873 m_playButton.get(), |
822 m_fullscreenButton.get(), | 874 m_fullscreenButton.get(), |
823 m_downloadButton.get(), | 875 m_downloadButton.get(), |
824 m_timeline.get(), | 876 m_timeline.get(), |
825 m_muteButton.get(), | 877 m_muteButton.get(), |
826 m_volumeSlider.get(), | 878 m_volumeSlider.get(), |
827 m_toggleClosedCaptionsButton.get(), | 879 m_toggleClosedCaptionsButton.get(), |
828 m_castButton.get(), | 880 m_castButton.get(), |
829 m_currentTimeDisplay.get(), | 881 m_currentTimeDisplay.get(), |
830 m_durationDisplay.get(), | 882 m_durationDisplay.get(), |
831 }; | 883 }; |
832 | 884 |
833 // TODO(mlamouri): we need a more dynamic way to find out the width of an | 885 // TODO(mlamouri): we need a more dynamic way to find out the width of an |
834 // element. | 886 // element. |
835 const int sliderMargin = 36; // Sliders have 18px margin on each side. | 887 const int sliderMargin = 36; // Sliders have 18px margin on each side. |
836 | 888 |
837 if (!m_panelWidth) { | 889 if (!m_effectiveWidth) { |
838 // No layout yet -- hide everything, then make them show up later. | 890 // No layout yet -- hide everything, then make them show up later. |
839 // This prevents the wrong controls from being shown briefly | 891 // This prevents the wrong controls from being shown briefly |
840 // immediately after the first layout and paint, but before we have | 892 // immediately after the first layout and paint, but before we have |
841 // a chance to revise them. | 893 // a chance to revise them. |
842 for (MediaControlElement* element : elements) { | 894 for (MediaControlElement* element : elements) { |
843 if (element) | 895 if (element) |
844 element->setDoesFit(false); | 896 element->setDoesFit(false); |
845 } | 897 } |
846 return; | 898 return; |
847 } | 899 } |
(...skipping 24 matching lines...) Expand all Loading... | |
872 MediaControlElement* firstDisplacedElement = nullptr; | 924 MediaControlElement* firstDisplacedElement = nullptr; |
873 // For each control that fits, enable it in order of decreasing priority. | 925 // For each control that fits, enable it in order of decreasing priority. |
874 for (MediaControlElement* element : elements) { | 926 for (MediaControlElement* element : elements) { |
875 if (!element) | 927 if (!element) |
876 continue; | 928 continue; |
877 int width = minimumWidth; | 929 int width = minimumWidth; |
878 if ((element == m_timeline.get()) || (element == m_volumeSlider.get())) | 930 if ((element == m_timeline.get()) || (element == m_volumeSlider.get())) |
879 width += sliderMargin; | 931 width += sliderMargin; |
880 element->shouldShowButtonInOverflowMenu(false); | 932 element->shouldShowButtonInOverflowMenu(false); |
881 if (element->isWanted()) { | 933 if (element->isWanted()) { |
882 if (usedWidth + width <= m_panelWidth) { | 934 if (usedWidth + width <= m_effectiveWidth) { |
883 element->setDoesFit(true); | 935 element->setDoesFit(true); |
884 usedWidth += width; | 936 usedWidth += width; |
885 } else { | 937 } else { |
886 element->setDoesFit(false); | 938 element->setDoesFit(false); |
887 element->shouldShowButtonInOverflowMenu(true); | 939 element->shouldShowButtonInOverflowMenu(true); |
888 if (element->hasOverflowButton()) | 940 if (element->hasOverflowButton()) |
889 overflowElements.push_front(element); | 941 overflowElements.push_front(element); |
890 // We want a way to access the first media element that was | 942 // We want a way to access the first media element that was |
891 // removed. If we don't end up needing an overflow menu, we can | 943 // removed. If we don't end up needing an overflow menu, we can |
892 // use the space the overflow menu would have taken up to | 944 // use the space the overflow menu would have taken up to |
893 // instead display that media element. | 945 // instead display that media element. |
894 if (!element->hasOverflowButton() && !firstDisplacedElement) | 946 if (!element->hasOverflowButton() && !firstDisplacedElement) |
895 firstDisplacedElement = element; | 947 firstDisplacedElement = element; |
896 } | 948 } |
897 } | 949 } |
898 } | 950 } |
899 | 951 |
900 // If we don't have at least two overflow elements, we will not show the | 952 // If we don't have at least two overflow elements, we will not show the |
901 // overflow menu. | 953 // overflow menu. |
902 if (overflowElements.empty()) { | 954 if (overflowElements.empty()) { |
903 m_overflowMenu->setIsWanted(false); | 955 m_overflowMenu->setIsWanted(false); |
904 usedWidth -= minimumWidth; | 956 usedWidth -= minimumWidth; |
905 if (firstDisplacedElement) { | 957 if (firstDisplacedElement) { |
906 int width = minimumWidth; | 958 int width = minimumWidth; |
907 if ((firstDisplacedElement == m_timeline.get()) || | 959 if ((firstDisplacedElement == m_timeline.get()) || |
908 (firstDisplacedElement == m_volumeSlider.get())) | 960 (firstDisplacedElement == m_volumeSlider.get())) |
909 width += sliderMargin; | 961 width += sliderMargin; |
910 if (usedWidth + width <= m_panelWidth) | 962 if (usedWidth + width <= m_effectiveWidth) |
911 firstDisplacedElement->setDoesFit(true); | 963 firstDisplacedElement->setDoesFit(true); |
912 } | 964 } |
913 } else if (overflowElements.size() == 1) { | 965 } else if (overflowElements.size() == 1) { |
914 m_overflowMenu->setIsWanted(false); | 966 m_overflowMenu->setIsWanted(false); |
915 overflowElements.front()->setDoesFit(true); | 967 overflowElements.front()->setDoesFit(true); |
916 } | 968 } |
969 | |
970 // Decide if the overlay play button fits. | |
971 if (m_effectiveWidth && m_effectiveHeight && m_overlayPlayButton) { | |
972 bool doesFit = m_effectiveWidth >= kMinWidthForOverlayPlayButton && | |
973 m_effectiveHeight >= kMinHeightForOverlayPlayButton; | |
974 m_overlayPlayButton->setDoesFit(doesFit); | |
975 } | |
917 } | 976 } |
918 | 977 |
919 void MediaControls::invalidate(Element* element) { | 978 void MediaControls::invalidate(Element* element) { |
920 if (!element) | 979 if (!element) |
921 return; | 980 return; |
922 | 981 |
923 if (LayoutObject* layoutObject = element->layoutObject()) | 982 if (LayoutObject* layoutObject = element->layoutObject()) |
924 layoutObject | 983 layoutObject |
925 ->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); | 984 ->setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); |
926 } | 985 } |
927 | 986 |
928 void MediaControls::networkStateChanged() { | 987 void MediaControls::networkStateChanged() { |
929 invalidate(m_playButton); | 988 invalidate(m_playButton); |
930 invalidate(m_overlayPlayButton); | 989 invalidate(m_overlayPlayButton); |
931 invalidate(m_muteButton); | 990 invalidate(m_muteButton); |
932 invalidate(m_fullscreenButton); | 991 invalidate(m_fullscreenButton); |
933 invalidate(m_downloadButton); | 992 invalidate(m_downloadButton); |
934 invalidate(m_timeline); | 993 invalidate(m_timeline); |
935 invalidate(m_volumeSlider); | 994 invalidate(m_volumeSlider); |
936 } | 995 } |
937 | 996 |
997 void MediaControls::onLayout(int width, int height) { | |
998 if (!m_sizingInitialized) | |
999 notifyElementSizeChanged(width, height); | |
1000 } | |
1001 | |
938 bool MediaControls::overflowMenuVisible() { | 1002 bool MediaControls::overflowMenuVisible() { |
939 return m_overflowList ? m_overflowList->isWanted() : false; | 1003 return m_overflowList ? m_overflowList->isWanted() : false; |
940 } | 1004 } |
941 | 1005 |
942 void MediaControls::toggleOverflowMenu() { | 1006 void MediaControls::toggleOverflowMenu() { |
943 DCHECK(m_overflowList); | 1007 DCHECK(m_overflowList); |
944 | 1008 |
945 if (!m_overflowList->isWanted()) | 1009 if (!m_overflowList->isWanted()) |
946 m_windowEventListener->start(); | 1010 m_windowEventListener->start(); |
947 m_overflowList->setIsWanted(!m_overflowList->isWanted()); | 1011 m_overflowList->setIsWanted(!m_overflowList->isWanted()); |
948 } | 1012 } |
949 | 1013 |
950 void MediaControls::hideAllMenus() { | 1014 void MediaControls::hideAllMenus() { |
951 m_windowEventListener->stop(); | 1015 m_windowEventListener->stop(); |
952 | 1016 |
953 if (m_overflowList->isWanted()) | 1017 if (m_overflowList->isWanted()) |
954 m_overflowList->setIsWanted(false); | 1018 m_overflowList->setIsWanted(false); |
955 if (m_textTrackList->isWanted()) | 1019 if (m_textTrackList->isWanted()) |
956 m_textTrackList->setVisible(false); | 1020 m_textTrackList->setVisible(false); |
957 } | 1021 } |
958 | 1022 |
959 DEFINE_TRACE(MediaControls) { | 1023 DEFINE_TRACE(MediaControls) { |
1024 visitor->trace(m_resizeObserver); | |
960 visitor->trace(m_mediaElement); | 1025 visitor->trace(m_mediaElement); |
961 visitor->trace(m_panel); | 1026 visitor->trace(m_panel); |
962 visitor->trace(m_overlayPlayButton); | 1027 visitor->trace(m_overlayPlayButton); |
963 visitor->trace(m_overlayEnclosure); | 1028 visitor->trace(m_overlayEnclosure); |
964 visitor->trace(m_playButton); | 1029 visitor->trace(m_playButton); |
965 visitor->trace(m_currentTimeDisplay); | 1030 visitor->trace(m_currentTimeDisplay); |
966 visitor->trace(m_timeline); | 1031 visitor->trace(m_timeline); |
967 visitor->trace(m_muteButton); | 1032 visitor->trace(m_muteButton); |
968 visitor->trace(m_volumeSlider); | 1033 visitor->trace(m_volumeSlider); |
969 visitor->trace(m_toggleClosedCaptionsButton); | 1034 visitor->trace(m_toggleClosedCaptionsButton); |
970 visitor->trace(m_fullscreenButton); | 1035 visitor->trace(m_fullscreenButton); |
971 visitor->trace(m_downloadButton); | 1036 visitor->trace(m_downloadButton); |
972 visitor->trace(m_durationDisplay); | 1037 visitor->trace(m_durationDisplay); |
973 visitor->trace(m_enclosure); | 1038 visitor->trace(m_enclosure); |
974 visitor->trace(m_textTrackList); | 1039 visitor->trace(m_textTrackList); |
975 visitor->trace(m_overflowMenu); | 1040 visitor->trace(m_overflowMenu); |
976 visitor->trace(m_overflowList); | 1041 visitor->trace(m_overflowList); |
977 visitor->trace(m_castButton); | 1042 visitor->trace(m_castButton); |
978 visitor->trace(m_overlayCastButton); | 1043 visitor->trace(m_overlayCastButton); |
979 visitor->trace(m_mediaEventListener); | 1044 visitor->trace(m_mediaEventListener); |
980 visitor->trace(m_windowEventListener); | 1045 visitor->trace(m_windowEventListener); |
981 visitor->trace(m_orientationLockDelegate); | 1046 visitor->trace(m_orientationLockDelegate); |
982 HTMLDivElement::trace(visitor); | 1047 HTMLDivElement::trace(visitor); |
983 } | 1048 } |
984 | 1049 |
985 } // namespace blink | 1050 } // namespace blink |
OLD | NEW |