Changeset 80569 in webkit


Ignore:
Timestamp:
Mar 8, 2011 10:18:51 AM (13 years ago)
Author:
Chris Fleizach
Message:

AX: Webkit2 not sending UAZoomFocusChanged notifications
https://bugs.webkit.org/show_bug.cgi?id=55916

Reviewed by Darin Adler.

Needed to implement the windowToScreen() method so that the right frame
could be calculated to send for zoom focus changes.

  • UIProcess/API/mac/PageClientImpl.h:
  • UIProcess/API/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::windowToScreen):

  • UIProcess/API/qt/qwkpage.cpp:

(QWKPagePrivate::windowToScreen):

  • UIProcess/API/qt/qwkpage_p.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::windowToScreen):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/win/WebView.cpp:

(WebKit::WebView::windowToScreen):

  • UIProcess/win/WebView.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::windowToScreen):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::windowToScreen):

  • WebProcess/WebPage/WebPage.h:
Location:
trunk/Source/WebKit2
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r80568 r80569  
     12011-03-08  Chris Fleizach  <cfleizach@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        AX: Webkit2 not sending UAZoomFocusChanged notifications
     6        https://bugs.webkit.org/show_bug.cgi?id=55916
     7
     8        Needed to implement the windowToScreen() method so that the right frame
     9        could be calculated to send for zoom focus changes.
     10
     11        * UIProcess/API/mac/PageClientImpl.h:
     12        * UIProcess/API/mac/PageClientImpl.mm:
     13        (WebKit::PageClientImpl::windowToScreen):
     14        * UIProcess/API/qt/qwkpage.cpp:
     15        (QWKPagePrivate::windowToScreen):
     16        * UIProcess/API/qt/qwkpage_p.h:
     17        * UIProcess/PageClient.h:
     18        * UIProcess/WebPageProxy.cpp:
     19        (WebKit::WebPageProxy::windowToScreen):
     20        * UIProcess/WebPageProxy.h:
     21        * UIProcess/WebPageProxy.messages.in:
     22        * UIProcess/win/WebView.cpp:
     23        (WebKit::WebView::windowToScreen):
     24        * UIProcess/win/WebView.h:
     25        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
     26        (WebKit::WebChromeClient::windowToScreen):
     27        * WebProcess/WebPage/WebPage.cpp:
     28        (WebKit::WebPage::windowToScreen):
     29        * WebProcess/WebPage/WebPage.h:
     30
    1312011-03-08  John Sullivan  <sullivan@apple.com>
    232
  • trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h

    r80394 r80569  
    7575    virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
    7676    virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
    77 
     77    virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
     78   
    7879    virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled);
    7980
  • trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm

    r80394 r80569  
    304304    return [m_wkView _convertToUserSpace:rect];
    305305}
     306   
     307IntRect PageClientImpl::windowToScreen(const IntRect& rect)
     308{
     309    NSRect tempRect = rect;
     310    tempRect = [m_wkView convertRect:tempRect toView:nil];
     311    tempRect.origin = [[m_wkView window] convertBaseToScreen:tempRect.origin];
     312    return enclosingIntRect(tempRect);
     313}
    306314
    307315void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent& event, bool wasEventHandled)
  • trunk/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp

    r80394 r80569  
    219219
    220220FloatRect QWKPagePrivate::convertToDeviceSpace(const FloatRect& rect)
     221{
     222    return rect;
     223}
     224
     225IntRect QWKPagePrivate::windowToScreen(const IntRect& rect)
    221226{
    222227    return rect;
  • trunk/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h

    r80394 r80569  
    7878    virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
    7979    virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
     80    virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
     81
    8082    virtual void doneWithKeyEvent(const WebKit::NativeWebKeyboardEvent&, bool wasEventHandled);
    8183    virtual void selectionChanged(bool, bool, bool, bool);
  • trunk/Source/WebKit2/UIProcess/PageClient.h

    r80394 r80569  
    108108    virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) = 0;
    109109    virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) = 0;
    110 
     110    virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) = 0;
     111   
    111112    virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) = 0;
    112113
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r80479 r80569  
    18901890}
    18911891
     1892void WebPageProxy::windowToScreen(const IntRect& viewRect, IntRect& result)
     1893{
     1894    result = m_pageClient->windowToScreen(viewRect);
     1895}
     1896   
    18921897void WebPageProxy::runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose)
    18931898{
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r80479 r80569  
    535535    void setWindowFrame(const WebCore::FloatRect&);
    536536    void getWindowFrame(WebCore::FloatRect&);
     537    void windowToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
    537538    void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
    538539    void didChangeViewportData(const WebCore::ViewportArguments&);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r80479 r80569  
    4949    SetWindowFrame(WebCore::FloatRect windowFrame)
    5050    GetWindowFrame() -> (WebCore::FloatRect windowFrame)
     51    WindowToScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame)
    5152    RunBeforeUnloadConfirmPanel(WTF::String message, uint64_t frameID) -> (bool shouldClose)
    5253    PageDidScroll()
  • trunk/Source/WebKit2/UIProcess/win/WebView.cpp

    r80398 r80569  
    807807}
    808808
     809IntRect WebView::windowToScreen(const IntRect& rect)
     810{
     811    return rect;
     812}
     813
    809814FloatRect WebView::convertToUserSpace(const FloatRect& rect)
    810815{
  • trunk/Source/WebKit2/UIProcess/win/WebView.h

    r80394 r80569  
    152152    virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
    153153    virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
     154    virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
    154155    virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled);
    155156    virtual void compositionSelectionChanged(bool);
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r80297 r80569  
    386386}
    387387
    388 IntRect WebChromeClient::windowToScreen(const IntRect&) const
    389 {
    390     notImplemented();
    391     return IntRect();
     388IntRect WebChromeClient::windowToScreen(const IntRect& rect) const
     389{
     390    return m_page->windowToScreen(rect);
    392391}
    393392
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r80431 r80569  
    11771177    m_userAgent = userAgent;
    11781178}
     1179   
     1180IntRect WebPage::windowToScreen(const IntRect& rect)
     1181{
     1182    IntRect screenRect;
     1183    sendSync(Messages::WebPageProxy::WindowToScreen(rect), Messages::WebPageProxy::WindowToScreen::Reply(screenRect));
     1184    return screenRect;
     1185}
    11791186
    11801187IntRect WebPage::windowResizerRect() const
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r80398 r80569  
    239239    void uninstallPageOverlay(PageOverlay*);
    240240    bool hasPageOverlay() const { return m_pageOverlay; }
     241    WebCore::IntRect windowToScreen(const WebCore::IntRect&);
    241242
    242243    PassRefPtr<WebImage> snapshotInViewCoordinates(const WebCore::IntRect&, ImageOptions);
Note: See TracChangeset for help on using the changeset viewer.