Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2015 23:12:09 +0000 (23:12 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2015 23:12:09 +0000 (23:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145193

Reviewed by Eric Carlson.

Source/WebCore:

HTMLMediaElement.h and MediaPlayer.h are included in a number of headers solely for access to the enums
defined within the classes contained within. Move these enums into their own--otherwise empty--classes.
Then add `using` declarations to pull those inherited enums back into the namespace of HTMLMediaElement
and MediaPlayer.

Classes and headers which do not need to directly include HTMLMediaElement.h can now include HTMLMediaElementEnums.h
instead; the same goes for MediaPlayer.h and MediaPlayerEnums.h.

* WebCore.xcodeproj/project.pbxproj: Add new files to project.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Move definition here from the header.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::videoFullscreenGravity): MediaPlayer -> MediaPlayerEnums.
(WebCore::HTMLMediaElement::preloadValue): Ditto.
(WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Deleted; moved to implementation file.
* html/HTMLMediaElementEnums.h: Added.
* html/MediaControllerInterface.h: Inherit from HTMLMediaElementEnums.
* page/ChromeClient.h: HTMLMediaElement -> HTMLMediaElementEnums.
* platform/graphics/MediaPlayer.h: MediaPlayer -> MediaPlayerEnums.
* platform/graphics/MediaPlayerEnums.h: Added.
* platform/ios/WebVideoFullscreenControllerAVKit.h:
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController enterFullscreen:mode:]): HTMLMediaElement -> HTMLMediaElementEnums.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Ditto.
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto.
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Ditto.
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized): Ditto.
(WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen): Ditto.
(WebVideoFullscreenInterfaceAVKit::setMode): Ditto.
(WebVideoFullscreenInterfaceAVKit::clearMode): Ditto.
* platform/ios/WebVideoFullscreenModel.h:
* platform/ios/WebVideoFullscreenModelVideoElement.h:
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setVideoElement): Ditto.
(WebVideoFullscreenModelVideoElement::fullscreenModeChanged): Ditto.

Source/WebKit/mac:

Use HTMLMediaElementEnums instead of HTMLMediaElement.

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::enterVideoFullscreenForVideoElement): HTMLMediaElement -> HTMLMediaElementEnums.
* WebView/WebView.mm:
(-[WebView _enterVideoFullscreenForVideoElement:mode:]): Ditto.
* WebView/WebViewInternal.h:

Source/WebKit2:

Use HTMLMediaElementEnums instead of HTMLMediaElement.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isShowingVideoOptimized]): HTMLMediaElement -> HTMLMediaElementEnums.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::hasMode): Ditto.
(WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Ditto.
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
(WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): Ditto.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/ios/WebVideoFullscreenManager.h:
(WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode): Ditto.
(WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode): Ditto.
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
(WebKit::WebVideoFullscreenManager::fullscreenModeChanged): Ditto.
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184670 268f45cc-cd09-0410-ab3c-d52691b4dbfc

31 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLMediaElementEnums.h [new file with mode: 0644]
Source/WebCore/html/MediaControllerInterface.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/MediaPlayerEnums.h [new file with mode: 0644]
Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.h
Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm
Source/WebCore/platform/ios/WebVideoFullscreenModel.h
Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.h
Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/mac/WebView/WebViewInternal.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h
Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in
Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.h
Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.messages.in
Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm

index 13b3b21..3b250dd 100644 (file)
@@ -1,3 +1,53 @@
+2015-05-19  Jer Noble  <jer.noble@apple.com>
+
+        Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
+        https://bugs.webkit.org/show_bug.cgi?id=145193
+
+        Reviewed by Eric Carlson.
+
+        HTMLMediaElement.h and MediaPlayer.h are included in a number of headers solely for access to the enums
+        defined within the classes contained within. Move these enums into their own--otherwise empty--classes.
+        Then add `using` declarations to pull those inherited enums back into the namespace of HTMLMediaElement
+        and MediaPlayer.
+
+        Classes and headers which do not need to directly include HTMLMediaElement.h can now include HTMLMediaElementEnums.h
+        instead; the same goes for MediaPlayer.h and MediaPlayerEnums.h.
+
+        * WebCore.xcodeproj/project.pbxproj: Add new files to project.
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Move definition here from the header.
+        * html/HTMLMediaElement.h:
+        (WebCore::HTMLMediaElement::videoFullscreenGravity): MediaPlayer -> MediaPlayerEnums.
+        (WebCore::HTMLMediaElement::preloadValue): Ditto.
+        (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Deleted; moved to implementation file.
+        * html/HTMLMediaElementEnums.h: Added.
+        * html/MediaControllerInterface.h: Inherit from HTMLMediaElementEnums.
+        * page/ChromeClient.h: HTMLMediaElement -> HTMLMediaElementEnums.
+        * platform/graphics/MediaPlayer.h: MediaPlayer -> MediaPlayerEnums.
+        * platform/graphics/MediaPlayerEnums.h: Added.
+        * platform/ios/WebVideoFullscreenControllerAVKit.h:
+        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+        (-[WebVideoFullscreenController enterFullscreen:mode:]): HTMLMediaElement -> HTMLMediaElementEnums.
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::setMode): Ditto.
+        (WebVideoFullscreenInterfaceAVKit::clearMode): Ditto.
+        * platform/ios/WebVideoFullscreenModel.h:
+        * platform/ios/WebVideoFullscreenModelVideoElement.h:
+        * platform/ios/WebVideoFullscreenModelVideoElement.mm:
+        (WebVideoFullscreenModelVideoElement::setVideoElement): Ditto.
+        (WebVideoFullscreenModelVideoElement::fullscreenModeChanged): Ditto.
+
 2015-05-20  Roger Fong  <roger_fong@apple.com>
 
         Media Controls stop updating after hovering for a few seconds.
index 2ec2d78..138a461 100644 (file)
                CD3E252318046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3E252118046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp */; };
                CD3E252418046BCD00E27F56 /* CSSGridTemplateAreasValue.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3E252218046BCD00E27F56 /* CSSGridTemplateAreasValue.h */; };
                CD4AC52A1496AE9A0087C4EF /* Composite.wav in Copy Audio Resources */ = {isa = PBXBuildFile; fileRef = CD4AC5281496AE2F0087C4EF /* Composite.wav */; };
+               CD5209E41B0BD8380077184E /* MediaPlayerEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5209E31B0BD8380077184E /* MediaPlayerEnums.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               CD5209E61B0BD9E10077184E /* HTMLMediaElementEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5209E51B0BD9E10077184E /* HTMLMediaElementEnums.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CD52481A18E200ED0008A07D /* DisplaySleepDisabler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD52481818E200ED0008A07D /* DisplaySleepDisabler.cpp */; };
                CD52481B18E200ED0008A07D /* DisplaySleepDisabler.h in Headers */ = {isa = PBXBuildFile; fileRef = CD52481918E200ED0008A07D /* DisplaySleepDisabler.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CD5393D3175E018600C07123 /* JSMemoryInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5393D1175E018600C07123 /* JSMemoryInfo.cpp */; };
                CD4097FF1A8C855F004C65E9 /* CFNSURLConnectionSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFNSURLConnectionSPI.h; sourceTree = "<group>"; };
                CD4AC5281496AE2F0087C4EF /* Composite.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = Composite.wav; path = platform/audio/resources/Composite.wav; sourceTree = SOURCE_ROOT; };
                CD4E0AFA11F7BC27009D3811 /* fullscreen.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = fullscreen.css; sourceTree = "<group>"; };
+               CD5209E31B0BD8380077184E /* MediaPlayerEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerEnums.h; sourceTree = "<group>"; };
+               CD5209E51B0BD9E10077184E /* HTMLMediaElementEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLMediaElementEnums.h; sourceTree = "<group>"; };
                CD52481818E200ED0008A07D /* DisplaySleepDisabler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplaySleepDisabler.cpp; sourceTree = "<group>"; };
                CD52481918E200ED0008A07D /* DisplaySleepDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplaySleepDisabler.h; sourceTree = "<group>"; };
                CD5393CB175DCCE600C07123 /* MemoryInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInfo.h; sourceTree = "<group>"; };
                                E44613920CD6331000FADA75 /* HTMLMediaElement.cpp */,
                                E44613930CD6331000FADA75 /* HTMLMediaElement.h */,
                                E44613940CD6331000FADA75 /* HTMLMediaElement.idl */,
