[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

vestbo at webkit.org vestbo at webkit.org
Wed Dec 22 13:40:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e5cb716dae8673d749a64e4236c69e0af90555b3
Author: vestbo at webkit.org <vestbo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 23 10:53:58 2010 +0000

    2010-09-23  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
    
            Reviewed by Simon Hausmann.
    
            [Qt] Refactor QtWebKitPlatformPlugin interface
    
            Make it easier to keep source-compability for the
            QtWebKitPlatformPlugin interface, and run qmake
            on the example (but not build) for convenience.
    
            https://bugs.webkit.org/show_bug.cgi?id=46345
    
            * Api/qwebkitplatformplugin.h:
            * WebCoreSupport/QtPlatformPlugin.cpp:
            * examples/platformplugin/README:
            * examples/platformplugin/WebPlugin.cpp:
            * examples/platformplugin/WebPlugin.h:
            * examples/platformplugin/qwebkitplatformplugin.h:
    2010-09-23  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
    
            Reviewed by Simon Hausmann.
    
            [Qt] Refactor QtWebKitPlatformPlugin interface
    
            Make it easier to keep source-compability for the
            QtWebKitPlatformPlugin interface, and run qmake
            on the example (but not build) for convenience.
    
            https://bugs.webkit.org/show_bug.cgi?id=46345
    
            * Scripts/webkitdirs.pm:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68128 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/Api/qwebkitplatformplugin.h b/WebKit/qt/Api/qwebkitplatformplugin.h
index 76496c5..faa6989 100644
--- a/WebKit/qt/Api/qwebkitplatformplugin.h
+++ b/WebKit/qt/Api/qwebkitplatformplugin.h
@@ -110,12 +110,9 @@ public:
     };
 
     virtual bool supportsExtension(Extension extension) const = 0;
-    virtual QWebSelectMethod* createSelectInputMethod() const = 0;
-    virtual QWebNotificationPresenter* createNotificationPresenter() const = 0;
-    virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const = 0;
-
+    virtual QObject* createExtension(Extension extension) const = 0;
 };
 
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.4");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.5");
 
 #endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index a92b73c..06aa1e4 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-23  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Refactor QtWebKitPlatformPlugin interface
+
+        Make it easier to keep source-compability for the 
+        QtWebKitPlatformPlugin interface, and run qmake
+        on the example (but not build) for convenience.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46345
+
+        * Api/qwebkitplatformplugin.h:
+        * WebCoreSupport/QtPlatformPlugin.cpp:
+        * examples/platformplugin/README:
+        * examples/platformplugin/WebPlugin.cpp:
+        * examples/platformplugin/WebPlugin.h:
+        * examples/platformplugin/qwebkitplatformplugin.h:
+
 2010-09-22  Andras Becsi  <abecsi at webkit.org>
 
         Speculative build fix for the Qt Windows bots.
diff --git a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
index fd86e91..6dd91a1 100644
--- a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
+++ b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
@@ -91,16 +91,14 @@ QWebKitPlatformPlugin* QtPlatformPlugin::plugin()
 QWebSelectMethod* QtPlatformPlugin::createSelectInputMethod()
 {
     QWebKitPlatformPlugin* p = plugin();
-    return p ? p->createSelectInputMethod() : 0;
+    return p ? qobject_cast<QWebSelectMethod*>(p->createExtension(QWebKitPlatformPlugin::MultipleSelections)) : 0;
 }
 
 
 QWebNotificationPresenter* QtPlatformPlugin::createNotificationPresenter()
 {
     QWebKitPlatformPlugin* p = plugin();
-    if (!p)
-        return 0;
-    return p->createNotificationPresenter();
+    return p ? qobject_cast<QWebNotificationPresenter*>(p->createExtension(QWebKitPlatformPlugin::Notifications)) : 0;
 }
 
 }
diff --git a/WebKit/qt/examples/platformplugin/README b/WebKit/qt/examples/platformplugin/README
index 47ef797..e220d04 100644
--- a/WebKit/qt/examples/platformplugin/README
+++ b/WebKit/qt/examples/platformplugin/README
@@ -6,6 +6,9 @@ that will provide combo boxes popups to QtWebKit.
 QtWebKit will look for the plugins automatically so there is no need to make any other configuration to
 put the plugin into use. To stop using the plugin just remove the directory $$[QT_INSTALL_PLUGINS]/webkit.
 
+A copy of qwebkitplatformplugin.h is provided with the example, as platform plugins should not depend
+on the precense of QtWebKit to build.
+
 This plugin can provide popups for <select multiple> elements but to use this feature QtWebKit must be
 compiled with NO_LISTBOX_RENDERING enabled.
 
