Changeset 202351 in webkit
- Timestamp:
- Jun 22, 2016 2:41:01 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r202347 r202351 1 2016-06-22 Brian Burg <bburg@apple.com> 2 3 Web Automation: Automation.inspectBrowsingContext should have an option to enable timeline auto-capturing 4 https://bugs.webkit.org/show_bug.cgi?id=159004 5 <rdar://problem/26931269> 6 7 Reviewed by Joseph Pecoraro. 8 9 Automation.inspectBrowsingContext was added to make it easier to hit breakpoints inside of 10 code evaluated using Automation.evaluateJavaScriptFunction. I recently changed the behavior 11 of this command to automatically start profiling the page as soon as the inspector attached 12 so that a full timeline recording could be obtained. However, starting a timeline recording 13 turns off the debugger, so this command is not so useful for debugging right now. 14 15 Add a new option, enableAutoCapturing, to the inspectBrowsingContext command. Don't toggle 16 profiling automatically unless this optional flag is present and set to true. 17 18 * UIProcess/Automation/Automation.json: 19 * UIProcess/Automation/WebAutomationSession.cpp: 20 (WebKit::WebAutomationSession::inspectBrowsingContext): 21 (WebKit::WebAutomationSession::inspectorFrontendLoaded): Deleted. 22 * UIProcess/Automation/WebAutomationSession.h: 23 1 24 2016-06-22 Tim Horton <timothy_horton@apple.com> 2 25 -
trunk/Source/WebKit2/UIProcess/Automation/Automation.json
r200702 r202351 298 298 "description": "Inspect the specified browsing context using Web Inspector.", 299 299 "parameters": [ 300 { "name": "handle", "$ref": "BrowsingContextHandle", "description": "The handle for the browsing context that should be inspected." } 300 { "name": "handle", "$ref": "BrowsingContextHandle", "description": "The handle for the browsing context that should be inspected." }, 301 { "name": "enableAutoCapturing", "type": "boolean", "optional": true, "description": "If this option is present and set to true, the Web Inspector will automatically start a timeline recording of the specified browsing context once it is attached. Note that this disables the debugger for the duration of the recording." } 301 302 ], 302 303 "async": true -
trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp
r200959 r202351 434 434 } 435 435 436 void WebAutomationSession::inspectBrowsingContext(Inspector::ErrorString& errorString, const String& handle, Ref<InspectBrowsingContextCallback>&& callback)436 void WebAutomationSession::inspectBrowsingContext(Inspector::ErrorString& errorString, const String& handle, const bool* optionalEnableAutoCapturing, Ref<InspectBrowsingContextCallback>&& callback) 437 437 { 438 438 WebPageProxy* page = webPageProxyForHandle(handle); … … 446 446 // Don't bring the inspector to front since this may be done automatically. 447 447 // We just want it loaded so it can pause if a breakpoint is hit during a command. 448 if (page->inspector()) 448 if (page->inspector()) { 449 449 page->inspector()->connect(); 450 451 // Start collecting profile information immediately so the entire session is captured. 452 if (optionalEnableAutoCapturing && *optionalEnableAutoCapturing) 453 page->inspector()->togglePageProfiling(); 454 } 450 455 } 451 456 … … 460 465 if (auto callback = m_pendingInspectorCallbacksPerPage.take(page.pageID())) 461 466 callback->sendSuccess(InspectorObject::create()); 462 463 // Start collecting profile information immediately so the entire session is captured.464 page.inspector()->togglePageProfiling();465 467 } 466 468 -
trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.h
r200702 r202351 106 106 void goForwardInBrowsingContext(Inspector::ErrorString&, const String&, Ref<GoForwardInBrowsingContextCallback>&&) override; 107 107 void reloadBrowsingContext(Inspector::ErrorString&, const String&, Ref<ReloadBrowsingContextCallback>&&) override; 108 void inspectBrowsingContext(Inspector::ErrorString&, const String&, Ref<InspectBrowsingContextCallback>&&) override;108 void inspectBrowsingContext(Inspector::ErrorString&, const String&, const bool* optionalEnableAutoCapturing, Ref<InspectBrowsingContextCallback>&&) override; 109 109 void evaluateJavaScriptFunction(Inspector::ErrorString&, const String& browsingContextHandle, const String* optionalFrameHandle, const String& function, const Inspector::InspectorArray& arguments, const bool* optionalExpectsImplicitCallbackArgument, const int* optionalCallbackTimeout, Ref<Inspector::AutomationBackendDispatcherHandler::EvaluateJavaScriptFunctionCallback>&&) override; 110 110 void performMouseInteraction(Inspector::ErrorString&, const String& handle, const Inspector::InspectorObject& requestedPosition, const String& mouseButton, const String& mouseInteraction, const Inspector::InspectorArray& keyModifiers, RefPtr<Inspector::Protocol::Automation::Point>& updatedPosition) override;
Note: See TracChangeset
for help on using the changeset viewer.