Bug 21282 - Make contentsToScreen and screenToContents cross-platform
: Make contentsToScreen and screenToContents cross-platform
Status: RESOLVED FIXED
: WebKit
Platform
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
: 21083
  Show dependency treegraph
 
Reported: 2008-10-01 13:00 PST by
Modified: 2008-10-01 13:34 PST (History)


Attachments
Patch (20.24 KB, patch)
2008-10-01 13:03 PST, Dave Hyatt
no flags Review Patch | Details | Formatted Diff | Diff
Patch #2 (20.28 KB, patch)
2008-10-01 13:08 PST, Dave Hyatt
aroben: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-10-01 13:00:29 PST
Make contentsToScreen and screenToContents cross-platform
------- Comment #1 From 2008-10-01 13:03:42 PST -------
Created an attachment (id=23987) [details]
Patch
------- Comment #2 From 2008-10-01 13:08:17 PST -------
Created an attachment (id=23988) [details]
Patch #2
------- Comment #3 From 2008-10-01 13:26:49 PST -------
(From update of attachment 23988 [details])
+++ WebKit/gtk/WebCoreSupport/ChromeClientGtk.h    (working copy)
@@ -88,6 +88,8 @@ namespace WebKit {
         virtual void updateBackingStore();

         virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false);
+        virtual IntPoint screenToWindow(const IntPoint& p) const;
+        virtual IntRect windowToScreen(const IntRect& r) const;

Looks like you're missing some "WebCore::" on the types. The parameter names aren't needed here, either.

+++ WebKit/qt/WebCoreSupport/ChromeClientQt.h    (working copy)
@@ -104,7 +104,9 @@ namespace WebCore {
         virtual void updateBackingStore();

         virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false);
-
+        virtual IntPoint screenToWindow(const IntPoint& p) const;
+        virtual IntRect windowToScreen(const IntRect& r) const;

Parameter names can be omitted.

+++ WebKit/wx/WebKitSupport/ChromeClientWx.h    (working copy)
@@ -99,6 +99,8 @@ public:
     virtual void updateBackingStore();

     virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false);
+    virtual IntPoint screenToWindow(const IntPoint& p) const;
+    virtual IntRect windowToScreen(const IntRect& r) const;

Ditto.

r=me
------- Comment #4 From 2008-10-01 13:34:56 PST -------
Fixed in r37153.