2010-05-22 Jer Noble <jer.noble@apple.com>
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 May 2010 22:29:24 +0000 (22:29 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 May 2010 22:29:24 +0000 (22:29 +0000)
commitd4dfd6fdd9876ea74abe21399e9b755408ff1a54
tree2b70943c39b52a94ac56ac85ae9e75682ea907c7
parentdb480f24e3c9c0b2a95d7d075639769886d0499a
2010-05-22  Jer Noble  <jer.noble@apple.com>

        Reviewed by Adam Roben.

        Full screen doesn't work for video elements
        https://bugs.webkit.org/show_bug.cgi?id=39557
        rdar://problem/8011813

        Modified FullscreenVideoController to work with MediaPlayerPrivateFullscreenWindow.  The FullscreenVideoController
        is now MediaPlayerPrivate agnostic..

        * FullscreenVideoController.cpp:
        (FullscreenVideoController::LayoutClient::LayoutClient): New helper class which implements WKCACFLayerLayoutClient.
        (FullscreenVideoController::LayoutClient::layoutSublayersOfLayer):
        (FullscreenVideoController::FullscreenVideoController):
        (FullscreenVideoController::~FullscreenVideoController):
        (FullscreenVideoController::enterFullscreen):
        (FullscreenVideoController::exitFullscreen):
        (FullscreenVideoController::fullscreenClientWndProc): Handle WM_KEYDOWN.
        (FullscreenVideoController::createHUDWindow):
        (FullscreenVideoController::hudWndProc):  Handle WM_KEYDOWN.
        (FullscreenVideoController::onChar):
        (FullscreenVideoController::onKeyDown):  New function: handles the VK_ESCAPE case more reliably than WM_CHAR.
        * FullscreenVideoController.h:
        * WebView.h:
        (WebView::viewWindow): Added a simple viewWindow() accessor.
2010-05-22  Jer Noble  <jer.noble@apple.com>

        Reviewed by Adam Roben.

        Full screen doesn't work for video elements
        https://bugs.webkit.org/show_bug.cgi?id=39557
        rdar://problem/8011813

        Add fullscreen support for MediaPlayerPrivateVisualContext.  A new class, MediaPlayerPrivateFullscreenWindow,
        provides the fullscreen hwnd and layer renderer.  Any WKCACFLayer can be provided to MediaPlayerPrivateFullscreenWindow
        so future additional MediaPlayerPrivate implementations can use the fullscreen window.

        Minor additions have been made to the FloatSize and IntSize classes.

        MediaPlayerPrivateQuickTimeVisualContext now calls retrieveCurrentImage after creating a new
        videoLayer; this is an existing bug that was never really exposed before now.

        * WebCore.vcproj/WebCore.vcproj:
        * platform/graphics/FloatSize.h: Added aspectRatio() and scale(float).
        (WebCore::FloatSize::aspectRatio):
        (WebCore::FloatSize::scale):
        * platform/graphics/IntSize.h: Added aspectRatio().
        (WebCore::IntSize::aspectRatio):
        * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: Added.
        * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Added.
        * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Call retrieveCurrentImage() after creating the videoLayer.
        (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen):
        (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
        (WebCore::MediaPlayerPrivateQuickTimeVisualContext::createLayerForMovie):
        * platform/graphics/win/WKCACFLayer.cpp:
        (WebCore::WKCACFLayer::WKCACFLayer):
        (WebCore::WKCACFLayer::removeFromSuperlayer):
        (WebCore::WKCACFLayer::setFrame):
        (WebCore::WKCACFLayer::internalSetNeedsDisplay):
        (WebCore::WKCACFLayer::setLayoutClient):
        (WebCore::WKCACFLayer::layoutSublayersProc):
        (WebCore::WKCACFLayer::layoutClient):
        (WebCore::WKCACFLayer::setNeedsLayout):
        * platform/graphics/win/WKCACFLayer.h: Add layout client class.
        (WebCore::WKCACFLayerLayoutClient::~WKCACFLayerLayoutClient):
        (WebCore::WKCACFLayer::frame): Added back frame()/setFrame().
        * platform/graphics/win/WebTiledLayer.cpp:
        (WebCore::WebTiledLayer::setFrame): Implamented setFrame() in subclass of WKCACFLayer
        * platform/graphics/win/WebTiledLayer.h:
        * platform/graphics/win/WebTiledLayer.cpp: Added setFrame() overriding WKCACFLayer's implementation
        (WebCore::WebTiledLayer::setFrame):
        * platform/graphics/win/WebTiledLayer.h:

2010-05-25  Jer Noble  <jer.noble@apple.com>

        Reviewed by Adam Roben.

        Full screen doesn't work for video elements
        https://bugs.webkit.org/show_bug.cgi?id=39557
        rdar://problem/8011813

        Re-enabled fullscreen support on windows, and modified tests to match.

        * platform/win/media/controls-after-reload-expected.txt:
        * platform/win/media/controls-drag-timebar-expected.txt:
        * platform/win/media/controls-strict-expected.txt:
        * platform/win/media/controls-styling-expected.txt:
        * platform/win/media/video-controls-rendering-expected.txt:
        * platform/win/media/video-display-toggle-expected.txt:
        * platform/win/media/video-no-audio-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@60190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/win/media/controls-after-reload-expected.txt
LayoutTests/platform/win/media/controls-drag-timebar-expected.txt
LayoutTests/platform/win/media/controls-strict-expected.txt
LayoutTests/platform/win/media/controls-styling-expected.txt
LayoutTests/platform/win/media/video-controls-rendering-expected.txt
LayoutTests/platform/win/media/video-display-toggle-expected.txt
LayoutTests/platform/win/media/video-no-audio-expected.txt
WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/platform/graphics/FloatSize.h
WebCore/platform/graphics/IntSize.h
WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp [new file with mode: 0644]
WebCore/platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h [new file with mode: 0644]
WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp
WebCore/platform/graphics/win/WKCACFLayer.cpp
WebCore/platform/graphics/win/WKCACFLayer.h
WebCore/platform/graphics/win/WebTiledLayer.cpp
WebCore/platform/graphics/win/WebTiledLayer.h
WebKit/win/ChangeLog
WebKit/win/FullscreenVideoController.cpp
WebKit/win/FullscreenVideoController.h
WebKit/win/WebView.h