Title: [153717] branches/safari-537-branch

Diff

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153716 => 153717)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-05 19:31:38 UTC (rev 153717)
@@ -1,5 +1,41 @@
 2013-08-05  Lucas Forschler  <[email protected]>
 
+        Merge r153628
+
+    2013-08-01  Brent Fulgham  <[email protected]>
+
+            [Windows] WebKit1 Fullscreen Video Play is Broken
+            https://bugs.webkit.org/show_bug.cgi?id=119415
+
+            Reviewed by Jer Noble.
+
+            * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add
+            call for ACFPlayerLayerSetFrame
+            * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+            (WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible):
+            Tear down video player when leaving Fullscreen mode and not using
+            the newer Fullscreen feature.
+            (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper):
+            Disconnect from notifications for AVCFPlayerItemPresentationSizeChangedNotification,
+            AVCFPlayerItemDuratoinChangedNotification, and disconnect any
+            LegibleOutput items added to the player item.
+            (WebCore::AVFWrapper::createPlayerItem): Add notifications for
+            AVCFPlayerItemPresentationSizeChanged. 
+            (WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Notify
+            the AVCFPLayerLayer when the display size has changed.
+            * platform/graphics/ca/win/CACFLayerTreeHost.h:
+            (WebCore::CACFLayerTreeHost::manualCreateRenderer): Added.
+            * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
+            (WebCore::WKCACFViewLayerTreeHost::manualCreateRenderer): Added.
+            * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
+            (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Minor
+            cleanups.
+            (WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
+            Make sure a Direct3D renderer is created when building the full screen
+            window for Video playback.
+
+2013-08-05  Lucas Forschler  <[email protected]>
+
         Merge r153377
 
     2013-07-26  Brent Fulgham  <[email protected]>

Modified: branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h (153716 => 153717)


--- branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h	2013-08-05 19:31:38 UTC (rev 153717)
@@ -189,6 +189,9 @@
 SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerLayerIsReadyForDisplay, Boolean, __cdecl, (AVCFPlayerLayerRef playerLayer), (playerLayer))
 #define AVCFPlayerLayerIsReadyForDisplay softLink_AVCFPlayerLayerIsReadyForDisplay
 
+SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerLayerSetFrame, void, __cdecl, (AVCFPlayerLayerRef playerLayer, CGRect rect), (playerLayer, rect))
+#define AVCFPlayerLayerSetFrame softLink_AVCFPlayerLayerSetFrame
+
 SOFT_LINK_DLL_IMPORT(AVFoundationCF, AVCFPlayerLayerSetPlayer, void, __cdecl, (AVCFPlayerLayerRef playerLayer, AVCFPlayerRef player), (playerLayer, player))
 #define AVCFPlayerLayerSetPlayer softLink_AVCFPlayerLayerSetPlayer
 

Modified: branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (153716 => 153717)


--- branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp	2013-08-05 19:31:38 UTC (rev 153717)
@@ -472,6 +472,8 @@
     // whether we're affected by the same issue.
     setDelayCallbacks(true);
     m_avfWrapper->setVideoLayerHidden(!isVisible);    
+    if (!isVisible)
+        tearDownVideoRendering();
     setDelayCallbacks(false);
 }
 
@@ -1251,9 +1253,11 @@
         CFNotificationCenterRemoveObserver(center, avfWrapper->callbackContext(), AVCFPlayerItemTracksChangedNotification, avfWrapper->avPlayerItem());
         CFNotificationCenterRemoveObserver(center, avfWrapper->callbackContext(), AVCFPlayerItemSeekableTimeRangesChangedNotification, avfWrapper->avPlayerItem());
         CFNotificationCenterRemoveObserver(center, avfWrapper->callbackContext(), AVCFPlayerItemLoadedTimeRangesChangedNotification, avfWrapper->avPlayerItem());
