Changeset 70564 in webkit


Ignore:
Timestamp:
Oct 26, 2010 1:28:44 PM (13 years ago)
Author:
andersca@apple.com
Message:

WebKit2: pageDidScroll callback should be on the UI process client rather than (or in addition to) the web process client
https://bugs.webkit.org/show_bug.cgi?id=48366

Reviewed by Sam Weinig.

  • UIProcess/API/qt/qwkpage.cpp:

(QWKPage::QWKPage):
Add zero initializer.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::pageDidScroll):
Call the pageDidScroll client function.

  • UIProcess/WebPageProxy.messages.in:

Add PageDidScroll message.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::pageDidScroll):
Send the PageDidScroll message.

WebKitTools: pageDidScroll callback should be on the UI process client rather than (or in addition to) the web process client
https://bugs.webkit.org/show_bug.cgi?id=48366
<rdar://problem/8595202>

Reviewed by Sam Weinig.

  • MiniBrowser/mac/BrowserWindowController.m:

(-[BrowserWindowController awakeFromNib]):

  • WebKitTestRunner/TestController.cpp:

(WTR::createOtherPage):
(WTR::TestController::initialize):

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r70561 r70564  
     12010-10-26  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        pageDidScroll callback should be on the UI process client rather than (or in addition to) the web process client
     6        https://bugs.webkit.org/show_bug.cgi?id=48366
     7
     8        * UIProcess/API/qt/qwkpage.cpp:
     9        (QWKPage::QWKPage):
     10        Add zero initializer.
     11
     12        * UIProcess/WebPageProxy.cpp:
     13        (WebKit::WebPageProxy::pageDidScroll):
     14        Call the pageDidScroll client function.
     15
     16        * UIProcess/WebPageProxy.messages.in:
     17        Add PageDidScroll message.
     18
     19        * WebProcess/WebPage/WebPage.cpp:
     20        (WebKit::WebPage::pageDidScroll):
     21        Send the PageDidScroll message.
     22
    1232010-10-26  Brian Weinstein  <bweinstein@apple.com>
    224
  • trunk/WebKit2/UIProcess/API/C/WKPage.h

    r70561 r70564  
    143143typedef void (*WKPageSetWindowFrameCallback)(WKPageRef page, WKRect frame, const void *clientInfo);
    144144typedef bool (*WKPageRunBeforeUnloadConfirmPanelCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo);
    145 typedef void (*WKPageDidDraw)(WKPageRef page, const void *clientInfo);
     145typedef void (*WKPageDidDrawCallback)(WKPageRef page, const void *clientInfo);
     146typedef void (*WKPageDidScrollCallback)(WKPageRef page, const void *clientInfo);
     147
    146148
    147149struct WKPageUIClient {
     
    161163    WKPageSetWindowFrameCallback                                        setWindowFrame;
    162164    WKPageRunBeforeUnloadConfirmPanelCallback                           runBeforeUnloadConfirmPanel;
    163     WKPageDidDraw                                                       didDraw;
     165    WKPageDidDrawCallback                                               didDraw;
     166    WKPageDidScrollCallback                                             pageDidScroll;
    164167};
    165168typedef struct WKPageUIClient WKPageUIClient;
  • trunk/WebKit2/UIProcess/API/qt/qwkpage.cpp

    r70329 r70564  
    311311        0,  /* setWindowFrame */
    312312        0,  /* runBeforeUnloadConfirmPanel */
    313         0   /* didDraw */
     313        0,  /* didDraw */
     314        0   /* pageDidScroll */
    314315    };
    315316    WKPageSetPageUIClient(pageRef(), &uiClient);
  • trunk/WebKit2/UIProcess/WebPageProxy.cpp

    r70561 r70564  
    920920}
    921921
     922void WebPageProxy::pageDidScroll()
     923{
     924    m_uiClient.pageDidScroll(this);
     925}
     926
    922927void WebPageProxy::didDraw()
    923928{
  • trunk/WebKit2/UIProcess/WebPageProxy.h

    r70561 r70564  
    275275    void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
    276276    void didChangeViewportData(const WebCore::ViewportArguments&);
     277    void pageDidScroll();
    277278
    278279    // Back/Forward list management
  • trunk/WebKit2/UIProcess/WebPageProxy.messages.in

    r70491 r70564  
    4242    CanRunBeforeUnloadConfirmPanel() -> (bool canRun)
    4343    RunBeforeUnloadConfirmPanel(WTF::String message, uint64_t frameID) -> (bool shouldClose)
     44    PageDidScroll()
    4445
    4546    # Policy messages.
  • trunk/WebKit2/UIProcess/WebUIClient.cpp

    r70333 r70564  
    192192        return;
    193193
    194     return m_pageUIClient.didDraw(toAPI(page), m_pageUIClient.clientInfo);
    195 }
    196 
     194    m_pageUIClient.didDraw(toAPI(page), m_pageUIClient.clientInfo);
     195}
     196
     197void WebUIClient::pageDidScroll(WebPageProxy* page)
     198{
     199    if (!m_pageUIClient.pageDidScroll)
     200        return;
     201
     202    m_pageUIClient.pageDidScroll(toAPI(page), m_pageUIClient.clientInfo);
     203}
    197204
    198205} // namespace WebKit
  • trunk/WebKit2/UIProcess/WebUIClient.h

    r70333 r70564  
    7070
    7171    void didDraw(WebPageProxy*);
     72    void pageDidScroll(WebPageProxy*);
    7273
    7374private:
  • trunk/WebKit2/WebProcess/WebPage/WebPage.cpp

    r70504 r70564  
    456456
    457457    m_uiClient.pageDidScroll(this);
     458
     459    WebProcess::shared().connection()->send(Messages::WebPageProxy::PageDidScroll(), m_pageID);
    458460}
    459461
  • trunk/WebKitTools/ChangeLog

    r70562 r70564  
     12010-10-26  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        pageDidScroll callback should be on the UI process client rather than (or in addition to) the web process client
     6        https://bugs.webkit.org/show_bug.cgi?id=48366
     7        <rdar://problem/8595202>
     8
     9        * MiniBrowser/mac/BrowserWindowController.m:
     10        (-[BrowserWindowController awakeFromNib]):
     11        * WebKitTestRunner/TestController.cpp:
     12        (WTR::createOtherPage):
     13        (WTR::TestController::initialize):
     14
    1152010-10-26  Eric Seidel  <eric@webkit.org>
    216
  • trunk/WebKitTools/MiniBrowser/mac/BrowserWindowController.m

    r70333 r70564  
    583583        setWindowFrame,
    584584        runBeforeUnloadConfirmPanel,
    585         0          /* didDraw */
     585        0,          /* didDraw */
     586        0           /* pageDidScroll */
    586587    };
    587588    WKPageSetPageUIClient(_webView.pageRef, &uiClient);
  • trunk/WebKitTools/WebKitTestRunner/TestController.cpp

    r70333 r70564  
    122122        setWindowFrameOtherPage,
    123123        0, // runBeforeUnloadConfirmPanel
    124         0 // didDraw
     124        0, // didDraw
     125        0  // pageDidScroll
    125126    };
    126127    WKPageSetPageUIClient(newPage, &otherPageUIClient);
     
    207208        setWindowFrameMainPage,
    208209        0, // runBeforeUnloadConfirmPanel
    209         0 // didDraw
     210        0, // didDraw
     211        0  // pageDidScroll
    210212    };
    211213    WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient);
Note: See TracChangeset for help on using the changeset viewer.