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

abecsi at webkit.org abecsi at webkit.org
Wed Dec 22 14:20:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 06a32bd43e22ec6ec4efdb9b945072c8053c95c0
Author: abecsi at webkit.org <abecsi at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 6 23:00:44 2010 +0000

    2010-10-06  Balazs Kelemen  <kbalazs at webkit.org>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] PlatformWebView implementation for WebKitTestRunner
            https://bugs.webkit.org/show_bug.cgi?id=47276
    
            The implementation follows the way how
            we use the API in MiniBrowser.
            * WebKitTestRunner/PlatformWebView.h:
            * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
            (WTR::WebView::wkView):
            (WTR::WebView::~WebView):
            (WTR::WebView::WebView):
            (WTR::PlatformWebView::PlatformWebView):
            (WTR::PlatformWebView::~PlatformWebView):
            (WTR::PlatformWebView::resizeTo):
            (WTR::PlatformWebView::page):
            (WTR::PlatformWebView::focus):
            * WebKitTestRunner/qt/WebKitTestRunner.pro:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69248 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9f0f112..964b346 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,27 @@
 
         Reviewed by Kenneth Rohde Christiansen.
 
+        [Qt] PlatformWebView implementation for WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=47276
+
+        The implementation follows the way how
+        we use the API in MiniBrowser.
+        * WebKitTestRunner/PlatformWebView.h:
+        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+        (WTR::WebView::wkView):
+        (WTR::WebView::~WebView):
+        (WTR::WebView::WebView):
+        (WTR::PlatformWebView::PlatformWebView):
+        (WTR::PlatformWebView::~PlatformWebView):
+        (WTR::PlatformWebView::resizeTo):
+        (WTR::PlatformWebView::page):
+        (WTR::PlatformWebView::focus):
+        * WebKitTestRunner/qt/WebKitTestRunner.pro:
+
+2010-10-06  Balazs Kelemen  <kbalazs at webkit.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
         [Qt] Add WebKitTestRunner's build files
         https://bugs.webkit.org/show_bug.cgi?id=44155
 
diff --git a/WebKitTools/WebKitTestRunner/PlatformWebView.h b/WebKitTools/WebKitTestRunner/PlatformWebView.h
index 83c34b4..d586d1b 100644
--- a/WebKitTools/WebKitTestRunner/PlatformWebView.h
+++ b/WebKitTools/WebKitTestRunner/PlatformWebView.h
@@ -40,8 +40,12 @@ typedef NSWindow* PlatformWindow;
 typedef WKViewRef PlatformWKView;
 typedef HWND PlatformWindow;
 #elif defined(BUILDING_QT__)
-typedef void* PlatformWKView;
-typedef void* PlatformWindow;
+namespace WTR {
+class WebView;
+}
+typedef WTR::WebView* PlatformWKView;
+class QMainWindow;
+typedef QMainWindow* PlatformWindow;
 #endif
 
 namespace WTR {
diff --git a/WebKitTools/WebKitTestRunner/qt/PlatformWebViewQt.cpp b/WebKitTools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
index de9389a..4aafceb 100644
--- a/WebKitTools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
+++ b/WebKitTools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
@@ -25,33 +25,58 @@
  */
 
 #include "PlatformWebView.h"
-#include "NotImplemented.h"
+#include "qgraphicswkview.h"
+#include <QtGui>
 
 namespace WTR {
 
+class WebView : public QGraphicsView {
+public:
+    WebView(WKPageNamespaceRef);
+
+    QGraphicsWKView* wkView() const { return m_item; }
+
+    virtual ~WebView() { delete m_item; }
+
+private:
+    QGraphicsWKView* m_item;
+};
+
+WebView::WebView(WKPageNamespaceRef namespaceRef)
+    : QGraphicsView()
+    , m_item(new QGraphicsWKView(namespaceRef))
+{
+    setScene(new QGraphicsScene(this));
+    scene()->addItem(m_item);
+}
+
 PlatformWebView::PlatformWebView(WKPageNamespaceRef namespaceRef)
+    : m_view(new WebView(namespaceRef))
+    , m_window(new QMainWindow())
 {
-    notImplemented();
+    m_view->setParent(m_window);
+    m_window->setCentralWidget(m_view);
+    m_window->setGeometry(0, 0, 800, 600);
 }
 
 PlatformWebView::~PlatformWebView()
 {
+    delete m_window;
 }
 
 void PlatformWebView::resizeTo(unsigned width, unsigned height)
 {
-    notImplemented();
+    m_window->resize(width, height);
 }
 
 WKPageRef PlatformWebView::page()
 {
-    notImplemented();
-    return 0;
+    return m_view->wkView()->page()->pageRef();
 }
 
 void PlatformWebView::focus()
 {
-    notImplemented();
+    m_view->setFocus(Qt::OtherFocusReason);
 }
 
 } // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/qt/WebKitTestRunner.pro b/WebKitTools/WebKitTestRunner/qt/WebKitTestRunner.pro
index 6404b86..b1ac70e 100644
--- a/WebKitTools/WebKitTestRunner/qt/WebKitTestRunner.pro
+++ b/WebKitTools/WebKitTestRunner/qt/WebKitTestRunner.pro
@@ -19,6 +19,7 @@ INCLUDEPATH += \
     $$BASEDIR/../../JavaScriptCore \
     $$BASEDIR/../../WebKit2 \
     $$BASEDIR/../../WebKit2/Shared \
+    $$BASEDIR/../../WebKit2/UIProcess/API/qt \
 
 INCLUDEPATH += \
     $$OUTPUT_DIR/include \

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list