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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 15:27:59 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2ac6640c0dc50ed6b7be7fd11d30457417d4566a
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 4 03:55:33 2010 +0000

    2010-11-03  Andre Pedralho  <andre.pedralho at gmail.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Using the Platform Plugin to define the default values for the padding of HitTestResult.
            https://bugs.webkit.org/show_bug.cgi?id=48450
    
            * Api/qwebkitplatformplugin.h:
            (QWebTouchModifier::~QWebTouchModifier):
            * WebCoreSupport/QtPlatformPlugin.cpp:
            (WebCore::QtPlatformPlugin::createTouchModifier):
            * WebCoreSupport/QtPlatformPlugin.h:
            * examples/platformplugin/WebPlugin.cpp:
            (WebPlugin::supportsExtension):
            (WebPlugin::createExtension):
            * examples/platformplugin/WebPlugin.h:
            (TouchModifier::hitTestPaddingForTouch):
            * examples/platformplugin/qwebkitplatformplugin.h:
            (QWebTouchModifier::~QWebTouchModifier):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71303 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/Api/qwebkitplatformplugin.h b/WebKit/qt/Api/qwebkitplatformplugin.h
index a851d56..2ceaac1 100644
--- a/WebKit/qt/Api/qwebkitplatformplugin.h
+++ b/WebKit/qt/Api/qwebkitplatformplugin.h
@@ -102,6 +102,19 @@ public:
     virtual void playHapticFeedback(const HapticEvent, const QString& hapticType, const HapticStrength) = 0;
 };
 
+class QWebTouchModifier : public QObject
+{
+    Q_OBJECT
+public:
+    virtual ~QWebTouchModifier() {}
+
+    enum PaddingDirection {
+        Up, Right, Down, Left
+    };
+
+    virtual unsigned hitTestPaddingForTouch(const PaddingDirection) const = 0;
+};
+
 class QWebKitPlatformPlugin
 {
 public:
@@ -110,13 +123,14 @@ public:
     enum Extension {
         MultipleSelections,
         Notifications,
-        Haptics
+        Haptics,
+        TouchInteraction
     };
 
     virtual bool supportsExtension(Extension extension) const = 0;
     virtual QObject* createExtension(Extension extension) const = 0;
 };
 
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.5");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.6");
 
 #endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 6ba203c..94bebfe 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,23 @@
+2010-11-03  Andre Pedralho  <andre.pedralho at gmail.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Using the Platform Plugin to define the default values for the padding of HitTestResult.
+        https://bugs.webkit.org/show_bug.cgi?id=48450
+
+        * Api/qwebkitplatformplugin.h:
+        (QWebTouchModifier::~QWebTouchModifier):
+        * WebCoreSupport/QtPlatformPlugin.cpp:
+        (WebCore::QtPlatformPlugin::createTouchModifier):
+        * WebCoreSupport/QtPlatformPlugin.h:
+        * examples/platformplugin/WebPlugin.cpp:
+        (WebPlugin::supportsExtension):
+        (WebPlugin::createExtension):
+        * examples/platformplugin/WebPlugin.h:
+        (TouchModifier::hitTestPaddingForTouch):
+        * examples/platformplugin/qwebkitplatformplugin.h:
+        (QWebTouchModifier::~QWebTouchModifier):
+
 2010-11-03  Andreas Kling  <kling at webkit.org>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
index 9786967..ede8a73 100644
--- a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
+++ b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
@@ -107,4 +107,10 @@ QWebHapticFeedbackPlayer* QtPlatformPlugin::createHapticFeedbackPlayer()
     return p ? static_cast<QWebHapticFeedbackPlayer*>(p->createExtension(QWebKitPlatformPlugin::Haptics)) : 0;
 }
 
+QWebTouchModifier* QtPlatformPlugin::createTouchModifier()
+{
+    QWebKitPlatformPlugin* p = plugin();
+    return p ? static_cast<QWebTouchModifier*>(p->createExtension(QWebKitPlatformPlugin::TouchInteraction)) : 0;
+}
+
 }
diff --git a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
index a3e50c2..ef14a1f 100644
--- a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
+++ b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
@@ -28,6 +28,7 @@ class QWebKitPlatformPlugin;
 class QWebNotificationPresenter;
 class QWebHapticFeedbackPlayer;
 class QWebSelectData;
+class QWebTouchModifier;
 
 namespace WebCore {
 
@@ -39,6 +40,7 @@ public:
     QWebSelectMethod* createSelectInputMethod();
     QWebNotificationPresenter* createNotificationPresenter();
     QWebHapticFeedbackPlayer* createHapticFeedbackPlayer();
+    QWebTouchModifier* createTouchModifier();
 
     QWebKitPlatformPlugin* plugin();
 
diff --git a/WebKit/qt/examples/platformplugin/WebPlugin.cpp b/WebKit/qt/examples/platformplugin/WebPlugin.cpp
index 23b938e..d029b73 100644
--- a/WebKit/qt/examples/platformplugin/WebPlugin.cpp
+++ b/WebKit/qt/examples/platformplugin/WebPlugin.cpp
@@ -217,6 +217,8 @@ bool WebPlugin::supportsExtension(Extension extension) const
     case Notifications:
         return true;
 #endif
+    case TouchInteraction:
+        return true;
     default:
         return false;
     }
@@ -231,6 +233,8 @@ QObject* WebPlugin::createExtension(Extension extension) const
     case Notifications:
         return new WebNotificationPresenter();
 #endif
+    case TouchInteraction:
+        return new TouchModifier();
     default:
         return 0;
     }
diff --git a/WebKit/qt/examples/platformplugin/WebPlugin.h b/WebKit/qt/examples/platformplugin/WebPlugin.h
index 3df345f..0243f57 100644
--- a/WebKit/qt/examples/platformplugin/WebPlugin.h
+++ b/WebKit/qt/examples/platformplugin/WebPlugin.h
@@ -82,6 +82,18 @@ private:
     Popup* createMultipleSelectionPopup(const QWebSelectData& data);
 };
 
+class TouchModifier : public QWebTouchModifier
+{
+    Q_OBJECT
+public:
+    unsigned hitTestPaddingForTouch(const PaddingDirection direction) const {
+        // Use 10 as padding in each direction but Up.
+        if (direction == QWebTouchModifier::Up)
+            return 15;
+        return 10;
+    }
+};
+
 class WebPlugin : public QObject, public QWebKitPlatformPlugin
 {
     Q_OBJECT
diff --git a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
index faa6989..f38a8fb 100644
--- a/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
+++ b/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
@@ -98,6 +98,19 @@ public:
     virtual void playHapticFeedback(const HapticEvent, const QString& hapticType, const HapticStrength) = 0;
 };
 
+class QWebTouchModifier : public QObject
+{
+    Q_OBJECT
+public:
+    virtual ~QWebTouchModifier() {}
+
+    enum PaddingDirection {
+        Up, Right, Down, Left
+    };
+
+    virtual unsigned hitTestPaddingForTouch(const PaddingDirection) const = 0;
+};
+
 class QWebKitPlatformPlugin
 {
 public:
@@ -106,13 +119,14 @@ public:
     enum Extension {
         MultipleSelections,
         Notifications,
-        Haptics
+        Haptics,
+        TouchInteraction
     };
 
     virtual bool supportsExtension(Extension extension) const = 0;
     virtual QObject* createExtension(Extension extension) const = 0;
 };
 
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.5");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.6");
 
 #endif // QWEBKITPLATFORMPLUGIN_H

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list