WebView::windowToScreen was added to PageClientImpl in r80569.
Created attachment 85080 [details] Patch
Created attachment 85222 [details] Patch using duplicating calculating from WebKit1
Comment on attachment 85222 [details] Patch using duplicating calculating from WebKit1 View in context: https://bugs.webkit.org/attachment.cgi?id=85222&action=review > Source/WebKit2/UIProcess/gtk/WebView.cpp:243 > + GtkWidget* toplevel = gtk_widget_get_toplevel(m_viewWidget); > + if (!toplevel || !gtk_widget_is_toplevel(toplevel) || !GTK_IS_WINDOW(toplevel)) > + return rect; > + > + int xInWindow, yInWindow; > + gtk_widget_translate_coordinates(m_viewWidget, toplevel, rect.x(), rect.y(), &xInWindow, &yInWindow); > + int windowOriginX, windowOriginY; > + gdk_window_get_origin(gtk_widget_get_window(toplevel), &windowOriginX, &windowOriginY); > + > + IntRect rectInScreenCoordinates(rect); > + rectInScreenCoordinates.move(windowOriginX + xInWindow, windowOriginY + yInWindow); > + return rectInScreenCoordinates; hmm, isn't all this the same than simply calling gdk_window_get_origin(gtk_widget_get_window(m_viewWidget), &x, &y); ?
(In reply to comment #3) > hmm, isn't all this the same than simply calling gdk_window_get_origin(gtk_widget_get_window(m_viewWidget), &x, &y); ? Carlos and I talked about this before and I explained how a more complex implementation is likely necessary because widgets can share GdkWindows.
Comment on attachment 85222 [details] Patch using duplicating calculating from WebKit1 IIRC this is very similar to the code in WebKit1? Wasn't the plan to move it into WebCore somehow and share it? r- for now!
Created attachment 92009 [details] Patch
Comment on attachment 92009 [details] Patch Alright.
Comment on attachment 92009 [details] Patch Clearing flags on attachment: 92009 Committed r85987: <http://trac.webkit.org/changeset/85987>
All reviewed patches have been landed. Closing bug.