Diff
Modified: trunk/Source/WebKit2/ChangeLog (163907 => 163908)
--- trunk/Source/WebKit2/ChangeLog 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/ChangeLog 2014-02-11 21:56:24 UTC (rev 163908)
@@ -1,3 +1,48 @@
+2014-02-11 Benjamin Poulain <[email protected]>
+
+ [WK2] Rename screenToWindow to screenToRootView and windowToScreen to rootViewToScreen
+ https://bugs.webkit.org/show_bug.cgi?id=128575
+
+ Reviewed by Darin Adler.
+
+ In WebKit2, screenToRootView and rootViewToScreen were named screenToWindow and windowToScreen.
+ Those names were fine on ports were FrameView correspond to the scrollview, but they do not apply on iOS.
+
+ This patch renames screenToWindow and windowToScreen to their more generic WebCore counterpart.
+
+ * UIProcess/API/gtk/PageClientImpl.cpp:
+ (WebKit::PageClientImpl::screenToRootView):
+ (WebKit::PageClientImpl::rootViewToScreen):
+ * UIProcess/API/gtk/PageClientImpl.h:
+ * UIProcess/API/ios/PageClientImplIOS.h:
+ * UIProcess/API/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::screenToRootView):
+ (WebKit::PageClientImpl::rootViewToScreen):
+ * UIProcess/API/mac/PageClientImpl.h:
+ * UIProcess/API/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::screenToRootView):
+ (WebKit::PageClientImpl::rootViewToScreen):
+ * UIProcess/CoordinatedGraphics/WebView.cpp:
+ (WebKit::WebView::screenToRootView):
+ (WebKit::WebView::rootViewToScreen):
+ * UIProcess/CoordinatedGraphics/WebView.h:
+ * UIProcess/PageClient.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::screenToRootView):
+ (WebKit::WebPageProxy::rootViewToScreen):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::screenToRootView):
+ (WebKit::WebChromeClient::rootViewToScreen):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::screenToRootView):
+ (WebKit::WebPage::rootViewToScreen):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
+ (-[WKAccessibilityWebPageObject _convertScreenPointToRootView:]):
+ (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
+
2014-02-11 Andy Estes <[email protected]>
[Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp 2014-02-11 21:56:24 UTC (rev 163908)
@@ -189,7 +189,7 @@
return viewRect;
}
-IntPoint PageClientImpl::screenToWindow(const IntPoint& point)
+IntPoint PageClientImpl::screenToRootView(const IntPoint& point)
{
IntPoint widgetPositionOnScreen = convertWidgetPointToScreenPoint(m_viewWidget, IntPoint());
IntPoint result(point);
@@ -197,7 +197,7 @@
return result;
}
-IntRect PageClientImpl::windowToScreen(const IntRect& rect)
+IntRect PageClientImpl::rootViewToScreen(const IntRect& rect)
{
return IntRect(convertWidgetPointToScreenPoint(m_viewWidget, rect.location()), rect.size());
}
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h 2014-02-11 21:56:24 UTC (rev 163908)
@@ -84,8 +84,8 @@
virtual void executeUndoRedo(WebPageProxy::UndoOrRedo) override;
virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override;
virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override;
- virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) override;
- virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) override;
+ virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) override;
+ virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) override;
virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override;
virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override;
virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*) override;
Modified: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h 2014-02-11 21:56:24 UTC (rev 163908)
@@ -79,8 +79,8 @@
virtual void makeFirstResponder() override;
virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override;
virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override;
- virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) override;
- virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) override;
+ virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) override;
+ virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) override;
virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override;
#if ENABLE(TOUCH_EVENTS)
virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) override;
Modified: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm 2014-02-11 21:56:24 UTC (rev 163908)
@@ -258,12 +258,12 @@
return FloatRect();
}
-IntPoint PageClientImpl::screenToWindow(const IntPoint& point)
+IntPoint PageClientImpl::screenToRootView(const IntPoint& point)
{
return IntPoint([m_view convertPoint:point fromView:nil]);
}
-IntRect PageClientImpl::windowToScreen(const IntRect& rect)
+IntRect PageClientImpl::rootViewToScreen(const IntRect& rect)
{
return enclosingIntRect([m_view convertRect:rect toView:nil]);
}
Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h 2014-02-11 21:56:24 UTC (rev 163908)
@@ -97,8 +97,8 @@
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 WebCore::IntPoint screenToRootView(const WebCore::IntPoint&);
+ virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&);
virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled);
Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm 2014-02-11 21:56:24 UTC (rev 163908)
@@ -361,7 +361,7 @@
return [m_wkView _convertToUserSpace:rect];
}
-IntPoint PageClientImpl::screenToWindow(const IntPoint& point)
+IntPoint PageClientImpl::screenToRootView(const IntPoint& point)
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -370,7 +370,7 @@
return IntPoint([m_wkView convertPoint:windowCoord fromView:nil]);
}
-IntRect PageClientImpl::windowToScreen(const IntRect& rect)
+IntRect PageClientImpl::rootViewToScreen(const IntRect& rect)
{
NSRect tempRect = rect;
tempRect = [m_wkView convertRect:tempRect toView:nil];
Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp 2014-02-11 21:56:24 UTC (rev 163908)
@@ -407,13 +407,13 @@
m_undoController.executeUndoRedo(undoOrRedo);
}
-IntPoint WebView::screenToWindow(const IntPoint& point)
+IntPoint WebView::screenToRootView(const IntPoint& point)
{
notImplemented();
return point;
}
-IntRect WebView::windowToScreen(const IntRect&)
+IntRect WebView::rootViewToScreen(const IntRect&)
{
notImplemented();
return IntRect();
Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h 2014-02-11 21:56:24 UTC (rev 163908)
@@ -168,8 +168,8 @@
virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override;
virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override;
- virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) override;
- virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) override;
+ virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) override;
+ virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) override;
virtual void updateTextInputState() override;
Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/PageClient.h 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h 2014-02-11 21:56:24 UTC (rev 163908)
@@ -192,8 +192,8 @@
#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 WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) = 0;
+ virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) = 0;
virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) = 0;
#if ENABLE(TOUCH_EVENTS)
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2014-02-11 21:56:24 UTC (rev 163908)
@@ -2790,14 +2790,14 @@
newWindowFrame = m_pageClient.convertToUserSpace(m_uiClient->windowFrame(this));
}
-void WebPageProxy::screenToWindow(const IntPoint& screenPoint, IntPoint& windowPoint)
+void WebPageProxy::screenToRootView(const IntPoint& screenPoint, IntPoint& windowPoint)
{
- windowPoint = m_pageClient.screenToWindow(screenPoint);
+ windowPoint = m_pageClient.screenToRootView(screenPoint);
}
-void WebPageProxy::windowToScreen(const IntRect& viewRect, IntRect& result)
+void WebPageProxy::rootViewToScreen(const IntRect& viewRect, IntRect& result)
{
- result = m_pageClient.windowToScreen(viewRect);
+ result = m_pageClient.rootViewToScreen(viewRect);
}
void WebPageProxy::runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose)
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2014-02-11 21:56:24 UTC (rev 163908)
@@ -981,8 +981,8 @@
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 screenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
+ void rootViewToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
void didChangeViewportProperties(const WebCore::ViewportAttributes&);
void pageDidScroll();
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (163907 => 163908)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2014-02-11 21:56:24 UTC (rev 163908)
@@ -60,8 +60,8 @@
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)
+ ScreenToRootView(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint)
+ RootViewToScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame)
RunBeforeUnloadConfirmPanel(String message, uint64_t frameID) -> (bool shouldClose)
PageDidScroll()
RunOpenPanel(uint64_t frameID, WebCore::FileChooserSettings parameters)
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (163907 => 163908)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2014-02-11 21:56:24 UTC (rev 163908)
@@ -472,12 +472,12 @@
IntPoint WebChromeClient::screenToRootView(const IntPoint& point) const
{
- return m_page->screenToWindow(point);
+ return m_page->screenToRootView(point);
}
IntRect WebChromeClient::rootViewToScreen(const IntRect& rect) const
{
- return m_page->windowToScreen(rect);
+ return m_page->rootViewToScreen(rect);
}
PlatformPageClient WebChromeClient::platformPageClient() const
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (163907 => 163908)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-02-11 21:56:24 UTC (rev 163908)
@@ -2163,17 +2163,17 @@
m_page->resumeActiveDOMObjectsAndAnimations();
}
-IntPoint WebPage::screenToWindow(const IntPoint& point)
+IntPoint WebPage::screenToRootView(const IntPoint& point)
{
IntPoint windowPoint;
- sendSync(Messages::WebPageProxy::ScreenToWindow(point), Messages::WebPageProxy::ScreenToWindow::Reply(windowPoint));
+ sendSync(Messages::WebPageProxy::ScreenToRootView(point), Messages::WebPageProxy::ScreenToRootView::Reply(windowPoint));
return windowPoint;
}
-IntRect WebPage::windowToScreen(const IntRect& rect)
+IntRect WebPage::rootViewToScreen(const IntRect& rect)
{
IntRect screenRect;
- sendSync(Messages::WebPageProxy::WindowToScreen(rect), Messages::WebPageProxy::WindowToScreen::Reply(screenRect));
+ sendSync(Messages::WebPageProxy::RootViewToScreen(rect), Messages::WebPageProxy::RootViewToScreen::Reply(screenRect));
return screenRect;
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (163907 => 163908)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2014-02-11 21:56:24 UTC (rev 163908)
@@ -404,8 +404,8 @@
void showPageBanners();
#endif // !PLATFORM(IOS)
- WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
- WebCore::IntRect windowToScreen(const WebCore::IntRect&);
+ WebCore::IntPoint screenToRootView(const WebCore::IntPoint&);
+ WebCore::IntRect rootViewToScreen(const WebCore::IntRect&);
PassRefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double scaleFactor, SnapshotOptions);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm (163907 => 163908)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm 2014-02-11 21:50:21 UTC (rev 163907)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm 2014-02-11 21:56:24 UTC (rev 163908)
@@ -188,9 +188,9 @@
return nil;
}
-- (NSPoint)_convertScreenPointToWindow:(NSPoint)point
+- (NSPoint)_convertScreenPointToRootView:(NSPoint)point
{
- return m_page->screenToWindow(IntPoint(point.x, point.y));
+ return m_page->screenToRootView(IntPoint(point.x, point.y));
}
- (id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter
@@ -198,7 +198,7 @@
WKRetainPtr<WKTypeRef> pageOverlayParameter = 0;
if ([parameter isKindOfClass:[NSValue class]] && strcmp([(NSValue*)parameter objCType], @encode(NSPoint)) == 0) {
- NSPoint point = [self _convertScreenPointToWindow:[(NSValue *)parameter pointValue]];
+ NSPoint point = [self _convertScreenPointToRootView:[(NSValue *)parameter pointValue]];
pageOverlayParameter = WKPointCreate(WKPointMake(point.x, point.y));
}