+                               CD5209E51B0BD9E10077184E /* HTMLMediaElementEnums.h */,
                                07FE99DA18807A7D00256648 /* HTMLMediaSession.cpp */,
                                07FE99DB18807A7D00256648 /* HTMLMediaSession.h */,
                                A8EA79EC0A1916DF00A8EF5F /* HTMLMenuElement.cpp */,
                                078E43D81ABB6C7E001C2FA6 /* MediaPlaybackTargetPicker.h */,
                                E4B41E0C0CBF90BD00AF2ECE /* MediaPlayer.cpp */,
                                E4B41E0D0CBF90BD00AF2ECE /* MediaPlayer.h */,
+                               CD5209E31B0BD8380077184E /* MediaPlayerEnums.h */,
                                079F5E4B0F3BEBEA005E0782 /* MediaPlayerPrivate.h */,
                                CD641EB11818F5ED00EE4C41 /* MediaSourcePrivate.h */,
                                CDDC1E7918A952F30027A9D4 /* MediaSourcePrivateClient.h */,
                                51741D0F0B07259A00ED442C /* BackForwardClient.h in Headers */,
                                BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */,
                                BCA8CA6011E4E6D100812FB7 /* BackForwardList.h in Headers */,
+                               CD5209E61B0BD9E10077184E /* HTMLMediaElementEnums.h in Headers */,
                                BC124EE80C2641CD009E2349 /* BarProp.h in Headers */,
                                379E61CA126CA5C400B63E8D /* BaseButtonInputType.h in Headers */,
                                379E61CC126CA5C400B63E8D /* BaseCheckableInputType.h in Headers */,
                                7AF9B20618CFB2DF00C64BEF /* VTTRegionList.h in Headers */,
                                7A93868618DCC14500B8263D /* VTTScanner.h in Headers */,
                                A14832B0187F618D00DA63A6 /* WAKAppKitStubs.h in Headers */,
+                               CD5209E41B0BD8380077184E /* MediaPlayerEnums.h in Headers */,
                                A14832B2187F61ED00DA63A6 /* WAKClipView.h in Headers */,
                                A14832B4187F629A00DA63A6 /* WAKResponder.h in Headers */,
                                A14832B6187F631F00DA63A6 /* WAKScrollView.h in Headers */,
index 8f604d6..c458d28 100644 (file)
@@ -62,6 +62,7 @@
 #include "MediaFragmentURIParser.h"
 #include "MediaKeyEvent.h"
 #include "MediaList.h"
+#include "MediaPlayer.h"
 #include "MediaQueryEvaluator.h"
 #include "MediaResourceLoader.h"
 #include "MediaSessionManager.h"
@@ -253,6 +254,24 @@ private:
 };
 #endif
 
+struct HTMLMediaElement::TrackGroup {
+    enum GroupKind { CaptionsAndSubtitles, Description, Chapter, Metadata, Other };
+
+    TrackGroup(GroupKind kind)
+        : visibleTrack(0)
+        , defaultTrack(0)
+        , kind(kind)
+        , hasSrcLang(false)
+    {
+    }
+
+    Vector<RefPtr<TextTrack>> tracks;
+    RefPtr<TextTrack> visibleTrack;
+    RefPtr<TextTrack> defaultTrack;
+    GroupKind kind;
+    bool hasSrcLang;
+};
+
 HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& document, bool createdByParser)
     : HTMLElement(tagName, document)
     , ActiveDOMObject(&document)
index 92cce86..e973329 100644 (file)
 #include "ActiveDOMObject.h"
 #include "GenericEventQueue.h"
 #include "GenericTaskQueue.h"
+#include "HTMLMediaElementEnums.h"
 #include "HTMLMediaSession.h"
 #include "MediaCanStartListener.h"
 #include "MediaControllerInterface.h"
-#include "MediaPlayer.h"
 #include "MediaProducer.h"
 #include "PageThrottler.h"
 
@@ -67,6 +67,7 @@ class MediaController;
 class MediaControls;
 class MediaControlsHost;
 class MediaError;
+class MediaPlayer;
 class TimeRanges;
 #if ENABLE(ENCRYPTED_MEDIA_V2)
 class MediaKeys;
@@ -131,22 +132,14 @@ public:
     void setVideoFullscreenLayer(PlatformLayer*);
     PlatformLayer* videoFullscreenLayer() const { return m_videoFullscreenLayer.get(); }
     void setVideoFullscreenFrame(FloatRect);
-    void setVideoFullscreenGravity(MediaPlayer::VideoGravity);
-    MediaPlayer::VideoGravity videoFullscreenGravity() const { return m_videoFullscreenGravity; }
+    void setVideoFullscreenGravity(MediaPlayerEnums::VideoGravity);
+    MediaPlayerEnums::VideoGravity videoFullscreenGravity() const { return m_videoFullscreenGravity; }
 #endif
 
-    enum DelayedActionType {
-        LoadMediaResource = 1 << 0,
-        ConfigureTextTracks = 1 << 1,
-        TextTrackChangesNotification = 1 << 2,
-        ConfigureTextTrackDisplay = 1 << 3,
-        CheckPlaybackTargetCompatablity = 1 << 4,
-
-        EveryDelayedAction = LoadMediaResource | ConfigureTextTracks | TextTrackChangesNotification | ConfigureTextTrackDisplay | CheckPlaybackTargetCompatablity,
-    };
+    using HTMLMediaElementEnums::DelayedActionType;
     void scheduleDelayedAction(DelayedActionType);
     
-    MediaPlayer::MovieLoadType movieLoadType() const;
+    MediaPlayerEnums::MovieLoadType movieLoadType() const;
     
     bool inActiveDocument() const { return m_inActiveDocument; }
     
@@ -163,7 +156,7 @@ public:
 #endif
 
 // network state
-    enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO_SOURCE };
+    using HTMLMediaElementEnums::NetworkState;
     NetworkState networkState() const;
 
     String preload() const;    
@@ -174,6 +167,7 @@ public:
     String canPlayType(const String& mimeType, const String& keySystem = String(), const URL& = URL()) const;
 
 // ready state
+    using HTMLMediaElementEnums::ReadyState;
     virtual ReadyState readyState() const override;
     bool seeking() const;
 
@@ -306,24 +300,7 @@ public:
     PlatformTextTrackMenuInterface* platformTextTrackMenu();
 #endif
 
-    struct TrackGroup {
-        enum GroupKind { CaptionsAndSubtitles, Description, Chapter, Metadata, Other };
-
-        TrackGroup(GroupKind kind)
-            : visibleTrack(0)
-            , defaultTrack(0)
-            , kind(kind)
-            , hasSrcLang(false)
-        {
-        }
-
-        Vector<RefPtr<TextTrack>> tracks;
-        RefPtr<TextTrack> visibleTrack;
-        RefPtr<TextTrack> defaultTrack;
-        GroupKind kind;
-        bool hasSrcLang;
-    };
-
+    struct TrackGroup;
     void configureTextTrackGroupForLanguage(const TrackGroup&) const;
     void configureTextTracks();
     void configureTextTrackGroup(const TrackGroup&);
@@ -331,7 +308,7 @@ public:
     void setSelectedTextTrack(TextTrack*);
 
     bool textTracksAreReady() const;
