Changeset 49091 in webkit
- Timestamp:
- Oct 5, 2009 7:03:07 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r49080 r49091 1 2009-10-05 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: add testing harness for Web Inspector. 6 7 https://bugs.webkit.org/show_bug.cgi?id=30010 8 9 * WebKit.xcodeproj/project.pbxproj: 10 1 11 2009-10-04 Fumitoshi Ukai <ukai@chromium.org> 2 12 -
trunk/WebKit/WebKit.xcodeproj/project.pbxproj
r48914 r49091 122 122 65FFB7FC0AD0B7D30048CD05 /* WebDocumentLoaderMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoaderMac.h */; }; 123 123 65FFB7FD0AD0B7D30048CD05 /* WebDocumentLoaderMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65FFB7FB0AD0B7D30048CD05 /* WebDocumentLoaderMac.mm */; }; 124 7A8FF0D11075024A00A80A08 /* WebInspectorPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A8FF0D01075024A00A80A08 /* WebInspectorPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 124 125 7E6FEF0808985A7200C44C3F /* WebScriptDebugDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 125 126 7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.mm */; }; … … 511 512 7082F56F038EADAA00A80180 /* WebKitNSStringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKitNSStringExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 512 513 7082F570038EADAA00A80180 /* WebKitNSStringExtras.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; indentWidth = 4; path = WebKitNSStringExtras.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 514 7A8FF0D01075024A00A80A08 /* WebInspectorPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorPrivate.h; sourceTree = "<group>"; }; 513 515 7E6FEF0508985A7200C44C3F /* WebScriptDebugDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptDebugDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 514 516 7E6FEF0608985A7200C44C3F /* WebScriptDebugDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebScriptDebugDelegate.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 812 814 5D7BF8120C2A1D90008CE06D /* WebInspector.h */, 813 815 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */, 816 7A8FF0D01075024A00A80A08 /* WebInspectorPrivate.h */, 814 817 1C68F663095B5FC100C2984E /* WebNodeHighlight.h */, 815 818 1C68F664095B5FC100C2984E /* WebNodeHighlight.mm */, … … 1379 1382 5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */, 1380 1383 06693DDC0BFBA85200216072 /* WebInspectorClient.h in Headers */, 1384 7A8FF0D11075024A00A80A08 /* WebInspectorPrivate.h in Headers */, 1381 1385 939810A00824BF01008DF038 /* WebJavaPlugIn.h in Headers */, 1382 1386 939810420824BF01008DF038 /* WebJavaScriptTextInputPanel.h in Headers */, -
trunk/WebKit/mac/ChangeLog
r49079 r49091 1 2009-10-05 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: add testing harness for Web Inspector. 6 7 https://bugs.webkit.org/show_bug.cgi?id=30010 8 9 * WebInspector/WebInspector.mm: 10 (-[WebInspector evaluateInFrontend:callId:script:]): 11 * WebInspector/WebInspectorPrivate.h: Added. 12 1 13 2009-10-04 Kevin Decker <kdecker@apple.com> 2 14 -
trunk/WebKit/mac/WebInspector/WebInspector.mm
r43804 r49091 28 28 29 29 #import "WebInspector.h" 30 30 31 #import "WebFrameInternal.h" 32 #import "WebInspectorPrivate.h" 31 33 32 34 #include <WebCore/Document.h> … … 164 166 page->inspectorController()->detachWindow(); 165 167 } 168 169 - (void)evaluateInFrontend:(id)sender callId:(long)callId script:(NSString *)script 170 { 171 if (Page* page = core(_webView)) 172 page->inspectorController()->evaluateForTestInFrontend(callId, script); 173 } 166 174 @end 167 175 -
trunk/WebKit/win/ChangeLog
r49033 r49091 1 2009-10-05 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: add testing harness for Web Inspector. 6 7 https://bugs.webkit.org/show_bug.cgi?id=30010 8 9 * Interfaces/IWebInspectorPrivate.idl: Added. 10 * Interfaces/IWebViewPrivate.idl: 11 * Interfaces/WebKit.idl: 12 * WebInspector.cpp: 13 (WebInspector::evaluateInFrontend): 14 * WebInspector.h: 15 * WebView.cpp: 16 (WebView::inspectorPrivate): 17 * WebView.h: 18 1 19 2009-10-02 Dave Hyatt <hyatt@apple.com> 2 20 -
trunk/WebKit/win/Interfaces/IWebViewPrivate.idl
r49033 r49091 30 30 import "IWebFrameLoadDelegatePrivate.idl"; 31 31 import "IWebInspector.idl"; 32 import "IWebInspectorPrivate.idl"; 32 33 #endif 33 34 … … 39 40 interface IWebFrameLoadDelegatePrivate; 40 41 interface IWebInspector; 42 interface IWebInspectorPrivate; 41 43 interface IWebPluginHalterDelegate; 42 44 interface IWebURLRequest; … … 114 116 115 117 HRESULT inspector([out, retval] IWebInspector**); 118 119 HRESULT inspectorPrivate([out, retval] IWebInspectorPrivate**); 116 120 117 121 HRESULT clearUndoRedoOperations(); -
trunk/WebKit/win/Interfaces/WebKit.idl
r48748 r49091 97 97 #include "IWebIconFetcher.idl" 98 98 #include "IWebInspector.idl" 99 #include "IWebInspectorPrivate.idl" 99 100 #include "IWebJavaScriptCollector.idl" 100 101 #include "IWebKitStatistics.idl" -
trunk/WebKit/win/WebInspector.cpp
r37943 r49091 257 257 return S_OK; 258 258 } 259 260 HRESULT STDMETHODCALLTYPE WebInspector::evaluateInFrontend(ULONG callId, BSTR bScript) 261 { 262 if (!m_webView) 263 return S_OK; 264 265 Page* page = m_webView->page(); 266 if (!page) 267 return S_OK; 268 269 String script(bScript, SysStringLen(bScript)); 270 page->inspectorController()->evaluateForTestInFrontend(callId, script); 271 return S_OK; 272 } -
trunk/WebKit/win/WebInspector.h
r45891 r49091 35 35 class WebView; 36 36 37 class WebInspector : public IWebInspector, public Noncopyable {37 class WebInspector : public IWebInspector, public IWebInspectorPrivate, public Noncopyable { 38 38 public: 39 39 static WebInspector* createInstance(WebView*); … … 60 60 virtual HRESULT STDMETHODCALLTYPE isJavaScriptProfilingEnabled(BOOL* isProfilingEnabled); 61 61 virtual HRESULT STDMETHODCALLTYPE setJavaScriptProfilingEnabled(BOOL); 62 63 virtual HRESULT STDMETHODCALLTYPE evaluateInFrontend(ULONG callId, BSTR script); 62 64 63 65 private: -
trunk/WebKit/win/WebKit.vcproj/Interfaces.vcproj
r48748 r49091 945 945 </File> 946 946 <File 947 RelativePath="..\Interfaces\IWebInspectorPrivate.idl" 948 > 949 <FileConfiguration 950 Name="Debug|Win32" 951 ExcludedFromBuild="true" 952 > 953 <Tool 954 Name="VCMIDLTool" 955 /> 956 </FileConfiguration> 957 <FileConfiguration 958 Name="Release|Win32" 959 ExcludedFromBuild="true" 960 > 961 <Tool 962 Name="VCMIDLTool" 963 /> 964 </FileConfiguration> 965 </File> 966 <File 947 967 RelativePath="..\Interfaces\IWebJavaScriptCollector.idl" 948 968 > -
trunk/WebKit/win/WebView.cpp
r49038 r49091 5178 5178 } 5179 5179 5180 HRESULT STDMETHODCALLTYPE WebView::inspectorPrivate(IWebInspectorPrivate** inspector) 5181 { 5182 if (!m_webInspector) 5183 m_webInspector.adoptRef(WebInspector::createInstance(this)); 5184 5185 return m_webInspector.copyRefTo(inspector); 5186 } 5187 5180 5188 HRESULT STDMETHODCALLTYPE WebView::windowAncestryDidChange() 5181 5189 { -
trunk/WebKit/win/WebView.h
r49033 r49091 673 673 virtual HRESULT STDMETHODCALLTYPE inspector( 674 674 /* [retval][out] */ IWebInspector**); 675 676 virtual HRESULT STDMETHODCALLTYPE inspectorPrivate( 677 /* [retval][out] */ IWebInspectorPrivate**); 675 678 676 679 virtual HRESULT STDMETHODCALLTYPE clearUndoRedoOperations( void); -
trunk/WebKitTools/ChangeLog
r49088 r49091 1 2009-10-05 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: add testing harness for Web Inspector. 6 7 https://bugs.webkit.org/show_bug.cgi?id=30010 8 9 * DumpRenderTree/LayoutTestController.cpp: 10 (showWebInspectorCallback): 11 (closeWebInspectorCallback): 12 (evaluateInWebInspectorCallback): 13 (LayoutTestController::staticFunctions): 14 * DumpRenderTree/LayoutTestController.h: 15 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: 16 (LayoutTestController::showWebInspector): 17 (LayoutTestController::closeWebInspector): 18 (LayoutTestController::evaluateInWebInspector): 19 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 20 (LayoutTestController::showWebInspector): 21 (LayoutTestController::closeWebInspector): 22 (LayoutTestController::evaluateInWebInspector): 23 * DumpRenderTree/win/LayoutTestControllerWin.cpp: 24 (LayoutTestController::showWebInspector): 25 (LayoutTestController::closeWebInspector): 26 (LayoutTestController::evaluateInWebInspector): 27 * DumpRenderTree/wx/LayoutTestControllerWx.cpp: 28 (LayoutTestController::showWebInspector): 29 (LayoutTestController::closeWebInspector): 30 (LayoutTestController::evaluateInWebInspector): 31 1 32 2009-10-05 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 33 -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp
r48915 r49091 930 930 } 931 931 932 static JSValueRef showWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 933 { 934 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 935 controller->showWebInspector(); 936 return JSValueMakeUndefined(context); 937 } 938 939 static JSValueRef closeWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 940 { 941 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 942 controller->closeWebInspector(); 943 return JSValueMakeUndefined(context); 944 } 945 946 static JSValueRef evaluateInWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 947 { 948 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 949 double callId = JSValueToNumber(context, arguments[0], exception); 950 ASSERT(!*exception); 951 JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[1], exception)); 952 ASSERT(!*exception); 953 954 controller->evaluateInWebInspector(static_cast<long>(callId), script.get()); 955 return JSValueMakeUndefined(context); 956 } 957 932 958 static JSValueRef elementDoesAutoCompleteForElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 933 959 { … … 1115 1141 { "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1116 1142 { "clearPersistentUserStyleSheet", clearPersistentUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1143 { "closeWebInspector", closeWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1117 1144 { "decodeHostName", decodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1118 1145 { "disableImageLoading", disableImageLoadingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, … … 1136 1163 { "elementDoesAutoCompleteForElementWithId", elementDoesAutoCompleteForElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1137 1164 { "encodeHostName", encodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1165 { "evaluateInWebInspector", evaluateInWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1138 1166 { "execCommand", execCommandCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1139 1167 { "grantDesktopNotificationPermission", grantDesktopNotificationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, … … 1186 1214 { "setWillSendRequestReturnsNullOnRedirect", setWillSendRequestReturnsNullOnRedirectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1187 1215 { "setWindowIsKey", setWindowIsKeyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1216 { "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1188 1217 { "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1189 1218 { "testRepaint", testRepaintCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.h
r48915 r49091 204 204 bool geolocationPermission() const { return m_geolocationPermission; } 205 205 206 void showWebInspector(); 207 void closeWebInspector(); 208 void evaluateInWebInspector(long callId, JSStringRef script); 209 206 210 private: 207 211 bool m_dumpAsPDF; -
trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r48222 r49091 472 472 printf("LayoutTestController::addUserStyleSheet not implemented.\n"); 473 473 } 474 475 void LayoutTestController::showWebInspector() 476 { 477 // FIXME: Implement this. 478 } 479 480 void LayoutTestController::closeWebInspector() 481 { 482 // FIXME: Implement this. 483 } 484 485 void LayoutTestController::evaluateInWebInspector(long callId, JSStringRef script) 486 { 487 // FIXME: Implement this. 488 } -
trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r49034 r49091 52 52 #import <WebKit/WebHistory.h> 53 53 #import <WebKit/WebHistoryPrivate.h> 54 #import <WebKit/WebInspector .h>54 #import <WebKit/WebInspectorPrivate.h> 55 55 #import <WebKit/WebGeolocationMockPrivate.h> 56 56 #import <WebKit/WebNSURLExtras.h> … … 493 493 } 494 494 495 void LayoutTestController::showWebInspector() 496 { 497 [[[mainFrame webView] inspector] show:nil]; 498 } 499 500 void LayoutTestController::closeWebInspector() 501 { 502 [[[mainFrame webView] inspector] close:nil]; 503 } 504 505 void LayoutTestController::evaluateInWebInspector(long callId, JSStringRef script) 506 { 507 RetainPtr<CFStringRef> scriptCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, script)); 508 NSString *scriptNS = (NSString *)scriptCF.get(); 509 [[[mainFrame webView] inspector] evaluateInFrontend:nil callId:callId script:scriptNS]; 510 } -
trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r49034 r49091 870 870 webView->addUserStyleSheetToGroup(_bstr_t(L"org.webkit.DumpRenderTree").GetBSTR(), 1, bstrT(source).GetBSTR(), 0, 0, 0, 0, 0); 871 871 } 872 873 void LayoutTestController::showWebInspector() 874 { 875 COMPtr<IWebViewPrivate> webView; 876 if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView)))) 877 return; 878 879 COMPtr<IWebInspector> inspector; 880 if (SUCCEEDED(webView->inspector(&inspector))) 881 inspector->show(); 882 } 883 884 void LayoutTestController::closeWebInspector() 885 { 886 COMPtr<IWebViewPrivate> webView; 887 if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView)))) 888 return; 889 890 COMPtr<IWebInspector> inspector; 891 if (SUCCEEDED(webView->inspector(&inspector))) 892 inspector->close(); 893 } 894 895 void LayoutTestController::evaluateInWebInspector(long callId, JSStringRef script) 896 { 897 COMPtr<IWebViewPrivate> webView; 898 if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView)))) 899 return; 900 901 COMPtr<IWebInspectorPrivate> inspector; 902 if (SUCCEEDED(webView->inspectorPrivate(&inspector))) 903 inspector->evaluateInFrontend(callId, bstrT(script).GetBSTR()); 904 } -
trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
r48222 r49091 299 299 printf("LayoutTestController::addUserStyleSheet not implemented.\n"); 300 300 } 301 302 void LayoutTestController::showWebInspector() 303 { 304 // FIXME: Implement this. 305 } 306 307 void LayoutTestController::closeWebInspector() 308 { 309 // FIXME: Implement this. 310 } 311 312 void LayoutTestController::evaluateInWebInspector(long callId, JSStringRef script) 313 { 314 // FIXME: Implement this. 315 }
Note: See TracChangeset
for help on using the changeset viewer.