Bug 21282

Summary: Make contentsToScreen and screenToContents cross-platform
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: PlatformAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 21083    
Attachments:
Description Flags
Patch
none
Patch #2 aroben: review+

Description Dave Hyatt 2008-10-01 13:00:29 PDT
Make contentsToScreen and screenToContents cross-platform
Comment 1 Dave Hyatt 2008-10-01 13:03:42 PDT
Created attachment 23987 [details]
Patch
Comment 2 Dave Hyatt 2008-10-01 13:08:17 PDT
Created attachment 23988 [details]
Patch #2
Comment 3 Adam Roben (:aroben) 2008-10-01 13:26:49 PDT
Comment on attachment 23988 [details]
Patch #2

+++ 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 Dave Hyatt 2008-10-01 13:34:56 PDT
Fixed in r37153.