[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 12:12:53 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e2ac64947f8efa51e74e4c5c1502f8eb44b1a231
Author: vestbo at webkit.org <vestbo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 17 11:18:41 2010 +0000

    [Qt] Implement ChromeClient's windowToScreen() and screenToWindow()
    
    Reviewed by Kenneth Christiansen.
    
    * WebCoreSupport/ChromeClientQt.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65491 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 2c964d3..a7da741 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-16  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
+
+        Reviewed by Kenneth Christiansen.
+
+        [Qt] Implement ChromeClient's windowToScreen() and screenToWindow()
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+
 2010-08-14  Adam Barth  <abarth at webkit.org>
 
         Propagate name change to Qt.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 0b77ea6..87ed19d 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -410,14 +410,31 @@ void ChromeClientQt::scroll(const IntSize& delta, const IntRect& scrollViewRect,
 
 IntRect ChromeClientQt::windowToScreen(const IntRect& rect) const
 {
-    notImplemented();
-    return rect;
+    QWebPageClient* pageClient = platformPageClient();
+    if (!pageClient)
+        return rect;
+
+    QWidget* ownerWidget = pageClient->ownerWidget();
+    if (!ownerWidget)
+       return rect;
+
+    QRect screenRect(rect);
+    screenRect.translate(ownerWidget->mapToGlobal(QPoint(0, 0)));
+
+    return screenRect;
 }
 
 IntPoint ChromeClientQt::screenToWindow(const IntPoint& point) const
 {
-    notImplemented();
-    return point;
+    QWebPageClient* pageClient = platformPageClient();
+    if (!pageClient)
+        return point;
+
+    QWidget* ownerWidget = pageClient->ownerWidget();
+    if (!ownerWidget)
+        return point;
+
+    return ownerWidget->mapFromGlobal(point);
 }
 
 PlatformPageClient ChromeClientQt::platformPageClient() const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list