-    enum TextTrackVisibilityCheckType { CheckTextTrackVisibility, AssumeTextTrackVisibilityChanged };
+    using HTMLMediaElementEnums::TextTrackVisibilityCheckType;
     void configureTextTrackDisplay(TextTrackVisibilityCheckType checkType = CheckTextTrackVisibility);
     void updateTextTrackDisplay();
 
@@ -381,13 +358,7 @@ public:
     WEBCORE_EXPORT virtual bool isFullscreen() const override;
     void toggleFullscreenState();
 
-    enum {
-        VideoFullscreenModeNone = 0,
-        VideoFullscreenModeStandard = 1 << 0,
-        VideoFullscreenModeOptimized = 1 << 1,
-    };
-    typedef uint32_t VideoFullscreenMode;
-
+    using MediaPlayerEnums::VideoFullscreenMode;
     VideoFullscreenMode fullscreenMode() const { return m_videoFullscreenMode; }
     virtual void fullscreenModeChanged(VideoFullscreenMode mode) { m_videoFullscreenMode = mode; }
 
@@ -424,7 +395,7 @@ public:
     AudioSourceProvider* audioSourceProvider();
 #endif
 
-    enum InvalidURLAction { DoNothing, Complain };
+    using HTMLMediaElementEnums::InvalidURLAction;
     bool isSafeToLoadURL(const URL&, InvalidURLAction);
 
     const String& mediaGroup() const;
@@ -437,14 +408,14 @@ public:
 
     unsigned long long fileSize() const;
 
-    void mediaLoadingFailed(MediaPlayer::NetworkState);
-    void mediaLoadingFailedFatally(MediaPlayer::NetworkState);
+    void mediaLoadingFailed(MediaPlayerEnums::NetworkState);
+    void mediaLoadingFailedFatally(MediaPlayerEnums::NetworkState);
 
 #if ENABLE(MEDIA_SOURCE)
     RefPtr<VideoPlaybackQuality> getVideoPlaybackQuality();
 #endif
 
-    MediaPlayer::Preload preloadValue() const { return m_preload; }
+    MediaPlayerEnums::Preload preloadValue() const { return m_preload; }
     HTMLMediaSession& mediaSession() const { return *m_mediaSession; }
 
 #if ENABLE(MEDIA_CONTROLS_SCRIPT)
@@ -524,8 +495,8 @@ private:
 
     virtual void updateDisplayState() { }
     
-    void setReadyState(MediaPlayer::ReadyState);
-    void setNetworkState(MediaPlayer::NetworkState);
+    void setReadyState(MediaPlayerEnums::ReadyState);
+    void setNetworkState(MediaPlayerEnums::NetworkState);
 
     double effectivePlaybackRate() const;
     double requestedPlaybackRate() const;
@@ -705,7 +676,7 @@ private:
     bool isBlocked() const;
     bool isBlockedOnMediaController() const;
     virtual bool hasCurrentSrc() const override { return !m_currentSrc.isEmpty(); }
-    virtual bool isLiveStream() const override { return movieLoadType() == MediaPlayer::LiveStream; }
+    virtual bool isLiveStream() const override { return movieLoadType() == MediaPlayerEnums::LiveStream; }
     bool isAutoplaying() const { return m_autoplaying; }
 
     void updateSleepDisabling();
@@ -803,12 +774,12 @@ private:
 #if PLATFORM(IOS)
     RetainPtr<PlatformLayer> m_videoFullscreenLayer;
     FloatRect m_videoFullscreenFrame;
-    MediaPlayer::VideoGravity m_videoFullscreenGravity;
+    MediaPlayerEnums::VideoGravity m_videoFullscreenGravity;
 #endif
 
     std::unique_ptr<MediaPlayer> m_player;
 
-    MediaPlayer::Preload m_preload;
+    MediaPlayerEnums::Preload m_preload;
 
     DisplayMode m_displayMode;
 
diff --git a/Source/WebCore/html/HTMLMediaElementEnums.h b/Source/WebCore/html/HTMLMediaElementEnums.h
new file mode 100644 (file)
index 0000000..9079791
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef HTMLMediaElementEnums_h
+#define HTMLMediaElementEnums_h
+
+#include "MediaPlayerEnums.h"
+
+namespace WebCore {
+
+class HTMLMediaElementEnums : public MediaPlayerEnums {
+public:
+    using MediaPlayerEnums::VideoFullscreenMode;
+
+    enum DelayedActionType {
+        LoadMediaResource = 1 << 0,
+        ConfigureTextTracks = 1 << 1,
+        TextTrackChangesNotification = 1 << 2,
+        ConfigureTextTrackDisplay = 1 << 3,
+        CheckPlaybackTargetCompatablity = 1 << 4,
+
+        EveryDelayedAction = LoadMediaResource | ConfigureTextTracks | TextTrackChangesNotification | ConfigureTextTrackDisplay | CheckPlaybackTargetCompatablity,
+    };
+
+    enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTURE_DATA, HAVE_ENOUGH_DATA };
+    enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO_SOURCE };
+    enum TextTrackVisibilityCheckType { CheckTextTrackVisibility, AssumeTextTrackVisibilityChanged };
+    enum InvalidURLAction { DoNothing, Complain };
+};
+
+}
+
+#endif
index cd1aa7a..ee70e2e 100644 (file)
@@ -28,6 +28,7 @@
 
 #if ENABLE(VIDEO)
 
+#include "HTMLMediaElementEnums.h"
 #include <wtf/PassRefPtr.h>
 
 namespace WebCore {
@@ -36,7 +37,7 @@ class TimeRanges;
 
 typedef int ExceptionCode;
 
-class MediaControllerInterface {
+class MediaControllerInterface : public HTMLMediaElementEnums {
 public:
     virtual ~MediaControllerInterface() { };
     
@@ -64,8 +65,8 @@ public:
     
     virtual bool muted() const = 0;
     virtual void setMuted(bool) = 0;
-    
-    enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTURE_DATA, HAVE_ENOUGH_DATA };
+
+    using HTMLMediaElementEnums::ReadyState;
     virtual ReadyState readyState() const = 0;
 
     // MediaControlElements:
index 030dd68..a56cdc2 100644 (file)
@@ -29,7 +29,7 @@
 #include "FocusDirection.h"
 #include "FrameLoader.h"
 #include "GraphicsContext.h"
-#include "HTMLMediaElement.h"
+#include "HTMLMediaElementEnums.h"
 #include "HostWindow.h"
 #include "LayerFlushThrottleState.h"
 #include "MediaProducer.h"
@@ -327,7 +327,7 @@ public:
 
     virtual bool supportsVideoFullscreen() { return false; }
 #if ENABLE(VIDEO)
-    virtual void enterVideoFullscreenForVideoElement(HTMLVideoElement&, HTMLMediaElement::VideoFullscreenMode) { }
+    virtual void enterVideoFullscreenForVideoElement(HTMLVideoElement&, HTMLMediaElementEnums::VideoFullscreenMode) { }
 #endif
     virtual void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&) { }
     virtual bool requiresFullscreenForVideoPlayback() { return false; } 
index c20241c..54602cc 100644 (file)
@@ -35,6 +35,7 @@
 #include "IntRect.h"
 #include "URL.h"
 #include "LayoutRect.h"
+#include "MediaPlayerEnums.h"
 #include "MediaSession.h"
 #include "NativeImagePtr.h"
 #include "PlatformLayer.h"
@@ -285,7 +286,7 @@ public:
     virtual String mediaPlayerDocumentHost() const { return String(); }
 };
 
