Title: [92915] branches/safari-534.51-branch/Source/WebKit2

Diff

Modified: branches/safari-534.51-branch/Source/WebKit2/ChangeLog (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/ChangeLog	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/ChangeLog	2011-08-12 04:32:15 UTC (rev 92915)
@@ -1,3 +1,39 @@
+2011-08-11  Lucas Forschler  <[email protected]>
+
+    Merged 88669
+
+    2011-06-13  Chris Fleizach  <[email protected]>
+
+            Reviewed by Darin Adler.
+
+            kAXTextMarkerForPositionParametrizedAttribute does not work correctly in WK2
+            https://bugs.webkit.org/show_bug.cgi?id=62547
+
+            Implement the missing screenToWindow method for WK2.
+
+            * UIProcess/API/gtk/PageClientImpl.cpp:
+            (WebKit::PageClientImpl::screenToWindow):
+            * UIProcess/API/gtk/PageClientImpl.h:
+            * UIProcess/API/mac/PageClientImpl.h:
+            * UIProcess/API/mac/PageClientImpl.mm:
+            (WebKit::PageClientImpl::screenToWindow):
+            * UIProcess/API/qt/qwkpage.cpp:
+            (QWKPagePrivate::screenToWindow):
+            * UIProcess/API/qt/qwkpage_p.h:
+            * UIProcess/PageClient.h:
+            * UIProcess/WebPageProxy.cpp:
+            (WebKit::WebPageProxy::screenToWindow):
+            * UIProcess/WebPageProxy.h:
+            * UIProcess/WebPageProxy.messages.in:
+            * UIProcess/win/WebView.cpp:
+            (WebKit::WebView::screenToWindow):
+            * UIProcess/win/WebView.h:
+            * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+            (WebKit::WebChromeClient::screenToWindow):
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::screenToWindow):
+            * WebProcess/WebPage/WebPage.h:
+
 2011-08-09  Gavin Barraclough  <[email protected]>
 
         Reviewed by nobody.

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2011-08-12 04:32:15 UTC (rev 92915)
@@ -184,6 +184,12 @@
     return viewRect;
 }
 
+IntPoint PageClientImpl::screenToWindow(const IntPoint& point)
+{
+    notImplemented();
+    return point;
+}
+
 IntRect PageClientImpl::windowToScreen(const IntRect& rect)
 {
     return convertWidgetRectToScreenRect(m_viewWidget, rect);

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2011-08-12 04:32:15 UTC (rev 92915)
@@ -75,6 +75,7 @@
     virtual void executeUndoRedo(WebPageProxy::UndoOrRedo);
     virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
     virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
+    virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
     virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
     virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled);
     virtual void didNotHandleKeyEvent(const NativeWebKeyboardEvent&);

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h	2011-08-12 04:32:15 UTC (rev 92915)
@@ -79,6 +79,7 @@
 
     virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
     virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
+    virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
     virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
     
     virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled);

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm	2011-08-12 04:32:15 UTC (rev 92915)
@@ -278,6 +278,12 @@
 {
     return [m_wkView _convertToUserSpace:rect];
 }
+   
+IntPoint PageClientImpl::screenToWindow(const IntPoint& point)
+{
+    NSPoint windowCoord = [[m_wkView window] convertScreenToBase:point];
+    return IntPoint([m_wkView convertPoint:windowCoord fromView:nil]);
+}
     
 IntRect PageClientImpl::windowToScreen(const IntRect& rect)
 {

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp	2011-08-12 04:32:15 UTC (rev 92915)
@@ -231,6 +231,11 @@
     return rect;
 }
 
+IntPoint QWKPagePrivate::screenToWindow(const IntPoint& point)
+{
+    return point;
+}
+
 IntRect QWKPagePrivate::windowToScreen(const IntRect& rect)
 {
     return rect;

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h	2011-08-12 04:32:15 UTC (rev 92915)
@@ -78,6 +78,7 @@
     virtual void executeUndoRedo(WebPageProxy::UndoOrRedo);
     virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
     virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
+    virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
     virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
 
     virtual void doneWithKeyEvent(const WebKit::NativeWebKeyboardEvent&, bool wasEventHandled);

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/PageClient.h (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/PageClient.h	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/PageClient.h	2011-08-12 04:32:15 UTC (rev 92915)
@@ -127,6 +127,7 @@
 #endif
     virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) = 0;
     virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) = 0;