+        CFNotificationCenterRemoveObserver(center, avfWrapper->callbackContext(), AVCFPlayerItemPresentationSizeChangedNotification, avfWrapper->avPlayerItem());
         CFNotificationCenterRemoveObserver(center, avfWrapper->callbackContext(), AVCFPlayerItemIsPlaybackLikelyToKeepUpChangedNotification, avfWrapper->avPlayerItem());
         CFNotificationCenterRemoveObserver(center, avfWrapper->callbackContext(), AVCFPlayerItemIsPlaybackBufferEmptyChangedNotification, avfWrapper->avPlayerItem());
         CFNotificationCenterRemoveObserver(center, avfWrapper->callbackContext(), AVCFPlayerItemIsPlaybackBufferFullChangedNotification, avfWrapper->avPlayerItem());
+        CFNotificationCenterRemoveObserver(center, avfWrapper->callbackContext(), AVCFPlayerItemDurationChangedNotification, avfWrapper->avPlayerItem());
         CFNotificationCenterRemoveObserver(center, avfWrapper->callbackContext(), CACFContextNeedsFlushNotification(), 0);
     }
 
@@ -1264,6 +1268,10 @@
         CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), avfWrapper->callbackContext(), AVCFPlayerRateChangedNotification, avfWrapper->avPlayer());
     }
 
+#if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP) && HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
+    AVCFPlayerItemRemoveOutput(avfWrapper->avPlayerItem(), avfWrapper->legibleOutput());
+#endif
+
     delete avfWrapper;
 }
 
@@ -1334,11 +1342,12 @@
     CFNotificationCenterAddObserver(center, callbackContext(), notificationCallback, AVCFPlayerItemTracksChangedNotification, itemRef, CFNotificationSuspensionBehaviorDeliverImmediately);
     CFNotificationCenterAddObserver(center, callbackContext(), notificationCallback, AVCFPlayerItemSeekableTimeRangesChangedNotification, itemRef, CFNotificationSuspensionBehaviorDeliverImmediately);
     CFNotificationCenterAddObserver(center, callbackContext(), notificationCallback, AVCFPlayerItemLoadedTimeRangesChangedNotification, itemRef, CFNotificationSuspensionBehaviorDeliverImmediately);
+    CFNotificationCenterAddObserver(center, callbackContext(), notificationCallback, AVCFPlayerItemPresentationSizeChangedNotification, itemRef, CFNotificationSuspensionBehaviorDeliverImmediately);
     CFNotificationCenterAddObserver(center, callbackContext(), notificationCallback, AVCFPlayerItemIsPlaybackLikelyToKeepUpChangedNotification, itemRef, CFNotificationSuspensionBehaviorDeliverImmediately);
     CFNotificationCenterAddObserver(center, callbackContext(), notificationCallback, AVCFPlayerItemIsPlaybackBufferEmptyChangedNotification, itemRef, CFNotificationSuspensionBehaviorDeliverImmediately);
     CFNotificationCenterAddObserver(center, callbackContext(), notificationCallback, AVCFPlayerItemIsPlaybackBufferFullChangedNotification, itemRef, CFNotificationSuspensionBehaviorDeliverImmediately);
     CFNotificationCenterAddObserver(center, callbackContext(), notificationCallback, AVCFPlayerItemDurationChangedNotification, itemRef, CFNotificationSuspensionBehaviorDeliverImmediately);
-    // FIXME: Are there other legible output things we need to register for? asset, hasEnabledAudio?
+    // FIXME: Are there other legible output things we need to register for? asset and hasEnabledAudio are not exposed by AVCF
 
     CFNotificationCenterAddObserver(center, callbackContext(), notificationCallback, CACFContextNeedsFlushNotification(), 0, CFNotificationSuspensionBehaviorDeliverImmediately);
 
@@ -1675,6 +1684,8 @@
 
     CACFLayerSetPosition(m_parent->caVideoLayer(), position);
     CACFLayerSetBounds(m_parent->caVideoLayer(), bounds);
+
+    AVCFPlayerLayerSetFrame(m_parent->videoLayer(), CGRectMake(0, 0, bounds.size.width, bounds.size.height));
 }
 
 } // namespace WebCore

Modified: branches/safari-537-branch/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h (153716 => 153717)


--- branches/safari-537-branch/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h	2013-08-05 19:31:38 UTC (rev 153717)
@@ -74,6 +74,8 @@
     virtual GraphicsDeviceAdapter* graphicsDeviceAdapter() const { return 0; }
 #endif
 
+    virtual bool createRenderer() = 0;
+
     // AbstractCACFLayerTreeHost
     virtual void flushPendingLayerChangesNow();
 