diff --git a/WebKit/qt/examples/platformplugin/WebPlugin.cpp b/WebKit/qt/examples/platformplugin/WebPlugin.cpp
index c3efb80..23b938e 100644
--- a/WebKit/qt/examples/platformplugin/WebPlugin.cpp
+++ b/WebKit/qt/examples/platformplugin/WebPlugin.cpp
@@ -210,15 +210,30 @@ MultipleSelectionPopup::MultipleSelectionPopup(const QWebSelectData& data)
 
 bool WebPlugin::supportsExtension(Extension extension) const
 {
-    if (extension == MultipleSelections)
+    switch (extension) {
+    case MultipleSelections:
         return true;
-    if (extension == Notifications)
 #if ENABLE_NOTIFICATIONS
+    case Notifications:
         return true;
-#else
+#endif
+    default:
         return false;
+    }
+}
+
+QObject* WebPlugin::createExtension(Extension extension) const
+{
+    switch (extension) {
+    case MultipleSelections:
+        return new WebPopup();
+#if ENABLE_NOTIFICATIONS
+    case Notifications:
+        return new WebNotificationPresenter();
 #endif
-    return false;
+    default:
+        return 0;
+    }
 }
 
 Q_EXPORT_PLUGIN2(platformplugin, WebPlugin)
diff --git a/WebKit/qt/examples/platformplugin/WebPlugin.h b/WebKit/qt/examples/platformplugin/WebPlugin.h
index 4af19f9..3df345f 100644
--- a/WebKit/qt/examples/platformplugin/WebPlugin.h
+++ b/WebKit/qt/examples/platformplugin/WebPlugin.h
@@ -87,14 +87,8 @@ class WebPlugin : public QObject, public QWebKitPlatformPlugin
     Q_OBJECT
     Q_INTERFACES(QWebKitPlatformPlugin)
 public:
-    virtual QWebSelectMethod* createSelectInputMethod() const { return new WebPopup(); }
     virtual bool supportsExtension(Extension extension) const;
-    virtual QWebNotificationPresenter* createNotificationPresenter() const {
-        return new WebNotificationPresenter();
-    }
-    virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const {
-        return 0;
-    }
+    virtual QObject* createExtension(Extension extension) const;
 };
 
 #endif // WEBPLUGIN_H
diff --git a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
index 76496c5..faa6989 100644
--- a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
+++ b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
@@ -110,12 +110,9 @@ public:
     };
 
     virtual bool supportsExtension(Extension extension) const = 0;
-    virtual QWebSelectMethod* createSelectInputMethod() const = 0;
-    virtual QWebNotificationPresenter* createNotificationPresenter() const = 0;
-    virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const = 0;
-
+    virtual QObject* createExtension(Extension extension) const = 0;
 };
 
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.4");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.5");
 
 #endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 7cfda0c..9b59d17 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-23  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Refactor QtWebKitPlatformPlugin interface
+
+        Make it easier to keep source-compability for the
+        QtWebKitPlatformPlugin interface, and run qmake
+        on the example (but not build) for convenience. 
+
+        https://bugs.webkit.org/show_bug.cgi?id=46345
+
+        * Scripts/webkitdirs.pm:
+
 2010-09-23  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index 40a1633..08e14ab 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -1546,7 +1546,6 @@ sub buildQMakeProject($@)
         }
     }
 
-    push @buildArgs, sourceDir() . "/WebKit.pro";
     if ($config =~ m/debug/i) {
         push @buildArgs, "CONFIG-=release";
         push @buildArgs, "CONFIG+=debug";
@@ -1561,6 +1560,8 @@ sub buildQMakeProject($@)
         }
     }
 
+    push @buildArgs, sourceDir() . "/WebKit.pro";
+
     print "Calling '$qmakebin @buildArgs' in " . $dir . "\n\n";
     print "Installation headers directory: $installHeaders\n" if(defined($installHeaders));
     print "Installation libraries directory: $installLibs\n" if(defined($installLibs));
@@ -1570,6 +1571,16 @@ sub buildQMakeProject($@)
        die "Failed to setup build environment using $qmakebin!\n";
     }
 
+    # Manually create makefiles for the examples so we don't build by default
+    my $examplesDir = $dir . "/WebKit/qt/examples";
+    File::Path::mkpath($examplesDir);
+    $buildArgs[-1] = sourceDir() . "/WebKit/qt/examples/examples.pro";
+    chdir $examplesDir or die;
+    print "Calling '$qmakebin @buildArgs' in " . $examplesDir . "\n\n";
+    $result = system "$qmakebin @buildArgs";
+    die "Failed to create makefiles for the examples!\n" if $result ne 0;
+    chdir $dir or die;
+
     if ($clean) {
       print "Calling '$make $makeargs distclean' in " . $dir . "\n\n";
       $result = system "$make $makeargs distclean";

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list