2011-04-06 Alexis Menard <alexis.menard@openbossa.org>
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 22:17:11 +0000 (22:17 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 22:17:11 +0000 (22:17 +0000)
        Reviewed by Andreas Kling.

        [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
        https://bugs.webkit.org/show_bug.cgi?id=57974

        We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).

        No new tests needed, just a config flag rename.

        * features.pri:
2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>

        Reviewed by Andreas Kling.

        [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
        https://bugs.webkit.org/show_bug.cgi?id=57974

        We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).

        No new tests needed, just a config flag rename.

        * Api/qwebkitplatformplugin.h:
        * WebCoreSupport/ChromeClientQt.cpp:
        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
        (DumpRenderTreeSupportQt::mediaContentUrlByElementId):
        * WebCoreSupport/FullScreenVideoQt.cpp:
        (WebCore::FullScreenVideoQt::FullScreenVideoQt):
        (WebCore::FullScreenVideoQt::~FullScreenVideoQt):
        (WebCore::FullScreenVideoQt::enterFullScreenForNode):
        (WebCore::FullScreenVideoQt::exitFullScreenForNode):
        (WebCore::FullScreenVideoQt::requiresFullScreenForVideoPlayback):
        (WebCore::FullScreenVideoQt::isValid):
        * WebCoreSupport/FullScreenVideoQt.h:
        * WebCoreSupport/QtPlatformPlugin.cpp:
        * WebCoreSupport/QtPlatformPlugin.h:
        * examples/platformplugin/WebPlugin.cpp:
        (WebPlugin::supportsExtension):
        (WebPlugin::createExtension):
        * examples/platformplugin/WebPlugin.h:
        * examples/platformplugin/platformplugin.pro:
        * examples/platformplugin/qwebkitplatformplugin.h:
        * tests/qwebpage/tst_qwebpage.cpp:
        (tst_QWebPage::loadHtml5Video):
        * tests/tests.pri:

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

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/features.pri
Source/WebKit/qt/Api/qwebkitplatformplugin.h
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp
Source/WebKit/qt/examples/platformplugin/WebPlugin.h
Source/WebKit/qt/examples/platformplugin/platformplugin.pro
Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
Source/WebKit/qt/tests/tests.pri

index 2be33acae9d6221c49cecc6816c4fa0e33ea6bfa..713d6c4064e67799abaadc7f263dc53a6d171053 100644 (file)
@@ -1,3 +1,16 @@
+2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
+        https://bugs.webkit.org/show_bug.cgi?id=57974
+
+        We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
+
+        No new tests needed, just a config flag rename.
+
+        * features.pri:
+
 2011-04-06  Tyler Close  <tjclose@chromium.org>
 
         Reviewed by Nate Chapin.
index 8fbcfee8b7a24c8c3443155252c9dd7521587730..e71923c8f06639233dfff818ba62e6cd2e192f7c 100644 (file)
@@ -163,18 +163,18 @@ symbian|maemo5|maemo6 {
     contains(DEFINES, USE_GSTREAMER=1) {
         DEFINES -= ENABLE_VIDEO=0
         DEFINES += ENABLE_VIDEO=1
-        DEFINES -= ENABLE_QT_MULTIMEDIA=1
-        DEFINES += ENABLE_QT_MULTIMEDIA=0
+        DEFINES -= WTF_USE_QT_MULTIMEDIA=1
+        DEFINES += WTF_USE_QT_MULTIMEDIA=0
     } else:contains(MOBILITY_CONFIG, multimedia) {
         DEFINES -= ENABLE_VIDEO=0
         DEFINES += ENABLE_VIDEO=1
-        DEFINES -= ENABLE_QT_MULTIMEDIA=0
-        DEFINES += ENABLE_QT_MULTIMEDIA=1
+        DEFINES -= WTF_USE_QT_MULTIMEDIA=0
+        DEFINES += WTF_USE_QT_MULTIMEDIA=1
     } else:contains(QT_CONFIG, phonon) {
         DEFINES -= ENABLE_VIDEO=0
         DEFINES += ENABLE_VIDEO=1
-        DEFINES -= ENABLE_QT_MULTIMEDIA=1
-        DEFINES += ENABLE_QT_MULTIMEDIA=0
+        DEFINES -= WTF_USE_QT_MULTIMEDIA=1
+        DEFINES += WTF_USE_QT_MULTIMEDIA=0
     }
 }
 
index f274a0b5eea288cf68c6a59ab795a1e95d9a6364..9a84973a138fa89258152a59a524a68507c6231a 100644 (file)
@@ -29,7 +29,7 @@
 #include <QColor>
 #include <QObject>
 #include <QUrl>
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
 #include <QMediaPlayer>
 #endif
 
@@ -123,7 +123,7 @@ public:
     virtual unsigned hitTestPaddingForTouch(const PaddingDirection) const = 0;
 };
 
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
 class QWebFullScreenVideoHandler : public QObject {
     Q_OBJECT
 public:
index c22446b422e0fc317455106e335c5d0179f82e1c..2f8c0894f076f645260b8c356363c7a5105a06ea 100644 (file)
@@ -1,3 +1,38 @@
+2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
+        https://bugs.webkit.org/show_bug.cgi?id=57974
+
+        We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
+
+        No new tests needed, just a config flag rename.
+
+        * Api/qwebkitplatformplugin.h:
+        * WebCoreSupport/ChromeClientQt.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        (DumpRenderTreeSupportQt::mediaContentUrlByElementId):
+        * WebCoreSupport/FullScreenVideoQt.cpp:
+        (WebCore::FullScreenVideoQt::FullScreenVideoQt):
+        (WebCore::FullScreenVideoQt::~FullScreenVideoQt):
+        (WebCore::FullScreenVideoQt::enterFullScreenForNode):
+        (WebCore::FullScreenVideoQt::exitFullScreenForNode):
+        (WebCore::FullScreenVideoQt::requiresFullScreenForVideoPlayback):
+        (WebCore::FullScreenVideoQt::isValid):
+        * WebCoreSupport/FullScreenVideoQt.h:
+        * WebCoreSupport/QtPlatformPlugin.cpp:
+        * WebCoreSupport/QtPlatformPlugin.h:
+        * examples/platformplugin/WebPlugin.cpp:
+        (WebPlugin::supportsExtension):
+        (WebPlugin::createExtension):
+        * examples/platformplugin/WebPlugin.h:
+        * examples/platformplugin/platformplugin.pro:
+        * examples/platformplugin/qwebkitplatformplugin.h:
+        * tests/qwebpage/tst_qwebpage.cpp:
+        (tst_QWebPage::loadHtml5Video):
+        * tests/tests.pri:
+
 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
 
         Reviewed by Andreas Kling.
index ab55e69ee9c3f7e17fe7ea24ad0ed7e99f8f3230..083593ca169abf89f1a8a3d72aa63053490e7073 100644 (file)
@@ -80,7 +80,7 @@
 #include "HTMLMediaElement.h"
 #include "HTMLNames.h"
 #include "HTMLVideoElement.h"
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
 #include "MediaPlayerPrivateQt.h"
 #endif
 #endif
index ba712d113d840b5205e48a568517653e8b7acd97..6ad43ba0e0a54c3b700f34d590758ba7fc6e9686 100644 (file)
@@ -82,7 +82,7 @@
 #include "qwebpage_p.h"
 #include "qwebscriptworld.h"
 
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
 #include "HTMLVideoElement.h"
 #include "MediaPlayerPrivateQt.h"
 #endif
@@ -1014,7 +1014,7 @@ QUrl DumpRenderTreeSupportQt::mediaContentUrlByElementId(QWebFrame* frame, const
 {
     QUrl res;
 
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
     Frame* coreFrame = QWebFramePrivate::core(frame);
     if (!coreFrame)
         return res;
index e8d2e35084391710442058b388c8b1fb9b5f3107..7939370ddca7ee75e4a4130068fa82da7eecd465 100644 (file)
@@ -22,7 +22,7 @@
 #include "FullScreenVideoQt.h"
 
 #include "ChromeClientQt.h"
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
 #include "FullScreenVideoWidget.h"
 #include "MediaPlayerPrivateQt.h"
 #endif
@@ -35,7 +35,7 @@
 #include "PlatformVideoWindowPrivate.h"
 #endif
 
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
 #include <QGraphicsVideoItem>
 #include <QMediaPlayer>
 #endif
@@ -86,7 +86,7 @@ void GStreamerFullScreenVideoHandler::exitFullScreen()
 }
 #endif
 
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
 bool DefaultFullScreenVideoHandler::s_shouldForceFullScreenVideoPlayback = false;
 
 DefaultFullScreenVideoHandler::DefaultFullScreenVideoHandler()
@@ -135,7 +135,7 @@ FullScreenVideoQt::FullScreenVideoQt(ChromeClientQt* chromeClient)
 {
     Q_ASSERT(m_chromeClient);
 
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
     m_FullScreenVideoHandler = m_chromeClient->m_platformPlugin.createFullScreenVideoHandler();
     if (!m_FullScreenVideoHandler)
         m_FullScreenVideoHandler = new DefaultFullScreenVideoHandler;
@@ -151,7 +151,7 @@ FullScreenVideoQt::FullScreenVideoQt(ChromeClientQt* chromeClient)
 
 FullScreenVideoQt::~FullScreenVideoQt()
 {
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
     delete m_FullScreenVideoHandler;
 #endif
 #if USE(GSTREAMER)
@@ -166,7 +166,7 @@ void FullScreenVideoQt::enterFullScreenForNode(Node* node)
 
     m_videoElement = static_cast<HTMLVideoElement*>(node);
 
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
     HTMLVideoElement* videoElement = static_cast<HTMLVideoElement*>(node);
     PlatformMedia platformMedia = videoElement->platformMedia();
 
@@ -192,7 +192,7 @@ void FullScreenVideoQt::exitFullScreenForNode(Node* node)
 {
     Q_ASSERT(node);
 
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
     HTMLVideoElement* videoElement = static_cast<HTMLVideoElement*>(node);
     PlatformMedia platformMedia = videoElement->platformMedia();
 
@@ -220,7 +220,7 @@ void FullScreenVideoQt::aboutToClose()
     m_videoElement->exitFullscreen();
 }
 
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
 MediaPlayerPrivateQt* FullScreenVideoQt::mediaPlayer()
 {
     Q_ASSERT(m_videoElement);
@@ -231,7 +231,7 @@ MediaPlayerPrivateQt* FullScreenVideoQt::mediaPlayer()
 
 bool FullScreenVideoQt::requiresFullScreenForVideoPlayback()
 {
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
     return m_FullScreenVideoHandler ? m_FullScreenVideoHandler->requiresFullScreenForVideoPlayback() : false;
 #endif
 #if USE(GSTREAMER)
@@ -241,7 +241,7 @@ bool FullScreenVideoQt::requiresFullScreenForVideoPlayback()
 
 bool FullScreenVideoQt::isValid() const
 {
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
     return m_FullScreenVideoHandler;
 #endif
 #if USE(GSTREAMER)
index ac5cb051c4e358359c94b7458b4602cbab0ca86c..fda153d07e25939cea9d8c8a0df2b4ee298318e3 100644 (file)
@@ -35,7 +35,7 @@ class ChromeClientQt;
 class FullScreenVideoWidget;
 class HTMLVideoElement;
 class Node;
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
 class MediaPlayerPrivateQt;
 #endif
 
@@ -63,7 +63,7 @@ private:
 #endif
 
 // We do not use ENABLE or USE because moc does not expand these macros.
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
 class DefaultFullScreenVideoHandler : public QWebFullScreenVideoHandler {
     Q_OBJECT
 public:
@@ -93,7 +93,7 @@ public:
     bool isValid() const;
 
 private:
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
     MediaPlayerPrivateQt* mediaPlayer();
 #endif
 
@@ -103,7 +103,7 @@ private slots:
 private:
     ChromeClientQt* m_chromeClient;
     HTMLVideoElement* m_videoElement;
-#if ENABLE(QT_MULTIMEDIA)
+#if USE(QT_MULTIMEDIA)
     QWebFullScreenVideoHandler* m_FullScreenVideoHandler;
 #endif
 #if USE(GSTREAMER)
index ea561341c50204ea9d144f17ae1fe6a39b3fa447..12204acf9fb5c5dd34bf1138652bc8beb68cff36 100644 (file)
@@ -127,7 +127,7 @@ QWebTouchModifier* QtPlatformPlugin::createTouchModifier()
     return p ? static_cast<QWebTouchModifier*>(p->createExtension(QWebKitPlatformPlugin::TouchInteraction)) : 0;
 }
 
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
 QWebFullScreenVideoHandler* QtPlatformPlugin::createFullScreenVideoHandler()
 {
     QWebKitPlatformPlugin* p = plugin();
index 71ee2bb698d985b8be82d7366595f53d27e2300d..685195dcfde1b5a7659c2f9e8875226d5387a2db 100644 (file)
@@ -29,7 +29,7 @@ class QWebNotificationPresenter;
 class QWebHapticFeedbackPlayer;
 class QWebSelectData;
 class QWebTouchModifier;
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
 class QWebFullScreenVideoHandler;
 #endif
 
@@ -44,7 +44,7 @@ public:
     QWebNotificationPresenter* createNotificationPresenter();
     QWebHapticFeedbackPlayer* createHapticFeedbackPlayer();
     QWebTouchModifier* createTouchModifier();
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
     QWebFullScreenVideoHandler* createFullScreenVideoHandler();
 #endif
 
index 320079ffb3d04160d8e007c9bac235a53fcd0c43..b3ff4c1325f81afbd39460fc98f34b3c9ec7533a 100644 (file)
@@ -210,7 +210,7 @@ MultipleSelectionPopup::MultipleSelectionPopup(const QWebSelectData& data)
     resize(size().width(), visibleItemCount * gMaemoListItemSize);
 }
 
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
 FullScreenVideoWidget::FullScreenVideoWidget(QMediaPlayer* player)
     : QVideoWidget()
     , m_mediaPlayer(player)
@@ -286,7 +286,7 @@ bool WebPlugin::supportsExtension(Extension extension) const
 #endif
     case TouchInteraction:
         return true;
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
     case FullScreenVideoPlayer:
         return true;
 #endif
@@ -306,7 +306,7 @@ QObject* WebPlugin::createExtension(Extension extension) const
 #endif
     case TouchInteraction:
         return new TouchModifier();
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
     case FullScreenVideoPlayer:
         return new FullScreenVideoHandler();
 #endif
index 4994669bea1813cc91531926d921473c1ab002fd..a739ee927ea46e1cb53d74f904461745c6327ecf 100644 (file)
@@ -24,7 +24,7 @@
 #include "WebNotificationPresenter.h"
 
 #include <QDialog>
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
 #include <QVideoWidget>
 #endif
 
@@ -97,7 +97,7 @@ public:
     }
 };
 
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
 class FullScreenVideoWidget : public QVideoWidget {
     Q_OBJECT
 public:
index ccc0b3a2bfee64afba08c21704c9d66e27cc0577..80cecb3f9775742e955b88f643550cfc09c2a912 100644 (file)
@@ -14,8 +14,8 @@ load(mobilityconfig, true)
         MOBILITY += multimedia
         DEFINES -= ENABLE_VIDEO=0
         DEFINES += ENABLE_VIDEO=1
-        DEFINES -= ENABLE_QT_MULTIMEDIA=0
-        DEFINES += ENABLE_QT_MULTIMEDIA=1
+        DEFINES -= WTF_USE_QT_MULTIMEDIA=0
+        DEFINES += WTF_USE_QT_MULTIMEDIA=1
     }
 }
 
index 2a94e0cd8cfac87585473d0bcf946c101bca3f40..7a76fe7e440009f11f6806ddbfbb08e15c130c61 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <QObject>
 #include <QUrl>
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
 #include <QMediaPlayer>
 #endif
 
@@ -118,7 +118,7 @@ public:
     virtual unsigned hitTestPaddingForTouch(const PaddingDirection) const = 0;
 };
 
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
 class QWebFullScreenVideoHandler : public QObject {
     Q_OBJECT
 public:
index d43b2de752cfa01ebae46b776bb8d88d0a0c2b3d..8cdd5dc2a0d482761f6dd18464e61a7d06e5ccae 100644 (file)
@@ -434,7 +434,7 @@ void tst_QWebPage::userStyleSheet()
 
 void tst_QWebPage::loadHtml5Video()
 {
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
     QByteArray url("http://does.not/exist?a=1%2Cb=2");
     m_view->setHtml("<p><video id ='video' src='" + url + "' autoplay/></p>");
     QTest::qWait(2000);
index ebb6f8ec7e5fe9aaf286dc62a97ea48d69455bb7..3b0c3581a450f41b03fcd6b256e029708c5a652c 100644 (file)
@@ -10,8 +10,8 @@ ELSE { TARGET = tst_$$TARGET }
 load(mobilityconfig, true)
 contains(MOBILITY_CONFIG, multimedia) {
     # This define is used by tests depending on Qt Multimedia
-    DEFINES -= ENABLE_QT_MULTIMEDIA=0
-    DEFINES += ENABLE_QT_MULTIMEDIA=1
+    DEFINES -= WTF_USE_QT_MULTIMEDIA=0
+    DEFINES += WTF_USE_QT_MULTIMEDIA=1
 }
 
 SOURCES += $${TARGET}.cpp