@@ -87,7 +89,6 @@
     // AbstractCACFLayerTreeHost
     virtual PlatformCALayer* rootLayer() const;
 
-    virtual bool createRenderer() = 0;
     virtual void destroyRenderer();
     virtual void contextDidChange();
 

Modified: branches/safari-537-branch/Source/WebCore/platform/graphics/ca/win/WKCACFViewLayerTreeHost.h (153716 => 153717)


--- branches/safari-537-branch/Source/WebCore/platform/graphics/ca/win/WKCACFViewLayerTreeHost.h	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Source/WebCore/platform/graphics/ca/win/WKCACFViewLayerTreeHost.h	2013-08-05 19:31:38 UTC (rev 153717)
@@ -38,6 +38,8 @@
 public:
     static PassRefPtr<WKCACFViewLayerTreeHost> create();
 
+    virtual bool createRenderer();
+
 private:
     WKCACFViewLayerTreeHost();
 
@@ -46,7 +48,6 @@
 
     virtual void initializeContext(void* userData, PlatformCALayer*);
     virtual void resize();
-    virtual bool createRenderer();
     virtual void destroyRenderer();
     virtual void flushContext();
     virtual void contextDidChange();

Modified: branches/safari-537-branch/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp (153716 => 153717)


--- branches/safari-537-branch/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Source/WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp	2013-08-05 19:31:38 UTC (rev 153717)
@@ -62,7 +62,7 @@
     static LPCWSTR windowClassName = L"MediaPlayerPrivateFullscreenWindowClass";
     if (!windowAtom) {
         WNDCLASSEX wcex = {0};
-        wcex.cbSize = sizeof(WNDCLASSEX);
+        wcex.cbSize = sizeof(wcex);
         wcex.style = CS_HREDRAW | CS_VREDRAW;
         wcex.lpfnWndProc = staticWndProc;
         wcex.hInstance = instanceHandle();
@@ -81,7 +81,7 @@
     
     ::CreateWindowExW(WS_EX_TOOLWINDOW, windowClassName, L"", WS_POPUP, 
         monitorRect.x(), monitorRect.y(), monitorRect.width(), monitorRect.height(),
-        parentHwnd, 0, WebCore::instanceHandle(), this);
+        parentHwnd, 0, instanceHandle(), this);
     ASSERT(IsWindow(m_hwnd));
 
 #if USE(ACCELERATED_COMPOSITING)
@@ -110,8 +110,10 @@
 
     if (!m_layerTreeHost) {
         m_layerTreeHost = CACFLayerTreeHost::create();
-        if (m_hwnd)
+        if (m_hwnd) {
             m_layerTreeHost->setWindow(m_hwnd);
+            m_layerTreeHost->createRenderer();
+        }
     }
 
     m_layerTreeHost->setRootChildLayer(m_rootChild.get());

Modified: branches/safari-537-branch/Source/WebKit/win/ChangeLog (153716 => 153717)


--- branches/safari-537-branch/Source/WebKit/win/ChangeLog	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Source/WebKit/win/ChangeLog	2013-08-05 19:31:38 UTC (rev 153717)
@@ -1,3 +1,24 @@
+2013-08-05  Lucas Forschler  <[email protected]>
+
+        Merge r153628
+
+    2013-08-01  Brent Fulgham  <[email protected]>
+
+            [Windows] WebKit1 Fullscreen Video Play is Broken
+            https://bugs.webkit.org/show_bug.cgi?id=119415
+
+            Reviewed by Jer Noble.
+
+            * WebPreferences.cpp:
+            (WebPreferences::initializeDefaultSettings): Set accelerated
+            rendering on by default on systems that support it.
+            * WebView.cpp:
+            (WebView::exitFullscreen): Clean up Fullscreen video controller
+            once it is no longer used. This was preventing users from being
+            able to reenter Fullscreen mode after leaving it.
+            (WebView::fullScreenClientForceRepaint): Change assert to
+            match the member actually being used in the method.
+
 2013-07-15  Lucas Forschler  <[email protected]>
 
         Merge r152520

Modified: branches/safari-537-branch/Source/WebKit/win/WebPreferences.cpp (153716 => 153717)


