Changeset 64927 in webkit


Ignore:
Timestamp:
Aug 7, 2010 4:26:19 PM (14 years ago)
Author:
weinig@apple.com
Message:

Add additional loader client functions need to complete WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=43684

Reviewed by Anders Carlsson.

WebKit2:

  • WebProcess/InjectedBundle/API/c/WKBundlePage.h:
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:

(WebKit::InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame):
(WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
(WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame):
(WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
(WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):

  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
(WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
(WebKit::WebFrameLoaderClient::didRunInsecureContent):

WebKitTools:

Remove unnecessary and jarring underscores as well.

  • MiniBrowser/mac/WebBundle/WebBundleMain.m:

(didClearWindowObjectForFrame):
(didCreatePage):

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::InjectedBundlePage):
(WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
(WTR::InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame):
(WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
(WTR::InjectedBundlePage::didCommitLoadForFrame):
(WTR::InjectedBundlePage::didFinishLoadForFrame):
(WTR::InjectedBundlePage::didFailLoadWithErrorForFrame):
(WTR::InjectedBundlePage::didReceiveTitleForFrame):
(WTR::InjectedBundlePage::didClearWindowForFrame):
(WTR::InjectedBundlePage::didCancelClientRedirectForFrame):
(WTR::InjectedBundlePage::willPerformClientRedirectForFrame):
(WTR::InjectedBundlePage::didChangeLocationWithinPageForFrame):
(WTR::InjectedBundlePage::didFinishDocumentLoadForFrame):
(WTR::InjectedBundlePage::didHandleOnloadEventsForFrame):
(WTR::InjectedBundlePage::didDisplayInsecureContentForFrame):
(WTR::InjectedBundlePage::didRunInsecureContentForFrame):
(WTR::InjectedBundlePage::willAddMessageToConsole):
(WTR::InjectedBundlePage::willSetStatusbarText):
(WTR::InjectedBundlePage::willRunJavaScriptAlert):
(WTR::InjectedBundlePage::willRunJavaScriptConfirm):
(WTR::InjectedBundlePage::willRunJavaScriptPrompt):
(WTR::InjectedBundlePage::shouldBeginEditing):
(WTR::InjectedBundlePage::shouldEndEditing):
(WTR::InjectedBundlePage::shouldInsertNode):
(WTR::InjectedBundlePage::shouldInsertText):
(WTR::InjectedBundlePage::shouldDeleteRange):
(WTR::InjectedBundlePage::shouldChangeSelectedRange):
(WTR::InjectedBundlePage::shouldApplyStyle):
(WTR::InjectedBundlePage::didBeginEditing):
(WTR::InjectedBundlePage::didEndEditing):
(WTR::InjectedBundlePage::didChange):
(WTR::InjectedBundlePage::didChangeSelection):

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r64924 r64927  
     12010-08-07  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        Add additional loader client functions need to complete WebKitTestRunner
     6        https://bugs.webkit.org/show_bug.cgi?id=43684
     7
     8        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
     9        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
     10        (WebKit::InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame):
     11        (WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
     12        (WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
     13        (WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
     14        (WebKit::InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame):
     15        (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
     16        (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
     17        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
     18        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     19        (WebKit::WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
     20        (WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect):
     21        (WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
     22        (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
     23        (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
     24        (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
     25        (WebKit::WebFrameLoaderClient::didRunInsecureContent):
     26
    1272010-08-07  Sam Weinig  <sam@webkit.org>
    228
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h

    r64862 r64927  
    5858typedef void (*WKBundlePageDidReceiveTitleForFrameCallback)(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo);
    5959typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo);
     60typedef void (*WKBundlePageDidCancelClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
     61typedef void (*WKBundlePageWillPerformClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date, const void *clientInfo);
     62typedef void (*WKBundlePageDidChangeLocationWithinPageForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
     63typedef void (*WKBundlePageDidFinishDocumentLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
     64typedef void (*WKBundlePageDidHandleOnloadEventsForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
     65typedef void (*WKBundlePageDidDisplayInsecureContentForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
     66typedef void (*WKBundlePageDidRunInsecureContentForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo); // FIXME: Add WKSecurityOriginRef.
     67
    6068
    6169struct WKBundlePageLoaderClient {
     
    7078    WKBundlePageDidReceiveTitleForFrameCallback                         didReceiveTitleForFrame;
    7179    WKBundlePageDidClearWindowObjectForFrameCallback                    didClearWindowObjectForFrame;
     80    WKBundlePageDidCancelClientRedirectForFrameCallback                 didCancelClientRedirectForFrame;
     81    WKBundlePageWillPerformClientRedirectForFrameCallback               willPerformClientRedirectForFrame;
     82    WKBundlePageDidChangeLocationWithinPageForFrameCallback             didChangeLocationWithinPageForFrame;
     83    WKBundlePageDidFinishDocumentLoadForFrameCallback                   didFinishDocumentLoadForFrame;
     84    WKBundlePageDidHandleOnloadEventsForFrameCallback                   didHandleOnloadEventsForFrame;
     85    WKBundlePageDidDisplayInsecureContentForFrameCallback               didDisplayInsecureContentForFrame;
     86    WKBundlePageDidRunInsecureContentForFrameCallback                   didRunInsecureContentForFrame;
    7287};
    7388typedef struct WKBundlePageLoaderClient WKBundlePageLoaderClient;
  • trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp

    r63866 r64927  
    9595}
    9696
     97void InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame(WebPage* page, WebFrame* frame)
     98{
     99    if (m_client.didCancelClientRedirectForFrame)
     100        m_client.didCancelClientRedirectForFrame(toRef(page), toRef(frame), m_client.clientInfo);
     101}
     102
     103void InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame(WebPage* page, WebFrame* frame, const WebCore::String& url, double delay, double date)
     104{
     105    if (m_client.willPerformClientRedirectForFrame)
     106        m_client.willPerformClientRedirectForFrame(toRef(page), toRef(frame), toURLRef(url.impl()), delay, date, m_client.clientInfo);
     107}
     108
     109void InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame(WebPage* page, WebFrame* frame)
     110{
     111    if (m_client.didChangeLocationWithinPageForFrame)
     112        m_client.didChangeLocationWithinPageForFrame(toRef(page), toRef(frame), m_client.clientInfo);
     113}
     114
     115void InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame(WebPage* page, WebFrame* frame)
     116{
     117    if (m_client.didFinishDocumentLoadForFrame)
     118        m_client.didFinishDocumentLoadForFrame(toRef(page), toRef(frame), m_client.clientInfo);
     119}
     120
     121void InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame(WebPage* page, WebFrame* frame)
     122{
     123    if (m_client.didHandleOnloadEventsForFrame)
     124        m_client.didHandleOnloadEventsForFrame(toRef(page), toRef(frame), m_client.clientInfo);
     125}
     126
     127void InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame(WebPage* page, WebFrame* frame)
     128{
     129    if (m_client.didDisplayInsecureContentForFrame)
     130        m_client.didDisplayInsecureContentForFrame(toRef(page), toRef(frame), m_client.clientInfo);
     131}
     132
     133void InjectedBundlePageLoaderClient::didRunInsecureContentForFrame(WebPage* page, WebFrame* frame)
     134{
     135    if (m_client.didRunInsecureContentForFrame)
     136        m_client.didRunInsecureContentForFrame(toRef(page), toRef(frame), m_client.clientInfo);
     137}
     138
    97139} // namespace WebKit
  • trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h

    r64861 r64927  
    5252    void didReceiveTitleForFrame(WebPage*, const WebCore::String&, WebFrame*);
    5353    void didClearWindowObjectForFrame(WebPage*, WebFrame*, JSGlobalContextRef, JSObjectRef);
     54    void didCancelClientRedirectForFrame(WebPage*, WebFrame*);
     55    void willPerformClientRedirectForFrame(WebPage*, WebFrame*, const WebCore::String& url, double delay, double date);
     56    void didChangeLocationWithinPageForFrame(WebPage*, WebFrame*);
     57    void didFinishDocumentLoadForFrame(WebPage*, WebFrame*);
     58    void didHandleOnloadEventsForFrame(WebPage*, WebFrame*);
     59    void didDisplayInsecureContentForFrame(WebPage*, WebFrame*);
     60    void didRunInsecureContentForFrame(WebPage*, WebFrame*);
    5461
    5562private:
  • trunk/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r64744 r64927  
    187187void WebFrameLoaderClient::dispatchDidHandleOnloadEvents()
    188188{
    189     notImplemented();
     189    WebPage* webPage = m_frame->page();
     190    if (!webPage)
     191        return;
     192
     193    // Notify the bundle client.
     194    webPage->injectedBundleLoaderClient().didHandleOnloadEventsForFrame(webPage, m_frame);
    190195}
    191196
     
    205210void WebFrameLoaderClient::dispatchDidCancelClientRedirect()
    206211{
    207     notImplemented();
    208 }
    209 
    210 void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate)
    211 {
    212     notImplemented();
     212    WebPage* webPage = m_frame->page();
     213    if (!webPage)
     214        return;
     215
     216    // Notify the bundle client.
     217    webPage->injectedBundleLoaderClient().didChangeLocationWithinPageForFrame(webPage, m_frame);
     218}
     219
     220void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url, double interval, double fireDate)
     221{
     222    WebPage* webPage = m_frame->page();
     223    if (!webPage)
     224        return;
     225
     226    // Notify the bundle client.
     227    webPage->injectedBundleLoaderClient().willPerformClientRedirectForFrame(webPage, m_frame, url.string(), interval, fireDate);
    213228}
    214229
    215230void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage()
    216231{
    217     notImplemented();
     232    WebPage* webPage = m_frame->page();
     233    if (!webPage)
     234        return;
     235
     236    // Notify the bundle client.
     237    webPage->injectedBundleLoaderClient().didChangeLocationWithinPageForFrame(webPage, m_frame);
    218238}
    219239
     
    326346void WebFrameLoaderClient::dispatchDidFinishDocumentLoad()
    327347{
    328     notImplemented();
     348    WebPage* webPage = m_frame->page();
     349    if (!webPage)
     350        return;
     351
     352    // Notify the bundle client.
     353    webPage->injectedBundleLoaderClient().didFinishDocumentLoadForFrame(webPage, m_frame);
    329354}
    330355
     
    640665void WebFrameLoaderClient::didDisplayInsecureContent()
    641666{
    642     notImplemented();
     667    WebPage* webPage = m_frame->page();
     668    if (!webPage)
     669        return;
     670
     671    // Notify the bundle client.
     672    webPage->injectedBundleLoaderClient().didDisplayInsecureContentForFrame(webPage, m_frame);
    643673}
    644674
    645675void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin*)
    646676{
    647     notImplemented();
     677    WebPage* webPage = m_frame->page();
     678    if (!webPage)
     679        return;
     680
     681    // Notify the bundle client.
     682    webPage->injectedBundleLoaderClient().didRunInsecureContentForFrame(webPage, m_frame);
    648683}
    649684
  • trunk/WebKitTools/ChangeLog

    r64923 r64927  
     12010-08-07  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        Add additional loader client functions need to complete WebKitTestRunner
     6        https://bugs.webkit.org/show_bug.cgi?id=43684
     7
     8        Remove unnecessary and jarring underscores as well.
     9
     10        * MiniBrowser/mac/WebBundle/WebBundleMain.m:
     11        (didClearWindowObjectForFrame):
     12        (didCreatePage):
     13        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
     14        (WTR::InjectedBundlePage::InjectedBundlePage):
     15        (WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
     16        (WTR::InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame):
     17        (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
     18        (WTR::InjectedBundlePage::didCommitLoadForFrame):
     19        (WTR::InjectedBundlePage::didFinishLoadForFrame):
     20        (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame):
     21        (WTR::InjectedBundlePage::didReceiveTitleForFrame):
     22        (WTR::InjectedBundlePage::didClearWindowForFrame):
     23        (WTR::InjectedBundlePage::didCancelClientRedirectForFrame):
     24        (WTR::InjectedBundlePage::willPerformClientRedirectForFrame):
     25        (WTR::InjectedBundlePage::didChangeLocationWithinPageForFrame):
     26        (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame):
     27        (WTR::InjectedBundlePage::didHandleOnloadEventsForFrame):
     28        (WTR::InjectedBundlePage::didDisplayInsecureContentForFrame):
     29        (WTR::InjectedBundlePage::didRunInsecureContentForFrame):
     30        (WTR::InjectedBundlePage::willAddMessageToConsole):
     31        (WTR::InjectedBundlePage::willSetStatusbarText):
     32        (WTR::InjectedBundlePage::willRunJavaScriptAlert):
     33        (WTR::InjectedBundlePage::willRunJavaScriptConfirm):
     34        (WTR::InjectedBundlePage::willRunJavaScriptPrompt):
     35        (WTR::InjectedBundlePage::shouldBeginEditing):
     36        (WTR::InjectedBundlePage::shouldEndEditing):
     37        (WTR::InjectedBundlePage::shouldInsertNode):
     38        (WTR::InjectedBundlePage::shouldInsertText):
     39        (WTR::InjectedBundlePage::shouldDeleteRange):
     40        (WTR::InjectedBundlePage::shouldChangeSelectedRange):
     41        (WTR::InjectedBundlePage::shouldApplyStyle):
     42        (WTR::InjectedBundlePage::didBeginEditing):
     43        (WTR::InjectedBundlePage::didEndEditing):
     44        (WTR::InjectedBundlePage::didChange):
     45        (WTR::InjectedBundlePage::didChangeSelection):
     46        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
     47
    1482010-08-07  Dan Bernstein  <mitz@apple.com>
    249
  • trunk/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m

    r64396 r64927  
    3636static WKBundleRef globalBundle;
    3737
    38 // WKBundlePageClient
     38// WKBundlePageClient functions
    3939
    40 void didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    41 {
    42 }
    43 
    44 void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    45 {
    46 }
    47 
    48 void didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    49 {
    50 }
    51 
    52 void didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    53 {
    54 }
    55 
    56 void didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    57 {
    58 }
    59 
    60 void didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    61 {
    62 }
    63 
    64 void didReceiveTitleForFrame(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo)
    65 {
    66 }
    67 
    68 void didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo)
     40void didClearWindowObjectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo)
    6941{
    7042    WKURLRef wkURL = WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page));
     
    8961    LOG(@"WKBundleClient - didCreatePage\n");
    9062
    91     WKBundlePageLoaderClient client = {
    92         0,
    93         0,
    94         didStartProvisionalLoadForFrame,
    95         didReceiveServerRedirectForProvisionalLoadForFrame,
    96         didFailProvisionalLoadWithErrorForFrame,
    97         didCommitLoadForFrame,
    98         didFinishLoadForFrame,
    99         didFailLoadWithErrorForFrame,
    100         didReceiveTitleForFrame,
    101         didClearWindowForFrame
    102     };
     63    WKBundlePageLoaderClient client;
     64    memset(&client, 0, sizeof(client));
     65    client.didClearWindowObjectForFrame = didClearWindowObjectForFrame;
     66
    10367    WKBundlePageSetLoaderClient(page, &client);
    10468}
  • trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

    r64921 r64927  
    7979        0,
    8080        this,
    81         _didStartProvisionalLoadForFrame,
    82         _didReceiveServerRedirectForProvisionalLoadForFrame,
    83         _didFailProvisionalLoadWithErrorForFrame,
    84         _didCommitLoadForFrame,
    85         _didFinishLoadForFrame,
    86         _didFailLoadWithErrorForFrame,
    87         _didReceiveTitleForFrame,
    88         _didClearWindowForFrame
     81        didStartProvisionalLoadForFrame,
     82        didReceiveServerRedirectForProvisionalLoadForFrame,
     83        didFailProvisionalLoadWithErrorForFrame,
     84        didCommitLoadForFrame,
     85        didFinishLoadForFrame,
     86        didFailLoadWithErrorForFrame,
     87        didReceiveTitleForFrame,
     88        didClearWindowForFrame,
     89        didCancelClientRedirectForFrame,
     90        willPerformClientRedirectForFrame,
     91        didChangeLocationWithinPageForFrame,
     92        didFinishDocumentLoadForFrame,
     93        didHandleOnloadEventsForFrame,
     94        didDisplayInsecureContentForFrame,
     95        didRunInsecureContentForFrame
    8996    };
    9097    WKBundlePageSetLoaderClient(m_page, &loaderClient);
     
    93100        0,
    94101        this,
    95         _willAddMessageToConsole,
    96         _willSetStatusbarText,
    97         _willRunJavaScriptAlert,
    98         _willRunJavaScriptConfirm,
    99         _willRunJavaScriptPrompt
     102        willAddMessageToConsole,
     103        willSetStatusbarText,
     104        willRunJavaScriptAlert,
     105        willRunJavaScriptConfirm,
     106        willRunJavaScriptPrompt
    100107    };
    101108    WKBundlePageSetUIClient(m_page, &uiClient);
     
    104111        0,
    105112        this,
    106         _shouldBeginEditing,
    107         _shouldEndEditing,
    108         _shouldInsertNode,
    109         _shouldInsertText,
    110         _shouldDeleteRange,
    111         _shouldChangeSelectedRange,
    112         _shouldApplyStyle,
    113         _didBeginEditing,
    114         _didEndEditing,
    115         _didChange,
    116         _didChangeSelection
     113        shouldBeginEditing,
     114        shouldEndEditing,
     115        shouldInsertNode,
     116        shouldInsertText,
     117        shouldDeleteRange,
     118        shouldChangeSelectedRange,
     119        shouldApplyStyle,
     120        didBeginEditing,
     121        didEndEditing,
     122        didChange,
     123        didChangeSelection
    117124    };
    118125    WKBundlePageSetEditorClient(m_page, &editorClient);
     
    130137// Loader Client Callbacks
    131138
    132 void InjectedBundlePage::_didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
     139void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    133140{
    134141    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didStartProvisionalLoadForFrame(frame);
    135142}
    136143
    137 void InjectedBundlePage::_didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
     144void InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    138145{
    139146    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didReceiveServerRedirectForProvisionalLoadForFrame(frame);
    140147}
    141148
    142 void InjectedBundlePage::_didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
     149void InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    143150{
    144151    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFailProvisionalLoadWithErrorForFrame(frame);
    145152}
    146153
    147 void InjectedBundlePage::_didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
     154void InjectedBundlePage::didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    148155{
    149156    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didCommitLoadForFrame(frame);
    150157}
    151158
    152 void InjectedBundlePage::_didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
     159void InjectedBundlePage::didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    153160{
    154161    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishLoadForFrame(frame);
    155162}
    156163
    157 void InjectedBundlePage::_didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
     164void InjectedBundlePage::didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)
    158165{
    159166    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFailLoadWithErrorForFrame(frame);
    160167}
    161168
    162 void InjectedBundlePage::_didReceiveTitleForFrame(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo)
     169void InjectedBundlePage::didReceiveTitleForFrame(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo)
    163170{
    164171    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didReceiveTitleForFrame(title, frame);
    165172}
    166173
    167 void InjectedBundlePage::_didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo)
     174void InjectedBundlePage::didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo)
    168175{
    169176    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didClearWindowForFrame(frame, context, window);
    170177}
     178
     179void InjectedBundlePage::didCancelClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo)
     180{
     181    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didCancelClientRedirectForFrame(frame);
     182}
     183
     184void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date, const void* clientInfo)
     185{
     186    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willPerformClientRedirectForFrame(frame, url, delay, date);
     187}
     188
     189void InjectedBundlePage::didChangeLocationWithinPageForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo)
     190{
     191    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didChangeLocationWithinPageForFrame(frame);
     192}
     193
     194void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo)
     195{
     196    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishDocumentLoadForFrame(frame);
     197}
     198
     199void InjectedBundlePage::didHandleOnloadEventsForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo)
     200{
     201    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didHandleOnloadEventsForFrame(frame);
     202}
     203
     204void InjectedBundlePage::didDisplayInsecureContentForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo)
     205{
     206    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didDisplayInsecureContentForFrame(frame);
     207}
     208
     209void InjectedBundlePage::didRunInsecureContentForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo)
     210{
     211    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didRunInsecureContentForFrame(frame);
     212}
     213
    171214
    172215void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundleFrameRef frame)
     
    332375}
    333376
     377void InjectedBundlePage::didCancelClientRedirectForFrame(WKBundleFrameRef frame)
     378{
     379}
     380
     381void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundleFrameRef frame, WKURLRef url, double delay, double date)
     382{
     383}
     384
     385void InjectedBundlePage::didChangeLocationWithinPageForFrame(WKBundleFrameRef frame)
     386{
     387}
     388
     389void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundleFrameRef frame)
     390{
     391}
     392
     393void InjectedBundlePage::didHandleOnloadEventsForFrame(WKBundleFrameRef frame)
     394{
     395}
     396
     397void InjectedBundlePage::didDisplayInsecureContentForFrame(WKBundleFrameRef frame)
     398{
     399}
     400
     401void InjectedBundlePage::didRunInsecureContentForFrame(WKBundleFrameRef frame)
     402{
     403}
     404
    334405// UI Client Callbacks
    335406
    336 void InjectedBundlePage::_willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)
     407void InjectedBundlePage::willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)
    337408{
    338409    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willAddMessageToConsole(message, lineNumber);
    339410}
    340411
    341 void InjectedBundlePage::_willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo)
     412void InjectedBundlePage::willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo)
    342413{
    343414    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willSetStatusbarText(statusbarText);
    344415}
    345416
    346 void InjectedBundlePage::_willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)
     417void InjectedBundlePage::willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)
    347418{
    348419    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptAlert(message, frame);
    349420}
    350421
    351 void InjectedBundlePage::_willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)
     422void InjectedBundlePage::willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)
    352423{
    353424    return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptConfirm(message, frame);
    354425}
    355426
    356 void InjectedBundlePage::_willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo)
     427void InjectedBundlePage::willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo)
    357428{
    358429    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptPrompt(message, defaultValue, frame);
     
    390461// Editor Client Callbacks
    391462
    392 bool InjectedBundlePage::_shouldBeginEditing(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo)
     463bool InjectedBundlePage::shouldBeginEditing(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo)
    393464{
    394465    return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldBeginEditing(range);
    395466}
    396467
    397 bool InjectedBundlePage::_shouldEndEditing(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo)
     468bool InjectedBundlePage::shouldEndEditing(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo)
    398469{
    399470    return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldEndEditing(range);
    400471}
    401472
    402 bool InjectedBundlePage::_shouldInsertNode(WKBundlePageRef page, WKBundleNodeRef node, WKBundleRangeRef rangeToReplace, WKInsertActionType action, const void* clientInfo)
     473bool InjectedBundlePage::shouldInsertNode(WKBundlePageRef page, WKBundleNodeRef node, WKBundleRangeRef rangeToReplace, WKInsertActionType action, const void* clientInfo)
    403474{
    404475    return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldInsertNode(node, rangeToReplace, action);
    405476}
    406477
    407 bool InjectedBundlePage::_shouldInsertText(WKBundlePageRef page, WKStringRef text, WKBundleRangeRef rangeToReplace, WKInsertActionType action, const void* clientInfo)
     478bool InjectedBundlePage::shouldInsertText(WKBundlePageRef page, WKStringRef text, WKBundleRangeRef rangeToReplace, WKInsertActionType action, const void* clientInfo)
    408479{
    409480    return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldInsertText(text, rangeToReplace, action);
    410481}
    411482
    412 bool InjectedBundlePage::_shouldDeleteRange(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo)
     483bool InjectedBundlePage::shouldDeleteRange(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo)
    413484{
    414485    return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldDeleteRange(range);
    415486}
    416487
    417 bool InjectedBundlePage::_shouldChangeSelectedRange(WKBundlePageRef page, WKBundleRangeRef fromRange, WKBundleRangeRef toRange, WKAffinityType affinity, bool stillSelecting, const void* clientInfo)
     488bool InjectedBundlePage::shouldChangeSelectedRange(WKBundlePageRef page, WKBundleRangeRef fromRange, WKBundleRangeRef toRange, WKAffinityType affinity, bool stillSelecting, const void* clientInfo)
    418489{
    419490    return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldChangeSelectedRange(fromRange, toRange, affinity, stillSelecting);
    420491}
    421492
    422 bool InjectedBundlePage::_shouldApplyStyle(WKBundlePageRef page, WKBundleCSSStyleDeclarationRef style, WKBundleRangeRef range, const void* clientInfo)
     493bool InjectedBundlePage::shouldApplyStyle(WKBundlePageRef page, WKBundleCSSStyleDeclarationRef style, WKBundleRangeRef range, const void* clientInfo)
    423494{
    424495    return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldApplyStyle(style, range);
    425496}
    426497
    427 void InjectedBundlePage::_didBeginEditing(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)
     498void InjectedBundlePage::didBeginEditing(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)
    428499{
    429500    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didBeginEditing(notificationName);
    430501}
    431502
    432 void InjectedBundlePage::_didEndEditing(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)
     503void InjectedBundlePage::didEndEditing(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)
    433504{
    434505    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didEndEditing(notificationName);
    435506}
    436507
    437 void InjectedBundlePage::_didChange(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)
     508void InjectedBundlePage::didChange(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)
    438509{
    439510    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didChange(notificationName);
    440511}
    441512
    442 void InjectedBundlePage::_didChangeSelection(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)
     513void InjectedBundlePage::didChangeSelection(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)
    443514{
    444515    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didChangeSelection(notificationName);
  • trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h

    r64445 r64927  
    4545private:
    4646    // Loader Client
    47     static void _didStartProvisionalLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
    48     static void _didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
    49     static void _didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
    50     static void _didCommitLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
    51     static void _didFinishLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
    52     static void _didFailLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
    53     static void _didReceiveTitleForFrame(WKBundlePageRef, WKStringRef title, WKBundleFrameRef, const void* clientInfo);
    54     static void _didClearWindowForFrame(WKBundlePageRef, WKBundleFrameRef, JSGlobalContextRef, JSObjectRef window, const void* clientInfo);
     47    static void didStartProvisionalLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     48    static void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     49    static void didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     50    static void didCommitLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     51    static void didFinishLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     52    static void didFailLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     53    static void didReceiveTitleForFrame(WKBundlePageRef, WKStringRef title, WKBundleFrameRef, const void*);
     54    static void didClearWindowForFrame(WKBundlePageRef, WKBundleFrameRef, JSGlobalContextRef, JSObjectRef window, const void*);
     55    static void didCancelClientRedirectForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     56    static void willPerformClientRedirectForFrame(WKBundlePageRef, WKBundleFrameRef, WKURLRef url, double delay, double date, const void*);
     57    static void didChangeLocationWithinPageForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     58    static void didFinishDocumentLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     59    static void didHandleOnloadEventsForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     60    static void didDisplayInsecureContentForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     61    static void didRunInsecureContentForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
    5562    void didStartProvisionalLoadForFrame(WKBundleFrameRef);
    5663    void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef);
     
    6168    void didReceiveTitleForFrame(WKStringRef title, WKBundleFrameRef);
    6269    void didClearWindowForFrame(WKBundleFrameRef, JSGlobalContextRef, JSObjectRef window);
     70    void didCancelClientRedirectForFrame(WKBundleFrameRef);
     71    void willPerformClientRedirectForFrame(WKBundleFrameRef, WKURLRef url, double delay, double date);
     72    void didChangeLocationWithinPageForFrame(WKBundleFrameRef);
     73    void didFinishDocumentLoadForFrame(WKBundleFrameRef);
     74    void didHandleOnloadEventsForFrame(WKBundleFrameRef);
     75    void didDisplayInsecureContentForFrame(WKBundleFrameRef);
     76    void didRunInsecureContentForFrame(WKBundleFrameRef);
    6377
    6478    // UI Client
    65     static void _willAddMessageToConsole(WKBundlePageRef, WKStringRef message, uint32_t lineNumber, const void* clientInfo);
    66     static void _willSetStatusbarText(WKBundlePageRef, WKStringRef statusbarText, const void* clientInfo);
    67     static void _willRunJavaScriptAlert(WKBundlePageRef, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
    68     static void _willRunJavaScriptConfirm(WKBundlePageRef, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
    69     static void _willRunJavaScriptPrompt(WKBundlePageRef, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo);
     79    static void willAddMessageToConsole(WKBundlePageRef, WKStringRef message, uint32_t lineNumber, const void* clientInfo);
     80    static void willSetStatusbarText(WKBundlePageRef, WKStringRef statusbarText, const void* clientInfo);
     81    static void willRunJavaScriptAlert(WKBundlePageRef, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
     82    static void willRunJavaScriptConfirm(WKBundlePageRef, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
     83    static void willRunJavaScriptPrompt(WKBundlePageRef, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo);
    7084    void willAddMessageToConsole(WKStringRef message, uint32_t lineNumber);
    7185    void willSetStatusbarText(WKStringRef statusbarText);
     
    7589
    7690    // Editor client
    77     static bool _shouldBeginEditing(WKBundlePageRef, WKBundleRangeRef, const void* clientInfo);
    78     static bool _shouldEndEditing(WKBundlePageRef, WKBundleRangeRef, const void* clientInfo);
    79     static bool _shouldInsertNode(WKBundlePageRef, WKBundleNodeRef, WKBundleRangeRef rangeToReplace, WKInsertActionType, const void* clientInfo);
    80     static bool _shouldInsertText(WKBundlePageRef, WKStringRef, WKBundleRangeRef rangeToReplace, WKInsertActionType, const void* clientInfo);
    81     static bool _shouldDeleteRange(WKBundlePageRef, WKBundleRangeRef, const void* clientInfo);
    82     static bool _shouldChangeSelectedRange(WKBundlePageRef, WKBundleRangeRef fromRange, WKBundleRangeRef toRange, WKAffinityType, bool stillSelecting, const void* clientInfo);
    83     static bool _shouldApplyStyle(WKBundlePageRef, WKBundleCSSStyleDeclarationRef style, WKBundleRangeRef range, const void* clientInfo);
    84     static void _didBeginEditing(WKBundlePageRef, WKStringRef notificationName, const void* clientInfo);
    85     static void _didEndEditing(WKBundlePageRef, WKStringRef notificationName, const void* clientInfo);
    86     static void _didChange(WKBundlePageRef, WKStringRef notificationName, const void* clientInfo);
    87     static void _didChangeSelection(WKBundlePageRef, WKStringRef notificationName, const void* clientInfo);
     91    static bool shouldBeginEditing(WKBundlePageRef, WKBundleRangeRef, const void* clientInfo);
     92    static bool shouldEndEditing(WKBundlePageRef, WKBundleRangeRef, const void* clientInfo);
     93    static bool shouldInsertNode(WKBundlePageRef, WKBundleNodeRef, WKBundleRangeRef rangeToReplace, WKInsertActionType, const void* clientInfo);
     94    static bool shouldInsertText(WKBundlePageRef, WKStringRef, WKBundleRangeRef rangeToReplace, WKInsertActionType, const void* clientInfo);
     95    static bool shouldDeleteRange(WKBundlePageRef, WKBundleRangeRef, const void* clientInfo);
     96    static bool shouldChangeSelectedRange(WKBundlePageRef, WKBundleRangeRef fromRange, WKBundleRangeRef toRange, WKAffinityType, bool stillSelecting, const void* clientInfo);
     97    static bool shouldApplyStyle(WKBundlePageRef, WKBundleCSSStyleDeclarationRef style, WKBundleRangeRef range, const void* clientInfo);
     98    static void didBeginEditing(WKBundlePageRef, WKStringRef notificationName, const void* clientInfo);
     99    static void didEndEditing(WKBundlePageRef, WKStringRef notificationName, const void* clientInfo);
     100    static void didChange(WKBundlePageRef, WKStringRef notificationName, const void* clientInfo);
     101    static void didChangeSelection(WKBundlePageRef, WKStringRef notificationName, const void* clientInfo);
    88102    bool shouldBeginEditing(WKBundleRangeRef);
    89103    bool shouldEndEditing(WKBundleRangeRef);
Note: See TracChangeset for help on using the changeset viewer.