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 2be33ac..713d6c4 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 8fbcfee..e71923c 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 f274a0b..9a84973 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 c22446b..2f8c089 100644 (file)
@@ -2,6 +2,41 @@
 
         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.
+
         [Qt] Implement fullscreen playback for the GStreamer backend.
         https://bugs.webkit.org/show_bug.cgi?id=56826
 
index ab55e69..083593c 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 ba712d1..6ad43ba 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 e8d2e35..7939370 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 ac5cb05..fda153d 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 ea56134..12204ac 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 71ee2bb..685195d 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 320079f..b3ff4c1 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 4994669..a739ee9 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 ccc0b3a..80cecb3 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 2a94e0c..7a76fe7 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 d43b2de..8cdd5dc 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 ebb6f8e..3b0c358 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