-class MediaPlayer {
+class MediaPlayer : public MediaPlayerEnums {
     WTF_MAKE_NONCOPYABLE(MediaPlayer); WTF_MAKE_FAST_ALLOCATED;
 public:
     explicit MediaPlayer(MediaPlayerClient&);
@@ -311,7 +312,7 @@ public:
 #if PLATFORM(IOS)
     void setVideoFullscreenLayer(PlatformLayer*);
     void setVideoFullscreenFrame(FloatRect);
-    enum VideoGravity { VideoGravityResize, VideoGravityResizeAspect, VideoGravityResizeAspectFill };
+    using MediaPlayerEnums::VideoGravity;
     void setVideoFullscreenGravity(VideoGravity);
 
     NSArray *timedMetadata() const;
@@ -422,16 +423,16 @@ public:
 
     PassNativeImagePtr nativeImageForCurrentTime();
 
-    enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError, DecodeError };
+    using MediaPlayerEnums::NetworkState;
     NetworkState networkState();
 
-    enum ReadyState  { HaveNothing, HaveMetadata, HaveCurrentData, HaveFutureData, HaveEnoughData };
+    using MediaPlayerEnums::ReadyState;
     ReadyState readyState();
 
-    enum MovieLoadType { Unknown, Download, StoredStream, LiveStream };
+    using MediaPlayerEnums::MovieLoadType;
     MovieLoadType movieLoadType() const;
 
-    enum Preload { None, MetaData, Auto };
+    using MediaPlayerEnums::Preload;
     Preload preload() const;
     void setPreload(Preload);
 
diff --git a/Source/WebCore/platform/graphics/MediaPlayerEnums.h b/Source/WebCore/platform/graphics/MediaPlayerEnums.h
new file mode 100644 (file)
index 0000000..d1aa012
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef MediaPlayerEnums_h
+#define MediaPlayerEnums_h
+
+namespace WebCore {
+
+class MediaPlayerEnums {
+public:
+    enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError, DecodeError };
+    enum ReadyState  { HaveNothing, HaveMetadata, HaveCurrentData, HaveFutureData, HaveEnoughData };
+    enum MovieLoadType { Unknown, Download, StoredStream, LiveStream };
+    enum Preload { None, MetaData, Auto };
+    enum VideoGravity { VideoGravityResize, VideoGravityResizeAspect, VideoGravityResizeAspectFill };
+    enum {
+        VideoFullscreenModeNone = 0,
+        VideoFullscreenModeStandard = 1 << 0,
+        VideoFullscreenModeOptimized = 1 << 1,
+    };
+    typedef uint32_t VideoFullscreenMode;
+};
+
+}
+
+#endif
index a23360c..e223717 100644 (file)
 
 #if PLATFORM(IOS)
 
-#import <WebCore/HTMLVideoElement.h>
+#import <WebCore/HTMLMediaElementEnums.h>
 
 OBJC_CLASS UIView;
 
+namespace WebCore {
+class HTMLVideoElement;
+}
+
 WEBCORE_EXPORT @interface WebVideoFullscreenController : NSObject
 - (void)setVideoElement:(WebCore::HTMLVideoElement*)videoElement;
 - (WebCore::HTMLVideoElement*)videoElement;
-- (void)enterFullscreen:(UIView *)view mode:(WebCore::HTMLMediaElement::VideoFullscreenMode)mode;
+- (void)enterFullscreen:(UIView *)view mode:(WebCore::HTMLMediaElementEnums::VideoFullscreenMode)mode;
 - (void)exitFullscreen;
 - (void)requestHideAndExitFullscreen;
 @end
index 7a53737..b1c0be9 100644 (file)
@@ -33,6 +33,7 @@
 #import "WebVideoFullscreenInterfaceAVKit.h"
 #import "WebVideoFullscreenModelVideoElement.h"
 #import <QuartzCore/CoreAnimation.h>
+#import <WebCore/HTMLVideoElement.h>
 #import <WebCore/WebCoreThreadRun.h>
 
 using namespace WebCore;
@@ -121,7 +122,7 @@ public:
     return _videoElement.get();
 }
 
-- (void)enterFullscreen:(UIView *)view mode:(HTMLMediaElement::VideoFullscreenMode)mode
+- (void)enterFullscreen:(UIView *)view mode:(HTMLMediaElementEnums::VideoFullscreenMode)mode
 {
     [self retain]; // Balanced by -release in didExitFullscreen:
     
index f206784..7ad65dd 100644 (file)
 #if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000
 
 #include <WebCore/EventListener.h>
-#include <WebCore/HTMLMediaElement.h>
+#include <WebCore/HTMLMediaElementEnums.h>
 #include <WebCore/PlatformLayer.h>
 #include <WebCore/WebVideoFullscreenInterface.h>
+#include <functional>
+#include <objc/objc.h>
 #include <wtf/RefPtr.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/ThreadSafeRefCounted.h>
@@ -89,7 +91,7 @@ public:
     WEBCORE_EXPORT virtual void setLegibleMediaSelectionOptions(const Vector<WTF::String>& options, uint64_t selectedIndex) override;
     WEBCORE_EXPORT virtual void setExternalPlayback(bool enabled, ExternalPlaybackTargetType, WTF::String localizedDeviceName) override;
     
-    WEBCORE_EXPORT virtual void setupFullscreen(PlatformLayer&, const IntRect& initialRect, UIView *, HTMLMediaElement::VideoFullscreenMode, bool allowOptimizedFullscreen);
+    WEBCORE_EXPORT virtual void setupFullscreen(PlatformLayer&, const IntRect& initialRect, UIView *, HTMLMediaElementEnums::VideoFullscreenMode, bool allowOptimizedFullscreen);
     WEBCORE_EXPORT virtual void enterFullscreen();
     WEBCORE_EXPORT virtual void exitFullscreen(const IntRect& finalRect);
     WEBCORE_EXPORT virtual void cleanupFullscreen();
@@ -97,7 +99,7 @@ public:
     WEBCORE_EXPORT virtual void requestHideAndExitFullscreen();
     WEBCORE_EXPORT virtual void preparedToReturnToInline(bool visible, const IntRect& inlineRect);
 
-    HTMLMediaElement::VideoFullscreenMode mode() const { return m_mode; }
+    HTMLMediaElementEnums::VideoFullscreenMode mode() const { return m_mode; }
     bool allowOptimizedFullscreen() const { return m_allowOptimizedFullscreen; }
     void setIsOptimized(bool);
     WEBCORE_EXPORT bool mayAutomaticallyShowVideoOptimized() const;
@@ -111,15 +113,15 @@ public:
     void didCancelOptimizedFullscreen();
     void prepareForOptimizedFullscreenStopWithCompletionHandler(void (^)(BOOL));
 
-    void setMode(HTMLMediaElement::VideoFullscreenMode);
-    void clearMode(HTMLMediaElement::VideoFullscreenMode);
-    bool hasMode(HTMLMediaElement::VideoFullscreenMode mode) const { return m_mode & mode; }
-    bool isMode(HTMLMediaElement::VideoFullscreenMode mode) const { return m_mode == mode; }
+    void setMode(HTMLMediaElementEnums::VideoFullscreenMode);
+    void clearMode(HTMLMediaElementEnums::VideoFullscreenMode);
+    bool hasMode(HTMLMediaElementEnums::VideoFullscreenMode mode) const { return m_mode & mode; }
+    bool isMode(HTMLMediaElementEnums::VideoFullscreenMode mode) const { return m_mode == mode; }
 
 protected:
     WEBCORE_EXPORT WebVideoFullscreenInterfaceAVKit();
     void beginSession();
-    void setupFullscreenInternal(PlatformLayer&, const IntRect& initialRect, UIView *, HTMLMediaElement::VideoFullscreenMode, bool allowOptimizedFullscreen);
+    void setupFullscreenInternal(PlatformLayer&, const IntRect& initialRect, UIView *, HTMLMediaElementEnums::VideoFullscreenMode, bool allowOptimizedFullscreen);
     void enterFullscreenOptimized();
     void enterFullscreenStandard();
     void exitFullscreenInternal(const IntRect& finalRect);
@@ -138,7 +140,7 @@ protected:
     RetainPtr<UIViewController> m_viewController;
     RetainPtr<UIView> m_parentView;
     RetainPtr<UIWindow> m_parentWindow;
-    HTMLMediaElement::VideoFullscreenMode m_mode { HTMLMediaElement::VideoFullscreenModeNone };
+    HTMLMediaElementEnums::VideoFullscreenMode m_mode { HTMLMediaElementEnums::VideoFullscreenModeNone };
     std::function<void(bool)> m_prepareToInlineCallback;
     bool m_allowOptimizedFullscreen { false };
     bool m_exitRequested { false };
index d28bb6e..35e7864 100644 (file)
@@ -926,11 +926,11 @@ void WebVideoFullscreenInterfaceAVKit::setExternalPlayback(bool enabled, Externa
     });
 }
 
