Changeset 64927 in webkit
- Timestamp:
- Aug 7, 2010 4:26:19 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r64924 r64927 1 2010-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 1 27 2010-08-07 Sam Weinig <sam@webkit.org> 2 28 -
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
r64862 r64927 58 58 typedef void (*WKBundlePageDidReceiveTitleForFrameCallback)(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo); 59 59 typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo); 60 typedef void (*WKBundlePageDidCancelClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo); 61 typedef void (*WKBundlePageWillPerformClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date, const void *clientInfo); 62 typedef void (*WKBundlePageDidChangeLocationWithinPageForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo); 63 typedef void (*WKBundlePageDidFinishDocumentLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo); 64 typedef void (*WKBundlePageDidHandleOnloadEventsForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo); 65 typedef void (*WKBundlePageDidDisplayInsecureContentForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo); 66 typedef void (*WKBundlePageDidRunInsecureContentForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo); // FIXME: Add WKSecurityOriginRef. 67 60 68 61 69 struct WKBundlePageLoaderClient { … … 70 78 WKBundlePageDidReceiveTitleForFrameCallback didReceiveTitleForFrame; 71 79 WKBundlePageDidClearWindowObjectForFrameCallback didClearWindowObjectForFrame; 80 WKBundlePageDidCancelClientRedirectForFrameCallback didCancelClientRedirectForFrame; 81 WKBundlePageWillPerformClientRedirectForFrameCallback willPerformClientRedirectForFrame; 82 WKBundlePageDidChangeLocationWithinPageForFrameCallback didChangeLocationWithinPageForFrame; 83 WKBundlePageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame; 84 WKBundlePageDidHandleOnloadEventsForFrameCallback didHandleOnloadEventsForFrame; 85 WKBundlePageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame; 86 WKBundlePageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame; 72 87 }; 73 88 typedef struct WKBundlePageLoaderClient WKBundlePageLoaderClient; -
trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
r63866 r64927 95 95 } 96 96 97 void 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 103 void 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 109 void 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 115 void 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 121 void 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 127 void 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 133 void 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 97 139 } // namespace WebKit -
trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
r64861 r64927 52 52 void didReceiveTitleForFrame(WebPage*, const WebCore::String&, WebFrame*); 53 53 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*); 54 61 55 62 private: -
trunk/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r64744 r64927 187 187 void WebFrameLoaderClient::dispatchDidHandleOnloadEvents() 188 188 { 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); 190 195 } 191 196 … … 205 210 void WebFrameLoaderClient::dispatchDidCancelClientRedirect() 206 211 { 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 220 void 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); 213 228 } 214 229 215 230 void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage() 216 231 { 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); 218 238 } 219 239 … … 326 346 void WebFrameLoaderClient::dispatchDidFinishDocumentLoad() 327 347 { 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); 329 354 } 330 355 … … 640 665 void WebFrameLoaderClient::didDisplayInsecureContent() 641 666 { 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); 643 673 } 644 674 645 675 void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin*) 646 676 { 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); 648 683 } 649 684 -
trunk/WebKitTools/ChangeLog
r64923 r64927 1 2010-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 1 48 2010-08-07 Dan Bernstein <mitz@apple.com> 2 49 -
trunk/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m
r64396 r64927 36 36 static WKBundleRef globalBundle; 37 37 38 // WKBundlePageClient 38 // WKBundlePageClient functions 39 39 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) 40 void didClearWindowObjectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo) 69 41 { 70 42 WKURLRef wkURL = WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)); … … 89 61 LOG(@"WKBundleClient - didCreatePage\n"); 90 62 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 103 67 WKBundlePageSetLoaderClient(page, &client); 104 68 } -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r64921 r64927 79 79 0, 80 80 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 89 96 }; 90 97 WKBundlePageSetLoaderClient(m_page, &loaderClient); … … 93 100 0, 94 101 this, 95 _willAddMessageToConsole,96 _willSetStatusbarText,97 _willRunJavaScriptAlert,98 _willRunJavaScriptConfirm,99 _willRunJavaScriptPrompt102 willAddMessageToConsole, 103 willSetStatusbarText, 104 willRunJavaScriptAlert, 105 willRunJavaScriptConfirm, 106 willRunJavaScriptPrompt 100 107 }; 101 108 WKBundlePageSetUIClient(m_page, &uiClient); … … 104 111 0, 105 112 this, 106 _shouldBeginEditing,107 _shouldEndEditing,108 _shouldInsertNode,109 _shouldInsertText,110 _shouldDeleteRange,111 _shouldChangeSelectedRange,112 _shouldApplyStyle,113 _didBeginEditing,114 _didEndEditing,115 _didChange,116 _didChangeSelection113 shouldBeginEditing, 114 shouldEndEditing, 115 shouldInsertNode, 116 shouldInsertText, 117 shouldDeleteRange, 118 shouldChangeSelectedRange, 119 shouldApplyStyle, 120 didBeginEditing, 121 didEndEditing, 122 didChange, 123 didChangeSelection 117 124 }; 118 125 WKBundlePageSetEditorClient(m_page, &editorClient); … … 130 137 // Loader Client Callbacks 131 138 132 void InjectedBundlePage:: _didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)139 void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo) 133 140 { 134 141 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didStartProvisionalLoadForFrame(frame); 135 142 } 136 143 137 void InjectedBundlePage:: _didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)144 void InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo) 138 145 { 139 146 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didReceiveServerRedirectForProvisionalLoadForFrame(frame); 140 147 } 141 148 142 void InjectedBundlePage:: _didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)149 void InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo) 143 150 { 144 151 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFailProvisionalLoadWithErrorForFrame(frame); 145 152 } 146 153 147 void InjectedBundlePage:: _didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)154 void InjectedBundlePage::didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo) 148 155 { 149 156 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didCommitLoadForFrame(frame); 150 157 } 151 158 152 void InjectedBundlePage:: _didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)159 void InjectedBundlePage::didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo) 153 160 { 154 161 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishLoadForFrame(frame); 155 162 } 156 163 157 void InjectedBundlePage:: _didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo)164 void InjectedBundlePage::didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo) 158 165 { 159 166 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFailLoadWithErrorForFrame(frame); 160 167 } 161 168 162 void InjectedBundlePage:: _didReceiveTitleForFrame(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo)169 void InjectedBundlePage::didReceiveTitleForFrame(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo) 163 170 { 164 171 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didReceiveTitleForFrame(title, frame); 165 172 } 166 173 167 void InjectedBundlePage:: _didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo)174 void InjectedBundlePage::didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo) 168 175 { 169 176 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didClearWindowForFrame(frame, context, window); 170 177 } 178 179 void InjectedBundlePage::didCancelClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo) 180 { 181 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didCancelClientRedirectForFrame(frame); 182 } 183 184 void 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 189 void InjectedBundlePage::didChangeLocationWithinPageForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo) 190 { 191 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didChangeLocationWithinPageForFrame(frame); 192 } 193 194 void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo) 195 { 196 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishDocumentLoadForFrame(frame); 197 } 198 199 void InjectedBundlePage::didHandleOnloadEventsForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo) 200 { 201 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didHandleOnloadEventsForFrame(frame); 202 } 203 204 void InjectedBundlePage::didDisplayInsecureContentForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo) 205 { 206 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didDisplayInsecureContentForFrame(frame); 207 } 208 209 void InjectedBundlePage::didRunInsecureContentForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo) 210 { 211 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didRunInsecureContentForFrame(frame); 212 } 213 171 214 172 215 void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundleFrameRef frame) … … 332 375 } 333 376 377 void InjectedBundlePage::didCancelClientRedirectForFrame(WKBundleFrameRef frame) 378 { 379 } 380 381 void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundleFrameRef frame, WKURLRef url, double delay, double date) 382 { 383 } 384 385 void InjectedBundlePage::didChangeLocationWithinPageForFrame(WKBundleFrameRef frame) 386 { 387 } 388 389 void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundleFrameRef frame) 390 { 391 } 392 393 void InjectedBundlePage::didHandleOnloadEventsForFrame(WKBundleFrameRef frame) 394 { 395 } 396 397 void InjectedBundlePage::didDisplayInsecureContentForFrame(WKBundleFrameRef frame) 398 { 399 } 400 401 void InjectedBundlePage::didRunInsecureContentForFrame(WKBundleFrameRef frame) 402 { 403 } 404 334 405 // UI Client Callbacks 335 406 336 void InjectedBundlePage:: _willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)407 void InjectedBundlePage::willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo) 337 408 { 338 409 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willAddMessageToConsole(message, lineNumber); 339 410 } 340 411 341 void InjectedBundlePage:: _willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo)412 void InjectedBundlePage::willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo) 342 413 { 343 414 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willSetStatusbarText(statusbarText); 344 415 } 345 416 346 void InjectedBundlePage:: _willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)417 void InjectedBundlePage::willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo) 347 418 { 348 419 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptAlert(message, frame); 349 420 } 350 421 351 void InjectedBundlePage:: _willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)422 void InjectedBundlePage::willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo) 352 423 { 353 424 return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptConfirm(message, frame); 354 425 } 355 426 356 void InjectedBundlePage:: _willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo)427 void InjectedBundlePage::willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo) 357 428 { 358 429 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptPrompt(message, defaultValue, frame); … … 390 461 // Editor Client Callbacks 391 462 392 bool InjectedBundlePage:: _shouldBeginEditing(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo)463 bool InjectedBundlePage::shouldBeginEditing(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo) 393 464 { 394 465 return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldBeginEditing(range); 395 466 } 396 467 397 bool InjectedBundlePage:: _shouldEndEditing(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo)468 bool InjectedBundlePage::shouldEndEditing(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo) 398 469 { 399 470 return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldEndEditing(range); 400 471 } 401 472 402 bool InjectedBundlePage:: _shouldInsertNode(WKBundlePageRef page, WKBundleNodeRef node, WKBundleRangeRef rangeToReplace, WKInsertActionType action, const void* clientInfo)473 bool InjectedBundlePage::shouldInsertNode(WKBundlePageRef page, WKBundleNodeRef node, WKBundleRangeRef rangeToReplace, WKInsertActionType action, const void* clientInfo) 403 474 { 404 475 return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldInsertNode(node, rangeToReplace, action); 405 476 } 406 477 407 bool InjectedBundlePage:: _shouldInsertText(WKBundlePageRef page, WKStringRef text, WKBundleRangeRef rangeToReplace, WKInsertActionType action, const void* clientInfo)478 bool InjectedBundlePage::shouldInsertText(WKBundlePageRef page, WKStringRef text, WKBundleRangeRef rangeToReplace, WKInsertActionType action, const void* clientInfo) 408 479 { 409 480 return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldInsertText(text, rangeToReplace, action); 410 481 } 411 482 412 bool InjectedBundlePage:: _shouldDeleteRange(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo)483 bool InjectedBundlePage::shouldDeleteRange(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo) 413 484 { 414 485 return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldDeleteRange(range); 415 486 } 416 487 417 bool InjectedBundlePage:: _shouldChangeSelectedRange(WKBundlePageRef page, WKBundleRangeRef fromRange, WKBundleRangeRef toRange, WKAffinityType affinity, bool stillSelecting, const void* clientInfo)488 bool InjectedBundlePage::shouldChangeSelectedRange(WKBundlePageRef page, WKBundleRangeRef fromRange, WKBundleRangeRef toRange, WKAffinityType affinity, bool stillSelecting, const void* clientInfo) 418 489 { 419 490 return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldChangeSelectedRange(fromRange, toRange, affinity, stillSelecting); 420 491 } 421 492 422 bool InjectedBundlePage:: _shouldApplyStyle(WKBundlePageRef page, WKBundleCSSStyleDeclarationRef style, WKBundleRangeRef range, const void* clientInfo)493 bool InjectedBundlePage::shouldApplyStyle(WKBundlePageRef page, WKBundleCSSStyleDeclarationRef style, WKBundleRangeRef range, const void* clientInfo) 423 494 { 424 495 return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldApplyStyle(style, range); 425 496 } 426 497 427 void InjectedBundlePage:: _didBeginEditing(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)498 void InjectedBundlePage::didBeginEditing(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo) 428 499 { 429 500 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didBeginEditing(notificationName); 430 501 } 431 502 432 void InjectedBundlePage:: _didEndEditing(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)503 void InjectedBundlePage::didEndEditing(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo) 433 504 { 434 505 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didEndEditing(notificationName); 435 506 } 436 507 437 void InjectedBundlePage:: _didChange(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)508 void InjectedBundlePage::didChange(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo) 438 509 { 439 510 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didChange(notificationName); 440 511 } 441 512 442 void InjectedBundlePage:: _didChangeSelection(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo)513 void InjectedBundlePage::didChangeSelection(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo) 443 514 { 444 515 static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didChangeSelection(notificationName); -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
r64445 r64927 45 45 private: 46 46 // 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*); 55 62 void didStartProvisionalLoadForFrame(WKBundleFrameRef); 56 63 void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef); … … 61 68 void didReceiveTitleForFrame(WKStringRef title, WKBundleFrameRef); 62 69 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); 63 77 64 78 // 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); 70 84 void willAddMessageToConsole(WKStringRef message, uint32_t lineNumber); 71 85 void willSetStatusbarText(WKStringRef statusbarText); … … 75 89 76 90 // 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); 88 102 bool shouldBeginEditing(WKBundleRangeRef); 89 103 bool shouldEndEditing(WKBundleRangeRef);
Note: See TracChangeset
for help on using the changeset viewer.