Changeset 202522 in webkit
- Timestamp:
- Jun 27, 2016 5:23:09 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202517 r202522 1 2016-06-27 Brian Burg <bburg@apple.com> 2 3 Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole 4 https://bugs.webkit.org/show_bug.cgi?id=128092 5 <rdar://problem/15966526> 6 7 Reviewed by Timothy Hatcher. 8 9 Add some really basic coverage for RuntimeManager.defaultExecutionContextIdentifier 10 and using it in RuntimeManager.evaluateInInspectedWindow. 11 12 * inspector/runtime/change-execution-context-identifier-expected.txt: Added. 13 * inspector/runtime/change-execution-context-identifier.html: Added. 14 * inspector/runtime/resources/change-execution-context-identifier-subframe.html: Added. 15 1 16 2016-06-27 Benjamin Poulain <benjamin@webkit.org> 2 17 -
trunk/Source/WebInspectorUI/ChangeLog
r202384 r202522 1 2016-06-27 Brian Burg <bburg@apple.com> 2 3 Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole 4 https://bugs.webkit.org/show_bug.cgi?id=128092 5 <rdar://problem/15966526> 6 7 Reviewed by Timothy Hatcher. 8 9 This is a layering violation which makes it harder to use RuntimeManager.evaluateInInspectedWindow 10 from a testing context where the QuickConsole view does not exist. 11 12 Store the selected execution context identifier on RuntimeManager and use it 13 when doing subsequent evaluations that act on the currently selected frame. 14 15 * UserInterface/Controllers/RuntimeManager.js: 16 (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow): 17 (WebInspector.RuntimeManager.prototype.saveResult): 18 Use local state. 19 20 (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier): 21 (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier): 22 Added. 23 24 (WebInspector.RuntimeManager): 25 * UserInterface/Models/ExecutionContext.js: 26 (WebInspector.ExecutionContext): 27 Move the symbolic name for the top level execution context to RuntimeManager. 28 29 * UserInterface/Test/Test.js: 30 (WebInspector.loaded): No need to stub out WebInspector.QuickConsole any more. 31 32 * UserInterface/Views/QuickConsole.js: 33 (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged): 34 (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame): 35 (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): 36 (WebInspector.QuickConsole.prototype._pathComponentSelected): 37 For now, set RuntimeManager's selected execution context whenever we set the 38 selected path component. In a future patch, we should invert the dependency and have 39 the selected component change whenever RuntimeManager.defaultExecutionContext changes. 40 1 41 2016-06-23 Joseph Pecoraro <pecoraro@apple.com> 2 42 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/RuntimeManager.js
r201855 r202522 83 83 84 84 // COMPATIBILITY (iOS 8): "saveResult" did not exist. 85 var contextId = WebInspector.quickConsole.executionContextIdentifier;85 let contextId = this.defaultExecutionContextIdentifier; 86 86 RuntimeAgent.evaluate.invoke({expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, contextId, returnByValue, generatePreview, saveResult}, evalCallback.bind(this)); 87 87 } … … 105 105 RuntimeAgent.saveResult(remoteObject.asCallArgument(), mycallback); 106 106 else 107 RuntimeAgent.saveResult(remoteObject.asCallArgument(), WebInspector.quickConsole.executionContextIdentifier, mycallback);107 RuntimeAgent.saveResult(remoteObject.asCallArgument(), this.defaultExecutionContextIdentifier, mycallback); 108 108 } 109 109 … … 123 123 }); 124 124 } 125 126 get defaultExecutionContextIdentifier() { return this._defaultExecutionContextIdentifier; } 127 set defaultExecutionContextIdentifier(value) { this._defaultExecutionContextIdentifier = value; } 125 128 }; 129 130 WebInspector.RuntimeManager.TopLevelExecutionContextIdentifier = undefined; 126 131 127 132 WebInspector.RuntimeManager.Event = { -
trunk/Source/WebInspectorUI/UserInterface/Models/ExecutionContext.js
r188993 r202522 30 30 super(); 31 31 32 console.assert(typeof id === "number" || id === WebInspector. QuickConsole.MainFrameContextExecutionIdentifier);32 console.assert(typeof id === "number" || id === WebInspector.RuntimeManager.TopLevelExecutionContextIdentifier); 33 33 console.assert(typeof name === "string"); 34 34 -
trunk/Source/WebInspectorUI/UserInterface/Test/Test.js
r201171 r202522 63 63 this.replayManager = new WebInspector.ReplayManager; 64 64 65 // Global controllers.66 this.quickConsole = {executionContextIdentifier: undefined};67 68 65 document.addEventListener("DOMContentLoaded", this.contentLoaded); 69 66 -
trunk/Source/WebInspectorUI/UserInterface/Views/QuickConsole.js
r197245 r202522 150 150 delete this._restoreSelectedExecutionContextForFrame; 151 151 this._selectedExecutionContextPathComponent = newExecutionContextPathComponent; 152 WebInspector.runtimeManager.defaultExecutionContextIdentifier = this.executionContextIdentifier; 152 153 this._rebuildExecutionContextPathComponents(); 153 154 } … … 261 262 next.previousSibling = prev; 262 263 263 if (this._selectedExecutionContextPathComponent === executionContextPathComponent) 264 if (this._selectedExecutionContextPathComponent === executionContextPathComponent) { 264 265 this._selectedExecutionContextPathComponent = this._mainFrameExecutionContextPathComponent; 266 WebInspector.runtimeManager.defaultExecutionContextIdentifier = this.executionContextIdentifier; 267 } 265 268 266 269 this._otherExecutionContextPathComponents.remove(executionContextPathComponent, true); … … 285 288 var newExecutionContextPathComponent = this._insertExecutionContextPathComponentForFrame(frame, true); 286 289 287 if (wasSelected) 290 if (wasSelected) { 288 291 this._selectedExecutionContextPathComponent = newExecutionContextPathComponent; 292 WebInspector.runtimeManager.defaultExecutionContextIdentifier = this.executionContextIdentifier; 293 } 289 294 290 295 this._rebuildExecutionContextPathComponents(); … … 297 302 298 303 this._selectedExecutionContextPathComponent = event.data.pathComponent; 304 WebInspector.runtimeManager.defaultExecutionContextIdentifier = this.executionContextIdentifier; 299 305 300 306 this._rebuildExecutionContextPathComponents(); … … 326 332 WebInspector.QuickConsole.ToolbarTopBorder = 1; 327 333 328 WebInspector.QuickConsole.MainFrameContextExecutionIdentifier = undefined;329 330 334 WebInspector.QuickConsole.Event = { 331 335 DidResize: "quick-console-did-resize"
Note: See TracChangeset
for help on using the changeset viewer.