-void WebVideoFullscreenInterfaceAVKit::setupFullscreen(PlatformLayer& videoLayer, const WebCore::IntRect& initialRect, UIView* parentView, HTMLMediaElement::VideoFullscreenMode mode, bool allowOptimizedFullscreen)
+void WebVideoFullscreenInterfaceAVKit::setupFullscreen(PlatformLayer& videoLayer, const WebCore::IntRect& initialRect, UIView* parentView, HTMLMediaElementEnums::VideoFullscreenMode mode, bool allowOptimizedFullscreen)
 {
     RefPtr<WebVideoFullscreenInterfaceAVKit> strongThis(this);
 
-    ASSERT(mode != HTMLMediaElement::VideoFullscreenModeNone);
+    ASSERT(mode != HTMLMediaElementEnums::VideoFullscreenModeNone);
     m_videoLayer = &videoLayer;
 
     m_mode = mode;
@@ -940,7 +940,7 @@ void WebVideoFullscreenInterfaceAVKit::setupFullscreen(PlatformLayer& videoLayer
     });
 }
 
-void WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal(PlatformLayer& videoLayer, const WebCore::IntRect& initialRect, UIView* parentView, HTMLMediaElement::VideoFullscreenMode mode, bool allowOptimizedFullscreen)
+void WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal(PlatformLayer& videoLayer, const WebCore::IntRect& initialRect, UIView* parentView, HTMLMediaElementEnums::VideoFullscreenMode mode, bool allowOptimizedFullscreen)
 {
     LOG(Fullscreen, "WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal(%p)", this);
     UNUSED_PARAM(videoLayer);
@@ -1019,9 +1019,9 @@ void WebVideoFullscreenInterfaceAVKit::enterFullscreen()
     RefPtr<WebVideoFullscreenInterfaceAVKit> strongThis(this);
     dispatch_async(dispatch_get_main_queue(), [strongThis] {
         [strongThis->m_videoLayerContainer setBackgroundColor:[[getUIColorClass() blackColor] CGColor]];
-        if (strongThis->mode() == HTMLMediaElement::VideoFullscreenModeOptimized)
+        if (strongThis->mode() == HTMLMediaElementEnums::VideoFullscreenModeOptimized)
             strongThis->enterFullscreenOptimized();
-        else if (strongThis->mode() == HTMLMediaElement::VideoFullscreenModeStandard)
+        else if (strongThis->mode() == HTMLMediaElementEnums::VideoFullscreenModeStandard)
             strongThis->enterFullscreenStandard();
         else
             ASSERT_NOT_REACHED();
@@ -1084,16 +1084,16 @@ void WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal(const WebCore::Int
     [[m_playerViewController view] layoutIfNeeded];
 
 
-    if (isMode(HTMLMediaElement::VideoFullscreenModeOptimized)) {
+    if (isMode(HTMLMediaElementEnums::VideoFullscreenModeOptimized)) {
         [m_window setHidden:NO];
         [m_playerViewController stopOptimizedFullscreen];
-    } else if (isMode(HTMLMediaElement::VideoFullscreenModeOptimized | HTMLMediaElement::VideoFullscreenModeStandard)) {
+    } else if (isMode(HTMLMediaElementEnums::VideoFullscreenModeOptimized | HTMLMediaElementEnums::VideoFullscreenModeStandard)) {
         RefPtr<WebVideoFullscreenInterfaceAVKit> strongThis(this);
         [m_playerViewController exitFullScreenAnimated:NO completionHandler:[strongThis] (BOOL, NSError*) {
             [strongThis->m_window setHidden:NO];
             [strongThis->m_playerViewController stopOptimizedFullscreen];
         }];
-    } else if (isMode(HTMLMediaElement::VideoFullscreenModeStandard)) {
+    } else if (isMode(HTMLMediaElementEnums::VideoFullscreenModeStandard)) {
         RefPtr<WebVideoFullscreenInterfaceAVKit> strongThis(this);
         [m_playerViewController exitFullScreenAnimated:YES completionHandler:[strongThis] (BOOL, NSError*) {
             strongThis->m_exitCompleted = true;
@@ -1145,9 +1145,9 @@ void WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal()
     [m_playerViewController setDelegate:nil];
     [m_playerViewController setPlayerController:nil];
     
-    if (hasMode(HTMLMediaElement::VideoFullscreenModeOptimized))
+    if (hasMode(HTMLMediaElementEnums::VideoFullscreenModeOptimized))
         [m_playerViewController stopOptimizedFullscreen];
-    if (hasMode(HTMLMediaElement::VideoFullscreenModeStandard))
+    if (hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard))
         [m_playerViewController exitFullScreenAnimated:NO completionHandler:[] (BOOL, NSError *) { }];
     
     [[m_playerViewController view] removeFromSuperview];
@@ -1192,7 +1192,7 @@ void WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen()
     if (!m_enterRequested)
         return;
     
-    if (hasMode(HTMLMediaElement::VideoFullscreenModeOptimized))
+    if (hasMode(HTMLMediaElementEnums::VideoFullscreenModeOptimized))
         return;
     
     LOG(Fullscreen, "WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen(%p)", this);
@@ -1228,7 +1228,7 @@ void WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline(bool visible, co
 
 bool WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized() const
 {
-    return [m_playerController isPlaying] && m_mode == HTMLMediaElement::VideoFullscreenModeStandard && wkIsOptimizedFullscreenSupported();
+    return [m_playerController isPlaying] && m_mode == HTMLMediaElementEnums::VideoFullscreenModeStandard && wkIsOptimizedFullscreenSupported();
 }
 
 void WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline(std::function<void(bool)> callback)
@@ -1241,9 +1241,9 @@ void WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline(std::function
 void WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen()
 {
     LOG(Fullscreen, "WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen(%p)", this);
-    setMode(HTMLMediaElement::VideoFullscreenModeOptimized);
+    setMode(HTMLMediaElementEnums::VideoFullscreenModeOptimized);
 
-    if (!hasMode(HTMLMediaElement::VideoFullscreenModeStandard))
+    if (!hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard))
         return;
 
     RefPtr<WebVideoFullscreenInterfaceAVKit> strongThis(this);
@@ -1260,7 +1260,7 @@ void WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen()
         [strongThis->m_playerViewController exitFullScreenAnimated:YES completionHandler:[strongThis] (BOOL completed, NSError*) {
             if (!completed)
                 return;
-            strongThis->clearMode(HTMLMediaElement::VideoFullscreenModeStandard);
+            strongThis->clearMode(HTMLMediaElementEnums::VideoFullscreenModeStandard);
             [strongThis->m_window setHidden:YES];
         }];
     });
@@ -1294,7 +1294,7 @@ void WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen()
 void WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen()
 {
     LOG(Fullscreen, "WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen(%p)", this);
-    if (hasMode(HTMLMediaElement::VideoFullscreenModeStandard))
+    if (hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard))
         return;
 
     m_exitCompleted = true;
@@ -1304,7 +1304,7 @@ void WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen()
 
     RefPtr<WebVideoFullscreenInterfaceAVKit> strongThis(this);
     WebThreadRun([strongThis] {
-        strongThis->clearMode(HTMLMediaElement::VideoFullscreenModeOptimized);
+        strongThis->clearMode(HTMLMediaElementEnums::VideoFullscreenModeOptimized);
         [strongThis->m_window setHidden:YES];
         if (strongThis->m_fullscreenChangeObserver)
             strongThis->m_fullscreenChangeObserver->didExitFullscreen();
@@ -1328,12 +1328,12 @@ void WebVideoFullscreenInterfaceAVKit::willCancelOptimizedFullscreen()
 void WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen()
 {
     LOG(Fullscreen, "WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen(%p)", this);
-    if (hasMode(HTMLMediaElement::VideoFullscreenModeStandard))
+    if (hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard))
         return;
 
     RefPtr<WebVideoFullscreenInterfaceAVKit> strongThis(this);
     WebThreadRun([strongThis] {
-        strongThis->clearMode(HTMLMediaElement::VideoFullscreenModeOptimized);
+        strongThis->clearMode(HTMLMediaElementEnums::VideoFullscreenModeOptimized);
         [strongThis->m_window setHidden:YES];
         if (strongThis->m_fullscreenChangeObserver)
             strongThis->m_fullscreenChangeObserver->didExitFullscreen();
@@ -1352,9 +1352,9 @@ void WebVideoFullscreenInterfaceAVKit::prepareForOptimizedFullscreenStopWithComp
     });
 }
 
-void WebVideoFullscreenInterfaceAVKit::setMode(HTMLMediaElement::VideoFullscreenMode mode)
+void WebVideoFullscreenInterfaceAVKit::setMode(HTMLMediaElementEnums::VideoFullscreenMode mode)
 {
-    HTMLMediaElement::VideoFullscreenMode newMode = m_mode | mode;
+    HTMLMediaElementEnums::VideoFullscreenMode newMode = m_mode | mode;
     if (m_mode == newMode)
         return;
 
@@ -1363,9 +1363,9 @@ void WebVideoFullscreenInterfaceAVKit::setMode(HTMLMediaElement::VideoFullscreen
         m_videoFullscreenModel->fullscreenModeChanged(m_mode);
 }
 
-void WebVideoFullscreenInterfaceAVKit::clearMode(HTMLMediaElement::VideoFullscreenMode mode)
+void WebVideoFullscreenInterfaceAVKit::clearMode(HTMLMediaElementEnums::VideoFullscreenMode mode)
 {
-    HTMLMediaElement::VideoFullscreenMode newMode = m_mode & ~mode;
+    HTMLMediaElementEnums::VideoFullscreenMode newMode = m_mode & ~mode;
     if (m_mode == newMode)
         return;
 
index 8f26230..72914db 100644 (file)
@@ -54,7 +54,7 @@ public:
     virtual VideoGravity videoLayerGravity() const = 0;
     virtual void selectAudioMediaOption(uint64_t index) = 0;
     virtual void selectLegibleMediaOption(uint64_t index) = 0;
-    virtual void fullscreenModeChanged(HTMLMediaElement::VideoFullscreenMode) = 0;
+    virtual void fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode) = 0;
 };
 
 }
index d0c7af5..69c8f01 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <WebCore/EventListener.h>
 #include <WebCore/FloatRect.h>
-#include <WebCore/HTMLMediaElement.h>
+#include <WebCore/HTMLMediaElementEnums.h>
 #include <WebCore/PlatformLayer.h>
 #include <WebCore/WebVideoFullscreenModel.h>
 #include <wtf/RefPtr.h>
@@ -39,6 +39,7 @@
 #include <wtf/Vector.h>
 
 namespace WebCore {
+class AudioTrack;
 class HTMLVideoElement;
 class TextTrack;
 class WebVideoFullscreenInterface;
@@ -76,7 +77,7 @@ public:
     WEBCORE_EXPORT virtual VideoGravity videoLayerGravity() const override;
     WEBCORE_EXPORT virtual void selectAudioMediaOption(uint64_t index) override;
     WEBCORE_EXPORT virtual void selectLegibleMediaOption(uint64_t index) override;
-    WEBCORE_EXPORT virtual void fullscreenModeChanged(HTMLMediaElement::VideoFullscreenMode) override;
+    WEBCORE_EXPORT virtual void fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode) override;
 
 protected:
     WEBCORE_EXPORT WebVideoFullscreenModelVideoElement();
index 35b5137..8ad51ed 100644 (file)
@@ -83,7 +83,7 @@ void WebVideoFullscreenModelVideoElement::setVideoElement(HTMLVideoElement* vide
         m_videoFullscreenInterface->resetMediaState();
 
     if (m_videoElement && m_videoElement->fullscreenMode())
-        m_videoElement->fullscreenModeChanged(HTMLMediaElement::VideoFullscreenModeNone);
+        m_videoElement->fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenModeNone);
 
     if (m_videoElement && m_videoElement->videoFullscreenLayer())
         m_videoElement->setVideoFullscreenLayer(nullptr);
@@ -452,7 +452,7 @@ const AtomicString& WebVideoFullscreenModelVideoElement::eventNameAll()
     return sEventNameAll;
 }
 
-void WebVideoFullscreenModelVideoElement::fullscreenModeChanged(HTMLMediaElement::VideoFullscreenMode videoFullscreenMode)
+void WebVideoFullscreenModelVideoElement::fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode)
 {
     __block RefPtr<WebVideoFullscreenModelVideoElement> protect(this);
     WebThreadRun(^{
index 88771d4..cdf77ad 100644 (file)
@@ -1,3 +1,19 @@
+2015-05-19  Jer Noble  <jer.noble@apple.com>
+
+        Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
+        https://bugs.webkit.org/show_bug.cgi?id=145193
+
+        Reviewed by Eric Carlson.
+
+        Use HTMLMediaElementEnums instead of HTMLMediaElement.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::enterVideoFullscreenForVideoElement): HTMLMediaElement -> HTMLMediaElementEnums.
+        * WebView/WebView.mm:
+        (-[WebView _enterVideoFullscreenForVideoElement:mode:]): Ditto.
+        * WebView/WebViewInternal.h:
+
 2015-05-19  Michael Saboff  <msaboff@apple.com>
 
         REGRESSION(183787): JIT is enabled for all builds
index a347499..2f49cc6 100644 (file)
@@ -179,7 +179,7 @@ public:
 
 #if ENABLE(VIDEO)
     virtual bool supportsVideoFullscreen() override;
-    virtual void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&, WebCore::HTMLMediaElement::VideoFullscreenMode) override;
+    virtual void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&, WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
     virtual void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&) override;
 #endif
     
index 4f66a86..23e24af 100644 (file)
@@ -936,9 +936,9 @@ bool WebChromeClient::supportsVideoFullscreen()
     return true;
 }
 
-void WebChromeClient::enterVideoFullscreenForVideoElement(HTMLVideoElement& videoElement, HTMLMediaElement::VideoFullscreenMode mode)
+void WebChromeClient::enterVideoFullscreenForVideoElement(HTMLVideoElement& videoElement, HTMLMediaElementEnums::VideoFullscreenMode mode)
 {
-    ASSERT(mode != HTMLMediaElement::VideoFullscreenModeNone);
+    ASSERT(mode != HTMLMediaElementEnums::VideoFullscreenModeNone);
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
     [m_webView _enterVideoFullscreenForVideoElement:&videoElement mode:mode];
     END_BLOCK_OBJC_EXCEPTIONS;
index ddd7676..402ebb8 100644 (file)
@@ -8419,7 +8419,7 @@ bool LayerFlushController::flushLayers()
 #endif
 
 #if ENABLE(VIDEO)
-- (void)_enterVideoFullscreenForVideoElement:(WebCore::HTMLVideoElement*)videoElement mode:(WebCore::HTMLMediaElement::VideoFullscreenMode)mode
+- (void)_enterVideoFullscreenForVideoElement:(WebCore::HTMLVideoElement*)videoElement mode:(WebCore::HTMLMediaElementEnums::VideoFullscreenMode)mode
 {
     if (_private->fullscreenController) {
         if ([_private->fullscreenController videoElement] == videoElement) {
index ea8a830..2e8280a 100644 (file)
@@ -37,7 +37,7 @@
 #import <WebCore/AlternativeTextClient.h>
 #import <WebCore/FindOptions.h>
 #import <WebCore/FloatRect.h>
-#import <WebCore/HTMLMediaElement.h>
+#import <WebCore/HTMLMediaElementEnums.h>
 #import <WebCore/LayoutMilestones.h>
 #import <WebCore/TextAlternativeWithRange.h>
 #import <WebCore/TextIndicatorWindow.h>
@@ -242,7 +242,7 @@ OBJC_CLASS NSTextAlternatives;
 - (void)_preferencesChanged:(WebPreferences *)preferences;
 
 #if ENABLE(VIDEO) && defined(__cplusplus)
-- (void)_enterVideoFullscreenForVideoElement:(WebCore::HTMLVideoElement*)videoElement mode:(WebCore::HTMLMediaElement::VideoFullscreenMode)mode;
+- (void)_enterVideoFullscreenForVideoElement:(WebCore::HTMLVideoElement*)videoElement mode:(WebCore::HTMLMediaElementEnums::VideoFullscreenMode)mode;
 - (void)_exitVideoFullscreen;
 #endif
 
index 11e7b48..27912f6 100644 (file)
@@ -1,3 +1,33 @@
+2015-05-19  Jer Noble  <jer.noble@apple.com>
+
+        Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
+        https://bugs.webkit.org/show_bug.cgi?id=145193
+
+        Reviewed by Eric Carlson.
+
+        Use HTMLMediaElementEnums instead of HTMLMediaElement.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _isShowingVideoOptimized]): HTMLMediaElement -> HTMLMediaElementEnums.
+        * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
+        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
+        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
+        (WebKit::WebVideoFullscreenManagerProxy::hasMode): Ditto.
+        (WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged): Ditto.
+        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
+        (WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): Ditto.
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): Ditto.
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/ios/WebVideoFullscreenManager.h:
+        (WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode): Ditto.
+        (WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode): Ditto.
+        * WebProcess/ios/WebVideoFullscreenManager.messages.in:
+        * WebProcess/ios/WebVideoFullscreenManager.mm:
+        (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Ditto.
+        (WebKit::WebVideoFullscreenManager::fullscreenModeChanged): Ditto.
+        (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Ditto.
+
 2015-05-20  Anders Carlsson  <andersca@apple.com>
 
         Refactor process pool enumeration code in WebsiteDataStore
index 544df08..6b54046 100644 (file)
@@ -245,7 +245,7 @@ static int32_t deviceOrientation()
     if (!_page || !_page->videoFullscreenManager())
         return false;
     
-    return _page->videoFullscreenManager()->hasMode(WebCore::HTMLMediaElement::VideoFullscreenModeOptimized);
+    return _page->videoFullscreenManager()->hasMode(WebCore::HTMLMediaElementEnums::VideoFullscreenModeOptimized);
 }
 
 - (BOOL)_mayAutomaticallyShowVideoOptimized
index b498ae8..7e0be76 100644 (file)
@@ -83,7 +83,7 @@ private:
     virtual VideoGravity videoLayerGravity() const override;
     virtual void selectAudioMediaOption(uint64_t) override;
     virtual void selectLegibleMediaOption(uint64_t) override;
-    virtual void fullscreenModeChanged(WebCore::HTMLMediaElement::VideoFullscreenMode) override;
+    virtual void fullscreenModeChanged(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
 
     // WebVideoFullscreenChangeObserver
     virtual void didSetupFullscreen() override;
@@ -107,7 +107,7 @@ public:
     void invalidate();
 
     void requestHideAndExitFullscreen();
-    bool hasMode(WebCore::HTMLMediaElement::VideoFullscreenMode) const;
+    bool hasMode(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) const;
     bool mayAutomaticallyShowVideoOptimized() const;
 
 private:
@@ -123,7 +123,7 @@ private:
     WebCore::WebVideoFullscreenInterfaceAVKit& ensureInterface(uint64_t contextId);
 
     // Messages from WebVideoFullscreenManager
-    void setupFullscreenWithID(uint64_t contextId, uint32_t videoLayerID, const WebCore::IntRect& initialRect, float hostingScaleFactor, WebCore::HTMLMediaElement::VideoFullscreenMode, bool allowOptimizedFullscreen);
+    void setupFullscreenWithID(uint64_t contextId, uint32_t videoLayerID, const WebCore::IntRect& initialRect, float hostingScaleFactor, WebCore::HTMLMediaElementEnums::VideoFullscreenMode, bool allowOptimizedFullscreen);
     void resetMediaState(uint64_t contextId);
     void setCurrentTime(uint64_t contextId, double currentTime, double hostTime);
     void setBufferedTime(uint64_t contextId, double bufferedTime);
@@ -160,7 +160,7 @@ private:
     void setVideoLayerGravity(uint64_t contextId, WebCore::WebVideoFullscreenModel::VideoGravity);
     void selectAudioMediaOption(uint64_t contextId, uint64_t index);
     void selectLegibleMediaOption(uint64_t contextId, uint64_t index);
-    void fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElement::VideoFullscreenMode);
+    void fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
     void fullscreenMayReturnToInline(uint64_t contextId);
 
     WebPageProxy* m_page;
index a4e7c27..0c5dc11 100644 (file)
@@ -33,7 +33,7 @@ messages -> WebVideoFullscreenManagerProxy {
     SetExternalPlaybackProperties(uint64_t contextId, bool enabled, uint32_t targetType, String localizedDeviceName)
     SetDuration(uint64_t contextId, double duration)
     SetRate(uint64_t contextId, bool isPlaying, double rate)
-    SetupFullscreenWithID(uint64_t contextId, uint32_t videoLayerID, WebCore::IntRect initialRect, float hostingScaleFactor, WebCore::HTMLMediaElement::VideoFullscreenMode videoFullscreenMode, bool allowOptimizedFullscreen)
+    SetupFullscreenWithID(uint64_t contextId, uint32_t videoLayerID, WebCore::IntRect initialRect, float hostingScaleFactor, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode, bool allowOptimizedFullscreen)
     EnterFullscreen(uint64_t contextId)
     ExitFullscreen(uint64_t contextId, WebCore::IntRect finalRect)
     CleanupFullscreen(uint64_t contextId)
index 431080a..e6ada12 100644 (file)
@@ -57,7 +57,7 @@ void WebVideoFullscreenManagerProxy::invalidate()
 {
 }
 
-bool WebVideoFullscreenManagerProxy::hasMode(HTMLMediaElement::VideoFullscreenMode) const
+bool WebVideoFullscreenManagerProxy::hasMode(HTMLMediaElementEnums::VideoFullscreenMode) const
 {
     return false;
 }
@@ -177,7 +177,7 @@ void WebVideoFullscreenModelContext::selectLegibleMediaOption(uint64_t optionId)
         m_manager->selectLegibleMediaOption(m_contextId, optionId);
 }
 
-void WebVideoFullscreenModelContext::fullscreenModeChanged(WebCore::HTMLMediaElement::VideoFullscreenMode mode)
+void WebVideoFullscreenModelContext::fullscreenModeChanged(WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode)
 {
     if (m_manager)
         m_manager->fullscreenModeChanged(m_contextId, mode);
@@ -257,7 +257,7 @@ void WebVideoFullscreenManagerProxy::requestHideAndExitFullscreen()
         std::get<1>(tuple)->requestHideAndExitFullscreen();
 }
 
-bool WebVideoFullscreenManagerProxy::hasMode(HTMLMediaElement::VideoFullscreenMode mode) const
+bool WebVideoFullscreenManagerProxy::hasMode(HTMLMediaElementEnums::VideoFullscreenMode mode) const
 {
     for (auto& tuple : m_contextMap.values()) {
         if (std::get<1>(tuple)->hasMode(mode))
@@ -306,7 +306,7 @@ WebCore::WebVideoFullscreenInterfaceAVKit& WebVideoFullscreenManagerProxy::ensur
 
 #pragma mark Messages from WebVideoFullscreenManager
 
-void WebVideoFullscreenManagerProxy::setupFullscreenWithID(uint64_t contextId, uint32_t videoLayerID, const WebCore::IntRect& initialRect, float hostingDeviceScaleFactor, HTMLMediaElement::VideoFullscreenMode videoFullscreenMode, bool allowOptimizedFullscreen)
+void WebVideoFullscreenManagerProxy::setupFullscreenWithID(uint64_t contextId, uint32_t videoLayerID, const WebCore::IntRect& initialRect, float hostingDeviceScaleFactor, HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode, bool allowOptimizedFullscreen)
 {
     ASSERT(videoLayerID);
     RefPtr<WebVideoFullscreenModelContext> model;
@@ -542,7 +542,7 @@ void WebVideoFullscreenManagerProxy::selectLegibleMediaOption(uint64_t contextId
     m_page->send(Messages::WebVideoFullscreenManager::SelectLegibleMediaOption(contextId, index), m_page->pageID());
 }
 
-void WebVideoFullscreenManagerProxy::fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElement::VideoFullscreenMode mode)
+void WebVideoFullscreenManagerProxy::fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode)
 {
     m_page->send(Messages::WebVideoFullscreenManager::FullscreenModeChanged(contextId, mode), m_page->pageID());
 }
index f611738..9052812 100644 (file)
@@ -915,9 +915,9 @@ bool WebChromeClient::supportsVideoFullscreen()
     return m_page->videoFullscreenManager()->supportsVideoFullscreen();
 }
 
-void WebChromeClient::enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement& videoElement, WebCore::HTMLMediaElement::VideoFullscreenMode mode)
+void WebChromeClient::enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement& videoElement, WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode)
 {
-    ASSERT(mode != HTMLMediaElement::VideoFullscreenModeNone);
+    ASSERT(mode != HTMLMediaElementEnums::VideoFullscreenModeNone);
     m_page->videoFullscreenManager()->enterVideoFullscreenForVideoElement(videoElement, mode);
 }
 
index 749479c..fbdc308 100644 (file)
@@ -250,7 +250,7 @@ private:
 
 #if PLATFORM(IOS)
     virtual bool supportsVideoFullscreen() override;
-    virtual void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&, WebCore::HTMLMediaElement::VideoFullscreenMode) override;
+    virtual void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&, WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
     virtual void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&) override;
 #endif
 
index 6ac36b9..6f23a8f 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "MessageReceiver.h"
 #include <WebCore/EventListener.h>
-#include <WebCore/HTMLMediaElement.h>
+#include <WebCore/HTMLMediaElementEnums.h>
 #include <WebCore/PlatformCALayer.h>
 #include <WebCore/WebVideoFullscreenInterface.h>
 #include <WebCore/WebVideoFullscreenModelVideoElement.h>
@@ -73,8 +73,8 @@ public:
     bool targetIsFullscreen() const { return m_targetIsFullscreen; }
     void setTargetIsFullscreen(bool flag) { m_targetIsFullscreen = flag; }
 
-    WebCore::HTMLMediaElement::VideoFullscreenMode fullscreenMode() const { return m_fullscreenMode; }
-    void setFullscreenMode(WebCore::HTMLMediaElement::VideoFullscreenMode mode) { m_fullscreenMode = mode; }
+    WebCore::HTMLMediaElementEnums::VideoFullscreenMode fullscreenMode() const { return m_fullscreenMode; }
+    void setFullscreenMode(WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode) { m_fullscreenMode = mode; }
 
     bool isFullscreen() const { return m_isFullscreen; }
     void setIsFullscreen(bool flag) { m_isFullscreen = flag; }
@@ -100,7 +100,7 @@ private:
     std::unique_ptr<LayerHostingContext> m_layerHostingContext;
     bool m_isAnimating { false };
     bool m_targetIsFullscreen { false };
-    WebCore::HTMLMediaElement::VideoFullscreenMode m_fullscreenMode { WebCore::HTMLMediaElement::VideoFullscreenModeNone };
+    WebCore::HTMLMediaElementEnums::VideoFullscreenMode m_fullscreenMode { WebCore::HTMLMediaElementEnums::VideoFullscreenModeNone };
     bool m_isFullscreen { false };
 };
 
@@ -113,7 +113,7 @@ public:
 
     // Interface to ChromeClient
     bool supportsVideoFullscreen() const;
-    void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&, WebCore::HTMLMediaElement::VideoFullscreenMode);
+    void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&, WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
     void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&);
     
 protected:
@@ -160,7 +160,7 @@ protected:
     void setVideoLayerGravityEnum(uint64_t contextId, unsigned gravity);
     void selectAudioMediaOption(uint64_t contextId, uint64_t index);
     void selectLegibleMediaOption(uint64_t contextId, uint64_t index);
-    void fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElement::VideoFullscreenMode);
+    void fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
     void fullscreenMayReturnToInline(uint64_t contextId, bool isPageVisible);
     
     WebPage* m_page;
index 013da3e..b3153c0 100644 (file)
@@ -41,7 +41,7 @@ messages -> WebVideoFullscreenManager {
     SetVideoLayerGravityEnum(uint64_t contextId, unsigned gravity)
     SelectAudioMediaOption(uint64_t contextId, uint64_t index)
     SelectLegibleMediaOption(uint64_t contextId, uint64_t index)
-    FullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElement::VideoFullscreenMode videoFullscreenMode)
+    FullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode)
     FullscreenMayReturnToInline(uint64_t contextId, bool isPageVisible)
 }
 #endif
index 9aaefc8..cbd1ec2 100644 (file)
@@ -217,9 +217,9 @@ bool WebVideoFullscreenManager::supportsVideoFullscreen() const
     return Settings::avKitEnabled();
 }
 
-void WebVideoFullscreenManager::enterVideoFullscreenForVideoElement(HTMLVideoElement& videoElement, HTMLMediaElement::VideoFullscreenMode mode)
+void WebVideoFullscreenManager::enterVideoFullscreenForVideoElement(HTMLVideoElement& videoElement, HTMLMediaElementEnums::VideoFullscreenMode mode)
 {
-    ASSERT(mode != HTMLMediaElement::VideoFullscreenModeNone);
+    ASSERT(mode != HTMLMediaElementEnums::VideoFullscreenModeNone);
 
     uint64_t contextId;
 
@@ -394,7 +394,7 @@ void WebVideoFullscreenManager::selectLegibleMediaOption(uint64_t contextId, uin
     ensureModel(contextId).selectLegibleMediaOption(index);
 }
 
-void WebVideoFullscreenManager::fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElement::VideoFullscreenMode videoFullscreenMode)
+void WebVideoFullscreenManager::fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode)
 {
     ensureModel(contextId).fullscreenModeChanged(videoFullscreenMode);
 }
@@ -481,7 +481,7 @@ void WebVideoFullscreenManager::didCleanupFullscreen(uint64_t contextId)
 
     interface->setIsAnimating(false);
     interface->setIsFullscreen(false);
-    HTMLMediaElement::VideoFullscreenMode mode = interface->fullscreenMode();
+    HTMLMediaElementEnums::VideoFullscreenMode mode = interface->fullscreenMode();
 
     model->setVideoFullscreenLayer(nil);
     RefPtr<HTMLVideoElement> videoElement = model->videoElement();