+    virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) = 0;
     virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) = 0;
     
     virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) = 0;

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2011-08-12 04:32:15 UTC (rev 92915)
@@ -2053,7 +2053,12 @@
 {
     newWindowFrame = m_pageClient->convertToUserSpace(m_uiClient.windowFrame(this));
 }
-
+    
+void WebPageProxy::screenToWindow(const IntPoint& screenPoint, IntPoint& windowPoint)
+{
+    windowPoint = m_pageClient->screenToWindow(screenPoint);
+}
+    
 void WebPageProxy::windowToScreen(const IntRect& viewRect, IntRect& result)
 {
     result = m_pageClient->windowToScreen(viewRect);

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/WebPageProxy.h (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/WebPageProxy.h	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/WebPageProxy.h	2011-08-12 04:32:15 UTC (rev 92915)
@@ -607,6 +607,7 @@
     void getIsResizable(bool& isResizable);
     void setWindowFrame(const WebCore::FloatRect&);
     void getWindowFrame(WebCore::FloatRect&);
+    void screenToWindow(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
     void windowToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
     void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
     void didChangeViewportData(const WebCore::ViewportArguments&);

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2011-08-12 04:32:15 UTC (rev 92915)
@@ -52,6 +52,7 @@
     GetIsResizable() -> (bool isResizable)
     SetWindowFrame(WebCore::FloatRect windowFrame)
     GetWindowFrame() -> (WebCore::FloatRect windowFrame)
+    ScreenToWindow(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint)
     WindowToScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame)
     RunBeforeUnloadConfirmPanel(WTF::String message, uint64_t frameID) -> (bool shouldClose)
     PageDidScroll()

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/win/WebView.cpp (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/win/WebView.cpp	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/win/WebView.cpp	2011-08-12 04:32:15 UTC (rev 92915)
@@ -1147,6 +1147,11 @@
     return rect;
 }
 
+IntPoint WebView::screenToWindow(const IntPoint& point)
+{
+    return point;
+}
+
 IntRect WebView::windowToScreen(const IntRect& rect)
 {
     return rect;

Modified: branches/safari-534.51-branch/Source/WebKit2/UIProcess/win/WebView.h (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/UIProcess/win/WebView.h	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/UIProcess/win/WebView.h	2011-08-12 04:32:15 UTC (rev 92915)
@@ -192,6 +192,7 @@
     virtual void executeUndoRedo(WebPageProxy::UndoOrRedo);
     virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
     virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
+    virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
     virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
     virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled);
     virtual void compositionSelectionChanged(bool);

Modified: branches/safari-534.51-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2011-08-12 04:32:15 UTC (rev 92915)
@@ -407,10 +407,9 @@
 }
 #endif
 
-IntPoint WebChromeClient::screenToWindow(const IntPoint&) const
+IntPoint WebChromeClient::screenToWindow(const IntPoint& point) const
 {
-    notImplemented();
-    return IntPoint();
+    return m_page->screenToWindow(point);
 }
 
 IntRect WebChromeClient::windowToScreen(const IntRect& rect) const

Modified: branches/safari-534.51-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-08-12 04:32:15 UTC (rev 92915)
@@ -1351,6 +1351,13 @@
 {
     m_userAgent = userAgent;
 }
+  
+IntPoint WebPage::screenToWindow(const IntPoint& point)
+{
+    IntPoint windowPoint;
+    sendSync(Messages::WebPageProxy::ScreenToWindow(point), Messages::WebPageProxy::ScreenToWindow::Reply(windowPoint));
+    return windowPoint;
+}
     
 IntRect WebPage::windowToScreen(const IntRect& rect)
 {

Modified: branches/safari-534.51-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (92914 => 92915)


--- branches/safari-534.51-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h	2011-08-12 04:16:55 UTC (rev 92914)
+++ branches/safari-534.51-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h	2011-08-12 04:32:15 UTC (rev 92915)
@@ -266,6 +266,7 @@
     void installPageOverlay(PassRefPtr<PageOverlay>);
     void uninstallPageOverlay(PageOverlay*, bool fadeOut);
     bool hasPageOverlay() const { return m_pageOverlay; }
+    WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
     WebCore::IntRect windowToScreen(const WebCore::IntRect&);
 
     PassRefPtr<WebImage> snapshotInViewCoordinates(const WebCore::IntRect&, ImageOptions);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to