Changeset 163908 in webkit
- Timestamp:
- Feb 11, 2014 1:56:24 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r163905 r163908 1 2014-02-11 Benjamin Poulain <bpoulain@apple.com> 2 3 [WK2] Rename screenToWindow to screenToRootView and windowToScreen to rootViewToScreen 4 https://bugs.webkit.org/show_bug.cgi?id=128575 5 6 Reviewed by Darin Adler. 7 8 In WebKit2, screenToRootView and rootViewToScreen were named screenToWindow and windowToScreen. 9 Those names were fine on ports were FrameView correspond to the scrollview, but they do not apply on iOS. 10 11 This patch renames screenToWindow and windowToScreen to their more generic WebCore counterpart. 12 13 * UIProcess/API/gtk/PageClientImpl.cpp: 14 (WebKit::PageClientImpl::screenToRootView): 15 (WebKit::PageClientImpl::rootViewToScreen): 16 * UIProcess/API/gtk/PageClientImpl.h: 17 * UIProcess/API/ios/PageClientImplIOS.h: 18 * UIProcess/API/ios/PageClientImplIOS.mm: 19 (WebKit::PageClientImpl::screenToRootView): 20 (WebKit::PageClientImpl::rootViewToScreen): 21 * UIProcess/API/mac/PageClientImpl.h: 22 * UIProcess/API/mac/PageClientImpl.mm: 23 (WebKit::PageClientImpl::screenToRootView): 24 (WebKit::PageClientImpl::rootViewToScreen): 25 * UIProcess/CoordinatedGraphics/WebView.cpp: 26 (WebKit::WebView::screenToRootView): 27 (WebKit::WebView::rootViewToScreen): 28 * UIProcess/CoordinatedGraphics/WebView.h: 29 * UIProcess/PageClient.h: 30 * UIProcess/WebPageProxy.cpp: 31 (WebKit::WebPageProxy::screenToRootView): 32 (WebKit::WebPageProxy::rootViewToScreen): 33 * UIProcess/WebPageProxy.h: 34 * UIProcess/WebPageProxy.messages.in: 35 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 36 (WebKit::WebChromeClient::screenToRootView): 37 (WebKit::WebChromeClient::rootViewToScreen): 38 * WebProcess/WebPage/WebPage.cpp: 39 (WebKit::WebPage::screenToRootView): 40 (WebKit::WebPage::rootViewToScreen): 41 * WebProcess/WebPage/WebPage.h: 42 * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: 43 (-[WKAccessibilityWebPageObject _convertScreenPointToRootView:]): 44 (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]): 45 1 46 2014-02-11 Andy Estes <aestes@apple.com> 2 47 -
trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp
r163749 r163908 190 190 } 191 191 192 IntPoint PageClientImpl::screenTo Window(const IntPoint& point)192 IntPoint PageClientImpl::screenToRootView(const IntPoint& point) 193 193 { 194 194 IntPoint widgetPositionOnScreen = convertWidgetPointToScreenPoint(m_viewWidget, IntPoint()); … … 198 198 } 199 199 200 IntRect PageClientImpl:: windowToScreen(const IntRect& rect)200 IntRect PageClientImpl::rootViewToScreen(const IntRect& rect) 201 201 { 202 202 return IntRect(convertWidgetPointToScreenPoint(m_viewWidget, rect.location()), rect.size()); -
trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h
r163749 r163908 85 85 virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override; 86 86 virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override; 87 virtual WebCore::IntPoint screenTo Window(const WebCore::IntPoint&) override;88 virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) override;87 virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) override; 88 virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) override; 89 89 virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override; 90 90 virtual PassRefPtr<WebPopupMenuProxy> createPopupMenuProxy(WebPageProxy*) override; -
trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h
r163515 r163908 80 80 virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override; 81 81 virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override; 82 virtual WebCore::IntPoint screenTo Window(const WebCore::IntPoint&) override;83 virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) override;82 virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) override; 83 virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) override; 84 84 virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override; 85 85 #if ENABLE(TOUCH_EVENTS) -
trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm
r163839 r163908 259 259 } 260 260 261 IntPoint PageClientImpl::screenTo Window(const IntPoint& point)261 IntPoint PageClientImpl::screenToRootView(const IntPoint& point) 262 262 { 263 263 return IntPoint([m_view convertPoint:point fromView:nil]); 264 264 } 265 265 266 IntRect PageClientImpl:: windowToScreen(const IntRect& rect)266 IntRect PageClientImpl::rootViewToScreen(const IntRect& rect) 267 267 { 268 268 return enclosingIntRect([m_view convertRect:rect toView:nil]); -
trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
r163116 r163908 98 98 virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&); 99 99 virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&); 100 virtual WebCore::IntPoint screenTo Window(const WebCore::IntPoint&);101 virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);100 virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&); 101 virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&); 102 102 103 103 virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled); -
trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
r163218 r163908 362 362 } 363 363 364 IntPoint PageClientImpl::screenTo Window(const IntPoint& point)364 IntPoint PageClientImpl::screenToRootView(const IntPoint& point) 365 365 { 366 366 #pragma clang diagnostic push … … 371 371 } 372 372 373 IntRect PageClientImpl:: windowToScreen(const IntRect& rect)373 IntRect PageClientImpl::rootViewToScreen(const IntRect& rect) 374 374 { 375 375 NSRect tempRect = rect; -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp
r163694 r163908 408 408 } 409 409 410 IntPoint WebView::screenTo Window(const IntPoint& point)410 IntPoint WebView::screenToRootView(const IntPoint& point) 411 411 { 412 412 notImplemented(); … … 414 414 } 415 415 416 IntRect WebView:: windowToScreen(const IntRect&)416 IntRect WebView::rootViewToScreen(const IntRect&) 417 417 { 418 418 notImplemented(); -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h
r163164 r163908 169 169 virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) override; 170 170 virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) override; 171 virtual WebCore::IntPoint screenTo Window(const WebCore::IntPoint&) override;172 virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) override;171 virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) override; 172 virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) override; 173 173 174 174 virtual void updateTextInputState() override; -
trunk/Source/WebKit2/UIProcess/PageClient.h
r163515 r163908 193 193 virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) = 0; 194 194 virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) = 0; 195 virtual WebCore::IntPoint screenTo Window(const WebCore::IntPoint&) = 0;196 virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) = 0;195 virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&) = 0; 196 virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) = 0; 197 197 198 198 virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) = 0; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r163863 r163908 2791 2791 } 2792 2792 2793 void WebPageProxy::screenTo Window(const IntPoint& screenPoint, IntPoint& windowPoint)2794 { 2795 windowPoint = m_pageClient.screenTo Window(screenPoint);2793 void WebPageProxy::screenToRootView(const IntPoint& screenPoint, IntPoint& windowPoint) 2794 { 2795 windowPoint = m_pageClient.screenToRootView(screenPoint); 2796 2796 } 2797 2797 2798 void WebPageProxy:: windowToScreen(const IntRect& viewRect, IntRect& result)2799 { 2800 result = m_pageClient. windowToScreen(viewRect);2798 void WebPageProxy::rootViewToScreen(const IntRect& viewRect, IntRect& result) 2799 { 2800 result = m_pageClient.rootViewToScreen(viewRect); 2801 2801 } 2802 2802 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r163863 r163908 982 982 void setWindowFrame(const WebCore::FloatRect&); 983 983 void getWindowFrame(WebCore::FloatRect&); 984 void screenTo Window(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);985 void windowToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);984 void screenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint); 985 void rootViewToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result); 986 986 void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose); 987 987 void didChangeViewportProperties(const WebCore::ViewportAttributes&); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r163863 r163908 61 61 SetWindowFrame(WebCore::FloatRect windowFrame) 62 62 GetWindowFrame() -> (WebCore::FloatRect windowFrame) 63 ScreenTo Window(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint)64 WindowToScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame)63 ScreenToRootView(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint) 64 RootViewToScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame) 65 65 RunBeforeUnloadConfirmPanel(String message, uint64_t frameID) -> (bool shouldClose) 66 66 PageDidScroll() -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r163863 r163908 473 473 IntPoint WebChromeClient::screenToRootView(const IntPoint& point) const 474 474 { 475 return m_page->screenTo Window(point);475 return m_page->screenToRootView(point); 476 476 } 477 477 478 478 IntRect WebChromeClient::rootViewToScreen(const IntRect& rect) const 479 479 { 480 return m_page-> windowToScreen(rect);480 return m_page->rootViewToScreen(rect); 481 481 } 482 482 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r163844 r163908 2164 2164 } 2165 2165 2166 IntPoint WebPage::screenTo Window(const IntPoint& point)2166 IntPoint WebPage::screenToRootView(const IntPoint& point) 2167 2167 { 2168 2168 IntPoint windowPoint; 2169 sendSync(Messages::WebPageProxy::ScreenTo Window(point), Messages::WebPageProxy::ScreenToWindow::Reply(windowPoint));2169 sendSync(Messages::WebPageProxy::ScreenToRootView(point), Messages::WebPageProxy::ScreenToRootView::Reply(windowPoint)); 2170 2170 return windowPoint; 2171 2171 } 2172 2172 2173 IntRect WebPage:: windowToScreen(const IntRect& rect)2173 IntRect WebPage::rootViewToScreen(const IntRect& rect) 2174 2174 { 2175 2175 IntRect screenRect; 2176 sendSync(Messages::WebPageProxy:: WindowToScreen(rect), Messages::WebPageProxy::WindowToScreen::Reply(screenRect));2176 sendSync(Messages::WebPageProxy::RootViewToScreen(rect), Messages::WebPageProxy::RootViewToScreen::Reply(screenRect)); 2177 2177 return screenRect; 2178 2178 } -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r163821 r163908 405 405 #endif // !PLATFORM(IOS) 406 406 407 WebCore::IntPoint screenTo Window(const WebCore::IntPoint&);408 WebCore::IntRect windowToScreen(const WebCore::IntRect&);407 WebCore::IntPoint screenToRootView(const WebCore::IntPoint&); 408 WebCore::IntRect rootViewToScreen(const WebCore::IntRect&); 409 409 410 410 PassRefPtr<WebImage> scaledSnapshotWithOptions(const WebCore::IntRect&, double scaleFactor, SnapshotOptions); -
trunk/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm
r162929 r163908 189 189 } 190 190 191 - (NSPoint)_convertScreenPointTo Window:(NSPoint)point192 { 193 return m_page->screenTo Window(IntPoint(point.x, point.y));191 - (NSPoint)_convertScreenPointToRootView:(NSPoint)point 192 { 193 return m_page->screenToRootView(IntPoint(point.x, point.y)); 194 194 } 195 195 … … 199 199 200 200 if ([parameter isKindOfClass:[NSValue class]] && strcmp([(NSValue*)parameter objCType], @encode(NSPoint)) == 0) { 201 NSPoint point = [self _convertScreenPointTo Window:[(NSValue *)parameter pointValue]];201 NSPoint point = [self _convertScreenPointToRootView:[(NSValue *)parameter pointValue]]; 202 202 pageOverlayParameter = WKPointCreate(WKPointMake(point.x, point.y)); 203 203 }
Note: See TracChangeset
for help on using the changeset viewer.