--- branches/safari-537-branch/Source/WebKit/win/WebPreferences.cpp	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Source/WebKit/win/WebPreferences.cpp	2013-08-05 19:31:38 UTC (rev 153717)
@@ -261,8 +261,12 @@
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitUseHighResolutionTimersPreferenceKey), kCFBooleanTrue);
 
+#if USE(CG)
+    CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanTrue);
+#else
     CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanFalse);
-    
+#endif
+
     CFDictionaryAddValue(defaults, CFSTR(WebKitShowDebugBordersPreferenceKey), kCFBooleanFalse);
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitDNSPrefetchingEnabledPreferenceKey), kCFBooleanFalse);
@@ -274,6 +278,8 @@
 
     CFDictionaryAddValue(defaults, CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey), kCFBooleanTrue);
 
+    CFDictionaryAddValue(defaults, CFSTR(WebKitFullScreenEnabledPreferenceKey), kCFBooleanFalse);
+
     defaultSettings = defaults;
 }
 

Modified: branches/safari-537-branch/Source/WebKit/win/WebView.cpp (153716 => 153717)


--- branches/safari-537-branch/Source/WebKit/win/WebView.cpp	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Source/WebKit/win/WebView.cpp	2013-08-05 19:31:38 UTC (rev 153717)
@@ -6269,9 +6269,11 @@
 void WebView::exitFullscreen()
 {
 #if ENABLE(VIDEO)
-    if (m_fullScreenVideoController)
-        m_fullScreenVideoController->exitFullscreen();
+    if (!m_fullScreenVideoController)
+        return;
     
+    m_fullScreenVideoController->exitFullscreen();
+    m_fullScreenVideoController = nullptr;
 #endif
 }
 
@@ -6906,7 +6908,7 @@
 
 void WebView::fullScreenClientForceRepaint()
 {
-    ASSERT(m_fullScreenElement);
+    ASSERT(m_fullscreenController);
     RECT windowRect = {0};
     frameRect(&windowRect);
     repaint(windowRect, true /*contentChanged*/, true /*immediate*/, false /*contentOnly*/);

Modified: branches/safari-537-branch/Tools/ChangeLog (153716 => 153717)


--- branches/safari-537-branch/Tools/ChangeLog	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Tools/ChangeLog	2013-08-05 19:31:38 UTC (rev 153717)
@@ -1,5 +1,20 @@
 2013-08-05  Lucas Forschler  <[email protected]>
 
+        Merge r153628
+
+    2013-08-01  Brent Fulgham  <[email protected]>
+
+            [Windows] WebKit1 Fullscreen Video Play is Broken
+            https://bugs.webkit.org/show_bug.cgi?id=119415
+
+            Reviewed by Jer Noble.
+
+            * WinLauncher/WinLauncher.cpp:
+            (dllLauncherEntryPoint): Activate full screen mode via
+            IWebPreferencesInternal interface.
+
+2013-08-05  Lucas Forschler  <[email protected]>
+
         Merge r152861
 
     2013-07-16  Brent Fulgham  <[email protected]>

Modified: branches/safari-537-branch/Tools/WinLauncher/WinLauncher.cpp (153716 => 153717)


--- branches/safari-537-branch/Tools/WinLauncher/WinLauncher.cpp	2013-08-05 19:27:42 UTC (rev 153716)
+++ branches/safari-537-branch/Tools/WinLauncher/WinLauncher.cpp	2013-08-05 19:31:38 UTC (rev 153717)
@@ -351,7 +351,12 @@
 
     standardPreferences->setAcceleratedCompositingEnabled(TRUE);
 
-    HRESULT hr = WebKitCreateInstance(CLSID_WebView, 0, IID_IWebView, reinterpret_cast<void**>(&gWebView));
+    IWebPreferencesPrivate* prefsPrivate = 0;
+    HRESULT hr = standardPreferences->QueryInterface(IID_IWebPreferencesPrivate, reinterpret_cast<void**>(&prefsPrivate));
+    if (SUCCEEDED(hr))
+        prefsPrivate->setFullScreenEnabled(TRUE);
+
+    hr = WebKitCreateInstance(CLSID_WebView, 0, IID_IWebView, reinterpret_cast<void**>(&gWebView));
     if (FAILED(hr))
         goto exit;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to