Changeset 86183 in webkit


Ignore:
Timestamp:
May 10, 2011 3:15:09 PM (13 years ago)
Author:
jeffm@apple.com
Message:

2011-05-10 Jeff Miller <jeffm@apple.com>

Reviewed by Anders Carlsson.

WebKit2: Windows clients need to know if the page overlay is installed
https://bugs.webkit.org/show_bug.cgi?id=60562
<rdar://problem/8940164>


Until we move all the UI for find on page into WebKit on Windows (specifically, drawing the find bouncy),
WebKit clients need to know whether WebKit is drawing the page overlay or not. Keep track of this in
the WebPageProxy in the UI process and provide a WebKit2 API to retrieve this information.

  • UIProcess/API/C/win/WKView.cpp: (WKViewIsPageOverlayInstalled): Added.
  • UIProcess/API/C/win/WKView.h: Added WKViewIsPageOverlayInstalled().


  • UIProcess/PageClient.h: Added didInstallOrUninstallPageOverlay().
  • UIProcess/WebPageProxy.h: Added didInstallOrUninstallPageOverlay().
  • UIProcess/WebPageProxy.messages.in: Added DidInstallOrUninstallPageOverlay.
  • UIProcess/win/WebPageProxyWin.cpp: (WebKit::WebPageProxy::didInstallOrUninstallPageOverlay): Added.


  • UIProcess/win/WebView.cpp: (WebKit::WebView::WebView): Initialize m_pageOverlayInstalled. (WebKit::WebView::didInstallOrUninstallPageOverlay): Added.
  • UIProcess/win/WebView.h: Added didInstallOrUninstallPageOverlay() and m_pageOverlayInstalled. (WebKit::WebView::pageOverlayInstalled): Added.


  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::installPageOverlay): Send message to UI process to tell it the page overlay is installed. (WebKit::WebPage::uninstallPageOverlay): Send message to UI process to tell it the page overlay is uninstalled.
