Changeset 89617 in webkit
- Timestamp:
- Jun 23, 2011 2:42:52 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r89613 r89617 1 2011-06-23 Alexis Menard <alexis.menard@openbossa.org> 2 3 Reviewed by Eric Carlson. 4 5 [Qt] Implement fullscreen support on Mac with the QuickTime backend. 6 https://bugs.webkit.org/show_bug.cgi?id=61728 7 8 Implement fullscreen support for Qt when using the QuickTime backend. 9 We mostly use what is already done for the Mac port. 10 11 * DerivedSources.pro: We use the mac files and they have <WebCore/x> type 12 of includes. We need to generate those headers. 13 * WebCore.pro: 14 * platform/mac/WebVideoFullscreenController.h: 15 * platform/mac/WebVideoFullscreenController.mm: 16 * platform/mac/WebVideoFullscreenHUDWindowController.h: 17 * platform/mac/WebVideoFullscreenHUDWindowController.mm: 18 * platform/qt/WebCoreSystemInterface.h: 19 * platform/qt/WebCoreSystemInterface.mm: 20 1 21 2011-06-23 Darin Adler <darin@apple.com> 2 22 -
trunk/Source/WebCore/DerivedSources.pro
r78566 r89617 28 28 } 29 29 30 contains(DEFINES, USE_QTKIT=1) { 31 SRC_ROOT_DIR = $$replace(PWD, /Source/WebCore, "") 32 fwheader_generator.commands = perl $${SRC_ROOT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl $${SRC_ROOT_DIR}/Source/WebKit2 ../include mac 33 fwheader_generator.depends = $${SRC_ROOT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl 34 generated_files.depends += fwheader_generator 35 QMAKE_EXTRA_TARGETS += fwheader_generator 36 } 37 30 38 include(CodeGenerators.pri) -
trunk/Source/WebCore/WebCore.pro
r89587 r89617 2998 2998 2999 2999 contains(DEFINES, USE_QTKIT=1) { 3000 INCLUDEPATH += \ 3001 $$SOURCE_DIR/../WebKitLibraries/ 3002 3000 3003 HEADERS += \ 3001 3004 platform/graphics/mac/MediaPlayerPrivateQTKit.h \ … … 3003 3006 platform/qt/WebCoreSystemInterface.h \ 3004 3007 platform/mac/BlockExceptions.h \ 3005 platform/mac/WebCoreObjCExtras.h 3008 platform/mac/WebCoreObjCExtras.h \ 3009 platform/mac/WebVideoFullscreenController.h \ 3010 platform/mac/WebVideoFullscreenHUDWindowController.h \ 3011 platform/mac/WebWindowAnimation.h 3012 3006 3013 SOURCES += \ 3014 platform/graphics/cg/IntRectCG.cpp \ 3015 platform/graphics/cg/FloatSizeCG.cpp \ 3016 platform/cf/SharedBufferCF.cpp \ 3017 platform/cf/KURLCFNet.cpp 3018 3019 OBJECTIVE_SOURCES += \ 3020 platform/qt/WebCoreSystemInterface.mm \ 3021 platform/mac/BlockExceptions.mm \ 3022 platform/mac/WebCoreObjCExtras.mm \ 3007 3023 platform/graphics/mac/MediaPlayerPrivateQTKit.mm \ 3008 3024 platform/mac/SharedBufferMac.mm \ … … 3011 3027 platform/graphics/mac/FloatSizeMac.mm \ 3012 3028 platform/graphics/mac/IntRectMac.mm \ 3013 platform/graphics/cg/IntRectCG.cpp \ 3014 platform/graphics/cg/FloatSizeCG.cpp \ 3015 platform/cf/SharedBufferCF.cpp \ 3016 platform/cf/KURLCFNet.cpp \ 3017 platform/qt/WebCoreSystemInterface.mm \ 3018 platform/mac/BlockExceptions.mm \ 3019 platform/mac/WebCoreObjCExtras.mm 3029 platform/mac/WebVideoFullscreenController.mm \ 3030 platform/mac/WebVideoFullscreenHUDWindowController.mm \ 3031 platform/mac/WebWindowAnimation.mm 3020 3032 3021 3033 DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES -
trunk/Source/WebCore/platform/mac/WebVideoFullscreenController.h
r89271 r89617 26 26 #if ENABLE(VIDEO) 27 27 28 #import <Cocoa/Cocoa.h> 28 29 #import <wtf/RefPtr.h> 29 30 -
trunk/Source/WebCore/platform/mac/WebVideoFullscreenController.mm
r89292 r89617 32 32 #import "WebVideoFullscreenHUDWindowController.h" 33 33 #import "WebWindowAnimation.h" 34 #import < HIToolbox/MacApplication.h>34 #import <Carbon/Carbon.h> 35 35 #import <IOKit/pwr_mgt/IOPMLib.h> 36 #import <OSServices/Power.h>37 36 #import <QTKit/QTKit.h> 38 37 #import <WebCore/HTMLMediaElement.h> -
trunk/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.h
r89271 r89617 25 25 26 26 #if ENABLE(VIDEO) 27 28 #import <Cocoa/Cocoa.h> 27 29 28 30 namespace WebCore { -
trunk/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm
r89387 r89617 31 31 #import "FloatConversion.h" 32 32 #import "WebCoreSystemInterface.h" 33 #import <JavaScriptCore/RetainPtr.h>34 #import <JavaScriptCore/UnusedParam.h>35 33 #import <WebCore/HTMLMediaElement.h> 34 #import <wtf/RetainPtr.h> 35 #import <wtf/UnusedParam.h> 36 36 37 37 using namespace WebCore; -
trunk/Source/WebCore/platform/qt/WebCoreSystemInterface.h
r87405 r89617 39 39 #ifdef __OBJC__ 40 40 @class NSArray; 41 @class NSControl; 41 42 @class NSString; 42 43 @class NSURL; 44 @class NSView; 45 @class NSWindow; 43 46 @class QTMovie; 44 47 @class QTMovieView; 45 48 #else 46 49 class NSArray; 50 class NSControl; 47 51 class NSString; 48 52 class NSURL; 53 class NSView; 54 class NSWindow; 49 55 class QTMovie; 50 56 class QTMovieView; … … 54 60 55 61 // In alphabetical order. 62 extern NSView *(*wkCreateMediaUIBackgroundView)(void); 63 extern NSControl *(*wkCreateMediaUIControl)(int); 56 64 extern unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void); 57 65 extern int (*wkQTMovieDataRate)(QTMovie*); … … 69 77 extern void (*wkQTClearMediaDownloadCacheForSite)(NSString *site); 70 78 extern void (*wkQTClearMediaDownloadCache)(); 79 extern void (*wkWindowSetAlpha)(NSWindow *, float); 80 extern void (*wkWindowSetScaledFrame)(NSWindow *, NSRect, NSRect); 71 81 72 82 } -
trunk/Source/WebCore/platform/qt/WebCoreSystemInterface.mm
r87405 r89617 28 28 #import <Foundation/Foundation.h> 29 29 30 NSView *(*wkCreateMediaUIBackgroundView)(void); 31 NSControl *(*wkCreateMediaUIControl)(int); 30 32 unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void); 31 33 int (*wkQTMovieDataRate)(QTMovie*); … … 43 45 void (*wkQTClearMediaDownloadCacheForSite)(NSString *site); 44 46 void (*wkQTClearMediaDownloadCache)(); 47 void (*wkWindowSetAlpha)(NSWindow *, float); 48 void (*wkWindowSetScaledFrame)(NSWindow *, NSRect, NSRect); 45 49 -
trunk/Source/WebKit/qt/ChangeLog
r89582 r89617 1 2011-06-23 Alexis Menard <alexis.menard@openbossa.org> 2 3 Reviewed by Eric Carlson. 4 5 [Qt] Implement fullscreen support on Mac with the QuickTime backend. 6 https://bugs.webkit.org/show_bug.cgi?id=61728 7 8 Implement fullscreen support for Qt when using the QuickTime backend. 9 We mostly use what is already done for the Mac port. 10 11 * QtWebKit.pro: 12 * WebCoreSupport/ChromeClientQt.cpp: 13 (WebCore::ChromeClientQt::ChromeClientQt): 14 (WebCore::ChromeClientQt::~ChromeClientQt): 15 * WebCoreSupport/ChromeClientQt.h: 16 * WebCoreSupport/FullScreenVideoQt.cpp: 17 (WebCore::FullScreenVideoQt::FullScreenVideoQt): 18 (WebCore::FullScreenVideoQt::~FullScreenVideoQt): 19 (WebCore::FullScreenVideoQt::enterFullScreenForNode): 20 (WebCore::FullScreenVideoQt::exitFullScreenForNode): 21 (WebCore::FullScreenVideoQt::requiresFullScreenForVideoPlayback): 22 (WebCore::FullScreenVideoQt::isValid): 23 * WebCoreSupport/FullScreenVideoQt.h: 24 * WebCoreSupport/QTKitFullScreenVideoHandler.h: Added. 25 * WebCoreSupport/QTKitFullScreenVideoHandler.mm: Added. 26 (QTKitFullScreenVideoHandler::QTKitFullScreenVideoHandler): 27 (QTKitFullScreenVideoHandler::~QTKitFullScreenVideoHandler): 28 (QTKitFullScreenVideoHandler::enterFullScreen): 29 (QTKitFullScreenVideoHandler::exitFullScreen): 30 * WebCoreSupport/WebSystemInterface.mm: 31 (InitWebCoreSystemInterface): 32 1 33 2011-06-23 Yael Aharon <yael.aharon@nokia.com> 2 34 -
trunk/Source/WebKit/qt/QtWebKit.pro
r89574 r89617 226 226 } 227 227 228 contains(DEFINES, USE_ GSTREAMER=1) | contains(MOBILITY_CONFIG, multimedia) {228 contains(DEFINES, USE_QTKIT=1) | contains(DEFINES, USE_GSTREAMER=1) | contains(MOBILITY_CONFIG, multimedia) { 229 229 HEADERS += $$PWD/WebCoreSupport/FullScreenVideoQt.h 230 230 SOURCES += $$PWD/WebCoreSupport/FullScreenVideoQt.cpp … … 232 232 233 233 contains(DEFINES, USE_QTKIT=1) { 234 INCLUDEPATH += $$SOURCE_DIR/WebCore/platform/qt/ 235 INCLUDEPATH += $$SOURCE_DIR/../WebKitLibraries/ 234 INCLUDEPATH += $$SOURCE_DIR/WebCore/platform/qt/ \ 235 $$SOURCE_DIR/WebCore/platform/mac/ \ 236 $$SOURCE_DIR/../WebKitLibraries/ 237 236 238 DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES 237 HEADERS += $$PWD/WebCoreSupport/WebSystemInterface.h 238 SOURCES += $$PWD/WebCoreSupport/WebSystemInterface.mm 239 240 HEADERS += $$PWD/WebCoreSupport/WebSystemInterface.h \ 241 $$PWD/WebCoreSupport/QTKitFullScreenVideoHandler.h 242 243 OBJECTIVE_SOURCES += $$PWD/WebCoreSupport/WebSystemInterface.mm \ 244 $$PWD/WebCoreSupport/QTKitFullScreenVideoHandler.mm 245 246 LIBS+= -framework Security -framework IOKit 239 247 # We can know the Mac OS version by using the Darwin major version 240 248 DARWIN_VERSION = $$split(QMAKE_HOST.version, ".") 241 249 DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION) 242 250 equals(DARWIN_MAJOR_VERSION, "10") { 243 LIBS+= $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a -framework Security251 LIBS+= $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a 244 252 } else { 245 253 equals(DARWIN_MAJOR_VERSION, "9") { 246 LIBS+= $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLeopard.a -framework Security254 LIBS+= $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLeopard.a 247 255 } 248 256 } -
trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r89430 r89617 79 79 #include <wtf/OwnPtr.h> 80 80 81 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) )81 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) 82 82 #include "FullScreenVideoQt.h" 83 83 #include "HTMLMediaElement.h" … … 96 96 : m_webPage(webPage) 97 97 , m_eventLoop(0) 98 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) )98 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) 99 99 , m_fullScreenVideo(0) 100 100 #endif … … 108 108 m_eventLoop->exit(); 109 109 110 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) )110 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) 111 111 delete m_fullScreenVideo; 112 112 #endif … … 672 672 #endif 673 673 674 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) )674 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) 675 675 FullScreenVideoQt* ChromeClientQt::fullScreenVideo() 676 676 { -
trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r89216 r89617 168 168 #endif 169 169 170 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) )170 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) 171 171 virtual bool supportsFullscreenForNode(const Node*); 172 172 virtual void enterFullscreenForNode(Node*); … … 210 210 QEventLoop* m_eventLoop; 211 211 212 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) )212 #if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) 213 213 FullScreenVideoQt* m_fullScreenVideo; 214 214 #endif -
trunk/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
r87312 r89617 34 34 #include "GStreamerGWorld.h" 35 35 #include "PlatformVideoWindowPrivate.h" 36 #endif 37 38 #if USE(QTKIT) 39 #include "QTKitFullScreenVideoHandler.h" 36 40 #endif 37 41 … … 148 152 m_FullScreenVideoHandlerGStreamer = new GStreamerFullScreenVideoHandler; 149 153 #endif 154 155 #if USE(QTKIT) 156 m_FullScreenVideoHandlerQTKit = new QTKitFullScreenVideoHandler; 157 #endif 150 158 } 151 159 … … 157 165 #if USE(GSTREAMER) 158 166 delete m_FullScreenVideoHandlerGStreamer; 167 #endif 168 #if USE(QTKIT) 169 delete m_FullScreenVideoHandlerQTKit; 159 170 #endif 160 171 } … … 186 197 m_FullScreenVideoHandlerGStreamer->enterFullScreen(); 187 198 #endif 199 200 #if USE(QTKIT) 201 m_FullScreenVideoHandlerQTKit->enterFullScreen(m_videoElement); 202 #endif 188 203 } 189 204 … … 212 227 m_FullScreenVideoHandlerGStreamer->exitFullScreen(); 213 228 #endif 229 230 #if USE(QTKIT) 231 m_FullScreenVideoHandlerQTKit->exitFullScreen(); 232 #endif 233 214 234 } 215 235 … … 233 253 #if USE(QT_MULTIMEDIA) 234 254 return m_FullScreenVideoHandler ? m_FullScreenVideoHandler->requiresFullScreenForVideoPlayback() : false; 235 #endif236 #if USE(GSTREAMER)237 return false;238 255 #else 239 256 return false; … … 248 265 #if USE(GSTREAMER) 249 266 return m_FullScreenVideoHandlerGStreamer; 267 #elif USE(QTKIT) 268 return m_FullScreenVideoHandlerQTKit; 250 269 #else 251 270 return 0; -
trunk/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
r86550 r89617 38 38 #if USE(QT_MULTIMEDIA) 39 39 class MediaPlayerPrivateQt; 40 #endif 41 #if USE(QTKIT) 42 class QTKitFullScreenVideoHandler; 40 43 #endif 41 44 … … 110 113 GStreamerFullScreenVideoHandler* m_FullScreenVideoHandlerGStreamer; 111 114 #endif 115 #if USE(QTKIT) 116 QTKitFullScreenVideoHandler* m_FullScreenVideoHandlerQTKit; 117 #endif 112 118 }; 113 119 -
trunk/Source/WebKit/qt/WebCoreSupport/WebSystemInterface.mm
r87405 r89617 58 58 INIT(QTClearMediaDownloadCacheForSite); 59 59 INIT(QTClearMediaDownloadCache); 60 INIT(CreateMediaUIBackgroundView); 61 INIT(CreateMediaUIControl); 62 INIT(WindowSetAlpha); 63 INIT(WindowSetScaledFrame); 60 64 61 65 didInit = true;
Note: See TracChangeset
for help on using the changeset viewer.