Bug 62626 - [GTK] Rename convertWidgetRectToScreenRect() to convertWidgetPointToScreenPoint()
Summary: [GTK] Rename convertWidgetRectToScreenRect() to convertWidgetPointToScreenPoi...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 62627
  Show dependency treegraph
Reported: 2011-06-14 02:13 PDT by Carlos Garcia Campos
Modified: 2011-06-14 07:58 PDT (History)
2 users (show)

See Also:

Patch (14.41 KB, patch)
2011-06-14 02:24 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-06-14 02:13:57 PDT
This method actually translates coordinates, the rect size is never modified, so it should be renamed to convertWidgetPointToScreenPoint() and modified to return a point instead of a rectangle. I've also noticed that this functionality is duplicated in several places, so this method should be used instead. There's also a bug in the implementation, it translates the rectangle coordinates with gtk_widget_translate_coordinates(), and it moves the original rectangle using the translated coordinates as an offset instead of as final location, so the method is returning the wrong coordinates when the given rectangle is not at 0,0 (in ChromeClient::screenToWindow() the rect is always at 0,0 so I guess that's why we haven't noticed the bug before)
Comment 1 Carlos Garcia Campos 2011-06-14 02:24:15 PDT
Created attachment 97089 [details]
Comment 2 Martin Robinson 2011-06-14 07:53:34 PDT
Comment on attachment 97089 [details]

Comment 3 Carlos Garcia Campos 2011-06-14 07:58:47 PDT
Committed r88802: <http://trac.webkit.org/changeset/88802>