Location:
trunk/Source/WebKit2
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r86175 r86183  
     12011-05-10  Jeff Miller  <jeffm@apple.com>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        WebKit2: Windows clients need to know if the page overlay is installed
     6        https://bugs.webkit.org/show_bug.cgi?id=60562
     7        <rdar://problem/8940164>
     8       
     9        Until we move all the UI for find on page into WebKit on Windows (specifically, drawing the find bouncy),
     10        WebKit clients need to know whether WebKit is drawing the page overlay or not.  Keep track of this in
     11        the WebPageProxy in the UI process and provide a WebKit2 API to retrieve this information.
     12
     13        * UIProcess/API/C/win/WKView.cpp:
     14        (WKViewIsPageOverlayInstalled): Added.
     15        * UIProcess/API/C/win/WKView.h: Added WKViewIsPageOverlayInstalled().
     16       
     17        * UIProcess/PageClient.h: Added didInstallOrUninstallPageOverlay().
     18        * UIProcess/WebPageProxy.h: Added didInstallOrUninstallPageOverlay().
     19        * UIProcess/WebPageProxy.messages.in: Added DidInstallOrUninstallPageOverlay.
     20        * UIProcess/win/WebPageProxyWin.cpp:
     21        (WebKit::WebPageProxy::didInstallOrUninstallPageOverlay): Added.
     22       
     23        * UIProcess/win/WebView.cpp:
     24        (WebKit::WebView::WebView): Initialize m_pageOverlayInstalled.
     25        (WebKit::WebView::didInstallOrUninstallPageOverlay): Added.
     26        * UIProcess/win/WebView.h: Added didInstallOrUninstallPageOverlay() and m_pageOverlayInstalled.
     27        (WebKit::WebView::pageOverlayInstalled): Added.
     28       
     29        * WebProcess/WebPage/WebPage.cpp:
     30        (WebKit::WebPage::installPageOverlay): Send message to UI process to tell it the page overlay is installed.
     31        (WebKit::WebPage::uninstallPageOverlay): Send message to UI process to tell it the page overlay is uninstalled.
     32
    1332011-05-10  Anders Carlsson  <andersca@apple.com>
    234
  • trunk/Source/WebKit2/UIProcess/API/C/win/WKView.cpp

    r85794 r86183  
    8888}
    8989
     90bool WKViewIsPageOverlayInstalled(WKViewRef viewRef)
     91{
     92    return toImpl(viewRef)->pageOverlayInstalled();
     93}
     94
    9095void WKViewSetViewUndoClient(WKViewRef viewRef, const WKViewUndoClient* wkClient)
    9196{
  • trunk/Source/WebKit2/UIProcess/API/C/win/WKView.h

    r85794 r86183  
    7979WK_EXPORT WKViewFindIndicatorCallback WKViewGetFindIndicatorCallback(WKViewRef view, void** context);
    8080
     81WK_EXPORT bool WKViewIsPageOverlayInstalled(WKViewRef view);
     82
    8183WK_EXPORT void WKViewSetDrawsTransparentBackground(WKViewRef view, bool drawsTransparentBackground);
    8284WK_EXPORT bool WKViewDrawsTransparentBackground(WKViewRef view);
  • trunk/Source/WebKit2/UIProcess/PageClient.h

    r85958 r86183  
    135135
    136136    virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut) = 0;
     137#if PLATFORM(WIN)
     138    virtual void didInstallOrUninstallPageOverlay(bool) = 0;
     139#endif
    137140
    138141#if USE(ACCELERATED_COMPOSITING)
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r85958 r86183  
    387387    void didFindString(const String&, uint32_t matchCount);
    388388    void didFailToFindString(const String&);
     389#if PLATFORM(WIN)
     390    void didInstallOrUninstallPageOverlay(bool);
     391#endif
    389392
    390393    void getContentsAsString(PassRefPtr<StringCallback>);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r85958 r86183  
    162162    DidFindString(WTF::String string, uint32_t matchCount)
    163163    DidFailToFindString(WTF::String string)
     164#if PLATFORM(WIN)
     165    DidInstallOrUninstallPageOverlay(bool didInstall)
     166#endif
    164167
    165168    # PopupMenu messages
  • trunk/Source/WebKit2/UIProcess/win/WebPageProxyWin.cpp

    r85958 r86183  
    7676}
    7777
     78void WebPageProxy::didInstallOrUninstallPageOverlay(bool didInstall)
     79{
     80    m_pageClient->didInstallOrUninstallPageOverlay(didInstall);
     81}
     82
    7883} // namespace WebKit
  • trunk/Source/WebKit2/UIProcess/win/WebView.cpp

    r85961 r86183  
    281281    , m_findIndicatorCallback(0)
    282282    , m_findIndicatorCallbackContext(0)
     283    , m_pageOverlayInstalled(false)
    283284    , m_lastPanX(0)
    284285    , m_lastPanY(0)
     
    14651466}
    14661467
     1468void WebView::didInstallOrUninstallPageOverlay(bool didInstall)
     1469{
     1470    m_pageOverlayInstalled = didInstall;
     1471}
     1472
    14671473void WebView::didCommitLoadForMainFrame(bool useCustomRepresentation)
    14681474{
  • trunk/Source/WebKit2/UIProcess/win/WebView.h

    r85958 r86183  
    8383    void setFindIndicatorCallback(WKViewFindIndicatorCallback, void*);
    8484    WKViewFindIndicatorCallback getFindIndicatorCallback(void**);
     85    bool pageOverlayInstalled() const { return m_pageOverlayInstalled; }
    8586    void initialize();
    8687   
     
    195196    virtual PassRefPtr<WebContextMenuProxy> createContextMenuProxy(WebPageProxy*);
    196197    virtual void setFindIndicator(PassRefPtr<FindIndicator>, bool fadeOut);
     198    virtual void didInstallOrUninstallPageOverlay(bool);
    197199
    198200#if USE(ACCELERATED_COMPOSITING)
     
    253255    WKViewFindIndicatorCallback m_findIndicatorCallback;
    254256    void* m_findIndicatorCallbackContext;
     257    bool m_pageOverlayInstalled;
    255258
    256259    COMPtr<IDataObject> m_dragData;
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r86103 r86183  
    814814
    815815    m_drawingArea->didInstallPageOverlay();
     816#if PLATFORM(WIN)
     817    send(Messages::WebPageProxy::DidInstallOrUninstallPageOverlay(true));
     818#endif
     819
    816820    m_pageOverlay->setNeedsDisplay();
    817821}
     
    831835
    832836    m_drawingArea->didUninstallPageOverlay();
     837#if PLATFORM(WIN)
     838    send(Messages::WebPageProxy::DidInstallOrUninstallPageOverlay(false));
     839#endif
    833840}
    834841
Note: See TracChangeset for help on using the changeset viewer.