1 2016-11-15 Joseph Pecoraro <pecoraro@apple.com>
3 Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
4 https://bugs.webkit.org/show_bug.cgi?id=164793
6 Reviewed by Matt Baker.
8 * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
9 * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
10 * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
11 * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
12 * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
13 * Versions/Inspector-iOS-10.0.json:
14 * Versions/Inspector-iOS-7.0.json:
15 * Versions/Inspector-iOS-8.0.json:
16 * Versions/Inspector-iOS-9.0.json:
17 * Versions/Inspector-iOS-9.3.json:
19 2016-11-15 Joseph Pecoraro <pecoraro@apple.com>
21 Web Inspector: URL Breakpoints that resolve in multiple workers should only appear in the UI once
22 https://bugs.webkit.org/show_bug.cgi?id=164334
23 <rdar://problem/29073523>
25 Reviewed by Matt Baker.
27 * UserInterface/Views/DebuggerSidebarPanel.js:
28 (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
29 Don't add a duplicate BreakpointTreeElements for the same Breakpoint.
31 2016-11-14 Joseph Pecoraro <pecoraro@apple.com>
33 Web Inspector: Worker debugging should pause all targets and view call frames in all targets
34 https://bugs.webkit.org/show_bug.cgi?id=164305
35 <rdar://problem/29056192>
37 Reviewed by Timothy Hatcher.
39 This implements a policy where, when one Target ("Thread") pauses
40 the frontend triggers a pause in all other Targets. The intended
41 user experience is "all threads pause" whenever the frontend shows
42 the debugger paused UI.
44 DebuggerManager has a few straight forward changes:
46 - The paused state reflects if any target is paused.
47 - The Paused Event is fired when going from !paused -> paused.
48 This means when the first target pauses.
49 - The Resumed Event is fired when going from paused -> !paused.
50 This means only after all targets have resumed.
51 - The CallFrameDidChange Event now includes the Target that updated.
53 When a Target first pauses the frontend then immediately pauses all
54 other Targets. This puts them into a "pausing" state (we display as
55 Idle) and they will pause as soon as they start executing JavaScript.
57 When a Target steps the "paused" state isn't changing. So this is
58 just a CallFramesDidChange update.
60 When clicking Resume we resume all targets. This is will be the normal,
61 expected way users resume execution. Note that one of the threads may
62 then hit a breakpoint and re-pause all threads.
64 Sometimes when multiple threads are paused you may want to run an
65 individual thread to completion but keep other threads paused. There
66 is a context menu on the ThreadTreeElement to resume just that
67 single thread. It will continue and pause for its next run loop.
69 * Localizations/en.lproj/localizedStrings.js:
70 * UserInterface/Images/Thread.svg: Added.
71 * UserInterface/Images/gtk/Thread.svg: Added.
72 * UserInterface/Main.html:
73 New strings and files.
75 * UserInterface/Base/Main.js:
76 (WebInspector.loaded):
77 * UserInterface/Test/Test.js:
78 (WebInspector.loaded):
79 Place the TargetManager first since other managers may want to listen
80 for TargetAdded / TargetRemoved events.
82 * UserInterface/Controllers/DebuggerManager.js:
83 (WebInspector.DebuggerManager.prototype.get paused):
84 This is now a computed state.
86 (WebInspector.DebuggerManager.prototype.pause):
87 (WebInspector.DebuggerManager.prototype.resume):
90 (WebInspector.DebuggerManager.prototype.stepOver):
91 (WebInspector.DebuggerManager.prototype.stepInto):
92 (WebInspector.DebuggerManager.prototype.stepOut):
93 (WebInspector.DebuggerManager.prototype.reset):
94 Update to use the paused computed property.
96 (WebInspector.DebuggerManager.prototype.continueUntilNextRunLoop):
97 Issue the new Debugger.continueUntilNextRunLoop command
100 (WebInspector.DebuggerManager.prototype.initializeTarget):
101 When a new Target is created and we were already paused,
102 then start that Worker in a paused state.
104 (WebInspector.DebuggerManager.prototype.debuggerDidPause):
105 Recover from bad cases where the backend informs the frontend about
106 internal JavaScript that it shouldn't know about. Legacy backend do
107 this but also there are corner cases we need to handle.
108 Dispatch events appropriately now that multiple targets may be paused.
110 (WebInspector.DebuggerManager.prototype._didResumeInternal):
111 Dispatch events appropriately now that multiple targets may be paused.
113 (WebInspector.DebuggerManager.prototype._targetRemoved):
114 Remove debugger data for targets that go away to avoid leaks.
116 * UserInterface/Models/DebuggerData.js:
117 (WebInspector.DebuggerData):
118 (WebInspector.DebuggerData.prototype.get paused):
119 (WebInspector.DebuggerData.prototype.get pausing):
120 Move some more per-Target state into DebuggerData.
122 (WebInspector.DebuggerData.prototype.pauseIfNeeded):
123 (WebInspector.DebuggerData.prototype.resumeIfNeeded):
124 (WebInspector.DebuggerData.prototype.continueUntilNextRunLoop):
125 These should only be called by DebuggerManager. They correctly
126 update the state of the DebuggerData for this Target, and also
127 issue the underlying command to the target.
129 (WebInspector.DebuggerData.prototype.updateForPause):
130 (WebInspector.DebuggerData.prototype.updateForResume):
131 Handle a special case where continueUntilNextRunLoop triggers
132 an invisible "pause" on the backend that we should mirror.
134 * UserInterface/Protocol/Target.js:
135 (WebInspector.MainTarget):
136 (WebInspector.MainTarget.prototype.get displayName):
137 (WebInspector.MainTarget.prototype.initialize):
138 Better display names.
140 * UserInterface/Views/DebuggerSidebarPanel.js:
141 (WebInspector.DebuggerSidebarPanel):
142 (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
143 (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
144 (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks):
145 (WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement):
146 (WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks):
147 (WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks):
148 (WebInspector.DebuggerSidebarPanel.prototype._findThreadTreeElementForTarget):
149 (WebInspector.DebuggerSidebarPanel.prototype._targetAdded):
150 (WebInspector.DebuggerSidebarPanel.prototype._targetRemoved):
151 (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
152 (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
153 The DebuggerSidebar still has a single "Call Stacks" section, but maintains
154 two TreeOutlines and only shows one at a time. The Single Thread view shows
155 a flat list of the call frames for the Main Target when it is the only target.
156 The Multiple Threads view shows a list of Threads and their call frames.
157 We always keep both up to date, because we may need to swap between them
158 purely as Targets are added / removed. There is a bit of extra logic to
159 ensure we select elements properly based only on the visible tree outline.
161 * UserInterface/Views/LogContentView.js:
162 (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
163 When evaluating in a particular target, "runAfterPendingDispatches"
164 must wait for all other commands in that particular target to have
165 completed. So use the target specific version.
167 * UserInterface/Views/NavigationSidebarPanel.js:
168 (WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
169 Gracefully handle a few more TreeElements without a represented object.
171 * UserInterface/Views/IdleTreeElement.css: Added.
172 (.details-section.call-stack .idle .icon):
173 * UserInterface/Views/IdleTreeElement.js: Added.
174 (WebInspector.IdleTreeElement):
175 Very basic tree element to encapsulate an Idle call frame with an
176 empty represented object.
178 * UserInterface/Views/ThreadTreeElement.css: Added.
179 (.details-section.call-stack .thread .icon):
180 * UserInterface/Views/ThreadTreeElement.js: Added.
181 (WebInspector.ThreadTreeElement):
182 (WebInspector.ThreadTreeElement.prototype.get target):
183 (WebInspector.ThreadTreeElement.prototype.refresh):
184 (WebInspector.ThreadTreeElement.prototype.onattach):
185 (WebInspector.ThreadTreeElement.prototype.oncontextmenu):
186 ThreadTreeElement has no represented object, but makes it easy
187 to refresh a list of CallFrameTreeElements for a given target.
189 2016-11-14 Timothy Hatcher <timothy@apple.com>
191 Web Inspector: Disable Warning Filter in Debugger Tab By Default
192 https://bugs.webkit.org/show_bug.cgi?id=164723
193 rdar://problem/29251780
195 Reviewed by Joseph Pecoraro.
197 * UserInterface/Views/DebuggerSidebarPanel.js:
198 (WebInspector.DebuggerSidebarPanel): Made "debugger-show-resources-with-issues-only" false by default.
200 2016-11-14 Nikita Vasilyev <nvasilyev@apple.com>
202 Web Inspector: Settings tab should look more like a native macOS view
203 https://bugs.webkit.org/show_bug.cgi?id=164708
204 <rdar://problem/29241296>
206 Reviewed by Timothy Hatcher.
208 * UserInterface/Views/SettingsTabContentView.css:
209 (.content-view.settings):
210 (.content-view.settings > .header):
211 (.content-view.settings > .setting-container):
212 Match macOS Sierra default font size for settings view.
214 (.content-view.settings > .setting-container > .setting-name):
215 (.content-view.settings > .setting-container > .setting-value-controller):
216 (.content-view.settings > .setting-container > .setting-value-controller input):
217 (.content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]):
218 Make checkbox larger.
220 (.content-view.settings > .setting-container > .setting-value-controller select):
221 (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
222 Decrease the width of the number fields to make them just wide enough to fit 2 digit numbers.
224 2016-11-12 Joseph Pecoraro <pecoraro@apple.com>
226 Web Inspector: Type Profiler and Code Coverage Profiler should work in Workers
227 https://bugs.webkit.org/show_bug.cgi?id=164682
229 Reviewed by Darin Adler.
231 * UserInterface/Controllers/BasicBlockAnnotator.js:
232 * UserInterface/Models/ScriptSyntaxTree.js:
233 (WebInspector.ScriptSyntaxTree.prototype.updateTypes):
234 Use the target associated with the Script.
236 * UserInterface/Protocol/Target.js:
237 (WebInspector.WorkerTarget.prototype.initialize):
238 When initializing a Worker Target, match the existing state
239 of the Page for these profilers.
241 * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
242 * UserInterface/Views/SourceCodeTextEditor.js:
243 (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation):
244 (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
245 Use the correct target for this Script / Resource.
247 (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
248 (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
249 Enable / disable for all targets when toggling profilers.
251 2016-11-11 Anthony Ricaud <rik@webkit.org>
253 Web Inspector: Whitespace in Editor should be less visible than regular content
254 https://bugs.webkit.org/show_bug.cgi?id=164660
256 Reviewed by Matt Baker.
258 * UserInterface/Views/CodeMirrorOverrides.css:
259 (.show-whitespace-characters .CodeMirror .cm-whitespace::before):
261 2016-11-11 Nikita Vasilyev <nvasilyev@apple.com>
263 Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off
264 https://bugs.webkit.org/show_bug.cgi?id=163407
265 <rdar://problem/28764230>
267 Reviewed by Timothy Hatcher.
269 Turning Type Profiler off by clicking [T] icon now disables its backend by calling RuntimeAgent.disableTypeProfiler().
271 * UserInterface/Views/SourceCodeTextEditor.js:
272 (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
274 2016-11-11 Nikita Vasilyev <nvasilyev@apple.com>
276 Web Inspector: Settings tab: make the header smaller to fit more content
277 https://bugs.webkit.org/show_bug.cgi?id=164613
278 <rdar://problem/29206007>
280 Reviewed by Timothy Hatcher.
282 * UserInterface/Views/SettingsTabContentView.css:
283 (.content-view.settings > .header):
284 Use hv units for margin. 1vh = 1% of viewport height. When Web Inspector window is taller, the margin is larger.
286 (.content-view.settings > .setting-container):
287 Convert padding to margin to make spacing between the header and the first section better.
289 2016-11-10 Nikita Vasilyev <nvasilyev@apple.com>
291 Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off
292 https://bugs.webkit.org/show_bug.cgi?id=163407
293 <rdar://problem/28764230>
295 Reviewed by Joseph Pecoraro.
297 Turning Code Coverage off by clicking [C] icon now disables its backend by calling RuntimeAgent.disableControlFlowProfiler().
299 * UserInterface/Views/SourceCodeTextEditor.js:
300 (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
302 2016-11-10 Aaron Chu <aaron_chu@apple.com>
304 Web Inspector: AXI: clarify button roles (e.g. toggle or popup button)
305 https://bugs.webkit.org/show_bug.cgi?id=130726
306 <rdar://problem/16420420>
308 Reviewed by Brian Burg.
310 Updated Inspector to show the button type using the new mapping information.
312 * Localizations/en.lproj/localizedStrings.js:
313 * UserInterface/Models/DOMNode.js:
314 (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
315 (WebInspector.DOMNode.prototype.accessibilityProperties):
316 * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
317 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
318 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
320 2016-11-09 Joseph Pecoraro <pecoraro@apple.com>
322 Web Inspector: DebuggerManager.Event.Resumed introduces test flakiness
323 https://bugs.webkit.org/show_bug.cgi?id=161951
324 <rdar://problem/28295767>
326 Reviewed by Brian Burg.
328 * UserInterface/Controllers/DebuggerManager.js:
329 (WebInspector.DebuggerManager.prototype.debuggerDidResume):
330 Now, Debugger.resumed events really mean the debugger resumed,
331 so act immediately instead of guessing. We must still guess
334 * UserInterface/Test/Test.js:
335 When the inspector frontend encounters an issue, log it.
337 * UserInterface/Views/DebuggerSidebarPanel.js:
338 (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
339 (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
340 Always enable the step out button. I don't think it makes sense to disable
341 it sometimes, and if there are issues with this we should solve the issues
342 instead of hiding them.
344 2016-11-09 Joseph Pecoraro <pecoraro@apple.com>
346 Web Inspector: Associate Worker Resources with the Worker and not the Page
347 https://bugs.webkit.org/show_bug.cgi?id=164342
348 <rdar://problem/29075775>
350 Reviewed by Timothy Hatcher.
352 A Target may have its own list of Resource. For example, Workers may
353 request any resources via XHR/Fetch. So we associate a ResourceCollection
354 with a Target, and ensure we show them in Web Inspector as you would expect.
355 At this point, Target starts acting like Frame. Target has a resourceCollection
356 and extraScriptsCollection just like Frame. Target has events for ResourceAdded
359 Even though Resource loads are happening in Workers, the Network data
360 still comes from the Page's Network agent. The added "targetId" data
361 with the Resource will let us associate a Resoure with a Target.
363 When opening inspector after a page has loaded, the frontend loads Resources
364 via the Page.getResourceTree path. In this case, the frontend may be
365 informed of Resources for a Target that it does not know about yet. In
366 these cases, it sets them aside as Orphaned resources for a target. Later,
367 when that Target is created, it will adopt its Orphaned resources.
369 Places that used to listen to just Frame.Event.ResourceWasAdded should now
370 also listen for Target.Event.ResourceAdded to ensure it sees the resources
371 associated with non-page targets.
373 * UserInterface/Protocol/Target.js:
374 (WebInspector.Target):
375 (WebInspector.Target.prototype.get identifier):
376 (WebInspector.Target.prototype.get resourceCollection):
377 (WebInspector.Target.prototype.get extraScriptCollection):
378 (WebInspector.Target.prototype.addResource):
379 (WebInspector.Target.prototype.adoptResource):
380 (WebInspector.Target.prototype.addScript):
381 Give Target resource collections.
383 (WebInspector.MainTarget):
384 (WebInspector.MainTarget.prototype.get mainResource):
385 Pass through to the FrameResourceManager for the MainTarget.
387 (WebInspector.WorkerTarget):
388 (WebInspector.WorkerTarget.prototype.initialize):
389 Adopt orphaned resources on creation.
391 * UserInterface/Models/Resource.js:
392 (WebInspector.Resource):
393 (WebInspector.Resource.prototype.get target):
394 (WebInspector.Resource.prototype.get type):
395 Resource now has a Target. During creation, if there is a targetId
396 then we must produce a Target or null (orphaned).
398 (WebInspector.Resource.prototype.associateWithScript):
399 When associating a Resource with a Script, we can use this opportunity
400 to convert from an XML / Other type to Script.
402 * UserInterface/Models/Script.js:
403 (WebInspector.Script.prototype._resolveResource):
404 When associating Scripts with a resource we must associate resources
405 from within the proper Target. If it is the Main target we still use
406 the FrameResourceManager which keep searches across all Frames.
408 * UserInterface/Protocol/NetworkObserver.js:
409 (WebInspector.NetworkObserver.prototype.requestWillBeSent):
410 * UserInterface/Controllers/FrameResourceManager.js:
411 (WebInspector.FrameResourceManager.prototype.initialize):
412 (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
413 (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
414 (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
415 (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
416 (WebInspector.FrameResourceManager.prototype.adoptOrphanedResourcesForTarget):
417 (WebInspector.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
418 (WebInspector.FrameResourceManager.prototype._addResourceToTarget):
419 (WebInspector.FrameResourceManager.prototype._createResource):
420 (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
421 (WebInspector.FrameResourceManager.prototype._addOrphanedResource):
422 (WebInspector.FrameResourceManager.prototype._mainFrameDidChange):
423 (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Deleted.
424 When creating Resources from Network events we may now have a targetId.
425 Once created a Resource must be associated with a Frame, Target, or orphaned.
427 * UserInterface/Main.html:
428 * UserInterface/Views/TargetTreeElement.js: Removed.
429 * UserInterface/Views/WorkerTreeElement.js: Added.
430 (WebInspector.WorkerTreeElement):
431 (WebInspector.WorkerTreeElement.prototype.get target):
432 (WebInspector.WorkerTreeElement.prototype.onexpand):
433 (WebInspector.WorkerTreeElement.prototype.oncollapse):
434 (WebInspector.WorkerTreeElement.prototype.onpopulate):
435 (WebInspector.WorkerTreeElement.prototype.updateSourceMapResources):
436 (WebInspector.WorkerTreeElement.prototype.onattach):
437 (WebInspector.WorkerTreeElement.prototype.compareChildTreeElements):
438 (WebInspector.WorkerTreeElement.prototype._handleContextMenuEvent):
439 (WebInspector.WorkerTreeElement.prototype._scriptAdded):
440 (WebInspector.WorkerTreeElement.prototype._resourceAdded):
441 Convert TargetTreeElement to WorkerTreeElement as that is clearer.
442 Behave like FrameTreeElement and populate resources on creation,
443 handle SourceMapResource, etc.
445 * UserInterface/Views/FolderizedTreeElement.js:
446 (WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings):
447 (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
448 (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
449 If the display name for a folder is `null` then there is no folder,
450 and place such child tree elements at the top level. This will be
451 the case for a Worker's Script's, which we choose not to folderize.
453 * UserInterface/Controllers/DebuggerManager.js:
454 (WebInspector.DebuggerManager.prototype.scriptDidParse):
455 * UserInterface/Controllers/TargetManager.js:
456 (WebInspector.TargetManager.prototype.targetForIdentifier):
458 * UserInterface/Models/DefaultDashboard.js:
459 (WebInspector.DefaultDashboard):
460 * UserInterface/Controllers/TimelineManager.js:
461 (WebInspector.TimelineManager):
462 * UserInterface/Controllers/WorkerManager.js:
463 (WebInspector.WorkerManager.prototype.workerCreated):
464 * UserInterface/Views/OpenResourceDialog.js:
465 (WebInspector.OpenResourceDialog.prototype.didDismissDialog):
466 (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
467 (WebInspector.OpenResourceDialog.prototype._addScriptsForTarget): Deleted.
468 (WebInspector.OpenResourceDialog.prototype._addResourcesForTarget): Added.
469 Ensure those that listen for Frame.Event.ResourceWasAdded now also
470 listen for Target.Event.ResourceAdded.
472 * UserInterface/Views/ContextMenuUtilities.js:
473 (WebInspector.appendContextMenuItemsForSourceCode):
474 (WebInspector.appendContextMenuItemsForResource): Deleted.
475 * UserInterface/Views/ResourceTimelineDataGridNode.js:
476 (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
477 * UserInterface/Views/ResourceTreeElement.js:
478 (WebInspector.ResourceTreeElement.prototype._updateTitles):
479 (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent):
480 Generalize ContextMenu helper to SourceCode so it can be used on a Script or Resource.
482 * UserInterface/Views/ResourceDetailsSidebarPanel.js:
483 (WebInspector.ResourceDetailsSidebarPanel.prototype.inspect):
484 When looking at a WorkerTarget's mainResource (Script) show the
485 Resource Details sidebar for its Resource.
487 * UserInterface/Views/ResourceSidebarPanel.js:
488 (WebInspector.ResourceSidebarPanel):
489 (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
490 (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
491 (WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource):
492 (WebInspector.ResourceSidebarPanel.prototype._targetRemoved):
493 (WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget): Deleted.
494 Simplify ResourceSidebarPanel to only handle adding WorkerTreeElements,
495 which will do the rest of the work for their Resources/Scripts.
497 * UserInterface/Views/SourceCodeTreeElement.js:
498 (WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
499 When we were changing the type of a resource, it would remove and re-insert.
500 This would collapse the parent if it was the only child in removal, and not
501 expand the parent when re-inserting. This ensures we re-expand.
503 2016-11-09 Nikita Vasilyev <nvasilyev@apple.com>
505 Web Inspector: Settings tab sections overlap each other in docked Inspector window
506 https://bugs.webkit.org/show_bug.cgi?id=164564
508 Reviewed by Joseph Pecoraro.
510 * UserInterface/Views/SettingsTabContentView.css:
511 (.content-view.settings):
512 Make settings sections non-shrinkable and make the content view vertically scrollable.
514 (.content-view.settings > .setting-container):
515 Set vertical padding that looks good for non-shrinkable sections.
517 2016-11-09 Nikita Vasilyev <nvasilyev@apple.com>
519 Web Inspector: Settings tab: Checkbox labels should be clickable
520 https://bugs.webkit.org/show_bug.cgi?id=164470
521 <rdar://problem/29133787>
523 Reviewed by Matt Baker.
525 * UserInterface/Views/SettingsTabContentView.js:
526 (WebInspector.SettingsTabContentView.prototype.initialLayout):
527 Add a label element to make checkboxes clickable.
529 2016-11-09 Devin Rousso <dcrousso+webkit@gmail.com>
531 Web Inspector: Allow FolderTreeElement to display content when selected
532 https://bugs.webkit.org/show_bug.cgi?id=164407
534 Reviewed by Timothy Hatcher.
536 * UserInterface/Main.html:
537 Add CollectionContentView and TitleView.
539 * UserInterface/Base/Main.js:
540 * UserInterface/Views/ContentView.js:
541 (WebInspector.ContentView.createFromRepresentedObject):
542 (WebInspector.ContentView.isViewable):
543 Add support for Collection as the representedObject of a content view.
545 * UserInterface/Views/CollectionContentView.css: Added.
546 (.content-view.collection):
547 (.content-view.collection > .content-view):
548 * UserInterface/Views/CollectionContentView.js: Added.
549 (WebInspector.CollectionContentView):
550 (WebInspector.CollectionContentView.prototype.initialLayout):
551 (WebInspector.CollectionContentView.prototype._addContentViewForItem):
552 (WebInspector.CollectionContentView.prototype._removeContentViewForItem):
553 (WebInspector.CollectionContentView.prototype._handleItemAdded):
554 (WebInspector.CollectionContentView.prototype._handleItemRemoved):
555 (WebInspector.CollectionContentView.prototype._handleContentError):
556 Takes in a Collection when constructed, and attempts to display a sub-ContentView for each
557 item in the collection if the type of the collection is viewable en masse. Currently, this
558 is only supported for WebInspector.Resource.Type.Image collections.
560 * UserInterface/Views/ResourceContentView.js:
561 (WebInspector.ResourceContentView.prototype._contentError):
562 Dispatch an event whenever the content fails to load.
564 * UserInterface/Views/ResourceSidebarPanel.js:
565 (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
566 * UserInterface/Views/ResourcesTabContentView.js:
567 (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
568 Allow FolderTreeElements to be selected.
570 * UserInterface/Views/TitleView.css: Added.
572 * UserInterface/Views/TitleView.js: Added.
573 (WebInspector.TitleView):
574 Basic view that displays the given text in the center of the viewable area.
576 2016-11-03 Nikita Vasilyev <nvasilyev@apple.com>
578 Web Inspector: Stack overflow when searching a timeline recording for JS function names
579 https://bugs.webkit.org/show_bug.cgi?id=161784
580 <rdar://problem/28219498>
582 Reviewed by Timothy Hatcher.
584 _populate method of ProfileNodeDataGridNode and ProfileDataGridNode traverses
585 all children of a given node. makeVisible function of DataGrid#_applyFiltersToNode
586 traverses all its parents to expand them. This creates an infinite recursion.
587 Remove "populate" event before appending child nodes to prevent it.
589 * UserInterface/Views/ProfileDataGridNode.js:
590 (WebInspector.ProfileDataGridNode.prototype._populate):
591 (WebInspector.ProfileDataGridNode):
592 * UserInterface/Views/ProfileNodeDataGridNode.js:
593 (WebInspector.ProfileNodeDataGridNode.prototype._populate):
594 (WebInspector.ProfileNodeDataGridNode):
596 2016-11-03 Devin Rousso <dcrousso+webkit@gmail.com>
598 Web Inspector: Modify FolderTreeElement to have a Collection as a its represented object
599 https://bugs.webkit.org/show_bug.cgi?id=164349
601 Reviewed by Matt Baker.
603 * UserInterface/Views/FolderTreeElement.js:
604 (WebInspector.FolderTreeElement):
605 Now accepts a representedObject parameter, which must be a WebInspector.Collection.
607 * UserInterface/Views/FolderizedTreeElement.js:
608 (WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings):
609 (WebInspector.FolderizedTreeElement.prototype.updateParentStatus):
610 (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
611 (WebInspector.FolderizedTreeElement.prototype._settingsForRepresentedObject):
612 (WebInspector.FolderizedTreeElement.prototype._shouldGroupIntoFolders):
613 (WebInspector.FolderizedTreeElement):
614 Rework the logic for creating WebInspector.FolderTreeElement so that items for the
615 representedObject parameter may be passed in via registerFolderizeSettings.
617 * UserInterface/Views/FrameTreeElement.js:
618 (WebInspector.FrameTreeElement):
619 (WebInspector.FrameTreeElement.): Deleted.
620 (WebInspector.FrameTreeElement.makeChildCountCallback): Deleted.
621 Rework logic for calling registerFolderizeSettings to support the representedObject
622 parameter. Also changed calls to WebInspector.Frame to support the
623 WebInspector.Collection class.
625 * UserInterface/Views/ResourceSidebarPanel.js:
626 (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
627 (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
628 (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
629 Create WebInspector.Collection instances of Script model objects for additional folders
630 created by the Resources sidebar:
635 2016-11-02 Joseph Pecoraro <pecoraro@apple.com>
637 Web Inspector: Include DebuggerAgent in Workers - see, pause, and step through scripts
638 https://bugs.webkit.org/show_bug.cgi?id=164136
639 <rdar://problem/29028462>
641 Reviewed by Brian Burg.
643 By implementing DebuggerAgent, Workers will inform the frontend about
644 Scripts that evaluate in the Worker's VM and the Worker VM can pause
645 and send the pausing CallFrames to the frontend. This means that
646 WebInspector.Script and WebInspector.CallFrame will need to be made
647 target aware. This also means that each Target will have its own
648 set of debugger data, such as the list of scripts and pause data
649 like the pause reason / call frames. Previously all this data was
650 managed by DebuggerManager.
652 With this change we split that data out of DebuggerManager to be
653 per-target DebuggerData. DebuggerManager keeps `activeCallFrame`
654 but the list of scripts and pause data have moved into `DebuggerData`
655 which is per-target, accessed through DebuggerManager's new
656 dataForTarget(target) method.
658 Finally we make a few changes to the UserInterface to make Workers
659 and their scripts, appear grouped together. The Resources sidebar
660 previously had a single top level item for the Main Frame, which
661 has all its resources as its children (potentially grouped into
662 folders). With this change, each Worker gets its own top level
663 item as well, and the Worker's subresources (imported scripts)
666 We also now associate a single mainResource with Targets. In the
667 case of Workers, we assume and assert that this is a Script. If
668 this were to ever change we would need to adjust the assumptions.
670 * UserInterface/Main.html:
671 * UserInterface/Test.html:
674 * UserInterface/Base/Main.js:
675 * UserInterface/Test/Test.js:
676 Add WebInspector.assumingMainTarget to fill in all the places where
677 we assume the main target right now, but would need to handle non-main
678 targets as other agents are implemented in workers. For example profile
679 data that assumes the main target right now could be worker targets
680 when we implement ScriptProfiler / Heap agents.
682 * UserInterface/Protocol/Connection.js:
683 (InspectorBackend.WorkerConnection):
684 * UserInterface/Protocol/Target.js:
685 (WebInspector.Target):
686 (WebInspector.Target.prototype.get DebuggerAgent):
687 (WebInspector.Target.prototype.get mainResource):
688 (WebInspector.Target.prototype.set mainResource):
689 (WebInspector.WorkerTarget.prototype.initialize):
690 (WebInspector.WorkerTarget):
691 Include DebuggerAgent in Targets.
692 Include a mainResource for Worker Targets.
694 * UserInterface/Protocol/DebuggerObserver.js:
695 (WebInspector.DebuggerObserver.prototype.scriptParsed):
696 (WebInspector.DebuggerObserver.prototype.breakpointResolved):
697 (WebInspector.DebuggerObserver.prototype.paused):
698 (WebInspector.DebuggerObserver.prototype.resumed):
699 Pass the target on to managers when necessary.
701 * UserInterface/Models/DebuggerData.js: Added.
702 (WebInspector.DebuggerData):
703 (WebInspector.DebuggerData.prototype.get target):
704 (WebInspector.DebuggerData.prototype.get callFrames):
705 (WebInspector.DebuggerData.prototype.get pauseReason):
706 (WebInspector.DebuggerData.prototype.get pauseData):
707 (WebInspector.DebuggerData.prototype.get scripts):
708 (WebInspector.DebuggerData.prototype.scriptForIdentifier):
709 (WebInspector.DebuggerData.prototype.scriptsForURL):
710 (WebInspector.DebuggerData.prototype.reset):
711 (WebInspector.DebuggerData.prototype.addScript):
712 (WebInspector.DebuggerData.prototype.pause):
713 (WebInspector.DebuggerData.prototype.unpause):
714 Extract per-target data from DebuggerManager. This includes the list
715 of scripts evaluated in a Target, and any pause data for this target
716 such as the pause reason and call frames.
718 * UserInterface/Controllers/DebuggerManager.js:
719 (WebInspector.DebuggerManager.prototype.dataForTarget):
720 (WebInspector.DebuggerManager.prototype.get pauseReason): Deleted.
721 (WebInspector.DebuggerManager.prototype.get pauseData): Deleted.
722 (WebInspector.DebuggerManager.prototype.get callFrames): Deleted.
723 (WebInspector.DebuggerManager.prototype.reset):
724 New way to access per-target debugger data.
726 (WebInspector.DebuggerManager.prototype.initializeTarget):
727 When a new Target is created, synchronize frontend state with the target.
728 Things like the list of breakpoints and global breakpoint states.
730 (WebInspector.DebuggerManager.prototype.scriptForIdentifier):
731 (WebInspector.DebuggerManager.prototype.scriptsForURL):
732 Convenience accessors for scripts must now provide a Target.
734 (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
735 This is a convenience accessors for a list of all scripts across all targets
736 so this handles getting the list across all targets.
738 (WebInspector.DebuggerManager.prototype.pause):
739 (WebInspector.DebuggerManager.prototype.resume):
740 (WebInspector.DebuggerManager.prototype.stepOver):
741 (WebInspector.DebuggerManager.prototype.stepInto):
742 (WebInspector.DebuggerManager.prototype.stepOut):
743 (WebInspector.DebuggerManager.prototype.continueToLocation):
744 Stepping commands affect the current target with the active call frame.
745 Eventually we will change Pause and Resume behavior to affect all targets.
747 (WebInspector.DebuggerManager.prototype.addBreakpoint):
748 (WebInspector.DebuggerManager.prototype.breakpointResolved):
749 (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
750 (WebInspector.DebuggerManager.prototype._setBreakpoint):
751 (WebInspector.DebuggerManager.prototype._removeBreakpoint):
752 Breakpoints should be set on all targets, but we need a way
753 to set them on a specific target, when initializing an
754 individual target when we want to inform that single target
755 of all of the breakpoints.
757 (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
758 (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
759 Changing global breakpoint state should inform all targets.
761 (WebInspector.DebuggerManager.prototype.scriptDidParse):
762 Associate Scripts with a Target. Identify the main resource of a
763 Worker Target and set it as soon as we can.
765 (WebInspector.DebuggerManager.prototype.debuggerDidPause):
766 (WebInspector.DebuggerManager.prototype.debuggerDidResume):
767 (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
768 (WebInspector.DebuggerManager.prototype._scopeChainFromPayload):
769 (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
770 (WebInspector.DebuggerManager.prototype._mainResourceDidChange):
771 (WebInspector.DebuggerManager.prototype._didResumeInternal):
772 Pausing and resuming now happens per-target, so associate
773 created model objects (CallFrame, ScopeChain objects) and any
774 other necessary data with the target.
776 * UserInterface/Models/Breakpoint.js:
777 (WebInspector.Breakpoint):
778 (WebInspector.Breakpoint.prototype.get target):
779 (WebInspector.Breakpoint.prototype.get info):
780 * UserInterface/Models/CallFrame.js:
781 (WebInspector.CallFrame):
782 (WebInspector.CallFrame.prototype.get target):
783 (WebInspector.CallFrame.fromDebuggerPayload):
784 (WebInspector.CallFrame.fromPayload):
785 * UserInterface/Models/ConsoleMessage.js:
786 (WebInspector.ConsoleMessage):
787 * UserInterface/Models/Script.js:
788 (WebInspector.Script):
789 (WebInspector.Script.prototype.get target):
790 (WebInspector.Script.prototype.isMainResource):
791 (WebInspector.Script.prototype.requestContentFromBackend):
792 (WebInspector.Script.prototype._resolveResource):
793 * UserInterface/Models/StackTrace.js:
794 (WebInspector.StackTrace.fromPayload):
795 (WebInspector.StackTrace.fromString):
796 * UserInterface/Models/ProbeManager.js:
797 (WebInspector.ProbeManager.prototype.didSampleProbe):
798 * UserInterface/Models/Probe.js:
799 (WebInspector.ProbeSample):
800 * UserInterface/Views/ConsoleMessageView.js:
801 (WebInspector.ConsoleMessageView.prototype._appendLocationLink):
802 (WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
803 Associate model objects with a specific target where necessary.
805 * UserInterface/Views/ObjectTreeBaseTreeElement.js:
806 (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
807 * UserInterface/Controllers/RuntimeManager.js:
808 (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
809 * UserInterface/Protocol/RemoteObject.js:
810 (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
811 Use target specific DebuggerAgent where necessary.
813 * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
814 * UserInterface/Controllers/TimelineManager.js:
815 (WebInspector.TimelineManager.prototype._callFramesFromPayload):
816 * UserInterface/Models/ScriptTimelineRecord.js:
817 (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
818 * UserInterface/Views/EventListenerSectionGroup.js:
819 (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
820 (WebInspector.EventListenerSectionGroup):
821 * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
822 (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.):
823 (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
824 (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview):
825 (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
826 (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
827 * UserInterface/Views/ProfileDataGridNode.js:
828 (WebInspector.ProfileDataGridNode.prototype.iconClassName):
829 (WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
830 (WebInspector.ProfileDataGridNode.prototype._displayContent):
831 Use assumed main target and audit these when the Worker gets more Agents.
833 * UserInterface/Controllers/FrameResourceManager.js:
834 (WebInspector.FrameResourceManager.prototype._initiatorSourceCodeLocationFromPayload):
835 This will always be the main target because only the main target
836 has access to the DOM.
838 * UserInterface/Views/SourceCodeTextEditor.js:
839 (WebInspector.SourceCodeTextEditor.prototype.get target):
840 (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
841 (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
842 (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
843 (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
844 (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
845 (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
846 Update target specific actions to use the proper target's agents.
848 * UserInterface/Views/TargetTreeElement.js: Added.
849 (WebInspector.TargetTreeElement):
850 (WebInspector.TargetTreeElement.prototype.get target):
851 (WebInspector.TargetTreeElement.prototype.onexpand):
852 (WebInspector.TargetTreeElement.prototype.oncollapse):
853 Add a new tree element for a Target. We currently assume that the
854 main resource for a Target will be a Script right now, as is the
855 case for Web Workers. This simply remembers its expanded or
856 collapsed state and has a better icon.
858 * UserInterface/Views/ResourceIcons.css:
859 (body:matches(.mac-platform, .windows-platform) .script.worker-icon .icon):
860 (body:matches(.mac-platform, .windows-platform) .large .script.worker-icon .icon):
861 * UserInterface/Images/WorkerScript.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument.png.
862 * UserInterface/Images/WorkerScript@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument@2x.png.
863 * UserInterface/Images/WorkerScriptLarge.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge.png.
864 * UserInterface/Images/WorkerScriptLarge@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge@2x.png.
865 Improve icon for a Worker's main resource script.
867 * UserInterface/Views/ResourceSidebarPanel.js:
868 (WebInspector.ResourceSidebarPanel):
869 (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
870 (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
871 (WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget):
872 (WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource):
873 (WebInspector.ResourceSidebarPanel.prototype._targetRemoved):
874 * UserInterface/Views/SearchSidebarPanel.js:
875 (WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts):
876 (WebInspector.SearchSidebarPanel.prototype._searchTreeElementForScript):
877 * UserInterface/Views/OpenResourceDialog.js:
878 (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline.createTreeElement):
879 (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
880 (WebInspector.OpenResourceDialog.prototype.didDismissDialog):
881 (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
882 (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
883 (WebInspector.OpenResourceDialog.prototype._addScriptsForTarget):
884 (WebInspector.OpenResourceDialog.prototype._scriptAdded):
885 (WebInspector.OpenResourceDialog):
886 * UserInterface/Views/DebuggerSidebarPanel.js:
887 (WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToTreeOutline):
888 (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
889 (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
890 (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
891 Include scripts from non-main targets in sidebars.
893 2016-11-01 Devin Rousso <dcrousso+webkit@gmail.com>
895 Web Inspector: Creating a new pseudo-selector in the Styles sidebar doesn't work on first attempt
896 https://bugs.webkit.org/show_bug.cgi?id=164092
898 Reviewed by Timothy Hatcher.
900 * UserInterface/Views/CSSStyleDeclarationSection.css:
901 (.style-declaration-section:not(.invalid-selector).rule-disabled > .header > .icon):
902 (.style-declaration-section.invalid-selector > .header > .icon):
903 (.style-declaration-section.invalid-selector > .header > .selector,):
904 (.style-declaration-section.rule-disabled > .header > .icon): Deleted.
906 * UserInterface/Views/CSSStyleDeclarationSection.js:
907 (WebInspector.CSSStyleDeclarationSection):
908 (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
909 (WebInspector.CSSStyleDeclarationSection.prototype._handleIconElementClicked):
910 (WebInspector.CSSStyleDeclarationSection.prototype._updateSelectorIcon): Added.
911 Re-add logic removed by https://webkit.org/b/159734 for handling invalid selectors. Instead
912 of just refreshing the section whenever the represented CSSRule changes selectors, we only
913 need to refresh if the selector no longer applies to the current element.
915 (WebInspector.CSSStyleDeclarationSection.prototype._handleMouseMove): Added.
916 Fix another issue discovered while adding the invalid selector warnings, where the title
917 attribute of each individual selector was no longer visible. To fix this, whenever the user
918 moves their mouse over the selector input, the position is compared to each selector to find
919 the first one that matches, whose title is then applied to the input element.
921 2016-11-01 Joseph Pecoraro <pecoraro@apple.com>
923 Web Inspector: Improve debugger highlight in some exception cases
924 https://bugs.webkit.org/show_bug.cgi?id=164300
926 Reviewed by Matt Baker.
928 * UserInterface/Views/SourceCodeTextEditor.js:
929 (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
930 When walking up AST nodes and reach a throw statement, use that.
932 2016-11-01 Joseph Pecoraro <pecoraro@apple.com>
934 Web Inspector: Cleanup stale code in NetworkSidebarPanel
935 https://bugs.webkit.org/show_bug.cgi?id=164295
937 Reviewed by Matt Baker.
939 * UserInterface/Views/NetworkSidebarPanel.js:
940 (WebInspector.NetworkSidebarPanel.prototype.closed): Deleted.
941 This doesn't appear to be needed since NetworkSidebarPanel never
942 registered any event listeners.
944 2016-11-01 Devin Rousso <dcrousso+webkit@gmail.com>
946 REGRESSION (r191419): Web Inspector: Autocomplete is broken
947 https://bugs.webkit.org/show_bug.cgi?id=150493
949 Reviewed by Timothy Hatcher.
951 Fixed CodeMirror.undo() logic rolled out by r191539 <https://webkit.org/b/150537>
953 Added calls to CodeMirror.changeGeneration(true) which tells the history stack to "close"
954 the current event, preventing it from being consolidated with new changes. If the user
955 typed fast enough, non-completion changes (like adding ":" in CSS) would get merged with
956 completion changes, causing calls to CodeMirror.undo() to undo those changes as well. To
957 prevent this, a boolean variable is set to true whenever a completion "activity" is in
958 progress, defined by a sequence of completion related events. When this "activity" first
959 starts, call CodeMirror.changeGeneration(true) to freeze the current history.
961 See original bug for more information <https://webkit.org/b/147720>.
963 * UserInterface/Controllers/CodeMirrorCompletionController.js:
964 (WebInspector.CodeMirrorCompletionController):
965 (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
966 (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
967 (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
968 (WebInspector.CodeMirrorCompletionController.prototype.close):
969 (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
970 (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
971 (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
972 (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update):
973 (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
974 (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
975 (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
976 (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
977 (WebInspector.CodeMirrorCompletionController.prototype._handleBeforeChange):
978 (WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker): Deleted.
979 (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory): Deleted.
980 (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker): Deleted.
982 2016-11-01 Devin Rousso <dcrousso+webkit@gmail.com>
984 Web Inspector: Replace sublists inside DOM-related model objects with WI.Collection
985 https://bugs.webkit.org/show_bug.cgi?id=164098
987 Reviewed by Timothy Hatcher.
989 * UserInterface/Models/DOMTree.js:
990 * UserInterface/Models/Frame.js:
991 Add support for WebInspector.Collection.
993 * UserInterface/Models/Script.js:
994 (WebInspector.Script):
995 * UserInterface/Views/DebuggerSidebarPanel.js:
996 (WebInspector.DebuggerSidebarPanel.prototype._addResourcesRecursivelyForFrame):
997 * UserInterface/Views/FrameTreeElement.js:
998 (WebInspector.FrameTreeElement):
999 (WebInspector.FrameTreeElement.prototype.onpopulate):
1000 * UserInterface/Views/OpenResourceDialog.js:
1001 (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
1002 Use new functions defined by changing to WebInspector.Collection.
1004 2016-11-01 Devin Rousso <dcrousso+webkit@gmail.com>
1006 Web Inspector: Fix double remove of ResourceCollection if type changes
1007 https://bugs.webkit.org/show_bug.cgi?id=164268
1009 Reviewed by Joseph Pecoraro.
1011 * UserInterface/Models/ResourceCollection.js:
1012 (WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
1013 Change logic so that a non-typed collection will not try to remove a resource that has
1014 changed types from the sub-collection of its old type, since the sub-collection itself will
1015 handle the removal inside its own event listener for the type change.
1017 2016-11-01 Ryosuke Niwa <rniwa@webkit.org>
1019 Web Inspector: Add the support for custom elements
1020 https://bugs.webkit.org/show_bug.cgi?id=164266
1021 <rdar://problem/29038883>
1023 Reviewed by Joseph Pecoraro.
1025 Show the custom element state in DOM node's details pane:
1026 - "Element" for all builtin elements.
1027 - "Element (Custom)" for any upgraded custom elements.
1028 - "Element (Waiting to be upgraded)" for any element waiting to be upgraded.
1029 - "Element (Failed to upgrade)" for any custom element that failed during construction or an upgrade.
1031 And add "Jump to Definition" to the context menu of an node to find the custom element's definition.
1033 * Localizations/en.lproj/localizedStrings.js: Added localized strings.
1034 * UserInterface/Controllers/DOMTreeManager.js:
1035 (WebInspector.DOMTreeManager.prototype._customElementStateChanged): Added. Update the state and fire
1036 WebInspector.DOMTreeManager.Event.CustomElementStateChanged to update the node's details pane.
1037 * UserInterface/Models/DOMNode.js:
1038 (WebInspector.DOMNode): Set the custom element state or default to "builtin". Use null when the node
1040 (WebInspector.DOMNode.prototype.isCustomElement): Added. Returns true if this is a successfully
1041 constructed or upgraded custom element.
1042 (WebInspector.DOMNode.prototype.customElementState): Added.
1043 (WebInspector.DOMNode.CustomElementState): Added.
1044 * UserInterface/Protocol/DOMObserver.js:
1045 (WebInspector.DOMObserver.prototype.customElementStateChanged): Added.
1046 * UserInterface/Protocol/RemoteObject.js:
1047 (WebInspector.RemoteObject.prototype.getProperty): Added. Retrieves the property of a given name from
1049 * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1050 (WebInspector.DOMNodeDetailsSidebarPanel): Call _customElementStateChanged when the custom element
1051 state changes by listening to WebInspector.DOMTreeManager.Event.CustomElementStateChanged.
1052 (WebInspector.DOMNodeDetailsSidebarPanel.prototype.layout):
1053 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshIdentity): Extracted from layout.
1054 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementStateChanged): Added.
1055 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName): Include the custom element
1056 state when it's not a builtin element (_customElementState returns null in that case).
1057 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementState): Get the localized string for
1058 each custom element state.
1059 * UserInterface/Views/DOMTreeElement.js:
1060 (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): Add "Jump to Definition" item in the
1061 context menu of an element when it's a successfully constructed or upgraded custom element.
1063 2016-10-31 Joseph Pecoraro <pecoraro@apple.com>
1065 Web Inspector: Shadow DOM scoped styles are missing
1066 https://bugs.webkit.org/show_bug.cgi?id=164247
1067 <rdar://problem/29035061>
1069 Reviewed by Antti Koivisto.
1071 * UserInterface/Models/DOMNodeStyles.js:
1072 (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
1073 Fix incorrect WrapperPromise usage.
1075 2016-10-31 Devin Rousso <dcrousso+webkit@gmail.com>
1077 Web Inspector: Arrows for Styles scope bar item are misaligned
1078 https://bugs.webkit.org/show_bug.cgi?id=164159
1080 Reviewed by Timothy Hatcher.
1082 * UserInterface/Views/ScopeRadioButtonNavigationItem.css:
1083 (.scope-radio-button-navigation-item > .scope-radio-button-item-select:focus):
1084 (.scope-radio-button-navigation-item > .arrows):
1086 2016-10-31 Devin Rousso <dcrousso+webkit@gmail.com>
1088 Web Inspector: Entering ":n" in Open Resource Dialog, where n > number of lines, should jump to the last line
1089 https://bugs.webkit.org/show_bug.cgi?id=160840
1091 Reviewed by Timothy Hatcher.
1093 * UserInterface/Views/TextEditor.js:
1094 (WebInspector.TextEditor.prototype.revealPosition):
1095 Since it is possible for the given position to be outside the bounds of the CodeMirror
1096 instance, wait to get the line handler for the highlight animation until we have constrained
1099 2016-10-28 Devin Rousso <dcrousso+webkit@gmail.com>
1101 Web Inspector: Preferences for Text Editor behavior
1102 https://bugs.webkit.org/show_bug.cgi?id=149120
1104 Reviewed by Timothy Hatcher.
1106 * Localizations/en.lproj/localizedStrings.js:
1108 * UserInterface/Base/Main.js:
1109 (WebInspector.loaded):
1110 (WebInspector.contentLoaded):
1111 (WebInspector.contentLoaded.setTabSize):
1112 (WebInspector.contentLoaded.setInvalidCharacterClassName):
1113 (WebInspector.contentLoaded.setWhitespaceCharacterClassName):
1114 (WebInspector._tryToRestorePendingTabs):
1115 (WebInspector.indentString):
1116 (WebInspector._updateNewTabButtonState): Deleted.
1117 (WebInspector._newTabItemClicked): Deleted.
1118 Removed calls to the New Tab tab bar item on the Tab Bar instance.
1119 Added listener to the indentUnit setting to change the tab-size value on <body>.
1120 Created helper function to generate the indentString value from settings.
1122 * UserInterface/Base/Test.js:
1123 (WebInspector.indentString):
1124 Assume indent string is " " for tests.
1126 * UserInterface/Base/Setting.js:
1127 Added global WebInspector.settings dictionary for holding settings with UI editors.
1129 * UserInterface/Main.html:
1130 Added GeneralTabBarItem, PinnedTabBarItem, and SettingsTabContentView.
1132 * UserInterface/Models/CSSStyleDeclaration.js:
1133 (WebInspector.CSSStyleDeclaration.prototype.generateCSSRuleString):
1134 * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1135 (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContentFromEditor):
1136 (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
1137 * UserInterface/Views/VisualStylePropertyEditor.js:
1138 (WebInspector.VisualStylePropertyEditor.generateFormattedTextForNewProperty):
1139 * UserInterface/Views/SourceCodeTextEditor.js:
1140 (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
1141 Now uses WebInspector.indentUnit for indentation values
1143 * UserInterface/Views/CodeMirrorAdditions.js:
1144 Added "showWhitespaceCharacter" option to CodeMirror. When enabled, it adds an overlay to
1145 the editor that will use pseudo-elements to display whitespace characters (unicode 00B7).
1147 * UserInterface/Views/CodeMirrorOverrides.css:
1148 (.CodeMirror .cm-tab):
1149 (.show-whitespace-characters .CodeMirror .cm-tab::before):
1150 (.show-whitespace-characters .CodeMirror .cm-whitespace::before):
1151 (.show-whitespace-characters .CodeMirror .cm-whitespace-1::before):
1152 (.show-whitespace-characters .CodeMirror .cm-whitespace-2::before):
1153 (.show-whitespace-characters .CodeMirror .cm-whitespace-3::before):
1154 (.show-whitespace-characters .CodeMirror .cm-whitespace-4::before):
1155 (.show-whitespace-characters .CodeMirror .cm-whitespace-5::before):
1156 (.show-whitespace-characters .CodeMirror .cm-whitespace-6::before):
1157 (.show-whitespace-characters .CodeMirror .cm-whitespace-7::before):
1158 (.show-whitespace-characters .CodeMirror .cm-whitespace-8::before):
1159 (.show-whitespace-characters .CodeMirror .cm-whitespace-9::before):
1160 (.show-whitespace-characters .CodeMirror .cm-whitespace-10::before):
1161 (.show-whitespace-characters .CodeMirror .cm-whitespace-11::before):
1162 (.show-whitespace-characters .CodeMirror .cm-whitespace-12::before):
1163 (.show-whitespace-characters .CodeMirror .cm-whitespace-13::before):
1164 (.show-whitespace-characters .CodeMirror .cm-whitespace-14::before):
1165 (.show-whitespace-characters .CodeMirror .cm-whitespace-15::before):
1166 (.show-whitespace-characters .CodeMirror .cm-whitespace-16::before):
1167 (.show-invalid-characters .CodeMirror .cm-invalidchar):
1168 (.CodeMirror .cm-invalidchar): Deleted.
1169 Use unicode character 00B7 (middle dot) to display a space. Also uses a grey border for
1170 visualizing tab characters.
1172 * UserInterface/Views/ApplicationCacheFrameContentView.js:
1173 * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1174 * UserInterface/Views/ClusterContentView.js:
1175 * UserInterface/Views/DOMTreeContentView.js:
1176 * UserInterface/Views/DatabaseContentView.js:
1177 * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
1178 * UserInterface/Views/NetworkGridContentView.js:
1179 * UserInterface/Views/ResourceContentView.js:
1180 * UserInterface/Views/ScriptContentView.js:
1181 * UserInterface/Views/TabContentView.js:
1182 * UserInterface/Views/TimelineRecordingContentView.js:
1183 Add calls to super.shown(), super.hidden(), and super.closed().
1185 * UserInterface/Views/ConsoleTabContentView.js:
1186 * UserInterface/Views/DebuggerTabContentView.js:
1187 * UserInterface/Views/ElementsTabContentView.js:
1188 * UserInterface/Views/NetworkTabContentView.js:
1189 * UserInterface/Views/NewTabContentView.js:
1190 * UserInterface/Views/ResourcesTabContentView.js:
1191 * UserInterface/Views/SearchTabContentView.js:
1192 * UserInterface/Views/StorageTabContentView.js:
1193 * UserInterface/Views/TimelineTabContentView.js:
1194 Now uses WebInspector.GeneralTabBarItem.
1196 * UserInterface/Views/GeneralTabBarItem.js: Added.
1197 (WebInspector.GeneralTabBarItem):
1198 (WebInspector.GeneralTabBarItem.prototype.set title):
1199 (WebInspector.GeneralTabBarItem.prototype._handleContextMenuEvent):
1200 Split from TabBarItem.js to make pinned tab bar items more distinct.
1202 * UserInterface/Views/Main.css:
1206 * UserInterface/Views/PinnedTabBarItem.js: Added.
1207 (WebInspector.PinnedTabBarItem):
1208 Split from TabBarItem.js to make pinned tab bar items more distinct.
1210 * UserInterface/Views/SettingsTabContentView.css: Added.
1211 (.content-view.settings):
1212 (.content-view.settings > .header):
1213 (.content-view.settings > .setting-container):
1214 (.content-view.settings > .setting-container > .setting-name):
1215 (.content-view.settings > .setting-container > .setting-value-controller):
1216 (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
1218 * UserInterface/Views/SettingsTabContentView.js:
1219 (WebInspector.SettingsTabContentView):
1220 (WebInspector.SettingsTabContentView.tabInfo):
1221 (WebInspector.SettingsTabContentView.isEphemeral):
1222 (WebInspector.SettingsTabContentView.shouldSaveTab):
1223 (WebInspector.SettingsTabContentView.prototype.initialLayout):
1224 (WebInspector.SettingsTabContentView.isTabAllowed): Deleted.
1225 (WebInspector.SettingsTabContentView.prototype.get type): Deleted.
1226 Added logic to display an appropriate editor for each item in WebInspector.settings.
1228 * UserInterface/Views/SourceCodeTextEditor.js:
1229 (WebInspector.SourceCodeTextEditor.prototype.close):
1230 Add call to super.close().
1232 * UserInterface/Views/TabBar.css:
1233 (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover):
1234 (.tab-bar > .item:not(.pinned) > .flex-space:last-child):
1235 (.tab-bar > .item.pinned > .icon):
1236 (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
1237 (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,): Deleted.
1238 (.tab-bar > .item > .flex-space:last-child): Deleted.
1239 (.tab-bar > .item.new-tab-button > .icon): Deleted.
1240 (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon,): Deleted.
1241 Removed rules specifically targeting `.new-tab-button`.
1243 * UserInterface/Views/TabBar.js:
1244 (WebInspector.TabBar):
1245 (WebInspector.TabBar.prototype.get newTabTabBarItem):
1246 (WebInspector.TabBar.prototype.updateNewTabTabBarItemState):
1247 (WebInspector.TabBar.prototype.insertTabBarItem):
1248 (WebInspector.TabBar.prototype.removeTabBarItem.animateTabs):
1249 (WebInspector.TabBar.prototype.removeTabBarItem):
1250 (WebInspector.TabBar.prototype.selectPreviousTab):
1251 (WebInspector.TabBar.prototype.selectNextTab):
1252 (WebInspector.TabBar.prototype.set selectedTabBarItem):
1253 (WebInspector.TabBar.prototype.hasNormalTab):
1254 (WebInspector.TabBar.prototype.layout):
1255 (WebInspector.TabBar.prototype._hasMoreThanOneNormalTab):
1256 (WebInspector.TabBar.prototype._handleMouseDown):
1257 (WebInspector.TabBar.prototype._handleMouseMoved):
1258 (WebInspector.TabBar.prototype._handleMouseLeave):
1259 (WebInspector.TabBar.prototype._handleNewTabClick):
1260 (WebInspector.TabBar.prototype._handleNewTabMouseEnter):
1261 (WebInspector.TabBar.prototype.get newTabItem): Deleted.
1262 (WebInspector.TabBar.prototype.set newTabItem): Deleted.
1263 Replaced the newTabItem setter by adding a saved pinned tab bar item (instead of relying
1264 upon a different object to give it the pinned tab bar item) that changes modes depending on
1265 whether a new tab is able to be created.
1267 * UserInterface/Views/TabBarItem.js:
1268 (WebInspector.TabBarItem):
1269 (WebInspector.TabBarItem.prototype.get element):
1270 (WebInspector.TabBarItem.prototype.get representedObject):
1271 (WebInspector.TabBarItem.prototype.set representedObject):
1272 (WebInspector.TabBarItem.prototype.get parentTabBar):
1273 (WebInspector.TabBarItem.prototype.set parentTabBar):
1274 (WebInspector.TabBarItem.prototype.get image):
1275 (WebInspector.TabBarItem.prototype.set image):
1276 (WebInspector.TabBarItem.prototype.get title):
1277 (WebInspector.TabBarItem.prototype.set title):
1278 (WebInspector.TabBarItem.prototype.get pinned): Deleted.
1279 (WebInspector.TabBarItem.prototype._handleContextMenuEvent): Deleted.
1280 Split into GeneralTabBarItem and PinnedTabBarItem to simplify the logic of the DOM and allow
1281 for easier checking of whether a tab bar item is pinned or not.
1283 * UserInterface/Views/TabBrowser.js:
1284 (WebInspector.TabBrowser):
1285 (WebInspector.TabBrowser.prototype.addTabForContentView):
1286 (WebInspector.TabBrowser.prototype.closeTabForContentView):
1287 (WebInspector.TabBrowser.prototype._tabBarItemSelected):
1288 (WebInspector.TabBrowser.prototype._tabBarItemRemoved):
1289 Replaced references to newTabItem with a set number (since each TabBar has a specific number
1292 * UserInterface/Views/TextEditor.js:
1293 (WebInspector.TextEditor):
1294 (WebInspector.TextEditor.prototype.close):.
1295 Remove settings update event listeners to allow garbage collection.
1297 (WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
1298 (WebInspector.TextEditor.prototype._startCodeMirrorPrettyPrint):
1299 Now uses the settings values in WebInspector.setting for settings on the CodeMirror
1300 instance. Also updates the CodeMirror instance if any setting changes.
1302 2016-10-28 Joseph Pecoraro <pecoraro@apple.com>
1304 Web Inspector: Include parameter strings for native CustomElementRegistry methods in the console
1305 https://bugs.webkit.org/show_bug.cgi?id=164147
1307 Reviewed by Brian Burg.
1309 * UserInterface/Models/NativeFunctionParameters.js:
1311 2016-10-28 Matt Baker <mattbaker@apple.com>
1313 Unreviewed, worker document images added
1315 * UserInterface/Images/WorkerDocument.png: Added.
1316 * UserInterface/Images/WorkerDocument@2x.png: Added.
1317 * UserInterface/Images/WorkerDocumentLarge.png: Added.
1318 * UserInterface/Images/WorkerDocumentLarge@2x.png: Added.
1320 2016-10-27 Devin Rousso <dcrousso+webkit@gmail.com>
1322 Web Inspector: Create general model object Collection class
1323 https://bugs.webkit.org/show_bug.cgi?id=163995
1325 Reviewed by Joseph Pecoraro.
1327 * UserInterface/Models/Collection.js: Added.
1328 (WebInspector.Collection):
1329 (WebInspector.Collection.prototype.get items):
1330 (WebInspector.Collection.prototype.get typeVerifier):
1331 (WebInspector.Collection.prototype.add):
1332 (WebInspector.Collection.prototype.remove):
1333 (WebInspector.Collection.prototype.clear):
1334 (WebInspector.Collection.prototype.toArray):
1335 (WebInspector.Collection.prototype.toJSON):
1336 (WebInspector.Collection.prototype.itemAdded):
1337 (WebInspector.Collection.prototype.itemRemoved):
1338 (WebInspector.Collection.prototype.itemsCleared):
1339 Class that holds multiple model objects. It can be limited to a specific type by supplying
1340 a "typeVerifier", which is a function that accepts a single argument (the model object) and
1341 returns true/false depending on if that argument matches the "type" of the collection.
1343 * UserInterface/Main.html:
1344 * UserInterface/Test.html:
1345 * UserInterface/Models/Frame.js:
1346 * UserInterface/Views/CookieStorageContentView.js:
1347 * UserInterface/Views/DebuggerSidebarPanel.js:
1348 * UserInterface/Views/FrameTreeElement.js:
1349 * UserInterface/Views/OpenResourceDialog.js:
1350 Add support for WebInspector.Collection.
1352 * UserInterface/Models/ResourceCollection.js:
1353 (WebInspector.ResourceCollection):
1354 (WebInspector.ResourceCollection.verifierForType):
1355 (WebInspector.ResourceCollection.prototype.resourceCollectionForType):
1356 (WebInspector.ResourceCollection.prototype.clear):
1357 (WebInspector.ResourceCollection.prototype.itemAdded):
1358 (WebInspector.ResourceCollection.prototype.itemRemoved):
1359 (WebInspector.ResourceCollection.prototype.itemsCleared):
1360 (WebInspector.ResourceCollection.prototype._associateWithResource):
1361 (WebInspector.ResourceCollection.prototype._disassociateWithResource):
1362 (WebInspector.ResourceCollection.prototype._resourceURLDidChange):
1363 (WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
1364 (WebInspector.ResourceCollection.prototype.get resources): Deleted.
1365 (WebInspector.ResourceCollection.prototype.resourcesWithType): Deleted.
1366 (WebInspector.ResourceCollection.prototype.addResource): Deleted.
1367 (WebInspector.ResourceCollection.prototype.removeResource): Deleted.
1368 (WebInspector.ResourceCollection.prototype.removeAllResources): Deleted.
1369 Now a subclass of WebInspector.Collection. Retrieving WebInspector.Resource objects by type
1370 and URL is still supported, but requesting by type now returns another instance of
1371 WebInspector.ResourceCollection that is configured to only accept the requested type.
1373 2016-10-27 Joseph Pecoraro <pecoraro@apple.com>
1375 Web Inspector: Include ConsoleAgent in Workers - real console.log support
1376 https://bugs.webkit.org/show_bug.cgi?id=163844
1377 <rdar://problem/28903328>
1379 Reviewed by Brian Burg.
1381 * UserInterface/Protocol/Target.js:
1382 (WebInspector.Target.prototype.get ConsoleAgent):
1383 (WebInspector.Target.prototype._initializeNonMainTarget):
1384 * UserInterface/Protocol/Connection.js:
1385 (InspectorBackend.WorkerConnection):
1388 * UserInterface/Controllers/LogManager.js:
1389 (WebInspector.LogManager.prototype.messageWasAdded):
1390 (WebInspector.LogManager.prototype.requestClearMessages):
1391 Handle ConsoleAgent calls with multiple targets.
1393 * UserInterface/Protocol/ConsoleObserver.js:
1394 (WebInspector.ConsoleObserver.prototype.messageAdded):
1395 Dispatch with the target in case we create Model objects.
1397 * UserInterface/Controllers/WorkerManager.js:
1398 (WebInspector.WorkerManager.prototype.workerCreated):
1399 The frontend must now call "initialized" on Workers after
1400 sending our setup messages (enable, set breakpoints, etc).
1402 * UserInterface/Protocol/RemoteObject.js:
1403 (WebInspector.RemoteObject.prototype.get target):
1404 Expose an accessor for tests.
1406 * UserInterface/Protocol/LoggingProtocolTracer.js:
1407 (WebInspector.LoggingProtocolTracer.prototype._processEntry):
1408 Actually output the Exception, useful when debugging failures in tests.
1410 2016-10-27 Joseph Pecoraro <pecoraro@apple.com>
1412 Web Inspector: Include RuntimeAgent in Workers - evaluate in Worker context
1413 https://bugs.webkit.org/show_bug.cgi?id=163835
1414 <rdar://problem/28901465>
1416 Reviewed by Brian Burg.
1418 This introduces the idea that the frontend may communication with multiple
1419 backend "Targets" which each have their own set of Agents.
1421 - WebInspector.Target
1422 - has its own list of Agents
1423 - has a InspectorBackend.Connection to communicate with the backend
1425 - WebInspector.mainTarget
1426 - always exists and represents the thing we are debugging (Page or JSContext)
1428 - WebInspector.targets / WebInspector.targetManager
1429 - management of all Targets
1430 - create new Targets for Workers
1432 This also slowly introduces the concept that Model objects may be tied to
1435 - WebInspector.RemoteObject
1436 - in order to evaluate JS and interact with this object we must know the target (Page or Worker)
1437 - when fetching PropertyDescriptors and other RemoteObjects we must continue to pass on the target
1439 Finally this makes the QuickConsole list Worker execution contexts in
1440 the context picker so that users can choose a Worker context and
1441 evaluate JavaScript in that context using the console.
1443 * Localizations/en.lproj/localizedStrings.js:
1444 * UserInterface/Main.html:
1445 * UserInterface/Base/Main.js:
1446 (WebInspector.loaded):
1447 * UserInterface/Test.html:
1448 * UserInterface/Test/Test.js:
1449 (WebInspector.loaded):
1450 New files, strings, and managers.
1451 New global WebInspector.mainTarget.
1452 New convenience WebInspector.targets.
1454 * UserInterface/Protocol/Target.js: Added.
1455 (WebInspector.Target):
1456 (WebInspector.Target.prototype.get RuntimeAgent):
1457 (WebInspector.Target.prototype.get name):
1458 (WebInspector.Target.prototype.get type):
1459 (WebInspector.Target.prototype.get connection):
1460 (WebInspector.Target.prototype.get executionContext):
1461 (WebInspector.Target.prototype.get displayName):
1462 (WebInspector.Target.prototype._intializeMainTarget):
1463 (WebInspector.Target.prototype._initializeNonMainTarget):
1464 Target has some basic properties.
1466 * UserInterface/Controllers/TargetManager.js:
1467 (WebInspector.TargetManager):
1468 (WebInspector.TargetManager.prototype.get targets):
1469 (WebInspector.TargetManager.prototype.addTarget):
1470 (WebInspector.TargetManager.prototype.removeTarget):
1471 Holds the list of Targets and events when created / removed.
1472 Each target with a RuntimeAgent has an ExecutionContext.
1474 * UserInterface/Controllers/WorkerManager.js:
1475 (WebInspector.WorkerManager):
1476 (WebInspector.WorkerManager.prototype.workerCreated):
1477 (WebInspector.WorkerManager.prototype.workerTerminated):
1478 (WebInspector.WorkerManager.prototype.dispatchMessageFromWorker):
1479 Create / remove / dispatch on a Worker Target.
1481 * UserInterface/Protocol/InspectorBackend.js:
1482 (InspectorBackendClass):
1483 (InspectorBackendClass.prototype.registerCommand):
1484 (InspectorBackendClass.prototype.dispatch):
1485 (InspectorBackendClass.prototype.runAfterPendingDispatches):
1486 (InspectorBackendClass.prototype._agentForDomain):
1487 Keep the original implementations and just dispatch to the main connection.
1489 (InspectorBackend.Agent):
1490 (InspectorBackend.Agent.prototype.get connection):
1491 (InspectorBackend.Agent.prototype.set connection):
1492 (InspectorBackend.Agent.prototype.get dispatcher):
1493 We will share Agent implementations but just give new "copies" a different
1494 connection and dispatcher.
1496 (InspectorBackend.Command):
1497 (InspectorBackend.Command.create):
1498 (InspectorBackend.Command.prototype.invoke):
1499 (InspectorBackend.Command.prototype.supports):
1500 We continue to have a single Command instance on the Agent. However instead
1501 of using the hardcoded Agent on the Instance when evaluated as a function
1502 it uses the `this` object which should be an agent. This way:
1504 target1.RuntimeAgent.evaluate
1505 - `this` is target1 and we use the connection for that target
1506 target2.RuntimeAgent.evaluate
1507 - `this` is target2 and we use the connection for that target
1509 Unfortunately this breaks `RuntimeAgent.evaluate.invoke`. Currently this
1510 is solved by providing an extra parameter. In the case where we need to
1511 invoke on a particular agent we must provide the agent.
1513 target.RuntimeAgent.evaluate.invoke({options}, target.RuntimeAgent)
1515 This is unfortunate but only needed in a handful of places right now.
1517 (InspectorBackendClass.prototype._sendCommandToBackendWithCallback): Deleted.
1518 (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise): Deleted.
1519 (InspectorBackendClass.prototype._sendMessageToBackend): Deleted.
1520 (InspectorBackendClass.prototype._dispatchResponse): Deleted.
1521 (InspectorBackendClass.prototype._dispatchResponseToCallback): Deleted.
1522 (InspectorBackendClass.prototype._dispatchResponseToPromise): Deleted.
1523 (InspectorBackendClass.prototype._dispatchEvent): Deleted.
1524 (InspectorBackendClass.prototype._flushPendingScripts): Deleted.
1525 (InspectorBackend.Agent.prototype.get currentDispatchState): Deleted.
1526 (InspectorBackend.Command.prototype.deliverFailure): Deleted.
1527 * UserInterface/Protocol/Connection.js: Added.
1528 (InspectorBackend.Connection):
1529 (InspectorBackend.Connection.prototype.get target):
1530 (InspectorBackend.Connection.prototype.set target):
1531 (InspectorBackend.Connection.prototype.dispatch):
1532 (InspectorBackend.Connection.prototype.runAfterPendingDispatches):
1533 (InspectorBackend.Connection.prototype.sendMessageToBackend):
1534 (InspectorBackend.Connection.prototype._dispatchResponse):
1535 (InspectorBackend.Connection.prototype._dispatchResponseToCallback):
1536 (InspectorBackend.Connection.prototype._dispatchResponseToPromise):
1537 (InspectorBackend.Connection.prototype._dispatchEvent):
1538 (InspectorBackend.Connection.prototype._sendCommandToBackendWithCallback):
1539 (InspectorBackend.Connection.prototype._sendCommandToBackendExpectingPromise):
1540 (InspectorBackend.Connection.prototype._sendMessageToBackend):
1541 (InspectorBackend.Connection.prototype._flushPendingScripts):
1542 This extracts the Connection details into its own class.
1543 Although we make it appear as though a Target has a list of
1544 Agents, we actually have the Connection hold the list of Agents.
1545 Instead of cloning the entire Agent we just create a new object
1546 extended from the original Agent instance. This allows us to keep
1547 the same interface but just change the connection / dispatcher
1548 properties within the Agent.
1550 (InspectorBackend.MainConnection):
1551 (InspectorBackend.MainConnection.prototype.sendMessageToBackend):
1552 (InspectorBackend.WorkerConnection):
1553 (InspectorBackend.WorkerConnection.sendMessageToBackend):
1554 Two different kinds of connections. One for the Main connection
1555 and one for Workers. Currently the list of agents we expose
1556 on a Worker Target/Connection is hardcoded.
1558 * UserInterface/Models/ExecutionContext.js:
1559 (WebInspector.ExecutionContext):
1560 (WebInspector.ExecutionContext.prototype.get target):
1561 We may now have ExecutionContexts that mean a Page, Frames, and Workers.
1562 To do this we include the (target, executionContextId) tuple in this object.
1563 With this we have everything we need to evaluate JavaScript.
1565 * UserInterface/Controllers/RuntimeManager.js:
1566 (WebInspector.RuntimeManager):
1567 (WebInspector.RuntimeManager.prototype.get activeExecutionContext):
1568 (WebInspector.RuntimeManager.prototype.set activeExecutionContext):
1569 (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier): Deleted.
1570 (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier): Deleted.
1571 Update from contextId to a full ExecutionContext object.
1573 (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow.evalCallback):
1574 (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
1575 (WebInspector.RuntimeManager.prototype.saveResult):
1576 (WebInspector.RuntimeManager.prototype.getPropertiesForRemoteObject):
1577 (WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
1578 * UserInterface/Controllers/FrameResourceManager.js:
1579 (WebInspector.FrameResourceManager.prototype.executionContextCreated):
1580 * UserInterface/Controllers/JavaScriptLogViewController.js:
1581 (WebInspector.JavaScriptLogViewController.prototype.consolePromptShouldCommitText):
1582 * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1583 Anywhere that wants to use the "activeExecutionContext" must use the
1584 specific RuntimeAgent tied to that ExecutionContext's Target.
1586 * UserInterface/Models/PropertyDescriptor.js:
1587 (WebInspector.PropertyDescriptor.fromPayload):
1588 * UserInterface/Protocol/RemoteObject.js:
1589 (WebInspector.RemoteObject):
1590 (WebInspector.RemoteObject.createFakeRemoteObject):
1591 (WebInspector.RemoteObject.fromPrimitiveValue):
1592 (WebInspector.RemoteObject.fromPayload):
1593 (WebInspector.RemoteObject.prototype.getDisplayablePropertyDescriptors):
1594 (WebInspector.RemoteObject.prototype.deprecatedGetDisplayableProperties):
1595 (WebInspector.RemoteObject.prototype.setPropertyValue):
1596 (WebInspector.RemoteObject.prototype.getCollectionEntries):
1597 (WebInspector.RemoteObject.prototype.releaseWeakCollectionEntries):
1598 (WebInspector.RemoteObject.prototype.callFunction):
1599 (WebInspector.RemoteObject.prototype.callFunctionJSON):
1600 (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor.wrappedCallback):
1601 (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor):
1602 (WebInspector.RemoteObject.prototype.release):
1603 (WebInspector.RemoteObject.prototype._getPropertyDescriptors):
1604 (WebInspector.RemoteObject.prototype._getPropertyDescriptorsResolver):
1605 (WebInspector.RemoteObject.prototype._deprecatedGetProperties):
1606 RemoteObject and related Model Objects now must be tied to a specific
1607 Target, because we need to know which Target it belongs to in order to
1608 interact with it further.
1610 * UserInterface/Views/QuickConsole.js:
1611 (WebInspector.QuickConsole):
1612 (WebInspector.QuickConsole.prototype.get selectedExecutionContext):
1613 (WebInspector.QuickConsole.prototype.set selectedExecutionContext):
1614 (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
1615 (WebInspector.QuickConsole.prototype._rebuildExecutionContextPathComponents):
1616 (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
1617 (WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
1618 (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
1619 (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
1620 (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
1621 (WebInspector.QuickConsole.prototype._insertOtherExecutionContextPathComponent):
1622 (WebInspector.QuickConsole.prototype._removeOtherExecutionContextPathComponent):
1623 (WebInspector.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
1624 (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
1625 (WebInspector.QuickConsole.prototype._targetAdded):
1626 (WebInspector.QuickConsole.prototype._targetRemoved):
1627 (WebInspector.QuickConsole.prototype._pathComponentSelected):
1628 (WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier): Deleted.
1629 (WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier): Deleted.
1630 (WebInspector.QuickConsole.prototype._defaultExecutionContextChanged): Deleted.
1631 Update the code from executionContextId to ExecutionContext objects.
1632 Update the picker with ExecutionContextPathComponent for Workers (new Targets).
1633 Generalize and cleanup the code to make it easier to follow.
1635 2016-10-27 Joseph Pecoraro <pecoraro@apple.com>
1637 Web Inspector: Introduce Page WorkerAgent and Worker InspectorController
1638 https://bugs.webkit.org/show_bug.cgi?id=163817
1639 <rdar://problem/28899063>
1641 Reviewed by Brian Burg.
1643 * UserInterface/Main.html:
1644 * UserInterface/Test.html:
1647 * UserInterface/Base/Main.js:
1648 (WebInspector.loaded):
1649 * UserInterface/Test/Test.js:
1650 (WebInspector.loaded):
1651 New Observers and Managers.
1653 * UserInterface/Protocol/WorkerObserver.js: Added.
1654 (WebInspector.WorkerObserver.prototype.workerCreated):
1655 (WebInspector.WorkerObserver.prototype.workerTerminated):
1656 (WebInspector.WorkerObserver.prototype.dispatchMessageFromWorker):
1657 (WebInspector.WorkerObserver):
1658 * UserInterface/Controllers/WorkerManager.js: Added.
1659 (WebInspector.WorkerManager):
1660 (WebInspector.WorkerManager.prototype.workerCreated):
1661 (WebInspector.WorkerManager.prototype.workerTerminated):
1662 (WebInspector.WorkerManager.prototype.dispatchMessageFromWorker):
1663 To be implemented with the first Worker agent implementation
1664 when there is actually something we can do with the Worker.
1666 2016-10-25 Joseph Pecoraro <pecoraro@apple.com>
1668 Web Inspector: Cmd-+ doesn't "zoom in" to increase text size in the Web Inspector
1669 https://bugs.webkit.org/show_bug.cgi?id=163961
1670 <rdar://problem/28895308>
1672 Reviewed by Brian Burg.
1674 * UserInterface/Base/Main.js:
1675 (WebInspector.contentLoaded):
1676 Add a duplicate set of keyboard shortcuts for the Shift variants.
1678 2016-10-25 Joseph Pecoraro <pecoraro@apple.com>
1680 Web Inspector: Remove dead code in FrameTreeElement
1681 https://bugs.webkit.org/show_bug.cgi?id=163914
1683 Reviewed by Brian Burg.
1685 * UserInterface/Views/FrameTreeElement.js:
1687 2016-10-24 Devin Rousso <dcrousso+webkit@gmail.com>
1689 Web Inspector: Scope chain shouldn't show empty Closure sections
1690 https://bugs.webkit.org/show_bug.cgi?id=152348
1692 Reviewed by Joseph Pecoraro.
1694 * UserInterface/Controllers/DebuggerManager.js:
1695 (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
1696 * UserInterface/Models/ScopeChainNode.js:
1697 (WebInspector.ScopeChainNode):
1698 (WebInspector.ScopeChainNode.prototype.get empty):
1699 Added support for new empty property.
1701 * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1702 (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
1703 Only create and display a DetailsSection if the scope is not empty (via empty).
1705 2016-10-24 Devin Rousso <dcrousso+webkit@gmail.com>
1707 Web Inspector: Improve Quick Open sorting algorithm
1708 https://bugs.webkit.org/show_bug.cgi?id=163705
1710 Reviewed by Joseph Pecoraro.
1712 * UserInterface/Models/ResourceQueryResult.js:
1713 (WebInspector.ResourceQueryResult.prototype._calculateRank.getMultiplier):
1714 (WebInspector.ResourceQueryResult.prototype._calculateRank):
1715 Added logic to multiply the ranking increment/decrement based on whether the current match
1716 is part of a sequence, whether that sequence began with a special character, and the length
1717 of the current sequence.
1719 2016-10-19 Dean Jackson <dino@apple.com>
1721 Support CSS Shapes Level 1 without a prefix
1722 https://bugs.webkit.org/show_bug.cgi?id=163709
1723 <rdar://problem/28859369>
1725 Reviewed by Myles Maxfield.
1727 Replace -webkit-shape-outside with shape-outside.
1729 * UserInterface/Models/CSSKeywordCompletions.js:
1731 2016-10-19 Aaron Chu <aaron_chu@apple.com>
1733 Web Inspector: AXI: expose computed tree node and heading level
1734 https://bugs.webkit.org/show_bug.cgi?id=130825
1735 <rdar://problem/16442349>
1737 Reviewed by Joseph Pecoraro.
1739 Updating the Web Accessibility Inspector to display Heading Level and Hierarchical Level.
1741 * Localizations/en.lproj/localizedStrings.js:
1742 * UserInterface/Models/DOMNode.js:
1743 (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
1744 (WebInspector.DOMNode.prototype.accessibilityProperties):
1745 * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1746 (WebInspector.DOMNodeDetailsSidebarPanel):
1747 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
1748 (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
1750 2016-10-18 Joseph Pecoraro <pecoraro@apple.com>
1752 Web Inspector: Styles Sidebar highlights "translate" but not "translateX"
1753 https://bugs.webkit.org/show_bug.cgi?id=163613
1754 <rdar://problem/28829610>
1756 Reviewed by Timothy Hatcher.
1758 * UserInterface/Models/CSSCompletions.js:
1759 (WebInspector.CSSCompletions.requestCSSCompletions):
1760 The hash table objects we pass to CodeMirror expects keys to be lowercased.
1762 2016-10-18 Joseph Pecoraro <pecoraro@apple.com>
1764 Web Inspector: CSS Autocompletion sometimes adds extra unexpected characters
1765 https://bugs.webkit.org/show_bug.cgi?id=163612
1766 <rdar://problem/28829557>
1768 Reviewed by Timothy Hatcher.
1770 * UserInterface/Controllers/CodeMirrorCompletionController.js:
1771 (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
1772 Better handle completions in cases where we are in the middle of a property
1773 to avoid orphaned characters, or at the end of a function name to avoid creating
1774 duplicate parenthesis.
1776 2016-10-18 Joseph Pecoraro <pecoraro@apple.com>
1778 REGRESSION(r201171): Web Inspector: Timeline Recording playhead should always start immediately, not wait until first event
1779 https://bugs.webkit.org/show_bug.cgi?id=163583
1780 <rdar://problem/28815882>
1782 Reviewed by Timothy Hatcher.
1784 * UserInterface/Views/TimelineRecordingContentView.js:
1785 (WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
1786 Revert logic change introduced by r201171 with no explanation.
1787 Whenever we get a start time we should use it, regardless of
1788 of what the current time is, precisely because the backend is
1789 informing us of the start time to use.
1791 2016-10-17 Joseph Pecoraro <pecoraro@apple.com>
1793 Web Inspector: Add toggles for debugger pauses at console.assert failures
1794 https://bugs.webkit.org/show_bug.cgi?id=139542
1795 <rdar://problem/19281600>
1797 Reviewed by Timothy Hatcher.
1799 * UserInterface/Controllers/DebuggerManager.js:
1800 (WebInspector.DebuggerManager.prototype.get assertionsBreakpoint):
1801 (WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
1802 (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
1803 New breakpoint and toggling behavior.
1805 * Localizations/en.lproj/localizedStrings.js:
1806 * UserInterface/Views/DebuggerSidebarPanel.js:
1807 (WebInspector.DebuggerSidebarPanel):
1808 (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
1809 (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint):
1810 (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
1811 New breakpoint tree element behavior.
1813 (WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
1814 (WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
1815 Sidebar restoration if it was selected.
1817 * UserInterface/Images/Assertion.svg: Added.
1818 * UserInterface/Images/gtk/Assertion.svg: Added.
1819 * UserInterface/Views/BreakpointTreeElement.css:
1820 (.breakpoint-assertion-icon .icon):
1821 New sidebar icon for the global breakpoint.
1823 2016-10-15 Joseph Pecoraro <pecoraro@apple.com>
1825 Web Inspector: Cleanup parts of DebuggerManager
1826 https://bugs.webkit.org/show_bug.cgi?id=163400
1828 Reviewed by Timothy Hatcher.
1830 * UserInterface/Controllers/DebuggerManager.js:
1831 (WebInspector.DebuggerManager.restoreBreakpointsSoon):
1833 (WebInspector.DebuggerManager.prototype.get paused):
1834 (WebInspector.DebuggerManager.prototype.get pauseReason):
1835 (WebInspector.DebuggerManager.prototype.get pauseData):
1836 (WebInspector.DebuggerManager.prototype.get callFrames):
1837 (WebInspector.DebuggerManager.prototype.get activeCallFrame):
1838 (WebInspector.DebuggerManager.prototype.set activeCallFrame):
1839 Put simple accessors at the top.
1841 (WebInspector.DebuggerManager.prototype.get allExceptionsBreakpoint):
1842 (WebInspector.DebuggerManager.prototype.get allUncaughtExceptionsBreakpoint):
1843 (WebInspector.DebuggerManager.prototype.get breakpoints):
1844 (WebInspector.DebuggerManager.prototype.breakpointForIdentifier):
1845 (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
1846 (WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
1847 (WebInspector.DebuggerManager.prototype.isBreakpointEditable):
1848 (WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
1849 Group public breakpoint state and access methods.
1851 (WebInspector.DebuggerManager.prototype.scriptForIdentifier):
1852 (WebInspector.DebuggerManager.prototype.scriptsForURL):
1853 (WebInspector.DebuggerManager.prototype.get searchableScripts):
1854 (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
1855 Group public script access methods.
1857 (WebInspector.DebuggerManager.prototype.pause):
1858 (WebInspector.DebuggerManager.prototype.resume):
1859 (WebInspector.DebuggerManager.prototype.stepOver):
1860 (WebInspector.DebuggerManager.prototype.stepInto):
1861 (WebInspector.DebuggerManager.prototype.stepOut):
1862 (WebInspector.DebuggerManager.prototype.continueToLocation):
1863 (WebInspector.DebuggerManager.prototype.addBreakpoint):
1864 (WebInspector.DebuggerManager.prototype.removeBreakpoint):
1865 Group and modernize public methods that perform actions.
1867 (WebInspector.DebuggerManager.prototype.nextBreakpointActionIdentifier):
1870 (WebInspector.DebuggerManager.prototype.breakpointResolved):
1871 (WebInspector.DebuggerManager.prototype.reset):
1872 (WebInspector.DebuggerManager.prototype.playBreakpointActionSound):
1873 (WebInspector.DebuggerManager.prototype.scriptDidParse):
1874 (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
1875 (WebInspector.DebuggerManager.prototype._setBreakpoint):
1876 (WebInspector.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
1877 (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
1878 (WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
1879 Minor cleanup in protected and private methods.
1881 * UserInterface/Models/BreakpointAction.js:
1882 (WebInspector.BreakpointAction):
1883 Getting the next identifier is an action so it should be a function call.
1885 * UserInterface/Views/SourceCodeTextEditor.js:
1886 (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
1887 Remove unused parameter.
1889 2016-10-14 Joseph Pecoraro <pecoraro@apple.com>
1891 Web Inspector: Dragging to delete a Breakpoint should never trigger a ContentView change
1892 https://bugs.webkit.org/show_bug.cgi?id=163403
1893 <rdar://problem/28762930>
1895 Reviewed by Timothy Hatcher.
1897 * UserInterface/Views/BreakpointTreeElement.js:
1898 (WebInspector.BreakpointTreeElement.prototype.ondelete):
1899 Signal when a breakpoint tree element will be going away because it was
1900 deleted via the keyboard operation within the TreeOutline. This is a dirty
1901 way to do the signal but we remove BreakpointTreeElements asynchronously
1902 when the Breakpoint actually gets removed from the backend.
1904 * UserInterface/Views/DebuggerSidebarPanel.js:
1905 (WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
1906 Deselect a BreakpointTreeElement if it was deleted in a way other then
1907 the delete keyboard shortcut. This ensures another TreeElement selection
1908 doesn't force ContentView changes.
1910 2016-10-14 Joseph Pecoraro <pecoraro@apple.com>
1912 Web Inspector: Improve debugger highlight when inside of getter/setter calls
1913 https://bugs.webkit.org/show_bug.cgi?id=163428
1914 <rdar://problem/28769061>
1916 Reviewed by Timothy Hatcher.
1918 * UserInterface/Views/SourceCodeTextEditor.js:
1919 (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
1920 When in the middle of a member expression at a '.' or '[' get the best member
1923 * UserInterface/Views/TextEditor.js:
1924 (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
1925 Include the character at the current position. This is useful since AST Nodes
1926 don't give us token info but we would like to know if we are at particular tokens.
1928 2016-10-14 Joseph Pecoraro <pecoraro@apple.com>
1930 Web Inspector: Unused Breakpoint getter/setter for "id" - should be "identifier"
1931 https://bugs.webkit.org/show_bug.cgi?id=163395
1933 Reviewed by Timothy Hatcher.
1935 * UserInterface/Models/Breakpoint.js:
1936 (WebInspector.Breakpoint.prototype.get identifier): Renamed.
1937 (WebInspector.Breakpoint.prototype.set identifier): Renamed.
1938 The only user is DebuggerManager which sets and gets. Previously
1939 it was unexpectedly setting a direct property on the Breakpoint
1940 instead of using these methods to set the member variable.
1942 2016-10-14 Joseph Pecoraro <pecoraro@apple.com>
1944 Web Inspector: Remove uses of delete in SourceCodeTextEditor
1945 https://bugs.webkit.org/show_bug.cgi?id=163379
1947 Reviewed by Timothy Hatcher.
1949 Remove uses of delete and better group member variables.
1950 One of the deletes was deleting an incorrect property.
1952 * UserInterface/Views/SourceCodeTextEditor.js:
1953 (WebInspector.SourceCodeTextEditor):
1954 (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
1955 (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
1956 (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
1957 (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
1958 (WebInspector.SourceCodeTextEditor.prototype._dismissEditingController):
1959 (WebInspector.SourceCodeTextEditor.prototype.editingControllerDidFinishEditing):
1961 2016-10-14 Joseph Pecoraro <pecoraro@apple.com>
1963 Uncaught Exception: TypeError: this.positionToOffset is not a function - seen hovering expressions with Type Profiler enabled
1964 https://bugs.webkit.org/show_bug.cgi?id=163405
1965 <rdar://problem/28763953>
1967 Reviewed by Matt Baker.
1969 * UserInterface/Views/SourceCodeTextEditor.js:
1970 Use correct method name, the old one must have gone away.
1972 2016-10-12 Joseph Pecoraro <pecoraro@apple.com>
1974 Web Inspector: Improve support for logging Proxy objects in console
1975 https://bugs.webkit.org/show_bug.cgi?id=163323
1976 <rdar://problem/28432553>
1978 Reviewed by Timothy Hatcher.
1980 * UserInterface/Views/ConsoleMessageView.js:
1981 (WebInspector.ConsoleMessageView.prototype._formatParameter):
1982 Treat a Proxy like any other object.
1984 2016-10-12 Joseph Pecoraro <pecoraro@apple.com>
1986 Emit DebugHooks uniformly with pause locations instead of having separate pause locations and op_debug emits
1987 https://bugs.webkit.org/show_bug.cgi?id=162809
1989 Reviewed by Geoffrey Garen.
1991 * UserInterface/Views/SourceCodeTextEditor.js:
1992 (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
1993 When pausing on the variable assignment inside for..of and for..in don't just
1994 highlight "var foo" but include the right hand side "var foo in ..." or
1997 2016-10-12 Joseph Pecoraro <pecoraro@apple.com>
1999 Web Inspector: Whole program sometimes highlighted instead of just first statement
2000 https://bugs.webkit.org/show_bug.cgi?id=163300
2001 <rdar://problem/28723162>
2003 Reviewed by Timothy Hatcher.
2005 * UserInterface/Views/SourceCodeTextEditor.js:
2006 (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2007 Avoid highlighting the entire program by skipping a Program type Node.
2009 * UserInterface/Views/TextEditor.js:
2010 (WebInspector.TextEditor.prototype.setExecutionLineAndColumn):
2011 Avoid unnecessary work before content has loaded.
2013 (WebInspector.TextEditor.prototype.currentPositionToOriginalOffset):
2014 Avoid unnecessary indirection to get the CodeMirror editor.
2016 2016-10-11 Joseph Pecoraro <pecoraro@apple.com>
2018 Web Inspector: Remove line highlight on primary execution line while stepping because it is distracting
2019 https://bugs.webkit.org/show_bug.cgi?id=163294
2020 <rdar://problem/28721176>
2022 Reviewed by Timothy Hatcher.
2024 * UserInterface/Views/TextEditor.js:
2025 (WebInspector.TextEditor.prototype._updateExecutionLine):
2026 When setting the primary execution line, remove default line highlights.
2028 2016-10-10 Matt Baker <mattbaker@apple.com>
2030 Web Inspector: Revealed line not highlighted in TextEditor while debugger paused
2031 https://bugs.webkit.org/show_bug.cgi?id=163197
2033 Reviewed by Timothy Hatcher.
2035 * UserInterface/Views/TextEditor.js:
2036 (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
2037 Avoid highlighting the execution line while debugging, but allow
2038 other lines to be highlighted.
2040 2016-10-06 Devin Rousso <dcrousso+webkit@gmail.com>
2042 Inspector exception in `parseTextForRule()` when pasting into CSS rule selector
2043 https://bugs.webkit.org/show_bug.cgi?id=162792
2045 Reviewed by Matt Baker.
2047 * UserInterface/Views/CSSStyleDeclarationSection.js:
2048 (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
2049 Changed regular expression for matching CSS rules to allow newlines in pasted text.
2051 2016-10-02 Devin Rousso <dcrousso+webkit@gmail.com>
2053 Web Inspector: Clicking twice on the color swatch square should hide the color picker
2054 https://bugs.webkit.org/show_bug.cgi?id=162759
2056 Reviewed by Matt Baker.
2058 * UserInterface/Views/InlineSwatch.js:
2059 (WebInspector.InlineSwatch):
2060 (WebInspector.InlineSwatch.prototype.didDismissPopover):
2061 (WebInspector.InlineSwatch.prototype._swatchElementClicked):
2062 Remove the "click" event listener when a popover is presented to prevent improper
2063 interaction. Add the event listener back when the popover is dismissed.
2065 2016-10-02 Matt Baker <mattbaker@apple.com>
2067 Web Inspector: Exception thrown when hovering network waterfall graphs during reload
2068 https://bugs.webkit.org/show_bug.cgi?id=162850
2069 <rdar://problem/28579653>
2071 Reviewed by Brian Burg.
2073 * UserInterface/Views/ResourceTimelineDataGridNode.js:
2074 (WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
2075 Check that the node's data grid reference is valid before use.
2076 (WebInspector.ResourceTimelineDataGridNode):
2078 2016-10-01 Joseph Pecoraro <pecoraro@apple.com>
2080 Web Inspector: Selection does not show up over execution highlight ranges
2081 https://bugs.webkit.org/show_bug.cgi?id=162844
2082 <rdar://problem/28579121>
2084 Reviewed by Matt Baker.
2086 * Scripts/update-codemirror-resources.rb:
2087 * UserInterface/External/CodeMirror/mark-selection.js: Added.
2088 * UserInterface/Main.html:
2089 New add-on that makes selection a text marker so it can be styled
2090 at the same level as other text markers.
2092 * UserInterface/Views/TextEditor.css:
2093 (.text-editor > .CodeMirror .execution-range-highlight:not(.CodeMirror-selectedtext)):
2094 Don't use execution-range-highlight styles if the text is selected.
2096 * UserInterface/Views/TextEditor.js:
2097 (WebInspector.TextEditor):
2098 Enable the text selection as text markers addon.
2100 2016-09-30 Joseph Pecoraro <pecoraro@apple.com>
2102 Web Inspector: Make debugger stepping highlights work in inline <script>s
2103 https://bugs.webkit.org/show_bug.cgi?id=162753
2104 <rdar://problem/28551332>
2106 Reviewed by Brian Burg.
2108 * UserInterface/Models/TextRange.js:
2109 (WebInspector.TextRange.prototype.contains):
2110 Check if a given line/column falls within this range.
2112 * UserInterface/Views/SourceCodeTextEditor.js:
2113 (WebInspector.SourceCodeTextEditor.prototype._getAssociatedScript):
2114 If we are in a Document resource find the associated script at a given position.
2116 (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2117 When comparing offsets to SyntaxTree offsets, the SyntaxTree's offset of 0 is the
2118 first character of the Script, which differs from the current SourceCode's offset.
2119 Adjust the offset by the Script's startOffset.
2121 * UserInterface/Views/TextEditor.js:
2122 (WebInspector.TextEditor.prototype.currentPositionToOriginalPosition):
2123 (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
2124 Pass both the original offset and original position to the delegate.
2126 2016-09-30 Joseph Pecoraro <pecoraro@apple.com>
2128 Web Inspector: Stepping through `a(); b(); c();` it is unclear where we are and what is about to execute
2129 https://bugs.webkit.org/show_bug.cgi?id=161658
2130 <rdar://problem/28181254>
2132 Reviewed by Geoffrey Garen.
2134 * UserInterface/Models/Script.js:
2135 (WebInspector.Script.prototype.requestScriptSyntaxTree):
2136 Fix first calls to requestScriptSyntaxTree. They were getting an uncaught
2137 exception because the content argument was missing.
2139 * UserInterface/Models/ScriptSyntaxTree.js:
2140 (WebInspector.ScriptSyntaxTree.prototype.containersOfOffset):
2141 Find all AST nodes that contain a particular offset.
2143 * UserInterface/Views/SourceCodeTextEditor.js:
2144 (WebInspector.SourceCodeTextEditor):
2145 (WebInspector.SourceCodeTextEditor.prototype.close):
2146 (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
2147 (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
2148 (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2149 Provide a good highlight range for a given offset. This is normally the start
2150 of a statement/expression, inside a statement/expression, or the closing brace
2151 of a function (leaving a function). Provide good ranges for each of these.
2153 * UserInterface/Views/TextEditor.js:
2154 (WebInspector.TextEditor):
2155 (WebInspector.TextEditor.set string.update):
2156 (WebInspector.TextEditor.prototype.set string):
2157 (WebInspector.TextEditor.prototype.setExecutionLineAndColumn):
2158 (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
2159 (WebInspector.TextEditor.prototype.revealPosition):
2160 (WebInspector.TextEditor.prototype.currentPositionToOriginalOffset):
2161 (WebInspector.TextEditor.prototype._updateAfterFormatting):
2162 (WebInspector.TextEditor.prototype.set executionLineNumber): Deleted.
2163 (WebInspector.TextEditor.prototype.set executionColumnNumber): Deleted.
2164 (WebInspector.TextEditor.prototype._updateExecutionLine.update): Deleted.
2165 Always set the execution line and column together, to simplify how we update highlights.
2167 (WebInspector.TextEditor.prototype._clearMultilineExecutionLineHighlights):
2168 (WebInspector.TextEditor.prototype._updateExecutionLine):
2169 When updating the main highlight clear any multi-line highlights.
2171 (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
2172 Ask the delegate for a specific highlight range. If provided use that range,
2173 otherwise just highlight the end of the line. Once we know the range, if it
2174 is multiple lines, give the extra lines the full line highlight as well.
2175 Also make adjustments, such as not highlighting trailing whitespace.
2177 * UserInterface/Views/TextEditor.css:
2178 (.text-editor > .CodeMirror .execution-line.primary .CodeMirror-linenumber::after):
2179 (.text-editor > .CodeMirror .execution-line):
2180 (.text-editor > .CodeMirror .execution-line .CodeMirror-matchingbracket):
2181 (.text-editor > .CodeMirror .execution-range-highlight):
2182 Styles for execution lines and execution range highlights.
2184 2016-09-29 Aaron Chu <aaron_chu@apple.com>
2186 Web Inspector: AXI: linkified refs to #document and #text are not usually navigable nodes; consider delinkifying them
2187 https://bugs.webkit.org/show_bug.cgi?id=130600
2188 <rdar://problem/16391333>
2190 Reviewed by Brian Burg.
2192 Removing link style for non-navigable nodes by first
2193 checking nodeType of the node.
2195 * UserInterface/Base/DOMUtilities.js:
2196 (WebInspector.linkifyNodeReference):
2198 2016-09-27 Matt Baker <mattbaker@apple.com>
2200 Web Inspector: Refreshing while in Timelines-tab causes negative timestamps in Network-tab
2201 https://bugs.webkit.org/show_bug.cgi?id=160051
2202 <rdar://problem/27480122>
2204 Reviewed by Brian Burg.
2206 * UserInterface/Views/NetworkGridContentView.js:
2207 (WebInspector.NetworkGridContentView.prototype.get startTime):
2208 (WebInspector.NetworkGridContentView.prototype.get zeroTime):
2209 Use the cached start time for graph data source properties instead of
2210 relying on the ruler, which requires a layout in order to be updated
2213 2016-09-27 Matt Baker <mattbaker@apple.com>
2215 Web Inspector: Unfocusing / Focusing inspector window should not change ContentView
2216 https://bugs.webkit.org/show_bug.cgi?id=162572
2217 <rdar://problem/28479562>
2219 Reviewed by Brian Burg.
2221 Improve NavigationSidebarPanel logic for coordinating selection between trees.
2222 When tree selection changes, the most recent selection should be restored
2223 the next time the tree is focused.
2225 The sidebar should also handle focusing a tree for the first time, in
2226 which no previous selection exists, and focusing a tree that has had its
2227 previous selection filtered out (hidden).
2229 * UserInterface/Views/NavigationSidebarPanel.js:
2230 (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineDidFocus):
2231 (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
2232 Restoring the last deselected element, instead of the last selected element
2233 only works when the selection is moving from one tree to another. When
2234 the elements belong to the same tree the newly selected element won't
2235 be saved until the next selection change. If the window loses and regains
2236 the focus before then, the tree will restore the previous selection,
2237 effectively reverting the last selection change.
2239 2016-09-27 Tomas Popela <tpopela@redhat.com>
2241 [GTK] Mac defaults are used for key shortcuts on Linux
2242 https://bugs.webkit.org/show_bug.cgi?id=162564
2244 Don't set Mac's default keymap as a fallthrough for CodeMirror when we
2247 Reviewed by Carlos Garcia Campos.
2249 * UserInterface/Test.html: Include Platform.js for the
2250 WebInspector.Platform definition.
2251 * UserInterface/Views/CodeMirrorAdditions.js:
2253 2016-09-26 Matt Baker <mattbaker@apple.com>
2255 Web Inspector: Box Model values not updated when DOM node styles change
2256 https://bugs.webkit.org/show_bug.cgi?id=162525
2258 Reviewed by Brian Burg.
2260 The Box Model section should refresh itself when the selected node's
2261 computed style changes. This is necessary since the Styles sidebar
2262 doesn't always refresh its sections on node changes.
2264 * UserInterface/Views/BoxModelDetailsSectionRow.js:
2265 (WebInspector.BoxModelDetailsSectionRow.prototype.set nodeStyles):
2266 Refresh metrics whenever the computed style changes.
2268 (WebInspector.BoxModelDetailsSectionRow.prototype._getBox):
2269 (WebInspector.BoxModelDetailsSectionRow.prototype._getComponentSuffix):
2270 (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createValueElement):
2271 (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
2272 (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
2273 (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
2274 Drive-by cleanup to make this large function easier to read.
2275 (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement): Deleted.
2276 Renamed createValueElement.
2277 (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement): Deleted.
2278 (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement): Deleted.
2279 Combined these into a single function taking a property name (width or height).
2281 == Rolled over to ChangeLog-2016-09-26 ==