4b5e83dc2f9c8469a9d4bce994322c009ec39cc4
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-12-11  Matt Baker  <mattbaker@apple.com>
2
3         Web Inspector: ThreadTreeElement should have a "Resume" status button when paused
4         https://bugs.webkit.org/show_bug.cgi?id=165581
5
6         Reviewed by Joseph Pecoraro.
7
8         * UserInterface/Images/Resume.svg:
9         Fill/stroke should be unspecified so that both can be styled in CSS.
10
11         * UserInterface/Views/DebuggerDashboardView.css:
12         (.dashboard.debugger .navigation-bar .item.debugger-dashboard-pause.activated):
13         * UserInterface/Views/DebuggerSidebarPanel.css:
14         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume):
15         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume.activated):
16         Recreate original style which relied on 'fill="none"' being specified in the SVG.
17
18         * UserInterface/Views/ThreadTreeElement.css:
19         (.tree-outline > .item.thread .icon):
20         (.tree-outline > .item.thread .status-button.resume):
21         (.tree-outline > .item.thread .status-button.resume:active):
22         (.tree-outline:matches(:focus, .force-focus) > .item.thread.selected .status-button.resume):
23         (.tree-outline > .item.thread.selected .status-button.resume,):
24         (.details-section.call-stack .thread .icon): Deleted.
25         Status button styles. Colors match those of the goto-arrow button.
26
27         * UserInterface/Views/ThreadTreeElement.js:
28         (WebInspector.ThreadTreeElement.prototype.refresh):
29         Update status icon.
30         (WebInspector.ThreadTreeElement.prototype.oncontextmenu):
31         (WebInspector.ThreadTreeElement.prototype._updateStatus):
32         Add/remove status button based on paused state.
33         Stop propagation of "mousedown" events on the status button, to
34         prevent button press from selecting the tree element.
35         (WebInspector.ThreadTreeElement):
36
37 2016-12-11  Joseph Pecoraro  <pecoraro@apple.com>
38
39         Web Inspector: Move MainTarget and WorkerTarget to their own files
40         https://bugs.webkit.org/show_bug.cgi?id=165701
41
42         Reviewed by Brian Burg.
43
44         * UserInterface/Controllers/DebuggerManager.js:
45         (WebInspector.DebuggerManager.prototype.scriptDidParse):
46         * UserInterface/Main.html:
47         * UserInterface/Protocol/MainTarget.js: Added.
48         (WebInspector.MainTarget):
49         (WebInspector.MainTarget.prototype.get displayName):
50         (WebInspector.MainTarget.prototype.get mainResource):
51         * UserInterface/Protocol/Target.js:
52         (WebInspector.Target):
53         (WebInspector.MainTarget): Deleted.
54         (WebInspector.MainTarget.prototype.get displayName): Deleted.
55         (WebInspector.MainTarget.prototype.get mainResource): Deleted.
56         (WebInspector.MainTarget.prototype.initialize): Deleted.
57         (WebInspector.WorkerTarget): Deleted.
58         (WebInspector.WorkerTarget.prototype.get displayName): Deleted.
59         (WebInspector.WorkerTarget.prototype.initialize): Deleted.
60         * UserInterface/Protocol/WorkerTarget.js: Added.
61         (WebInspector.WorkerTarget):
62         (WebInspector.WorkerTarget.prototype.get displayName):
63         * UserInterface/Test.html:
64
65 2016-12-09  Joseph Pecoraro  <pecoraro@apple.com>
66
67         Web Inspector: Frontend should not be resetting TypeProfiler state when switching between ContentViews
68         https://bugs.webkit.org/show_bug.cgi?id=165648
69
70         Reviewed by Brian Burg.
71
72         * UserInterface/Base/Main.js:
73         (WebInspector.loaded):
74         Update all backends when the state changes.
75
76         * UserInterface/Views/SourceCodeTextEditor.js:
77         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
78         (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
79         Moved this code to when the global Setting (which affects all editors) changes.
80
81 2016-12-09  Joseph Pecoraro  <pecoraro@apple.com>
82
83         Web Inspector: Some resources fetched via Fetch API do not have data
84         https://bugs.webkit.org/show_bug.cgi?id=165230
85         <rdar://problem/29449220>
86
87         Reviewed by Alex Christensen.
88
89         * Localizations/en.lproj/localizedStrings.js:
90         New "Fetch" and "Fetches" localized strings.
91
92         * UserInterface/Models/Resource.js:
93         (WebInspector.Resource.displayNameForType):
94         * UserInterface/Models/ResourceCollection.js:
95         (WebInspector.ResourceCollection.verifierForType):
96         * UserInterface/Views/CollectionContentView.js:
97         (WebInspector.CollectionContentView):
98         * UserInterface/Views/ResourceClusterContentView.js:
99         (WebInspector.ResourceClusterContentView.prototype.get responseContentView):
100         * UserInterface/Views/ResourceTreeElement.js:
101         (WebInspector.ResourceTreeElement.compareResourceTreeElements):
102         New ResourceType.Fetch. Behave like XHR in most places.
103
104 2016-12-08  Joseph Pecoraro  <pecoraro@apple.com>
105
106         Web Inspector: Unable to delete breakpoint from worker script
107         https://bugs.webkit.org/show_bug.cgi?id=165578
108
109         Reviewed by Matt Baker.
110
111         * UserInterface/Controllers/DebuggerManager.js:
112         (WebInspector.DebuggerManager.prototype._removeBreakpoint):
113         Match setting breakpoints. If this is a "URL breakpoint", affect
114         all targets. If this is a "Script breakpoint", affect just the
115         single target containing that Script.
116
117 2016-12-07  Devin Rousso  <dcrousso+webkit@gmail.com>
118
119         REGRESSION(r203912): Web Inspector: Navigation sidebar widths are not saved
120         https://bugs.webkit.org/show_bug.cgi?id=165496
121
122         Reviewed by Matt Baker.
123
124         * UserInterface/Views/TabBrowser.js:
125         (WebInspector.TabBrowser):
126         (WebInspector.TabBrowser.prototype._sidebarWidthDidChange):
127         (WebInspector.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
128         (WebInspector.TabBrowser.prototype._sidebarWidthDidChange): Renamed from _detailsSidebarWidthDidChange.
129         Add event listener for when the navigation sidebar's width is changed.
130
131         * UserInterface/Views/TabContentView.js:
132         (WebInspector.TabContentView):
133         (WebInspector.TabContentView.prototype.get navigationSidebarPanel):
134         (WebInspector.TabContentView.prototype.get navigationSidebarCollapsedSetting):
135         (WebInspector.TabContentView.prototype.get navigationSidebarWidthSetting):
136         (WebInspector.TabContentView.prototype.get detailsSidebarPanels):
137         (WebInspector.TabContentView.prototype.get detailsSidebarCollapsedSetting):
138         (WebInspector.TabContentView.prototype.get detailsSidebarSelectedPanelSetting):
139         (WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting):
140         Add WebInspector.Setting object for the navigation sidebar's width.
141
142 2016-12-07  Nikita Vasilyev  <nvasilyev@apple.com>
143
144         Web Inspector: Control Flow Profiler's event handlers aren't getting removed when ContentView closes
145         https://bugs.webkit.org/show_bug.cgi?id=165556
146
147         Reviewed by Joseph Pecoraro.
148
149         * UserInterface/Views/ScriptContentView.js:
150         (WebInspector.ScriptContentView.prototype.closed):
151         * UserInterface/Views/TextResourceContentView.js:
152         (WebInspector.TextResourceContentView.prototype.closed):
153
154 2016-12-07  Joseph Pecoraro  <pecoraro@apple.com>
155
156         Web Inspector: Add ability to distinguish if a Script was parsed as a module
157         https://bugs.webkit.org/show_bug.cgi?id=164900
158         <rdar://problem/29323817>
159
160         Reviewed by Timothy Hatcher.
161
162         * UserInterface/Models/Script.js:
163         (WebInspector.Script.prototype.get sourceType):
164         New property of Scripts. SourceType is either Program or Module.
165
166         * UserInterface/Controllers/DebuggerManager.js:
167         (WebInspector.DebuggerManager.prototype.scriptDidParse):
168         * UserInterface/Protocol/DebuggerObserver.js:
169         (WebInspector.DebuggerObserver.prototype.scriptParsed):
170         Convert incoming module boolean into SourceType when creating new Scripts.
171
172         * UserInterface/Models/ScriptSyntaxTree.js:
173         (WebInspector.ScriptSyntaxTree):
174         (WebInspector.ScriptSyntaxTree.prototype._recurse):
175         (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
176         Update the generic AST for new module specific Esprima types.
177
178         * UserInterface/Views/SourceCodeTextEditor.js:
179         (WebInspector.SourceCodeTextEditor.prototype.textEditorScriptSourceType):
180         * UserInterface/Views/TextEditor.js:
181         (WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
182         For pretty printing correctly state if this is a module or not for Esprima.
183
184 2016-12-07  Joseph Pecoraro  <pecoraro@apple.com>
185
186         Web Inspector: Update Esprima to support new features / syntax (**, async/await, trailing comma)
187         https://bugs.webkit.org/show_bug.cgi?id=164830
188         <rdar://problem/29293814>
189
190         Reviewed by Timothy Hatcher.
191
192         * UserInterface/External/Esprima/LICENSE:
193         * UserInterface/External/Esprima/esprima.js:
194         Updated to Esprima@7219731 (4.0.0-dev).
195
196         * UserInterface/Models/ScriptSyntaxTree.js:
197         (WebInspector.ScriptSyntaxTree.prototype._recurse):
198         (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
199         * UserInterface/Workers/Formatter/ESTreeWalker.js:
200         (ESTreeWalker.prototype._walkChildren):
201         Add new nodes (AwaitExpression).
202         Add new states (async boolean property on Functions).
203         Remove stale properties (defaults is no longer needed, as parameters
204         with default values are now AssignmentPatterns).
205         Update MetaProperty where meta/property are now Identifiers not strings.
206
207         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
208         (EsprimaFormatter.prototype._handleTokenAtNode):
209         Handle pretty printing of new nodes and identifiers.
210
211         * Controllers/FrameResourceManager.js
212         Address a console.assert warning for stripping assertions in Production.
213
214 2016-12-07  Joseph Pecoraro  <pecoraro@apple.com>
215
216         Web Inspector: Remove unused and mostly untested Page domain commands and events
217         https://bugs.webkit.org/show_bug.cgi?id=165507
218
219         Reviewed by Brian Burg.
220
221         * UserInterface/Protocol/PageObserver.js:
222         (WebInspector.PageObserver.prototype.javascriptDialogOpening):
223         (WebInspector.PageObserver.prototype.javascriptDialogClosed):
224         (WebInspector.PageObserver.prototype.scriptsEnabled):
225         Keep stub in case legacy backends dispatch the event to the frontend.
226
227         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
228         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
229         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
230         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
231         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
232         * Versions/Inspector-iOS-10.0.json:
233         * Versions/Inspector-iOS-7.0.json:
234         * Versions/Inspector-iOS-8.0.json:
235         * Versions/Inspector-iOS-9.0.json:
236         * Versions/Inspector-iOS-9.3.json:
237         Remove handleJavaScriptDialog command from legacy backends because it
238         doesn't appear as if the iOS backend handled it at all.
239
240 2016-12-06  Alexey Proskuryakov  <ap@apple.com>
241
242         Correct SDKROOT values in xcconfig files
243         https://bugs.webkit.org/show_bug.cgi?id=165487
244         rdar://problem/29539209
245
246         Reviewed by Dan Bernstein.
247
248         Fix suggested by Dan Bernstein.
249
250         * Configurations/DebugRelease.xcconfig:
251
252 2016-12-05  Matt Baker  <mattbaker@apple.com>
253
254         Web Inspector: Object.shallowEqual([{}], [{}]) should return true
255         https://bugs.webkit.org/show_bug.cgi?id=165397
256
257         Reviewed by Brian Burg.
258
259         * UserInterface/Base/Utilities.js:
260         (value):
261         Array.shallowEqual should compare array items using strict equivalence,
262         and on failure defer to Object.shallowEqual.
263
264 2016-12-05  Joseph Pecoraro  <pecoraro@apple.com>
265
266         Web Inspector: Remove legacy styles
267         https://bugs.webkit.org/show_bug.cgi?id=165389
268
269         Reviewed by Matt Baker.
270
271         Remove styles for platforms we don't build on anymore (Mavericks
272         and Mountain Lion). There are also no "unknown-mac" styles to
273         upgrade to a named platform.
274
275         * UserInterface/Base/Platform.js:
276         Add sierra and remove older unsupported platforms.
277
278         * UserInterface/Views/Main.css:
279         (body):
280         (body:not(.mavericks)): Deleted.
281         * UserInterface/Views/TabBar.css:
282         (body.mavericks .tab-bar > .item:not(.disabled).selected): Deleted.
283         * UserInterface/Views/Toolbar.css:
284         (body .toolbar):
285         (body.window-inactive .toolbar):
286         (body.mac-platform:not(.docked) .toolbar):
287         (body.mac-platform:not(.docked)):
288         (body:not(.mavericks) .toolbar,): Deleted.
289         (body.window-inactive:not(.mavericks) .toolbar): Deleted.
290         (body.mac-platform:not(.docked, .mavericks) .toolbar): Deleted.
291         (body.mac-platform:not(.docked, .mavericks)): Deleted.
292         Remove mavericks specific styles.
293
294 2016-12-02  Andy Estes  <aestes@apple.com>
295
296         [Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
297         https://bugs.webkit.org/show_bug.cgi?id=164492
298
299         Reviewed by Dan Bernstein.
300
301         * Configurations/WebInspectorUIFramework.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
302         com.apple.$(PRODUCT_NAME:rfc1034identifier).
303         * Info.plist: Changed CFBundleIdentifier's value from
304         com.apple.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}.
305
306 2016-12-02  Nikita Vasilyev  <nvasilyev@apple.com>
307
308         REGRESSION (r192344): Web Inspector: Turning off Code Coverage or Type Profiler logs an error
309         https://bugs.webkit.org/show_bug.cgi?id=164804
310         <rdar://problem/29278028>
311
312         Reviewed by Matt Baker.
313
314         BasicBlockAnnotator and TypeTokenAnnotator were instanciated for a resource in an inactive Debugger tab.
315
316         * UserInterface/Views/NavigationSidebarPanel.js:
317         (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
318         Don't show any content view if we are not in a selected tab.
319
320 2016-12-01  Matt Baker  <mattbaker@apple.com>
321
322         Web Inspector: Show async stack traces for workers
323         https://bugs.webkit.org/show_bug.cgi?id=165235
324         <rdar://problem/29450172>
325
326         Reviewed by Joseph Pecoraro.
327
328         * UserInterface/Views/CallFrameTreeElement.css:
329         (.tree-outline > .children > .item.call-frame.async-boundary):
330         (.tree-outline:not(.single-thread) > .children > .item.call-frame.async-boundary):
331         (.tree-outline .item.call-frame.async-boundary::before):
332         (.tree-outline.single-thread .item.call-frame.async-boundary::before):
333         (.tree-outline .item.call-frame.async-boundary): Deleted.
334         Style changes for single/multiple-thread call stacks.
335         Padding changes to account for Thread tree element.
336         Make selectors more specific where needed.
337
338         * UserInterface/Views/DebuggerSidebarPanel.css:
339         (.sidebar > .panel.navigation.debugger .tree-outline.single-thread > .item.thread):
340         (.sidebar > .panel.navigation.debugger .tree-outline.single-thread):
341         Style changes for single/multiple-thread call stacks.
342
343         * UserInterface/Views/DebuggerSidebarPanel.js:
344         (WebInspector.DebuggerSidebarPanel):
345         Use a single tree outline for showing a single thread or multiple threads.
346         For single-threaded, hide Thread tree element and un-indent children.
347
348         (WebInspector.DebuggerSidebarPanel.prototype._targetAdded):
349         (WebInspector.DebuggerSidebarPanel.prototype._targetRemoved):
350         (WebInspector.DebuggerSidebarPanel.prototype._updateCallStackTreeOutline):
351         Update tree style and whether Thread tree element is selectable.
352         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
353         Remove support for second tree outline.
354
355         (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks): Deleted.
356         (WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement): Deleted.
357         (WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks): Deleted.
358         (WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks): Deleted.
359         No longer needed after unifying tree outlines.
360
361         * UserInterface/Views/ThreadTreeElement.js:
362         (WebInspector.ThreadTreeElement.prototype.refresh):
363         Append call frames from the async stack trace.
364
365 2016-11-30  Joseph Pecoraro  <pecoraro@apple.com>
366
367         Web Inspector: Clicking on link in Web Inspector can cause UIProcess to crash
368         https://bugs.webkit.org/show_bug.cgi?id=165157
369         <rdar://problem/27896562>
370
371         Reviewed by Brian Burg.
372
373         By correctly disallowing slashes in the scheme Web Inspector resolves
374         the correct absolute URL and doesn't end up trying to navigate to an
375         incorrect file URL.
376
377         * UserInterface/Base/URLUtilities.js:
378         (parseURL):
379         Disallow "/" characters in the scheme portion. (/http://example.com)
380         Allow path to be optional before a fragment portion. (http://example.com#frag)
381
382 2016-11-29  Joseph Pecoraro  <pecoraro@apple.com>
383
384         Web Inspector: Improve name sorting in HeapSnapshot data grids
385         https://bugs.webkit.org/show_bug.cgi?id=165170
386         <rdar://problem/28784421>
387
388         Reviewed by Matt Baker.
389
390         When sorting the Name column, group named properties and unnamed
391         properties and sort them each individually:
392
393           - Sort named properties by their property name (property names will be unique if they exist)
394           - Sort unnamed properties by their class name (guaranteed)
395           - Sort any tied class names by their object id
396
397         This makes using the Object Graph with Name sort easier to follow.
398         In the ascending sort you see all the named properties first,
399         followed by the unnamed (internal) properties.
400
401         * UserInterface/Views/HeapSnapshotContentView.js:
402         (WebInspector.HeapSnapshotObjectGraphContentView):
403         Since this data grid column now sorts on more than just the "Class Name"
404         rename it to "Name".
405
406         * UserInterface/Views/HeapSnapshotDataGridTree.js:
407         (WebInspector.HeapSnapshotDataGridTree.buildSortComparator):
408         Make the sort of the `className` column more general to handle sorting
409         by property names, class names, and object identifiers.
410
411         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
412         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get propertyName):
413         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
414         Provide a lazy `propertyName` accessor where we compute it once and stash
415         it on the DataGridNode to avoid extra work when resorting.
416
417         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate.propertyName):
418         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
419         In the initial populated sort, provide the necessary property name property
420         the sort comparator expects.
421
422 2016-11-29  Matt Baker  <mattbaker@apple.com>
423
424         Web Inspector: Breakpoints button enabled state is too subtle
425         https://bugs.webkit.org/show_bug.cgi?id=165153
426
427         Reviewed by Joseph Pecoraro.
428
429         * UserInterface/Images/Breakpoints.svg:
430         Change to path so stroke and fill can be styled.
431
432         * UserInterface/Views/DebuggerSidebarPanel.css:
433         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints):
434         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints.activated):
435         Fill and stroke styles for the active and inactive breakpoint button.
436
437 2016-11-28  Matt Baker  <mattbaker@apple.com>
438
439         Web Inspector: Debugger should have an option for showing asynchronous call stacks
440         https://bugs.webkit.org/show_bug.cgi?id=163230
441         <rdar://problem/28698683>
442
443         Reviewed by Joseph Pecoraro.
444
445         * Localizations/en.lproj/localizedStrings.js:
446         New string for generic async call stack boundary label: "(async)".
447
448         * UserInterface/Controllers/DebuggerManager.js:
449         Create async stack depth setting and set default depth.
450         (WebInspector.DebuggerManager.prototype.get asyncStackTraceDepth):
451         (WebInspector.DebuggerManager.prototype.set asyncStackTraceDepth):
452         Make async stack depth setting accessible to the frontend.
453         (WebInspector.DebuggerManager.prototype.initializeTarget):
454         Set async stack depth value on the target.
455         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
456         Plumbing for the async stack trace payload.
457
458         * UserInterface/Models/ConsoleMessage.js:
459         (WebInspector.ConsoleMessage):
460         Updated for new StackTrace.fromPayload use.
461
462         * UserInterface/Models/DebuggerData.js:
463         (WebInspector.DebuggerData):
464         (WebInspector.DebuggerData.prototype.get asyncStackTrace):
465         (WebInspector.DebuggerData.prototype.updateForPause):
466         (WebInspector.DebuggerData.prototype.updateForResume):
467         More plumbing.
468
469         * UserInterface/Models/StackTrace.js:
470         Update frontend model for use as new protocol object Console.StackTrace,
471         which was previously an alias for a simple array of Console.CallFrames.
472
473         (WebInspector.StackTrace):
474         (WebInspector.StackTrace.fromPayload):
475         (WebInspector.StackTrace.fromString):
476         (WebInspector.StackTrace.prototype.get topCallFrameIsBoundary):
477         (WebInspector.StackTrace.prototype.get parentStackTrace):
478
479         * UserInterface/Protocol/DebuggerObserver.js:
480         (WebInspector.DebuggerObserver.prototype.paused):
481         More plumbing.
482
483         * UserInterface/Views/CallFrameTreeElement.css:
484         (.tree-outline .item.call-frame.async-boundary):
485         Use default cursor since boundary element is not selectable.
486         (.tree-outline .item.call-frame.async-boundary .icon):
487         (.tree-outline .item.call-frame.async-boundary::before,):
488         (.tree-outline .item.call-frame.async-boundary::after):
489         (.tree-outline .item.call-frame.async-boundary::before):
490         Dimmed text and divider line styles for boundary element.
491
492         * UserInterface/Views/CallFrameTreeElement.js:
493         (WebInspector.CallFrameTreeElement):
494         Add a flag denoting whether the call frame is an async call trace
495         boundary, and set styles accordingly.
496
497         * UserInterface/Views/DebuggerSidebarPanel.js:
498         Set async stack trace depth, if supported.
499         (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks):
500         Add call frames for async stack traces to the call stack TreeOutline.
501         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
502         Ensure that async call frames cannot become the active call frame.
503
504         * UserInterface/Views/Variables.css:
505         (:root):
506         Add --text-color-gray-medium, for dimmed text in async boundary element.
507
508 2016-11-18  Matt Baker  <mattbaker@apple.com>
509
510         Web Inspector: TimelineDataGridNode assertions when refreshing page
511         https://bugs.webkit.org/show_bug.cgi?id=162642
512         <rdar://problem/28505898>
513
514         Reviewed by Timothy Hatcher.
515
516         This patch fixes a number of deficiencies in the Network tab that caused
517         TimelineDataGridNode graphs to refresh before the tab became visible.
518
519         * UserInterface/Views/ElementsTabContentView.js:
520         (WebInspector.ElementsTabContentView):
521         (WebInspector.ElementsTabContentView.prototype.shown):
522         Drive-by fix: defer showing the DOM content view until the tab is shown.
523
524         * UserInterface/Views/NetworkGridContentView.js:
525         (WebInspector.NetworkGridContentView):
526         Drive-by event listener cleanup.
527         (WebInspector.NetworkGridContentView.prototype.get startTime):
528         (WebInspector.NetworkGridContentView.prototype.get endTime):
529         Back endTime with a variable, instead of using the ruler value which
530         isn't valid before the tab is shown for the first time.
531
532         (WebInspector.NetworkGridContentView.prototype.shown):
533         Force the grid to update its layout, and that of the Timeline column ruler.
534         During layout the ruler's secondsPerPixel value is used, which isn't
535         valid until the ruler does an initial layout.
536
537         (WebInspector.NetworkGridContentView.prototype.reset):
538         Clear pending records. This was causing duplicates to appear when the
539         inspected page was refreshed multiple times prior to showing the Network
540         tab for the first time.
541
542         (WebInspector.NetworkGridContentView.prototype.layout):
543         Should more closely match behavior in NetworkTimelineView.prototype.layout.
544         Graph end time padding is added if no longer updating the current time.
545
546         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
547         Track endTime of the last record added, so that the graph end time can
548         be padded once the current time is no longer being updated.
549
550         (WebInspector.NetworkGridContentView.prototype._update):
551         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
552         Graph end time padding shouldn't be applied here, since this isn't called
553         if the inspected page finishes loading before the view is shown.
554
555         (WebInspector.NetworkGridContentView.prototype._clearNetworkItems): Deleted.
556         Replaced by an arrow function.
557
558         * UserInterface/Views/NetworkSidebarPanel.js:
559         (WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
560         Don't show the content view if the tab is hidden.
561
562 2016-11-17  Devin Rousso  <dcrousso+webkit@gmail.com>
563
564         Web Inspector: Shift clicking on named color value only shows its hex form
565         https://bugs.webkit.org/show_bug.cgi?id=162758
566
567         Reviewed by Timothy Hatcher.
568
569         * UserInterface/Models/Color.js:
570         (WebInspector.Color.prototype.nextFormat):
571         Reworked the logic for the formatting order to be the following:
572          - Long HEX and Long HEXAlpha
573          - RGB and RGBA
574          - HSL and HSLA
575          - Keyword (if applicable)
576          - Short HEX (if applicable)
577          - Short HEXAlpha (if applicable)
578         It will only show formats with alpha values if the color value has an alpha that is not 1.
579         If the alpha is not 1, it will not show formats with non-alpha values.
580
581         The changes to this function have no effect on the context menu items of InlineSwatch
582         elements.  The purpose of each of those items is to allow the user to change the format to
583         a specified type, whereas WebInspector.Color.prototype.nextFormat is used to cycle through
584         all of the relevant formats.
585
586         (WebInspector.Color.prototype._toRGBString):
587         (WebInspector.Color.prototype._toRGBAString):
588         (WebInspector.Color.prototype._toHSLString):
589         (WebInspector.Color.prototype._toHSLAString):
590         Unrelated fix of extra decimals when converting from HEX to RGB and HSL.
591
592         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
593         (WebInspector.CSSStyleDeclarationTextEditor._inlineSwatchValueChanged):
594         Removed assertion for `_hasActiveInlineSwatchEditor` since the value may change from
595         switching the format of a color swatch (Shift-Click).
596
597 2016-11-16  Joseph Pecoraro  <pecoraro@apple.com>
598
599         Web Inspector: Background tabs are often updating non-stop because they think they are visible
600         https://bugs.webkit.org/show_bug.cgi?id=164841
601         <rdar://problem/29298658>
602
603         Reviewed by Matt Baker.
604
605         * UserInterface/Views/NetworkGridContentView.js:
606         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
607         * UserInterface/Views/TimelineRecordingContentView.js:
608         (WebInspector.TimelineRecordingContentView.prototype._update):
609         Don't constantly update when this tab is not in the foreground.
610
611 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
612
613         Web Inspector: SourceCodeTextEditor should display execution lines for background threads
614         https://bugs.webkit.org/show_bug.cgi?id=164679
615         <rdar://problem/29233026>
616
617         Reviewed by Timothy Hatcher.
618
619         There may be multiple threads paused in the same content view. With
620         this change we should a thread indicator for each primary line a
621         thread is paused on. It uses the same inline line indicator that
622         inline errors/warnings (issues) use.
623
624         When there is a single thread (just the Page) we don't show thread
625         indicators. But as soon as there are multiple threads we start
626         managing and showing them. The line indicator contains the name of
627         the thread on the side.
628
629         Note that SourceCodeTextEditor maintains the thread indicators, but
630         it still always handles the ActiveCallFrame as it used to, pushing
631         values down into TextEditor. The ActiveCallFrame styles override
632         the thread line indicators (albeit with the same styles). The reason
633         these are still separate is that TextEditor has some special styles
634         regarding its gutter for the active execution line. Eventually we
635         may want to find a way to push this up into SourceCodeTextEditor.
636
637         * Localizations/en.lproj/localizedStrings.js:
638         New string "%d Threads" when multiple threads are on the same line.
639
640         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
641         (WebInspector.ScopeChainDetailsSidebarPanel):
642         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._activeCallFrameDidChange):
643         Update Watch Expressions when the active call frame changes.
644
645         * UserInterface/Views/SourceCodeTextEditor.css:
646         (.source-code.text-editor > .CodeMirror .line-indicator-widget):
647         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline):
648         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .arrow):
649         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .arrow):
650         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .icon):
651         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .text):
652         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .text):
653         Share line indicator widget styles between issue widgets and thread widgets.
654
655         (.source-code.text-editor > .CodeMirror .thread-indicator):
656         (.source-code.text-editor > .CodeMirror .thread-widget):
657         (.source-code.text-editor > .CodeMirror .thread-widget.inline):
658         (.source-code.text-editor > .CodeMirror .thread-widget.inline > .arrow):
659         Colors for the thread-widget line-indicators.
660
661         * UserInterface/Views/SourceCodeTextEditor.js:
662         (WebInspector.SourceCodeTextEditor):
663         (WebInspector.SourceCodeTextEditor.prototype.close):
664         New event listeners handling for Target added / removed events.
665
666         (WebInspector.SourceCodeTextEditor.prototype._targetAdded):
667         (WebInspector.SourceCodeTextEditor.prototype._targetRemoved):
668         Update thread indicators as needed.
669
670         (WebInspector.SourceCodeTextEditor.prototype._looselyMatchesSourceCodeLocation):
671         More generic match based just on the URLs. Even if the exact script comes
672         from a different target, if they share the same URL that is fine.
673
674         (WebInspector.SourceCodeTextEditor.prototype._callFramesDidChange):
675         (WebInspector.SourceCodeTextEditor.prototype._addThreadIndicatorForTarget):
676         (WebInspector.SourceCodeTextEditor.prototype._removeThreadIndicatorForTarget):
677         (WebInspector.SourceCodeTextEditor.prototype._threadIndicatorWidgetForLine):
678         (WebInspector.SourceCodeTextEditor.prototype._updateThreadIndicatorWidget):
679         (WebInspector.SourceCodeTextEditor.prototype._handleThreadIndicatorWidgetClick):
680         Manage thread line indicator widgets. There are 3 maps we maintain.
681
682           1. line -> [threads]
683               List of threads paused on a line, needed for the UI text.
684           2. line -> widget
685               Gets the widget on a line so we can modify and eventually remove it.
686           3. target -> line
687               If a target is removed, we need to know what line it had an indicator on.
688
689         (WebInspector.SourceCodeTextEditor.prototype._isWidgetToggleable):
690         Generalize for all of our different line indicator widgets.
691
692         (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
693         (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):        
694         (WebInspector.SourceCodeTextEditor.prototype._reinsertAllThreadIndicators):
695         When first populated, or reformatted, clear and reinsert all widgets.
696
697         (WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues):
698         (WebInspector.SourceCodeTextEditor.prototype._logCleared):
699         (WebInspector.SourceCodeTextEditor.prototype._clearIssueWidgets): Renamed.
700         Rename _clearWidgets to _clearIssueWidgets.
701
702 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
703
704         Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
705         https://bugs.webkit.org/show_bug.cgi?id=164793
706
707         Reviewed by Timothy Hatcher.
708
709         * Localizations/en.lproj/localizedStrings.js:
710         Tooltips for new button.
711
712         * UserInterface/Base/Main.js:
713         (WebInspector.loaded):
714         New global setting.
715
716         * UserInterface/Views/DOMTreeContentView.js:
717         (WebInspector.DOMTreeContentView):
718         (WebInspector.DOMTreeContentView.prototype.get navigationItems):
719         (WebInspector.DOMTreeContentView.prototype._showPrintStylesSettingChanged):
720         (WebInspector.DOMTreeContentView.prototype._togglePrintStylesSetting):
721         New navigation bar button to toggle print styles.
722
723         * UserInterface/Controllers/CSSStyleManager.js:
724         (WebInspector.CSSStyleManager.prototype.mediaTypeChanged):
725         After toggling styles we will need to refresh styles, so provide
726         a meaningful way to trigger refreshing styles from the frontend.
727
728         * UserInterface/Images/Printer.svg: Added.
729         * UserInterface/Images/gtk/Printer.svg: Added.
730         New Printer icon for enabling / disabling print styles.
731
732         * UserInterface/Images/gtk/Crosshair.svg:
733         * UserInterface/Images/gtk/LayerBorders.svg:
734         * UserInterface/Images/gtk/NavigationItemCurleyBraces.svg:
735         * UserInterface/Images/gtk/NavigationItemTypes.svg:
736         * UserInterface/Images/gtk/PaintFlashing.svg:
737         * UserInterface/Images/gtk/ShadowDOM.svg:
738         * UserInterface/Images/gtk/ToggleLeftSidebar.svg:
739         * UserInterface/Images/gtk/ToggleRightSidebar.svg:
740         * UserInterface/Images/gtk/UpDownArrows.svg:
741         Fix a number of existing GTK images to have activated styles.
742
743 2016-11-15  Nikita Vasilyev  <nvasilyev@apple.com>
744
745         REGRESSION (r208248): Web Inspector: Pressing Left Arrow breaks autocomplete
746         https://bugs.webkit.org/show_bug.cgi?id=164391
747         <rdar://problem/29102408>
748
749         Reviewed by Matt Baker.
750
751         Unroll r208248.
752
753         * UserInterface/Controllers/CodeMirrorCompletionController.js:
754         (WebInspector.CodeMirrorCompletionController):
755         (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
756         (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
757         (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
758         (WebInspector.CodeMirrorCompletionController.prototype.close):
759         (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
760         (WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker):
761         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
762         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
763         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update):
764         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
765         (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory):
766         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker):
767         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
768         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
769         (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
770         (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
771
772 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
773
774         Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
775         https://bugs.webkit.org/show_bug.cgi?id=164793
776
777         Reviewed by Matt Baker.
778
779         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
780         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
781         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
782         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
783         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
784         * Versions/Inspector-iOS-10.0.json:
785         * Versions/Inspector-iOS-7.0.json:
786         * Versions/Inspector-iOS-8.0.json:
787         * Versions/Inspector-iOS-9.0.json:
788         * Versions/Inspector-iOS-9.3.json:
789
790 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
791
792         Web Inspector: URL Breakpoints that resolve in multiple workers should only appear in the UI once
793         https://bugs.webkit.org/show_bug.cgi?id=164334
794         <rdar://problem/29073523>
795
796         Reviewed by Matt Baker.
797
798         * UserInterface/Views/DebuggerSidebarPanel.js:
799         (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
800         Don't add a duplicate BreakpointTreeElements for the same Breakpoint.
801
802 2016-11-14  Joseph Pecoraro  <pecoraro@apple.com>
803
804         Web Inspector: Worker debugging should pause all targets and view call frames in all targets
805         https://bugs.webkit.org/show_bug.cgi?id=164305
806         <rdar://problem/29056192>
807
808         Reviewed by Timothy Hatcher.
809
810         This implements a policy where, when one Target ("Thread") pauses
811         the frontend triggers a pause in all other Targets. The intended
812         user experience is "all threads pause" whenever the frontend shows
813         the debugger paused UI.
814
815         DebuggerManager has a few straight forward changes:
816
817             - The paused state reflects if any target is paused.
818             - The Paused Event is fired when going from !paused -> paused.
819               This means when the first target pauses.
820             - The Resumed Event is fired when going from paused -> !paused.
821               This means only after all targets have resumed.
822             - The CallFrameDidChange Event now includes the Target that updated.
823
824         When a Target first pauses the frontend then immediately pauses all
825         other Targets. This puts them into a "pausing" state (we display as
826         Idle) and they will pause as soon as they start executing JavaScript.
827
828         When a Target steps the "paused" state isn't changing. So this is
829         just a CallFramesDidChange update.
830
831         When clicking Resume we resume all targets. This is will be the normal,
832         expected way users resume execution. Note that one of the threads may
833         then hit a breakpoint and re-pause all threads.
834
835         Sometimes when multiple threads are paused you may want to run an
836         individual thread to completion but keep other threads paused. There
837         is a context menu on the ThreadTreeElement to resume just that
838         single thread. It will continue and pause for its next run loop.
839
840         * Localizations/en.lproj/localizedStrings.js:
841         * UserInterface/Images/Thread.svg: Added.
842         * UserInterface/Images/gtk/Thread.svg: Added.
843         * UserInterface/Main.html:
844         New strings and files.
845
846         * UserInterface/Base/Main.js:
847         (WebInspector.loaded):
848         * UserInterface/Test/Test.js:
849         (WebInspector.loaded):
850         Place the TargetManager first since other managers may want to listen
851         for TargetAdded / TargetRemoved events.
852
853         * UserInterface/Controllers/DebuggerManager.js:
854         (WebInspector.DebuggerManager.prototype.get paused):
855         This is now a computed state.
856
857         (WebInspector.DebuggerManager.prototype.pause):
858         (WebInspector.DebuggerManager.prototype.resume):
859         Affect all targets.
860
861         (WebInspector.DebuggerManager.prototype.stepOver):
862         (WebInspector.DebuggerManager.prototype.stepInto):
863         (WebInspector.DebuggerManager.prototype.stepOut):
864         (WebInspector.DebuggerManager.prototype.reset):
865         Update to use the paused computed property.
866
867         (WebInspector.DebuggerManager.prototype.continueUntilNextRunLoop):
868         Issue the new Debugger.continueUntilNextRunLoop command
869         on a given target.
870
871         (WebInspector.DebuggerManager.prototype.initializeTarget):
872         When a new Target is created and we were already paused,
873         then start that Worker in a paused state.
874
875         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
876         Recover from bad cases where the backend informs the frontend about
877         internal JavaScript that it shouldn't know about. Legacy backend do
878         this but also there are corner cases we need to handle.
879         Dispatch events appropriately now that multiple targets may be paused.
880
881         (WebInspector.DebuggerManager.prototype._didResumeInternal):
882         Dispatch events appropriately now that multiple targets may be paused.
883
884         (WebInspector.DebuggerManager.prototype._targetRemoved):
885         Remove debugger data for targets that go away to avoid leaks.
886
887         * UserInterface/Models/DebuggerData.js:
888         (WebInspector.DebuggerData):
889         (WebInspector.DebuggerData.prototype.get paused):
890         (WebInspector.DebuggerData.prototype.get pausing):
891         Move some more per-Target state into DebuggerData.
892
893         (WebInspector.DebuggerData.prototype.pauseIfNeeded):
894         (WebInspector.DebuggerData.prototype.resumeIfNeeded):
895         (WebInspector.DebuggerData.prototype.continueUntilNextRunLoop):
896         These should only be called by DebuggerManager. They correctly
897         update the state of the DebuggerData for this Target, and also
898         issue the underlying command to the target.
899
900         (WebInspector.DebuggerData.prototype.updateForPause):
901         (WebInspector.DebuggerData.prototype.updateForResume):
902         Handle a special case where continueUntilNextRunLoop triggers
903         an invisible "pause" on the backend that we should mirror.
904
905         * UserInterface/Protocol/Target.js:
906         (WebInspector.MainTarget):
907         (WebInspector.MainTarget.prototype.get displayName):
908         (WebInspector.MainTarget.prototype.initialize):
909         Better display names.
910
911         * UserInterface/Views/DebuggerSidebarPanel.js:
912         (WebInspector.DebuggerSidebarPanel):
913         (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
914         (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
915         (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks):
916         (WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement):
917         (WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks):
918         (WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks):
919         (WebInspector.DebuggerSidebarPanel.prototype._findThreadTreeElementForTarget):
920         (WebInspector.DebuggerSidebarPanel.prototype._targetAdded):
921         (WebInspector.DebuggerSidebarPanel.prototype._targetRemoved):
922         (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
923         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
924         The DebuggerSidebar still has a single "Call Stacks" section, but maintains
925         two TreeOutlines and only shows one at a time. The Single Thread view shows
926         a flat list of the call frames for the Main Target when it is the only target.
927         The Multiple Threads view shows a list of Threads and their call frames.
928         We always keep both up to date, because we may need to swap between them
929         purely as Targets are added / removed. There is a bit of extra logic to
930         ensure we select elements properly based only on the visible tree outline.
931
932         * UserInterface/Views/LogContentView.js:
933         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
934         When evaluating in a particular target, "runAfterPendingDispatches"
935         must wait for all other commands in that particular target to have
936         completed. So use the target specific version.
937
938         * UserInterface/Views/NavigationSidebarPanel.js:
939         (WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
940         Gracefully handle a few more TreeElements without a represented object.
941
942         * UserInterface/Views/IdleTreeElement.css: Added.
943         (.details-section.call-stack .idle .icon):
944         * UserInterface/Views/IdleTreeElement.js: Added.
945         (WebInspector.IdleTreeElement):
946         Very basic tree element to encapsulate an Idle call frame with an
947         empty represented object.
948
949         * UserInterface/Views/ThreadTreeElement.css: Added.
950         (.details-section.call-stack .thread .icon):
951         * UserInterface/Views/ThreadTreeElement.js: Added.
952         (WebInspector.ThreadTreeElement):
953         (WebInspector.ThreadTreeElement.prototype.get target):
954         (WebInspector.ThreadTreeElement.prototype.refresh):
955         (WebInspector.ThreadTreeElement.prototype.onattach):
956         (WebInspector.ThreadTreeElement.prototype.oncontextmenu):
957         ThreadTreeElement has no represented object, but makes it easy
958         to refresh a list of CallFrameTreeElements for a given target.
959
960 2016-11-14  Timothy Hatcher  <timothy@apple.com>
961
962         Web Inspector: Disable Warning Filter in Debugger Tab By Default
963         https://bugs.webkit.org/show_bug.cgi?id=164723
964         rdar://problem/29251780
965
966         Reviewed by Joseph Pecoraro.
967
968         * UserInterface/Views/DebuggerSidebarPanel.js:
969         (WebInspector.DebuggerSidebarPanel): Made "debugger-show-resources-with-issues-only" false by default.
970
971 2016-11-14  Nikita Vasilyev  <nvasilyev@apple.com>
972
973         Web Inspector: Settings tab should look more like a native macOS view
974         https://bugs.webkit.org/show_bug.cgi?id=164708
975         <rdar://problem/29241296>
976
977         Reviewed by Timothy Hatcher.
978
979         * UserInterface/Views/SettingsTabContentView.css:
980         (.content-view.settings):
981         (.content-view.settings > .header):
982         (.content-view.settings > .setting-container):
983         Match macOS Sierra default font size for settings view.
984
985         (.content-view.settings > .setting-container > .setting-name):
986         (.content-view.settings > .setting-container > .setting-value-controller):
987         (.content-view.settings > .setting-container > .setting-value-controller input):
988         (.content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]):
989         Make checkbox larger.
990
991         (.content-view.settings > .setting-container > .setting-value-controller select):
992         (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
993         Decrease the width of the number fields to make them just wide enough to fit 2 digit numbers.
994
995 2016-11-12  Joseph Pecoraro  <pecoraro@apple.com>
996
997         Web Inspector: Type Profiler and Code Coverage Profiler should work in Workers
998         https://bugs.webkit.org/show_bug.cgi?id=164682
999
1000         Reviewed by Darin Adler.
1001
1002         * UserInterface/Controllers/BasicBlockAnnotator.js:
1003         * UserInterface/Models/ScriptSyntaxTree.js:
1004         (WebInspector.ScriptSyntaxTree.prototype.updateTypes):
1005         Use the target associated with the Script.
1006
1007         * UserInterface/Protocol/Target.js:
1008         (WebInspector.WorkerTarget.prototype.initialize):
1009         When initializing a Worker Target, match the existing state
1010         of the Page for these profilers.
1011
1012         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1013         * UserInterface/Views/SourceCodeTextEditor.js:
1014         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation):
1015         (WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
1016         Use the correct target for this Script / Resource.
1017
1018         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
1019         (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
1020         Enable / disable for all targets when toggling profilers.
1021
1022 2016-11-11  Anthony Ricaud  <rik@webkit.org>
1023
1024         Web Inspector: Whitespace in Editor should be less visible than regular content
1025         https://bugs.webkit.org/show_bug.cgi?id=164660
1026
1027         Reviewed by Matt Baker.
1028
1029         * UserInterface/Views/CodeMirrorOverrides.css:
1030         (.show-whitespace-characters .CodeMirror .cm-whitespace::before):
1031
1032 2016-11-11  Nikita Vasilyev  <nvasilyev@apple.com>
1033
1034         Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off
1035         https://bugs.webkit.org/show_bug.cgi?id=163407
1036         <rdar://problem/28764230>
1037
1038         Reviewed by Timothy Hatcher.
1039
1040         Turning Type Profiler off by clicking [T] icon now disables its backend by calling RuntimeAgent.disableTypeProfiler().
1041
1042         * UserInterface/Views/SourceCodeTextEditor.js:
1043         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
1044
1045 2016-11-11  Nikita Vasilyev  <nvasilyev@apple.com>
1046
1047         Web Inspector: Settings tab: make the header smaller to fit more content
1048         https://bugs.webkit.org/show_bug.cgi?id=164613
1049         <rdar://problem/29206007>
1050
1051         Reviewed by Timothy Hatcher.
1052
1053         * UserInterface/Views/SettingsTabContentView.css:
1054         (.content-view.settings > .header):
1055         Use hv units for margin. 1vh = 1% of viewport height. When Web Inspector window is taller, the margin is larger.
1056
1057         (.content-view.settings > .setting-container):
1058         Convert padding to margin to make spacing between the header and the first section better.
1059
1060 2016-11-10  Nikita Vasilyev  <nvasilyev@apple.com>
1061
1062         Web Inspector: Call RuntimeAgent.disableControlFlowProfiler when Code Coverage Profiler is turned off
1063         https://bugs.webkit.org/show_bug.cgi?id=163407
1064         <rdar://problem/28764230>
1065
1066         Reviewed by Joseph Pecoraro.
1067
1068         Turning Code Coverage off by clicking [C] icon now disables its backend by calling RuntimeAgent.disableControlFlowProfiler().
1069
1070         * UserInterface/Views/SourceCodeTextEditor.js:
1071         (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
1072
1073 2016-11-10  Aaron Chu  <aaron_chu@apple.com>
1074
1075         Web Inspector: AXI: clarify button roles (e.g. toggle or popup button)
1076         https://bugs.webkit.org/show_bug.cgi?id=130726
1077         <rdar://problem/16420420>
1078
1079         Reviewed by Brian Burg.
1080
1081         Updated Inspector to show the button type using the new mapping information.
1082
1083         * Localizations/en.lproj/localizedStrings.js:
1084         * UserInterface/Models/DOMNode.js:
1085         (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
1086         (WebInspector.DOMNode.prototype.accessibilityProperties):
1087         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1088         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
1089         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
1090
1091 2016-11-09  Joseph Pecoraro  <pecoraro@apple.com>
1092
1093         Web Inspector: DebuggerManager.Event.Resumed introduces test flakiness
1094         https://bugs.webkit.org/show_bug.cgi?id=161951
1095         <rdar://problem/28295767>
1096
1097         Reviewed by Brian Burg.
1098
1099         * UserInterface/Controllers/DebuggerManager.js:
1100         (WebInspector.DebuggerManager.prototype.debuggerDidResume):
1101         Now, Debugger.resumed events really mean the debugger resumed,
1102         so act immediately instead of guessing. We must still guess
1103         in legacy backends.
1104
1105         * UserInterface/Test/Test.js:
1106         When the inspector frontend encounters an issue, log it.
1107
1108         * UserInterface/Views/DebuggerSidebarPanel.js:
1109         (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
1110         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
1111         Always enable the step out button. I don't think it makes sense to disable
1112         it sometimes, and if there are issues with this we should solve the issues
1113         instead of hiding them.
1114
1115 2016-11-09  Joseph Pecoraro  <pecoraro@apple.com>
1116
1117         Web Inspector: Associate Worker Resources with the Worker and not the Page
1118         https://bugs.webkit.org/show_bug.cgi?id=164342
1119         <rdar://problem/29075775>
1120
1121         Reviewed by Timothy Hatcher.
1122
1123         A Target may have its own list of Resource. For example, Workers may
1124         request any resources via XHR/Fetch. So we associate a ResourceCollection
1125         with a Target, and ensure we show them in Web Inspector as you would expect.
1126         At this point, Target starts acting like Frame. Target has a resourceCollection
1127         and extraScriptsCollection just like Frame. Target has events for ResourceAdded
1128         just like Frame.
1129
1130         Even though Resource loads are happening in Workers, the Network data
1131         still comes from the Page's Network agent. The added "targetId" data
1132         with the Resource will let us associate a Resoure with a Target.
1133
1134         When opening inspector after a page has loaded, the frontend loads Resources
1135         via the Page.getResourceTree path. In this case, the frontend may be
1136         informed of Resources for a Target that it does not know about yet. In
1137         these cases, it sets them aside as Orphaned resources for a target. Later,
1138         when that Target is created, it will adopt its Orphaned resources.
1139
1140         Places that used to listen to just Frame.Event.ResourceWasAdded should now
1141         also listen for Target.Event.ResourceAdded to ensure it sees the resources
1142         associated with non-page targets.
1143
1144         * UserInterface/Protocol/Target.js:
1145         (WebInspector.Target):
1146         (WebInspector.Target.prototype.get identifier):
1147         (WebInspector.Target.prototype.get resourceCollection):
1148         (WebInspector.Target.prototype.get extraScriptCollection):
1149         (WebInspector.Target.prototype.addResource):
1150         (WebInspector.Target.prototype.adoptResource):
1151         (WebInspector.Target.prototype.addScript):
1152         Give Target resource collections.
1153
1154         (WebInspector.MainTarget):
1155         (WebInspector.MainTarget.prototype.get mainResource):
1156         Pass through to the FrameResourceManager for the MainTarget.
1157
1158         (WebInspector.WorkerTarget):
1159         (WebInspector.WorkerTarget.prototype.initialize):
1160         Adopt orphaned resources on creation.
1161
1162         * UserInterface/Models/Resource.js:
1163         (WebInspector.Resource):
1164         (WebInspector.Resource.prototype.get target):
1165         (WebInspector.Resource.prototype.get type):
1166         Resource now has a Target. During creation, if there is a targetId
1167         then we must produce a Target or null (orphaned).
1168
1169         (WebInspector.Resource.prototype.associateWithScript):
1170         When associating a Resource with a Script, we can use this opportunity
1171         to convert from an XML / Other type to Script.
1172
1173         * UserInterface/Models/Script.js:
1174         (WebInspector.Script.prototype._resolveResource):
1175         When associating Scripts with a resource we must associate resources
1176         from within the proper Target. If it is the Main target we still use
1177         the FrameResourceManager which keep searches across all Frames.
1178
1179         * UserInterface/Protocol/NetworkObserver.js:
1180         (WebInspector.NetworkObserver.prototype.requestWillBeSent):
1181         * UserInterface/Controllers/FrameResourceManager.js:
1182         (WebInspector.FrameResourceManager.prototype.initialize):
1183         (WebInspector.FrameResourceManager.prototype.frameDidNavigate):
1184         (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
1185         (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
1186         (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
1187         (WebInspector.FrameResourceManager.prototype.adoptOrphanedResourcesForTarget):
1188         (WebInspector.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
1189         (WebInspector.FrameResourceManager.prototype._addResourceToTarget):
1190         (WebInspector.FrameResourceManager.prototype._createResource):
1191         (WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
1192         (WebInspector.FrameResourceManager.prototype._addOrphanedResource):
1193         (WebInspector.FrameResourceManager.prototype._mainFrameDidChange):
1194         (WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Deleted.
1195         When creating Resources from Network events we may now have a targetId.
1196         Once created a Resource must be associated with a Frame, Target, or orphaned.
1197
1198         * UserInterface/Main.html:
1199         * UserInterface/Views/TargetTreeElement.js: Removed.
1200         * UserInterface/Views/WorkerTreeElement.js: Added.
1201         (WebInspector.WorkerTreeElement):
1202         (WebInspector.WorkerTreeElement.prototype.get target):
1203         (WebInspector.WorkerTreeElement.prototype.onexpand):
1204         (WebInspector.WorkerTreeElement.prototype.oncollapse):
1205         (WebInspector.WorkerTreeElement.prototype.onpopulate):
1206         (WebInspector.WorkerTreeElement.prototype.updateSourceMapResources):
1207         (WebInspector.WorkerTreeElement.prototype.onattach):
1208         (WebInspector.WorkerTreeElement.prototype.compareChildTreeElements):
1209         (WebInspector.WorkerTreeElement.prototype._handleContextMenuEvent):
1210         (WebInspector.WorkerTreeElement.prototype._scriptAdded):
1211         (WebInspector.WorkerTreeElement.prototype._resourceAdded):
1212         Convert TargetTreeElement to WorkerTreeElement as that is clearer.
1213         Behave like FrameTreeElement and populate resources on creation,
1214         handle SourceMapResource, etc.
1215
1216         * UserInterface/Views/FolderizedTreeElement.js:
1217         (WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings):
1218         (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
1219         (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
1220         If the display name for a folder is `null` then there is no folder,
1221         and place such child tree elements at the top level. This will be
1222         the case for a Worker's Script's, which we choose not to folderize.
1223
1224         * UserInterface/Controllers/DebuggerManager.js:
1225         (WebInspector.DebuggerManager.prototype.scriptDidParse):
1226         * UserInterface/Controllers/TargetManager.js:
1227         (WebInspector.TargetManager.prototype.targetForIdentifier):
1228
1229         * UserInterface/Models/DefaultDashboard.js:
1230         (WebInspector.DefaultDashboard):
1231         * UserInterface/Controllers/TimelineManager.js:
1232         (WebInspector.TimelineManager):
1233         * UserInterface/Controllers/WorkerManager.js:
1234         (WebInspector.WorkerManager.prototype.workerCreated):
1235         * UserInterface/Views/OpenResourceDialog.js:
1236         (WebInspector.OpenResourceDialog.prototype.didDismissDialog):
1237         (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
1238         (WebInspector.OpenResourceDialog.prototype._addScriptsForTarget): Deleted.
1239         (WebInspector.OpenResourceDialog.prototype._addResourcesForTarget): Added.
1240         Ensure those that listen for Frame.Event.ResourceWasAdded now also
1241         listen for Target.Event.ResourceAdded.
1242
1243         * UserInterface/Views/ContextMenuUtilities.js:
1244         (WebInspector.appendContextMenuItemsForSourceCode):
1245         (WebInspector.appendContextMenuItemsForResource): Deleted.
1246         * UserInterface/Views/ResourceTimelineDataGridNode.js:
1247         (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
1248         * UserInterface/Views/ResourceTreeElement.js:
1249         (WebInspector.ResourceTreeElement.prototype._updateTitles):
1250         (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent):
1251         Generalize ContextMenu helper to SourceCode so it can be used on a Script or Resource.
1252
1253         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1254         (WebInspector.ResourceDetailsSidebarPanel.prototype.inspect):
1255         When looking at a WorkerTarget's mainResource (Script) show the
1256         Resource Details sidebar for its Resource.
1257
1258         * UserInterface/Views/ResourceSidebarPanel.js:
1259         (WebInspector.ResourceSidebarPanel):
1260         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
1261         (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
1262         (WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource):
1263         (WebInspector.ResourceSidebarPanel.prototype._targetRemoved):
1264         (WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget): Deleted.
1265         Simplify ResourceSidebarPanel to only handle adding WorkerTreeElements,
1266         which will do the rest of the work for their Resources/Scripts.
1267
1268         * UserInterface/Views/SourceCodeTreeElement.js:
1269         (WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
1270         When we were changing the type of a resource, it would remove and re-insert.
1271         This would collapse the parent if it was the only child in removal, and not
1272         expand the parent when re-inserting. This ensures we re-expand.
1273
1274 2016-11-09  Nikita Vasilyev  <nvasilyev@apple.com>
1275
1276         Web Inspector: Settings tab sections overlap each other in docked Inspector window
1277         https://bugs.webkit.org/show_bug.cgi?id=164564
1278
1279         Reviewed by Joseph Pecoraro.
1280
1281         * UserInterface/Views/SettingsTabContentView.css:
1282         (.content-view.settings):
1283         Make settings sections non-shrinkable and make the content view vertically scrollable.
1284
1285         (.content-view.settings > .setting-container):
1286         Set vertical padding that looks good for non-shrinkable sections.
1287
1288 2016-11-09  Nikita Vasilyev  <nvasilyev@apple.com>
1289
1290         Web Inspector: Settings tab: Checkbox labels should be clickable
1291         https://bugs.webkit.org/show_bug.cgi?id=164470
1292         <rdar://problem/29133787>
1293
1294         Reviewed by Matt Baker.
1295
1296         * UserInterface/Views/SettingsTabContentView.js:
1297         (WebInspector.SettingsTabContentView.prototype.initialLayout):
1298         Add a label element to make checkboxes clickable.
1299
1300 2016-11-09  Devin Rousso  <dcrousso+webkit@gmail.com>
1301
1302         Web Inspector: Allow FolderTreeElement to display content when selected
1303         https://bugs.webkit.org/show_bug.cgi?id=164407
1304
1305         Reviewed by Timothy Hatcher.
1306
1307         * UserInterface/Main.html:
1308         Add CollectionContentView and TitleView.
1309
1310         * UserInterface/Base/Main.js:
1311         * UserInterface/Views/ContentView.js:
1312         (WebInspector.ContentView.createFromRepresentedObject):
1313         (WebInspector.ContentView.isViewable):
1314         Add support for Collection as the representedObject of a content view.
1315
1316         * UserInterface/Views/CollectionContentView.css: Added.
1317         (.content-view.collection):
1318         (.content-view.collection > .content-view):
1319         * UserInterface/Views/CollectionContentView.js: Added.
1320         (WebInspector.CollectionContentView):
1321         (WebInspector.CollectionContentView.prototype.initialLayout):
1322         (WebInspector.CollectionContentView.prototype._addContentViewForItem):
1323         (WebInspector.CollectionContentView.prototype._removeContentViewForItem):
1324         (WebInspector.CollectionContentView.prototype._handleItemAdded):
1325         (WebInspector.CollectionContentView.prototype._handleItemRemoved):
1326         (WebInspector.CollectionContentView.prototype._handleContentError):
1327         Takes in a Collection when constructed, and attempts to display a sub-ContentView for each
1328         item in the collection if the type of the collection is viewable en masse.  Currently, this
1329         is only supported for WebInspector.Resource.Type.Image collections.
1330
1331         * UserInterface/Views/ResourceContentView.js:
1332         (WebInspector.ResourceContentView.prototype._contentError):
1333         Dispatch an event whenever the content fails to load.
1334
1335         * UserInterface/Views/ResourceSidebarPanel.js:
1336         (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
1337         * UserInterface/Views/ResourcesTabContentView.js:
1338         (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
1339         Allow FolderTreeElements to be selected.
1340
1341         * UserInterface/Views/TitleView.css: Added.
1342         (.title-view):
1343         * UserInterface/Views/TitleView.js: Added.
1344         (WebInspector.TitleView):
1345         Basic view that displays the given text in the center of the viewable area.
1346
1347 2016-11-03  Nikita Vasilyev  <nvasilyev@apple.com>
1348
1349         Web Inspector: Stack overflow when searching a timeline recording for JS function names
1350         https://bugs.webkit.org/show_bug.cgi?id=161784
1351         <rdar://problem/28219498>
1352
1353         Reviewed by Timothy Hatcher.
1354
1355         _populate method of ProfileNodeDataGridNode and ProfileDataGridNode traverses
1356         all children of a given node. makeVisible function of DataGrid#_applyFiltersToNode
1357         traverses all its parents to expand them. This creates an infinite recursion.
1358         Remove "populate" event before appending child nodes to prevent it.
1359
1360         * UserInterface/Views/ProfileDataGridNode.js:
1361         (WebInspector.ProfileDataGridNode.prototype._populate):
1362         (WebInspector.ProfileDataGridNode):
1363         * UserInterface/Views/ProfileNodeDataGridNode.js:
1364         (WebInspector.ProfileNodeDataGridNode.prototype._populate):
1365         (WebInspector.ProfileNodeDataGridNode):
1366
1367 2016-11-03  Devin Rousso  <dcrousso+webkit@gmail.com>
1368
1369         Web Inspector: Modify FolderTreeElement to have a Collection as a its represented object
1370         https://bugs.webkit.org/show_bug.cgi?id=164349
1371
1372         Reviewed by Matt Baker.
1373
1374         * UserInterface/Views/FolderTreeElement.js:
1375         (WebInspector.FolderTreeElement):
1376         Now accepts a representedObject parameter, which must be a WebInspector.Collection.
1377
1378         * UserInterface/Views/FolderizedTreeElement.js:
1379         (WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings):
1380         (WebInspector.FolderizedTreeElement.prototype.updateParentStatus):
1381         (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
1382         (WebInspector.FolderizedTreeElement.prototype._settingsForRepresentedObject):
1383         (WebInspector.FolderizedTreeElement.prototype._shouldGroupIntoFolders):
1384         (WebInspector.FolderizedTreeElement):
1385         Rework the logic for creating WebInspector.FolderTreeElement so that items for the
1386         representedObject parameter may be passed in via registerFolderizeSettings.
1387
1388         * UserInterface/Views/FrameTreeElement.js:
1389         (WebInspector.FrameTreeElement):
1390         (WebInspector.FrameTreeElement.): Deleted.
1391         (WebInspector.FrameTreeElement.makeChildCountCallback): Deleted.
1392         Rework logic for calling registerFolderizeSettings to support the representedObject
1393         parameter.  Also changed calls to WebInspector.Frame to support the
1394         WebInspector.Collection class.
1395
1396         * UserInterface/Views/ResourceSidebarPanel.js:
1397         (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
1398         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
1399         (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
1400         Create WebInspector.Collection instances of Script model objects for additional folders
1401         created by the Resources sidebar:
1402          - Anonymous Scripts
1403          - Extension Scripts
1404          - Extra Scripts
1405
1406 2016-11-02  Joseph Pecoraro  <pecoraro@apple.com>
1407
1408         Web Inspector: Include DebuggerAgent in Workers - see, pause, and step through scripts
1409         https://bugs.webkit.org/show_bug.cgi?id=164136
1410         <rdar://problem/29028462>
1411
1412         Reviewed by Brian Burg.
1413         
1414         By implementing DebuggerAgent, Workers will inform the frontend about
1415         Scripts that evaluate in the Worker's VM and the Worker VM can pause
1416         and send the pausing CallFrames to the frontend. This means that
1417         WebInspector.Script and WebInspector.CallFrame will need to be made
1418         target aware. This also means that each Target will have its own
1419         set of debugger data, such as the list of scripts and pause data
1420         like the pause reason / call frames. Previously all this data was
1421         managed by DebuggerManager.
1422
1423         With this change we split that data out of DebuggerManager to be
1424         per-target DebuggerData. DebuggerManager keeps `activeCallFrame`
1425         but the list of scripts and pause data have moved into `DebuggerData`
1426         which is per-target, accessed through DebuggerManager's new
1427         dataForTarget(target) method.
1428
1429         Finally we make a few changes to the UserInterface to make Workers
1430         and their scripts, appear grouped together. The Resources sidebar
1431         previously had a single top level item for the Main Frame, which
1432         has all its resources as its children (potentially grouped into
1433         folders). With this change, each Worker gets its own top level
1434         item as well, and the Worker's subresources (imported scripts)
1435         become its children.
1436
1437         We also now associate a single mainResource with Targets. In the
1438         case of Workers, we assume and assert that this is a Script. If
1439         this were to ever change we would need to adjust the assumptions.
1440
1441         * UserInterface/Main.html:
1442         * UserInterface/Test.html:
1443         New files.
1444
1445         * UserInterface/Base/Main.js:
1446         * UserInterface/Test/Test.js:
1447         Add WebInspector.assumingMainTarget to fill in all the places where
1448         we assume the main target right now, but would need to handle non-main
1449         targets as other agents are implemented in workers. For example profile
1450         data that assumes the main target right now could be worker targets
1451         when we implement ScriptProfiler / Heap agents.
1452
1453         * UserInterface/Protocol/Connection.js:
1454         (InspectorBackend.WorkerConnection):
1455         * UserInterface/Protocol/Target.js:
1456         (WebInspector.Target):
1457         (WebInspector.Target.prototype.get DebuggerAgent):
1458         (WebInspector.Target.prototype.get mainResource):
1459         (WebInspector.Target.prototype.set mainResource):
1460         (WebInspector.WorkerTarget.prototype.initialize):
1461         (WebInspector.WorkerTarget):
1462         Include DebuggerAgent in Targets.
1463         Include a mainResource for Worker Targets.
1464
1465         * UserInterface/Protocol/DebuggerObserver.js:
1466         (WebInspector.DebuggerObserver.prototype.scriptParsed):
1467         (WebInspector.DebuggerObserver.prototype.breakpointResolved):
1468         (WebInspector.DebuggerObserver.prototype.paused):
1469         (WebInspector.DebuggerObserver.prototype.resumed):
1470         Pass the target on to managers when necessary.
1471
1472         * UserInterface/Models/DebuggerData.js: Added.
1473         (WebInspector.DebuggerData):
1474         (WebInspector.DebuggerData.prototype.get target):
1475         (WebInspector.DebuggerData.prototype.get callFrames):
1476         (WebInspector.DebuggerData.prototype.get pauseReason):
1477         (WebInspector.DebuggerData.prototype.get pauseData):
1478         (WebInspector.DebuggerData.prototype.get scripts):
1479         (WebInspector.DebuggerData.prototype.scriptForIdentifier):
1480         (WebInspector.DebuggerData.prototype.scriptsForURL):
1481         (WebInspector.DebuggerData.prototype.reset):
1482         (WebInspector.DebuggerData.prototype.addScript):
1483         (WebInspector.DebuggerData.prototype.pause):
1484         (WebInspector.DebuggerData.prototype.unpause):
1485         Extract per-target data from DebuggerManager. This includes the list
1486         of scripts evaluated in a Target, and any pause data for this target
1487         such as the pause reason and call frames.
1488
1489         * UserInterface/Controllers/DebuggerManager.js:
1490         (WebInspector.DebuggerManager.prototype.dataForTarget):
1491         (WebInspector.DebuggerManager.prototype.get pauseReason): Deleted.
1492         (WebInspector.DebuggerManager.prototype.get pauseData): Deleted.
1493         (WebInspector.DebuggerManager.prototype.get callFrames): Deleted.
1494         (WebInspector.DebuggerManager.prototype.reset):
1495         New way to access per-target debugger data.
1496
1497         (WebInspector.DebuggerManager.prototype.initializeTarget):
1498         When a new Target is created, synchronize frontend state with the target.
1499         Things like the list of breakpoints and global breakpoint states.
1500
1501         (WebInspector.DebuggerManager.prototype.scriptForIdentifier):
1502         (WebInspector.DebuggerManager.prototype.scriptsForURL):
1503         Convenience accessors for scripts must now provide a Target.
1504
1505         (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
1506         This is a convenience accessors for a list of all scripts across all targets
1507         so this handles getting the list across all targets.
1508
1509         (WebInspector.DebuggerManager.prototype.pause):
1510         (WebInspector.DebuggerManager.prototype.resume):
1511         (WebInspector.DebuggerManager.prototype.stepOver):
1512         (WebInspector.DebuggerManager.prototype.stepInto):
1513         (WebInspector.DebuggerManager.prototype.stepOut):
1514         (WebInspector.DebuggerManager.prototype.continueToLocation):
1515         Stepping commands affect the current target with the active call frame.
1516         Eventually we will change Pause and Resume behavior to affect all targets.
1517         
1518         (WebInspector.DebuggerManager.prototype.addBreakpoint):
1519         (WebInspector.DebuggerManager.prototype.breakpointResolved):
1520         (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
1521         (WebInspector.DebuggerManager.prototype._setBreakpoint):
1522         (WebInspector.DebuggerManager.prototype._removeBreakpoint):
1523         Breakpoints should be set on all targets, but we need a way
1524         to set them on a specific target, when initializing an
1525         individual target when we want to inform that single target
1526         of all of the breakpoints.
1527
1528         (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
1529         (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
1530         Changing global breakpoint state should inform all targets.
1531
1532         (WebInspector.DebuggerManager.prototype.scriptDidParse):
1533         Associate Scripts with a Target. Identify the main resource of a
1534         Worker Target and set it as soon as we can.
1535
1536         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
1537         (WebInspector.DebuggerManager.prototype.debuggerDidResume):
1538         (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
1539         (WebInspector.DebuggerManager.prototype._scopeChainFromPayload):
1540         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
1541         (WebInspector.DebuggerManager.prototype._mainResourceDidChange):
1542         (WebInspector.DebuggerManager.prototype._didResumeInternal):
1543         Pausing and resuming now happens per-target, so associate
1544         created model objects (CallFrame, ScopeChain objects) and any
1545         other necessary data with the target.
1546
1547         * UserInterface/Models/Breakpoint.js:
1548         (WebInspector.Breakpoint):
1549         (WebInspector.Breakpoint.prototype.get target):
1550         (WebInspector.Breakpoint.prototype.get info):
1551         * UserInterface/Models/CallFrame.js:
1552         (WebInspector.CallFrame):
1553         (WebInspector.CallFrame.prototype.get target):
1554         (WebInspector.CallFrame.fromDebuggerPayload):
1555         (WebInspector.CallFrame.fromPayload):
1556         * UserInterface/Models/ConsoleMessage.js:
1557         (WebInspector.ConsoleMessage):
1558         * UserInterface/Models/Script.js:
1559         (WebInspector.Script):
1560         (WebInspector.Script.prototype.get target):
1561         (WebInspector.Script.prototype.isMainResource):
1562         (WebInspector.Script.prototype.requestContentFromBackend):
1563         (WebInspector.Script.prototype._resolveResource):
1564         * UserInterface/Models/StackTrace.js:
1565         (WebInspector.StackTrace.fromPayload):
1566         (WebInspector.StackTrace.fromString):
1567         * UserInterface/Models/ProbeManager.js:
1568         (WebInspector.ProbeManager.prototype.didSampleProbe):
1569         * UserInterface/Models/Probe.js:
1570         (WebInspector.ProbeSample):
1571         * UserInterface/Views/ConsoleMessageView.js:
1572         (WebInspector.ConsoleMessageView.prototype._appendLocationLink):
1573         (WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
1574         Associate model objects with a specific target where necessary.
1575
1576         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
1577         (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
1578         * UserInterface/Controllers/RuntimeManager.js:
1579         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
1580         * UserInterface/Protocol/RemoteObject.js:
1581         (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
1582         Use target specific DebuggerAgent where necessary.
1583
1584         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1585         * UserInterface/Controllers/TimelineManager.js:
1586         (WebInspector.TimelineManager.prototype._callFramesFromPayload):
1587         * UserInterface/Models/ScriptTimelineRecord.js:
1588         (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
1589         * UserInterface/Views/EventListenerSectionGroup.js:
1590         (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
1591         (WebInspector.EventListenerSectionGroup):
1592         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1593         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode.node.shortestGCRootPath.):
1594         (WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
1595         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview):
1596         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
1597         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
1598         * UserInterface/Views/ProfileDataGridNode.js:
1599         (WebInspector.ProfileDataGridNode.prototype.iconClassName):
1600         (WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
1601         (WebInspector.ProfileDataGridNode.prototype._displayContent):
1602         Use assumed main target and audit these when the Worker gets more Agents.
1603
1604         * UserInterface/Controllers/FrameResourceManager.js:
1605         (WebInspector.FrameResourceManager.prototype._initiatorSourceCodeLocationFromPayload):
1606         This will always be the main target because only the main target
1607         has access to the DOM.
1608
1609         * UserInterface/Views/SourceCodeTextEditor.js:
1610         (WebInspector.SourceCodeTextEditor.prototype.get target):
1611         (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
1612         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1613         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
1614         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
1615         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
1616         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
1617         Update target specific actions to use the proper target's agents.
1618
1619         * UserInterface/Views/TargetTreeElement.js: Added.
1620         (WebInspector.TargetTreeElement):
1621         (WebInspector.TargetTreeElement.prototype.get target):
1622         (WebInspector.TargetTreeElement.prototype.onexpand):
1623         (WebInspector.TargetTreeElement.prototype.oncollapse):
1624         Add a new tree element for a Target. We currently assume that the
1625         main resource for a Target will be a Script right now, as is the
1626         case for Web Workers. This simply remembers its expanded or
1627         collapsed state and has a better icon.
1628
1629         * UserInterface/Views/ResourceIcons.css:
1630         (body:matches(.mac-platform, .windows-platform) .script.worker-icon .icon):
1631         (body:matches(.mac-platform, .windows-platform) .large .script.worker-icon .icon):
1632         * UserInterface/Images/WorkerScript.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument.png.
1633         * UserInterface/Images/WorkerScript@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocument@2x.png.
1634         * UserInterface/Images/WorkerScriptLarge.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge.png.
1635         * UserInterface/Images/WorkerScriptLarge@2x.png: Renamed from Source/WebInspectorUI/UserInterface/Images/WorkerDocumentLarge@2x.png.
1636         Improve icon for a Worker's main resource script.
1637
1638         * UserInterface/Views/ResourceSidebarPanel.js:
1639         (WebInspector.ResourceSidebarPanel):
1640         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
1641         (WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
1642         (WebInspector.ResourceSidebarPanel.prototype._addScriptForNonMainTarget):
1643         (WebInspector.ResourceSidebarPanel.prototype._addTargetWithMainResource):
1644         (WebInspector.ResourceSidebarPanel.prototype._targetRemoved):
1645         * UserInterface/Views/SearchSidebarPanel.js:
1646         (WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts):
1647         (WebInspector.SearchSidebarPanel.prototype._searchTreeElementForScript):
1648         * UserInterface/Views/OpenResourceDialog.js:
1649         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline.createTreeElement):
1650         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
1651         (WebInspector.OpenResourceDialog.prototype.didDismissDialog):
1652         (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
1653         (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
1654         (WebInspector.OpenResourceDialog.prototype._addScriptsForTarget):
1655         (WebInspector.OpenResourceDialog.prototype._scriptAdded):
1656         (WebInspector.OpenResourceDialog):
1657         * UserInterface/Views/DebuggerSidebarPanel.js:
1658         (WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToTreeOutline):
1659         (WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
1660         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
1661         (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
1662         Include scripts from non-main targets in sidebars.
1663
1664 2016-11-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1665
1666         Web Inspector: Creating a new pseudo-selector in the Styles sidebar doesn't work on first attempt
1667         https://bugs.webkit.org/show_bug.cgi?id=164092
1668
1669         Reviewed by Timothy Hatcher.
1670
1671         * UserInterface/Views/CSSStyleDeclarationSection.css:
1672         (.style-declaration-section:not(.invalid-selector).rule-disabled > .header > .icon):
1673         (.style-declaration-section.invalid-selector > .header > .icon):
1674         (.style-declaration-section.invalid-selector > .header > .selector,):
1675         (.style-declaration-section.rule-disabled > .header > .icon): Deleted.
1676
1677         * UserInterface/Views/CSSStyleDeclarationSection.js:
1678         (WebInspector.CSSStyleDeclarationSection):
1679         (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
1680         (WebInspector.CSSStyleDeclarationSection.prototype._handleIconElementClicked):
1681         (WebInspector.CSSStyleDeclarationSection.prototype._updateSelectorIcon): Added.
1682         Re-add logic removed by https://webkit.org/b/159734 for handling invalid selectors.  Instead
1683         of just refreshing the section whenever the represented CSSRule changes selectors, we only
1684         need to refresh if the selector no longer applies to the current element.
1685
1686         (WebInspector.CSSStyleDeclarationSection.prototype._handleMouseMove): Added.
1687         Fix another issue discovered while adding the invalid selector warnings, where the title
1688         attribute of each individual selector was no longer visible.  To fix this, whenever the user
1689         moves their mouse over the selector input, the position is compared to each selector to find
1690         the first one that matches, whose title is then applied to the input element.
1691
1692 2016-11-01  Joseph Pecoraro  <pecoraro@apple.com>
1693
1694         Web Inspector: Improve debugger highlight in some exception cases
1695         https://bugs.webkit.org/show_bug.cgi?id=164300
1696
1697         Reviewed by Matt Baker.
1698
1699         * UserInterface/Views/SourceCodeTextEditor.js:
1700         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
1701         When walking up AST nodes and reach a throw statement, use that.
1702
1703 2016-11-01  Joseph Pecoraro  <pecoraro@apple.com>
1704
1705         Web Inspector: Cleanup stale code in NetworkSidebarPanel
1706         https://bugs.webkit.org/show_bug.cgi?id=164295
1707
1708         Reviewed by Matt Baker.
1709
1710         * UserInterface/Views/NetworkSidebarPanel.js:
1711         (WebInspector.NetworkSidebarPanel.prototype.closed): Deleted.
1712         This doesn't appear to be needed since NetworkSidebarPanel never
1713         registered any event listeners.
1714
1715 2016-11-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1716
1717         REGRESSION (r191419): Web Inspector: Autocomplete is broken
1718         https://bugs.webkit.org/show_bug.cgi?id=150493
1719
1720         Reviewed by Timothy Hatcher.
1721
1722         Fixed CodeMirror.undo() logic rolled out by r191539 <https://webkit.org/b/150537>
1723
1724         Added calls to CodeMirror.changeGeneration(true) which tells the history stack to "close"
1725         the current event, preventing it from being consolidated with new changes.  If the user
1726         typed fast enough, non-completion changes (like adding ":" in CSS) would get merged with
1727         completion changes, causing calls to CodeMirror.undo() to undo those changes as well.  To
1728         prevent this, a boolean variable is set to true whenever a completion "activity" is in
1729         progress, defined by a sequence of completion related events.  When this "activity" first
1730         starts, call CodeMirror.changeGeneration(true) to freeze the current history.
1731
1732         See original bug for more information <https://webkit.org/b/147720>.
1733
1734         * UserInterface/Controllers/CodeMirrorCompletionController.js:
1735         (WebInspector.CodeMirrorCompletionController):
1736         (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
1737         (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
1738         (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
1739         (WebInspector.CodeMirrorCompletionController.prototype.close):
1740         (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
1741         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
1742         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
1743         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update):
1744         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
1745         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
1746         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
1747         (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
1748         (WebInspector.CodeMirrorCompletionController.prototype._handleBeforeChange):
1749         (WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker): Deleted.
1750         (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory): Deleted.
1751         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker): Deleted.
1752
1753 2016-11-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1754
1755         Web Inspector: Replace sublists inside DOM-related model objects with WI.Collection
1756         https://bugs.webkit.org/show_bug.cgi?id=164098
1757
1758         Reviewed by Timothy Hatcher.
1759
1760         * UserInterface/Models/DOMTree.js:
1761         * UserInterface/Models/Frame.js:
1762         Add support for WebInspector.Collection.
1763
1764         * UserInterface/Models/Script.js:
1765         (WebInspector.Script):
1766         * UserInterface/Views/DebuggerSidebarPanel.js:
1767         (WebInspector.DebuggerSidebarPanel.prototype._addResourcesRecursivelyForFrame):
1768         * UserInterface/Views/FrameTreeElement.js:
1769         (WebInspector.FrameTreeElement):
1770         (WebInspector.FrameTreeElement.prototype.onpopulate):
1771         * UserInterface/Views/OpenResourceDialog.js:
1772         (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
1773         Use new functions defined by changing to WebInspector.Collection.
1774
1775 2016-11-01  Devin Rousso  <dcrousso+webkit@gmail.com>
1776
1777         Web Inspector: Fix double remove of ResourceCollection if type changes
1778         https://bugs.webkit.org/show_bug.cgi?id=164268
1779
1780         Reviewed by Joseph Pecoraro.
1781
1782         * UserInterface/Models/ResourceCollection.js:
1783         (WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
1784         Change logic so that a non-typed collection will not try to remove a resource that has
1785         changed types from the sub-collection of its old type, since the sub-collection itself will
1786         handle the removal inside its own event listener for the type change.
1787
1788 2016-11-01  Ryosuke Niwa  <rniwa@webkit.org>
1789
1790         Web Inspector: Add the support for custom elements
1791         https://bugs.webkit.org/show_bug.cgi?id=164266
1792         <rdar://problem/29038883>
1793
1794         Reviewed by Joseph Pecoraro.
1795
1796         Show the custom element state in DOM node's details pane:
1797          - "Element" for all builtin elements.
1798          - "Element (Custom)" for any upgraded custom elements.
1799          - "Element (Waiting to be upgraded)" for any element waiting to be upgraded.
1800          - "Element (Failed to upgrade)" for any custom element that failed during construction or an upgrade.
1801
1802         And add "Jump to Definition" to the context menu of an node to find the custom element's definition.
1803
1804         * Localizations/en.lproj/localizedStrings.js: Added localized strings.
1805         * UserInterface/Controllers/DOMTreeManager.js:
1806         (WebInspector.DOMTreeManager.prototype._customElementStateChanged): Added. Update the state and fire
1807         WebInspector.DOMTreeManager.Event.CustomElementStateChanged to update the node's details pane.
1808         * UserInterface/Models/DOMNode.js:
1809         (WebInspector.DOMNode): Set the custom element state or default to "builtin". Use null when the node
1810         is not an element.
1811         (WebInspector.DOMNode.prototype.isCustomElement): Added. Returns true if this is a successfully
1812         constructed or upgraded custom element.
1813         (WebInspector.DOMNode.prototype.customElementState): Added.
1814         (WebInspector.DOMNode.CustomElementState): Added.
1815         * UserInterface/Protocol/DOMObserver.js:
1816         (WebInspector.DOMObserver.prototype.customElementStateChanged): Added.
1817         * UserInterface/Protocol/RemoteObject.js:
1818         (WebInspector.RemoteObject.prototype.getProperty): Added. Retrieves the property of a given name from
1819         the remote backend.
1820         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1821         (WebInspector.DOMNodeDetailsSidebarPanel): Call _customElementStateChanged when the custom element
1822         state changes by listening to WebInspector.DOMTreeManager.Event.CustomElementStateChanged.
1823         (WebInspector.DOMNodeDetailsSidebarPanel.prototype.layout):
1824         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshIdentity): Extracted from layout.
1825         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementStateChanged): Added. 
1826         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName): Include the custom element
1827         state when it's not a builtin element (_customElementState returns null in that case).
1828         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementState): Get the localized string for
1829         each custom element state.
1830         * UserInterface/Views/DOMTreeElement.js:
1831         (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): Add "Jump to Definition" item in the
1832         context menu of an element when it's a successfully constructed or upgraded custom element.
1833
1834 2016-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1835
1836         Web Inspector: Shadow DOM scoped styles are missing
1837         https://bugs.webkit.org/show_bug.cgi?id=164247
1838         <rdar://problem/29035061>
1839
1840         Reviewed by Antti Koivisto.
1841
1842         * UserInterface/Models/DOMNodeStyles.js:
1843         (WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
1844         Fix incorrect WrapperPromise usage.
1845
1846 2016-10-31  Devin Rousso  <dcrousso+webkit@gmail.com>
1847
1848         Web Inspector: Arrows for Styles scope bar item are misaligned
1849         https://bugs.webkit.org/show_bug.cgi?id=164159
1850
1851         Reviewed by Timothy Hatcher.
1852
1853         * UserInterface/Views/ScopeRadioButtonNavigationItem.css:
1854         (.scope-radio-button-navigation-item > .scope-radio-button-item-select:focus):
1855         (.scope-radio-button-navigation-item > .arrows):
1856
1857 2016-10-31  Devin Rousso  <dcrousso+webkit@gmail.com>
1858
1859         Web Inspector: Entering ":n" in Open Resource Dialog, where n > number of lines, should jump to the last line
1860         https://bugs.webkit.org/show_bug.cgi?id=160840
1861
1862         Reviewed by Timothy Hatcher.
1863
1864         * UserInterface/Views/TextEditor.js:
1865         (WebInspector.TextEditor.prototype.revealPosition):
1866         Since it is possible for the given position to be outside the bounds of the CodeMirror
1867         instance, wait to get the line handler for the highlight animation until we have constrained
1868         the position value.
1869
1870 2016-10-28  Devin Rousso  <dcrousso+webkit@gmail.com>
1871
1872         Web Inspector: Preferences for Text Editor behavior
1873         https://bugs.webkit.org/show_bug.cgi?id=149120
1874
1875         Reviewed by Timothy Hatcher.
1876
1877         * Localizations/en.lproj/localizedStrings.js:
1878
1879         * UserInterface/Base/Main.js:
1880         (WebInspector.loaded):
1881         (WebInspector.contentLoaded):
1882         (WebInspector.contentLoaded.setTabSize):
1883         (WebInspector.contentLoaded.setInvalidCharacterClassName):
1884         (WebInspector.contentLoaded.setWhitespaceCharacterClassName):
1885         (WebInspector._tryToRestorePendingTabs):
1886         (WebInspector.indentString):
1887         (WebInspector._updateNewTabButtonState): Deleted.
1888         (WebInspector._newTabItemClicked): Deleted.
1889         Removed calls to the New Tab tab bar item on the Tab Bar instance.
1890         Added listener to the indentUnit setting to change the tab-size value on <body>.
1891         Created helper function to generate the indentString value from settings.
1892
1893         * UserInterface/Base/Test.js:
1894         (WebInspector.indentString):
1895         Assume indent string is "    " for tests.
1896
1897         * UserInterface/Base/Setting.js:
1898         Added global WebInspector.settings dictionary for holding settings with UI editors.
1899
1900         * UserInterface/Main.html:
1901         Added GeneralTabBarItem, PinnedTabBarItem, and SettingsTabContentView.
1902
1903         * UserInterface/Models/CSSStyleDeclaration.js:
1904         (WebInspector.CSSStyleDeclaration.prototype.generateCSSRuleString):
1905         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1906         (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContentFromEditor):
1907         (WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
1908         * UserInterface/Views/VisualStylePropertyEditor.js:
1909         (WebInspector.VisualStylePropertyEditor.generateFormattedTextForNewProperty):
1910         * UserInterface/Views/SourceCodeTextEditor.js:
1911         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
1912         Now uses WebInspector.indentUnit for indentation values
1913
1914         * UserInterface/Views/CodeMirrorAdditions.js:
1915         Added "showWhitespaceCharacter" option to CodeMirror.  When enabled, it adds an overlay to
1916         the editor that will use pseudo-elements to display whitespace characters (unicode 00B7).
1917
1918         * UserInterface/Views/CodeMirrorOverrides.css:
1919         (.CodeMirror .cm-tab):
1920         (.show-whitespace-characters .CodeMirror .cm-tab::before):
1921         (.show-whitespace-characters .CodeMirror .cm-whitespace::before):
1922         (.show-whitespace-characters .CodeMirror .cm-whitespace-1::before):
1923         (.show-whitespace-characters .CodeMirror .cm-whitespace-2::before):
1924         (.show-whitespace-characters .CodeMirror .cm-whitespace-3::before):
1925         (.show-whitespace-characters .CodeMirror .cm-whitespace-4::before):
1926         (.show-whitespace-characters .CodeMirror .cm-whitespace-5::before):
1927         (.show-whitespace-characters .CodeMirror .cm-whitespace-6::before):
1928         (.show-whitespace-characters .CodeMirror .cm-whitespace-7::before):
1929         (.show-whitespace-characters .CodeMirror .cm-whitespace-8::before):
1930         (.show-whitespace-characters .CodeMirror .cm-whitespace-9::before):
1931         (.show-whitespace-characters .CodeMirror .cm-whitespace-10::before):
1932         (.show-whitespace-characters .CodeMirror .cm-whitespace-11::before):
1933         (.show-whitespace-characters .CodeMirror .cm-whitespace-12::before):
1934         (.show-whitespace-characters .CodeMirror .cm-whitespace-13::before):
1935         (.show-whitespace-characters .CodeMirror .cm-whitespace-14::before):
1936         (.show-whitespace-characters .CodeMirror .cm-whitespace-15::before):
1937         (.show-whitespace-characters .CodeMirror .cm-whitespace-16::before):
1938         (.show-invalid-characters .CodeMirror .cm-invalidchar):
1939         (.CodeMirror .cm-invalidchar): Deleted.
1940         Use unicode character 00B7 (middle dot) to display a space.  Also uses a grey border for
1941         visualizing tab characters.
1942
1943         * UserInterface/Views/ApplicationCacheFrameContentView.js:
1944         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1945         * UserInterface/Views/ClusterContentView.js:
1946         * UserInterface/Views/DOMTreeContentView.js:
1947         * UserInterface/Views/DatabaseContentView.js:
1948         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
1949         * UserInterface/Views/NetworkGridContentView.js:
1950         * UserInterface/Views/ResourceContentView.js:
1951         * UserInterface/Views/ScriptContentView.js:
1952         * UserInterface/Views/TabContentView.js:
1953         * UserInterface/Views/TimelineRecordingContentView.js:
1954         Add calls to super.shown(), super.hidden(), and super.closed().
1955
1956         * UserInterface/Views/ConsoleTabContentView.js:
1957         * UserInterface/Views/DebuggerTabContentView.js:
1958         * UserInterface/Views/ElementsTabContentView.js:
1959         * UserInterface/Views/NetworkTabContentView.js:
1960         * UserInterface/Views/NewTabContentView.js:
1961         * UserInterface/Views/ResourcesTabContentView.js:
1962         * UserInterface/Views/SearchTabContentView.js:
1963         * UserInterface/Views/StorageTabContentView.js:
1964         * UserInterface/Views/TimelineTabContentView.js:
1965         Now uses WebInspector.GeneralTabBarItem.
1966
1967         * UserInterface/Views/GeneralTabBarItem.js: Added.
1968         (WebInspector.GeneralTabBarItem):
1969         (WebInspector.GeneralTabBarItem.prototype.set title):
1970         (WebInspector.GeneralTabBarItem.prototype._handleContextMenuEvent):
1971         Split from TabBarItem.js to make pinned tab bar items more distinct.
1972
1973         * UserInterface/Views/Main.css:
1974         (body):
1975         Removed tab-size.
1976
1977         * UserInterface/Views/PinnedTabBarItem.js: Added.
1978         (WebInspector.PinnedTabBarItem):
1979         Split from TabBarItem.js to make pinned tab bar items more distinct.
1980
1981         * UserInterface/Views/SettingsTabContentView.css: Added.
1982         (.content-view.settings):
1983         (.content-view.settings > .header):
1984         (.content-view.settings > .setting-container):
1985         (.content-view.settings > .setting-container > .setting-name):
1986         (.content-view.settings > .setting-container > .setting-value-controller):
1987         (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
1988
1989         * UserInterface/Views/SettingsTabContentView.js:
1990         (WebInspector.SettingsTabContentView):
1991         (WebInspector.SettingsTabContentView.tabInfo):
1992         (WebInspector.SettingsTabContentView.isEphemeral):
1993         (WebInspector.SettingsTabContentView.shouldSaveTab):
1994         (WebInspector.SettingsTabContentView.prototype.initialLayout):
1995         (WebInspector.SettingsTabContentView.isTabAllowed): Deleted.
1996         (WebInspector.SettingsTabContentView.prototype.get type): Deleted.
1997         Added logic to display an appropriate editor for each item in WebInspector.settings.
1998
1999         * UserInterface/Views/SourceCodeTextEditor.js:
2000         (WebInspector.SourceCodeTextEditor.prototype.close):
2001         Add call to super.close().
2002
2003         * UserInterface/Views/TabBar.css:
2004         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover):
2005         (.tab-bar > .item:not(.pinned) > .flex-space:last-child):
2006         (.tab-bar > .item.pinned > .icon):
2007         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
2008         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,): Deleted.
2009         (.tab-bar > .item > .flex-space:last-child): Deleted.
2010         (.tab-bar > .item.new-tab-button > .icon): Deleted.
2011         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon,): Deleted.
2012         Removed rules specifically targeting `.new-tab-button`.
2013
2014         * UserInterface/Views/TabBar.js:
2015         (WebInspector.TabBar):
2016         (WebInspector.TabBar.prototype.get newTabTabBarItem):
2017         (WebInspector.TabBar.prototype.updateNewTabTabBarItemState):
2018         (WebInspector.TabBar.prototype.insertTabBarItem):
2019         (WebInspector.TabBar.prototype.removeTabBarItem.animateTabs):
2020         (WebInspector.TabBar.prototype.removeTabBarItem):
2021         (WebInspector.TabBar.prototype.selectPreviousTab):
2022         (WebInspector.TabBar.prototype.selectNextTab):
2023         (WebInspector.TabBar.prototype.set selectedTabBarItem):
2024         (WebInspector.TabBar.prototype.hasNormalTab):
2025         (WebInspector.TabBar.prototype.layout):
2026         (WebInspector.TabBar.prototype._hasMoreThanOneNormalTab):
2027         (WebInspector.TabBar.prototype._handleMouseDown):
2028         (WebInspector.TabBar.prototype._handleMouseMoved):
2029         (WebInspector.TabBar.prototype._handleMouseLeave):
2030         (WebInspector.TabBar.prototype._handleNewTabClick):
2031         (WebInspector.TabBar.prototype._handleNewTabMouseEnter):
2032         (WebInspector.TabBar.prototype.get newTabItem): Deleted.
2033         (WebInspector.TabBar.prototype.set newTabItem): Deleted.
2034         Replaced the newTabItem setter by adding a saved pinned tab bar item (instead of relying
2035         upon a different object to give it the pinned tab bar item) that changes modes depending on
2036         whether a new tab is able to be created.
2037
2038         * UserInterface/Views/TabBarItem.js:
2039         (WebInspector.TabBarItem):
2040         (WebInspector.TabBarItem.prototype.get element):
2041         (WebInspector.TabBarItem.prototype.get representedObject):
2042         (WebInspector.TabBarItem.prototype.set representedObject):
2043         (WebInspector.TabBarItem.prototype.get parentTabBar):
2044         (WebInspector.TabBarItem.prototype.set parentTabBar):
2045         (WebInspector.TabBarItem.prototype.get image):
2046         (WebInspector.TabBarItem.prototype.set image):
2047         (WebInspector.TabBarItem.prototype.get title):
2048         (WebInspector.TabBarItem.prototype.set title):
2049         (WebInspector.TabBarItem.prototype.get pinned): Deleted.
2050         (WebInspector.TabBarItem.prototype._handleContextMenuEvent): Deleted.
2051         Split into GeneralTabBarItem and PinnedTabBarItem to simplify the logic of the DOM and allow
2052         for easier checking of whether a tab bar item is pinned or not.
2053
2054         * UserInterface/Views/TabBrowser.js:
2055         (WebInspector.TabBrowser):
2056         (WebInspector.TabBrowser.prototype.addTabForContentView):
2057         (WebInspector.TabBrowser.prototype.closeTabForContentView):
2058         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
2059         (WebInspector.TabBrowser.prototype._tabBarItemRemoved):
2060         Replaced references to newTabItem with a set number (since each TabBar has a specific number
2061         of pinned tabs).
2062
2063         * UserInterface/Views/TextEditor.js:
2064         (WebInspector.TextEditor):
2065         (WebInspector.TextEditor.prototype.close):.
2066         Remove settings update event listeners to allow garbage collection.
2067
2068         (WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
2069         (WebInspector.TextEditor.prototype._startCodeMirrorPrettyPrint):
2070         Now uses the settings values in WebInspector.setting for settings on the CodeMirror
2071         instance.  Also updates the CodeMirror instance if any setting changes.
2072
2073 2016-10-28  Joseph Pecoraro  <pecoraro@apple.com>
2074
2075         Web Inspector: Include parameter strings for native CustomElementRegistry methods in the console
2076         https://bugs.webkit.org/show_bug.cgi?id=164147
2077
2078         Reviewed by Brian Burg.
2079
2080         * UserInterface/Models/NativeFunctionParameters.js:
2081
2082 2016-10-28  Matt Baker  <mattbaker@apple.com>
2083
2084         Unreviewed, worker document images added
2085
2086         * UserInterface/Images/WorkerDocument.png: Added.
2087         * UserInterface/Images/WorkerDocument@2x.png: Added.
2088         * UserInterface/Images/WorkerDocumentLarge.png: Added.
2089         * UserInterface/Images/WorkerDocumentLarge@2x.png: Added.
2090
2091 2016-10-27  Devin Rousso  <dcrousso+webkit@gmail.com>
2092
2093         Web Inspector: Create general model object Collection class
2094         https://bugs.webkit.org/show_bug.cgi?id=163995
2095
2096         Reviewed by Joseph Pecoraro.
2097
2098         * UserInterface/Models/Collection.js: Added.
2099         (WebInspector.Collection):
2100         (WebInspector.Collection.prototype.get items):
2101         (WebInspector.Collection.prototype.get typeVerifier):
2102         (WebInspector.Collection.prototype.add):
2103         (WebInspector.Collection.prototype.remove):
2104         (WebInspector.Collection.prototype.clear):
2105         (WebInspector.Collection.prototype.toArray):
2106         (WebInspector.Collection.prototype.toJSON):
2107         (WebInspector.Collection.prototype.itemAdded):
2108         (WebInspector.Collection.prototype.itemRemoved):
2109         (WebInspector.Collection.prototype.itemsCleared):
2110         Class that holds multiple model objects.  It can be limited to a specific type by supplying
2111         a "typeVerifier", which is a function that accepts a single argument (the model object) and
2112         returns true/false depending on if that argument matches the "type" of the collection.
2113
2114         * UserInterface/Main.html:
2115         * UserInterface/Test.html:
2116         * UserInterface/Models/Frame.js:
2117         * UserInterface/Views/CookieStorageContentView.js:
2118         * UserInterface/Views/DebuggerSidebarPanel.js:
2119         * UserInterface/Views/FrameTreeElement.js:
2120         * UserInterface/Views/OpenResourceDialog.js:
2121         Add support for WebInspector.Collection.
2122         
2123         * UserInterface/Models/ResourceCollection.js:
2124         (WebInspector.ResourceCollection):
2125         (WebInspector.ResourceCollection.verifierForType):
2126         (WebInspector.ResourceCollection.prototype.resourceCollectionForType):
2127         (WebInspector.ResourceCollection.prototype.clear):
2128         (WebInspector.ResourceCollection.prototype.itemAdded):
2129         (WebInspector.ResourceCollection.prototype.itemRemoved):
2130         (WebInspector.ResourceCollection.prototype.itemsCleared):
2131         (WebInspector.ResourceCollection.prototype._associateWithResource):
2132         (WebInspector.ResourceCollection.prototype._disassociateWithResource):
2133         (WebInspector.ResourceCollection.prototype._resourceURLDidChange):
2134         (WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
2135         (WebInspector.ResourceCollection.prototype.get resources): Deleted.
2136         (WebInspector.ResourceCollection.prototype.resourcesWithType): Deleted.
2137         (WebInspector.ResourceCollection.prototype.addResource): Deleted.
2138         (WebInspector.ResourceCollection.prototype.removeResource): Deleted.
2139         (WebInspector.ResourceCollection.prototype.removeAllResources): Deleted.
2140         Now a subclass of WebInspector.Collection.  Retrieving WebInspector.Resource objects by type
2141         and URL is still supported, but requesting by type now returns another instance of
2142         WebInspector.ResourceCollection that is configured to only accept the requested type.
2143
2144 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
2145
2146         Web Inspector: Include ConsoleAgent in Workers - real console.log support
2147         https://bugs.webkit.org/show_bug.cgi?id=163844
2148         <rdar://problem/28903328>
2149
2150         Reviewed by Brian Burg.
2151
2152         * UserInterface/Protocol/Target.js:
2153         (WebInspector.Target.prototype.get ConsoleAgent):
2154         (WebInspector.Target.prototype._initializeNonMainTarget):
2155         * UserInterface/Protocol/Connection.js:
2156         (InspectorBackend.WorkerConnection):
2157         Add ConsoleAgent.
2158
2159         * UserInterface/Controllers/LogManager.js:
2160         (WebInspector.LogManager.prototype.messageWasAdded):
2161         (WebInspector.LogManager.prototype.requestClearMessages):
2162         Handle ConsoleAgent calls with multiple targets.
2163
2164         * UserInterface/Protocol/ConsoleObserver.js:
2165         (WebInspector.ConsoleObserver.prototype.messageAdded):
2166         Dispatch with the target in case we create Model objects.
2167
2168         * UserInterface/Controllers/WorkerManager.js:
2169         (WebInspector.WorkerManager.prototype.workerCreated):
2170         The frontend must now call "initialized" on Workers after
2171         sending our setup messages (enable, set breakpoints, etc).
2172
2173         * UserInterface/Protocol/RemoteObject.js:
2174         (WebInspector.RemoteObject.prototype.get target):
2175         Expose an accessor for tests.
2176
2177         * UserInterface/Protocol/LoggingProtocolTracer.js:
2178         (WebInspector.LoggingProtocolTracer.prototype._processEntry):
2179         Actually output the Exception, useful when debugging failures in tests.
2180
2181 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
2182
2183         Web Inspector: Include RuntimeAgent in Workers - evaluate in Worker context
2184         https://bugs.webkit.org/show_bug.cgi?id=163835
2185         <rdar://problem/28901465>
2186
2187         Reviewed by Brian Burg.
2188
2189         This introduces the idea that the frontend may communication with multiple
2190         backend "Targets" which each have their own set of Agents.
2191
2192             - WebInspector.Target
2193               - has its own list of Agents
2194               - has a InspectorBackend.Connection to communicate with the backend
2195
2196             - WebInspector.mainTarget
2197               - always exists and represents the thing we are debugging (Page or JSContext)
2198
2199             - WebInspector.targets / WebInspector.targetManager
2200               - management of all Targets
2201               - create new Targets for Workers
2202
2203         This also slowly introduces the concept that Model objects may be tied to
2204         a specific Target:
2205
2206             - WebInspector.RemoteObject
2207               - in order to evaluate JS and interact with this object we must know the target (Page or Worker)
2208               - when fetching PropertyDescriptors and other RemoteObjects we must continue to pass on the target
2209
2210         Finally this makes the QuickConsole list Worker execution contexts in
2211         the context picker so that users can choose a Worker context and
2212         evaluate JavaScript in that context using the console.
2213
2214         * Localizations/en.lproj/localizedStrings.js:
2215         * UserInterface/Main.html:
2216         * UserInterface/Base/Main.js:
2217         (WebInspector.loaded):
2218         * UserInterface/Test.html:
2219         * UserInterface/Test/Test.js:
2220         (WebInspector.loaded):
2221         New files, strings, and managers.
2222         New global WebInspector.mainTarget.
2223         New convenience WebInspector.targets.
2224
2225         * UserInterface/Protocol/Target.js: Added.
2226         (WebInspector.Target):
2227         (WebInspector.Target.prototype.get RuntimeAgent):
2228         (WebInspector.Target.prototype.get name):
2229         (WebInspector.Target.prototype.get type):
2230         (WebInspector.Target.prototype.get connection):
2231         (WebInspector.Target.prototype.get executionContext):
2232         (WebInspector.Target.prototype.get displayName):
2233         (WebInspector.Target.prototype._intializeMainTarget):
2234         (WebInspector.Target.prototype._initializeNonMainTarget):
2235         Target has some basic properties.
2236
2237         * UserInterface/Controllers/TargetManager.js:
2238         (WebInspector.TargetManager):
2239         (WebInspector.TargetManager.prototype.get targets):
2240         (WebInspector.TargetManager.prototype.addTarget):
2241         (WebInspector.TargetManager.prototype.removeTarget):
2242         Holds the list of Targets and events when created / removed.
2243         Each target with a RuntimeAgent has an ExecutionContext.
2244
2245         * UserInterface/Controllers/WorkerManager.js:
2246         (WebInspector.WorkerManager):
2247         (WebInspector.WorkerManager.prototype.workerCreated):
2248         (WebInspector.WorkerManager.prototype.workerTerminated):
2249         (WebInspector.WorkerManager.prototype.dispatchMessageFromWorker):
2250         Create / remove / dispatch on a Worker Target.
2251
2252         * UserInterface/Protocol/InspectorBackend.js:
2253         (InspectorBackendClass):
2254         (InspectorBackendClass.prototype.registerCommand):
2255         (InspectorBackendClass.prototype.dispatch):
2256         (InspectorBackendClass.prototype.runAfterPendingDispatches):
2257         (InspectorBackendClass.prototype._agentForDomain):
2258         Keep the original implementations and just dispatch to the main connection.
2259
2260         (InspectorBackend.Agent):
2261         (InspectorBackend.Agent.prototype.get connection):
2262         (InspectorBackend.Agent.prototype.set connection):
2263         (InspectorBackend.Agent.prototype.get dispatcher):
2264         We will share Agent implementations but just give new "copies" a different
2265         connection and dispatcher.
2266
2267         (InspectorBackend.Command):
2268         (InspectorBackend.Command.create):
2269         (InspectorBackend.Command.prototype.invoke):
2270         (InspectorBackend.Command.prototype.supports):
2271         We continue to have a single Command instance on the Agent. However instead
2272         of using the hardcoded Agent on the Instance when evaluated as a function
2273         it uses the `this` object which should be an agent. This way:
2274
2275             target1.RuntimeAgent.evaluate
2276                 - `this` is target1 and we use the connection for that target
2277             target2.RuntimeAgent.evaluate
2278                 - `this` is target2 and we use the connection for that target
2279
2280         Unfortunately this breaks `RuntimeAgent.evaluate.invoke`. Currently this
2281         is solved by providing an extra parameter. In the case where we need to
2282         invoke on a particular agent we must provide the agent.
2283
2284             target.RuntimeAgent.evaluate.invoke({options}, target.RuntimeAgent)
2285
2286         This is unfortunate but only needed in a handful of places right now.
2287
2288         (InspectorBackendClass.prototype._sendCommandToBackendWithCallback): Deleted.
2289         (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise): Deleted.
2290         (InspectorBackendClass.prototype._sendMessageToBackend): Deleted.
2291         (InspectorBackendClass.prototype._dispatchResponse): Deleted.
2292         (InspectorBackendClass.prototype._dispatchResponseToCallback): Deleted.
2293         (InspectorBackendClass.prototype._dispatchResponseToPromise): Deleted.
2294         (InspectorBackendClass.prototype._dispatchEvent): Deleted.
2295         (InspectorBackendClass.prototype._flushPendingScripts): Deleted.
2296         (InspectorBackend.Agent.prototype.get currentDispatchState): Deleted.
2297         (InspectorBackend.Command.prototype.deliverFailure): Deleted.
2298         * UserInterface/Protocol/Connection.js: Added.
2299         (InspectorBackend.Connection):
2300         (InspectorBackend.Connection.prototype.get target):
2301         (InspectorBackend.Connection.prototype.set target):
2302         (InspectorBackend.Connection.prototype.dispatch):
2303         (InspectorBackend.Connection.prototype.runAfterPendingDispatches):
2304         (InspectorBackend.Connection.prototype.sendMessageToBackend):
2305         (InspectorBackend.Connection.prototype._dispatchResponse):
2306         (InspectorBackend.Connection.prototype._dispatchResponseToCallback):
2307         (InspectorBackend.Connection.prototype._dispatchResponseToPromise):
2308         (InspectorBackend.Connection.prototype._dispatchEvent):
2309         (InspectorBackend.Connection.prototype._sendCommandToBackendWithCallback):
2310         (InspectorBackend.Connection.prototype._sendCommandToBackendExpectingPromise):
2311         (InspectorBackend.Connection.prototype._sendMessageToBackend):
2312         (InspectorBackend.Connection.prototype._flushPendingScripts):
2313         This extracts the Connection details into its own class.
2314         Although we make it appear as though a Target has a list of
2315         Agents, we actually have the Connection hold the list of Agents.
2316         Instead of cloning the entire Agent we just create a new object
2317         extended from the original Agent instance. This allows us to keep
2318         the same interface but just change the connection / dispatcher
2319         properties within the Agent.
2320
2321         (InspectorBackend.MainConnection):
2322         (InspectorBackend.MainConnection.prototype.sendMessageToBackend):
2323         (InspectorBackend.WorkerConnection):
2324         (InspectorBackend.WorkerConnection.sendMessageToBackend):
2325         Two different kinds of connections. One for the Main connection
2326         and one for Workers. Currently the list of agents we expose
2327         on a Worker Target/Connection is hardcoded.
2328
2329         * UserInterface/Models/ExecutionContext.js:
2330         (WebInspector.ExecutionContext):
2331         (WebInspector.ExecutionContext.prototype.get target):
2332         We may now have ExecutionContexts that mean a Page, Frames, and Workers.
2333         To do this we include the (target, executionContextId) tuple in this object.
2334         With this we have everything we need to evaluate JavaScript.
2335
2336         * UserInterface/Controllers/RuntimeManager.js:
2337         (WebInspector.RuntimeManager):
2338         (WebInspector.RuntimeManager.prototype.get activeExecutionContext):
2339         (WebInspector.RuntimeManager.prototype.set activeExecutionContext):
2340         (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier): Deleted.
2341         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier): Deleted.
2342         Update from contextId to a full ExecutionContext object.
2343
2344         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow.evalCallback):
2345         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
2346         (WebInspector.RuntimeManager.prototype.saveResult):
2347         (WebInspector.RuntimeManager.prototype.getPropertiesForRemoteObject):
2348         (WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
2349         * UserInterface/Controllers/FrameResourceManager.js:
2350         (WebInspector.FrameResourceManager.prototype.executionContextCreated):
2351         * UserInterface/Controllers/JavaScriptLogViewController.js:
2352         (WebInspector.JavaScriptLogViewController.prototype.consolePromptShouldCommitText):
2353         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2354         Anywhere that wants to use the "activeExecutionContext" must use the
2355         specific RuntimeAgent tied to that ExecutionContext's Target.
2356
2357         * UserInterface/Models/PropertyDescriptor.js:
2358         (WebInspector.PropertyDescriptor.fromPayload):
2359         * UserInterface/Protocol/RemoteObject.js:
2360         (WebInspector.RemoteObject):
2361         (WebInspector.RemoteObject.createFakeRemoteObject):
2362         (WebInspector.RemoteObject.fromPrimitiveValue):
2363         (WebInspector.RemoteObject.fromPayload):
2364         (WebInspector.RemoteObject.prototype.getDisplayablePropertyDescriptors):
2365         (WebInspector.RemoteObject.prototype.deprecatedGetDisplayableProperties):
2366         (WebInspector.RemoteObject.prototype.setPropertyValue):
2367         (WebInspector.RemoteObject.prototype.getCollectionEntries):
2368         (WebInspector.RemoteObject.prototype.releaseWeakCollectionEntries):
2369         (WebInspector.RemoteObject.prototype.callFunction):
2370         (WebInspector.RemoteObject.prototype.callFunctionJSON):
2371         (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor.wrappedCallback):
2372         (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptor):
2373         (WebInspector.RemoteObject.prototype.release):
2374         (WebInspector.RemoteObject.prototype._getPropertyDescriptors):
2375         (WebInspector.RemoteObject.prototype._getPropertyDescriptorsResolver):
2376         (WebInspector.RemoteObject.prototype._deprecatedGetProperties):
2377         RemoteObject and related Model Objects now must be tied to a specific
2378         Target, because we need to know which Target it belongs to in order to
2379         interact with it further.
2380
2381         * UserInterface/Views/QuickConsole.js:
2382         (WebInspector.QuickConsole):
2383         (WebInspector.QuickConsole.prototype.get selectedExecutionContext):
2384         (WebInspector.QuickConsole.prototype.set selectedExecutionContext):
2385         (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
2386         (WebInspector.QuickConsole.prototype._rebuildExecutionContextPathComponents):
2387         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
2388         (WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
2389         (WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
2390         (WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
2391         (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
2392         (WebInspector.QuickConsole.prototype._insertOtherExecutionContextPathComponent):
2393         (WebInspector.QuickConsole.prototype._removeOtherExecutionContextPathComponent):
2394         (WebInspector.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
2395         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
2396         (WebInspector.QuickConsole.prototype._targetAdded):
2397         (WebInspector.QuickConsole.prototype._targetRemoved):
2398         (WebInspector.QuickConsole.prototype._pathComponentSelected):
2399         (WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier): Deleted.
2400         (WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier): Deleted.
2401         (WebInspector.QuickConsole.prototype._defaultExecutionContextChanged): Deleted.
2402         Update the code from executionContextId to ExecutionContext objects.
2403         Update the picker with ExecutionContextPathComponent for Workers (new Targets).
2404         Generalize and cleanup the code to make it easier to follow.
2405
2406 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
2407
2408         Web Inspector: Introduce Page WorkerAgent and Worker InspectorController
2409         https://bugs.webkit.org/show_bug.cgi?id=163817
2410         <rdar://problem/28899063>
2411
2412         Reviewed by Brian Burg.
2413
2414         * UserInterface/Main.html:
2415         * UserInterface/Test.html:
2416         New files.
2417
2418         * UserInterface/Base/Main.js:
2419         (WebInspector.loaded):
2420         * UserInterface/Test/Test.js:
2421         (WebInspector.loaded):
2422         New Observers and Managers.
2423
2424         * UserInterface/Protocol/WorkerObserver.js: Added.
2425         (WebInspector.WorkerObserver.prototype.workerCreated):
2426         (WebInspector.WorkerObserver.prototype.workerTerminated):
2427         (WebInspector.WorkerObserver.prototype.dispatchMessageFromWorker):
2428         (WebInspector.WorkerObserver):
2429         * UserInterface/Controllers/WorkerManager.js: Added.
2430         (WebInspector.WorkerManager):
2431         (WebInspector.WorkerManager.prototype.workerCreated):
2432         (WebInspector.WorkerManager.prototype.workerTerminated):
2433         (WebInspector.WorkerManager.prototype.dispatchMessageFromWorker):
2434         To be implemented with the first Worker agent implementation
2435         when there is actually something we can do with the Worker.
2436
2437 2016-10-25  Joseph Pecoraro  <pecoraro@apple.com>
2438
2439         Web Inspector: Cmd-+ doesn't "zoom in" to increase text size in the Web Inspector
2440         https://bugs.webkit.org/show_bug.cgi?id=163961
2441         <rdar://problem/28895308>
2442
2443         Reviewed by Brian Burg.
2444
2445         * UserInterface/Base/Main.js:
2446         (WebInspector.contentLoaded):
2447         Add a duplicate set of keyboard shortcuts for the Shift variants.
2448
2449 2016-10-25  Joseph Pecoraro  <pecoraro@apple.com>
2450
2451         Web Inspector: Remove dead code in FrameTreeElement
2452         https://bugs.webkit.org/show_bug.cgi?id=163914
2453
2454         Reviewed by Brian Burg.
2455
2456         * UserInterface/Views/FrameTreeElement.js:
2457
2458 2016-10-24  Devin Rousso  <dcrousso+webkit@gmail.com>
2459
2460         Web Inspector: Scope chain shouldn't show empty Closure sections
2461         https://bugs.webkit.org/show_bug.cgi?id=152348
2462
2463         Reviewed by Joseph Pecoraro.
2464
2465         * UserInterface/Controllers/DebuggerManager.js:
2466         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
2467         * UserInterface/Models/ScopeChainNode.js:
2468         (WebInspector.ScopeChainNode):
2469         (WebInspector.ScopeChainNode.prototype.get empty):
2470         Added support for new empty property.
2471
2472         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2473         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
2474         Only create and display a DetailsSection if the scope is not empty (via empty).
2475
2476 2016-10-24  Devin Rousso  <dcrousso+webkit@gmail.com>
2477
2478         Web Inspector: Improve Quick Open sorting algorithm
2479         https://bugs.webkit.org/show_bug.cgi?id=163705
2480
2481         Reviewed by Joseph Pecoraro.
2482
2483         * UserInterface/Models/ResourceQueryResult.js:
2484         (WebInspector.ResourceQueryResult.prototype._calculateRank.getMultiplier):
2485         (WebInspector.ResourceQueryResult.prototype._calculateRank):
2486         Added logic to multiply the ranking increment/decrement based on whether the current match
2487         is part of a sequence, whether that sequence began with a special character, and the length
2488         of the current sequence.
2489
2490 2016-10-19  Dean Jackson  <dino@apple.com>
2491
2492         Support CSS Shapes Level 1 without a prefix
2493         https://bugs.webkit.org/show_bug.cgi?id=163709
2494         <rdar://problem/28859369>
2495
2496         Reviewed by Myles Maxfield.
2497
2498         Replace -webkit-shape-outside with shape-outside.
2499
2500         * UserInterface/Models/CSSKeywordCompletions.js:
2501
2502 2016-10-19  Aaron Chu  <aaron_chu@apple.com>
2503
2504         Web Inspector: AXI: expose computed tree node and heading level
2505         https://bugs.webkit.org/show_bug.cgi?id=130825
2506         <rdar://problem/16442349>
2507
2508         Reviewed by Joseph Pecoraro.
2509
2510         Updating the Web Accessibility Inspector to display Heading Level and Hierarchical Level.
2511
2512         * Localizations/en.lproj/localizedStrings.js:
2513         * UserInterface/Models/DOMNode.js:
2514         (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
2515         (WebInspector.DOMNode.prototype.accessibilityProperties):
2516         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2517         (WebInspector.DOMNodeDetailsSidebarPanel):
2518         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
2519         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
2520
2521 2016-10-18  Joseph Pecoraro  <pecoraro@apple.com>
2522
2523         Web Inspector: Styles Sidebar highlights "translate" but not "translateX"
2524         https://bugs.webkit.org/show_bug.cgi?id=163613
2525         <rdar://problem/28829610>
2526
2527         Reviewed by Timothy Hatcher.
2528
2529         * UserInterface/Models/CSSCompletions.js:
2530         (WebInspector.CSSCompletions.requestCSSCompletions):
2531         The hash table objects we pass to CodeMirror expects keys to be lowercased.
2532
2533 2016-10-18  Joseph Pecoraro  <pecoraro@apple.com>
2534
2535         Web Inspector: CSS Autocompletion sometimes adds extra unexpected characters
2536         https://bugs.webkit.org/show_bug.cgi?id=163612
2537         <rdar://problem/28829557>
2538
2539         Reviewed by Timothy Hatcher.
2540
2541         * UserInterface/Controllers/CodeMirrorCompletionController.js:
2542         (WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
2543         Better handle completions in cases where we are in the middle of a property
2544         to avoid orphaned characters, or at the end of a function name to avoid creating
2545         duplicate parenthesis.
2546
2547 2016-10-18  Joseph Pecoraro  <pecoraro@apple.com>
2548
2549         REGRESSION(r201171): Web Inspector: Timeline Recording playhead should always start immediately, not wait until first event
2550         https://bugs.webkit.org/show_bug.cgi?id=163583
2551         <rdar://problem/28815882>
2552
2553         Reviewed by Timothy Hatcher.
2554
2555         * UserInterface/Views/TimelineRecordingContentView.js:
2556         (WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
2557         Revert logic change introduced by r201171 with no explanation.
2558         Whenever we get a start time we should use it, regardless of
2559         of what the current time is, precisely because the backend is
2560         informing us of the start time to use.
2561
2562 2016-10-17  Joseph Pecoraro  <pecoraro@apple.com>
2563
2564         Web Inspector: Add toggles for debugger pauses at console.assert failures
2565         https://bugs.webkit.org/show_bug.cgi?id=139542
2566         <rdar://problem/19281600>
2567
2568         Reviewed by Timothy Hatcher.
2569
2570         * UserInterface/Controllers/DebuggerManager.js:
2571         (WebInspector.DebuggerManager.prototype.get assertionsBreakpoint):
2572         (WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
2573         (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
2574         New breakpoint and toggling behavior.
2575
2576         * Localizations/en.lproj/localizedStrings.js:
2577         * UserInterface/Views/DebuggerSidebarPanel.js:
2578         (WebInspector.DebuggerSidebarPanel):
2579         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
2580         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint):
2581         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
2582         New breakpoint tree element behavior.
2583
2584         (WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
2585         (WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
2586         Sidebar restoration if it was selected.
2587
2588         * UserInterface/Images/Assertion.svg: Added.
2589         * UserInterface/Images/gtk/Assertion.svg: Added.
2590         * UserInterface/Views/BreakpointTreeElement.css:
2591         (.breakpoint-assertion-icon .icon):
2592         New sidebar icon for the global breakpoint.
2593
2594 2016-10-15  Joseph Pecoraro  <pecoraro@apple.com>
2595
2596         Web Inspector: Cleanup parts of DebuggerManager
2597         https://bugs.webkit.org/show_bug.cgi?id=163400
2598
2599         Reviewed by Timothy Hatcher.
2600
2601         * UserInterface/Controllers/DebuggerManager.js:
2602         (WebInspector.DebuggerManager.restoreBreakpointsSoon):
2603
2604         (WebInspector.DebuggerManager.prototype.get paused):
2605         (WebInspector.DebuggerManager.prototype.get pauseReason):
2606         (WebInspector.DebuggerManager.prototype.get pauseData):
2607         (WebInspector.DebuggerManager.prototype.get callFrames):
2608         (WebInspector.DebuggerManager.prototype.get activeCallFrame):
2609         (WebInspector.DebuggerManager.prototype.set activeCallFrame):
2610         Put simple accessors at the top.
2611
2612         (WebInspector.DebuggerManager.prototype.get allExceptionsBreakpoint):
2613         (WebInspector.DebuggerManager.prototype.get allUncaughtExceptionsBreakpoint):
2614         (WebInspector.DebuggerManager.prototype.get breakpoints):
2615         (WebInspector.DebuggerManager.prototype.breakpointForIdentifier):
2616         (WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
2617         (WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
2618         (WebInspector.DebuggerManager.prototype.isBreakpointEditable):
2619         (WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
2620         Group public breakpoint state and access methods.
2621
2622         (WebInspector.DebuggerManager.prototype.scriptForIdentifier):
2623         (WebInspector.DebuggerManager.prototype.scriptsForURL):
2624         (WebInspector.DebuggerManager.prototype.get searchableScripts):
2625         (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
2626         Group public script access methods.
2627
2628         (WebInspector.DebuggerManager.prototype.pause):
2629         (WebInspector.DebuggerManager.prototype.resume):
2630         (WebInspector.DebuggerManager.prototype.stepOver):
2631         (WebInspector.DebuggerManager.prototype.stepInto):
2632         (WebInspector.DebuggerManager.prototype.stepOut):
2633         (WebInspector.DebuggerManager.prototype.continueToLocation):
2634         (WebInspector.DebuggerManager.prototype.addBreakpoint):
2635         (WebInspector.DebuggerManager.prototype.removeBreakpoint):
2636         Group and modernize public methods that perform actions.
2637
2638         (WebInspector.DebuggerManager.prototype.nextBreakpointActionIdentifier):
2639         Misc. methods.
2640
2641         (WebInspector.DebuggerManager.prototype.breakpointResolved):
2642         (WebInspector.DebuggerManager.prototype.reset):
2643         (WebInspector.DebuggerManager.prototype.playBreakpointActionSound):
2644         (WebInspector.DebuggerManager.prototype.scriptDidParse):
2645         (WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
2646         (WebInspector.DebuggerManager.prototype._setBreakpoint):
2647         (WebInspector.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
2648         (WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
2649         (WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
2650         Minor cleanup in protected and private methods.
2651
2652         * UserInterface/Models/BreakpointAction.js:
2653         (WebInspector.BreakpointAction):
2654         Getting the next identifier is an action so it should be a function call.
2655
2656         * UserInterface/Views/SourceCodeTextEditor.js:
2657         (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
2658         Remove unused parameter.
2659
2660 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2661
2662         Web Inspector: Dragging to delete a Breakpoint should never trigger a ContentView change
2663         https://bugs.webkit.org/show_bug.cgi?id=163403
2664         <rdar://problem/28762930>
2665
2666         Reviewed by Timothy Hatcher.
2667
2668         * UserInterface/Views/BreakpointTreeElement.js:
2669         (WebInspector.BreakpointTreeElement.prototype.ondelete):
2670         Signal when a breakpoint tree element will be going away because it was
2671         deleted via the keyboard operation within the TreeOutline. This is a dirty
2672         way to do the signal but we remove BreakpointTreeElements asynchronously
2673         when the Breakpoint actually gets removed from the backend.
2674
2675         * UserInterface/Views/DebuggerSidebarPanel.js:
2676         (WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
2677         Deselect a BreakpointTreeElement if it was deleted in a way other then
2678         the delete keyboard shortcut. This ensures another TreeElement selection
2679         doesn't force ContentView changes.
2680
2681 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2682
2683         Web Inspector: Improve debugger highlight when inside of getter/setter calls
2684         https://bugs.webkit.org/show_bug.cgi?id=163428
2685         <rdar://problem/28769061>
2686
2687         Reviewed by Timothy Hatcher.
2688
2689         * UserInterface/Views/SourceCodeTextEditor.js:
2690         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2691         When in the middle of a member expression at a '.' or '[' get the best member
2692         expression range.
2693
2694         * UserInterface/Views/TextEditor.js:
2695         (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
2696         Include the character at the current position. This is useful since AST Nodes
2697         don't give us token info but we would like to know if we are at particular tokens.
2698
2699 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2700
2701         Web Inspector: Unused Breakpoint getter/setter for "id" - should be "identifier"
2702         https://bugs.webkit.org/show_bug.cgi?id=163395
2703
2704         Reviewed by Timothy Hatcher.
2705
2706         * UserInterface/Models/Breakpoint.js:
2707         (WebInspector.Breakpoint.prototype.get identifier): Renamed.
2708         (WebInspector.Breakpoint.prototype.set identifier): Renamed.
2709         The only user is DebuggerManager which sets and gets. Previously
2710         it was unexpectedly setting a direct property on the Breakpoint
2711         instead of using these methods to set the member variable.
2712
2713 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2714
2715         Web Inspector: Remove uses of delete in SourceCodeTextEditor
2716         https://bugs.webkit.org/show_bug.cgi?id=163379
2717
2718         Reviewed by Timothy Hatcher.
2719
2720         Remove uses of delete and better group member variables.
2721         One of the deletes was deleting an incorrect property.
2722
2723         * UserInterface/Views/SourceCodeTextEditor.js:
2724         (WebInspector.SourceCodeTextEditor):
2725         (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
2726         (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
2727         (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
2728         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
2729         (WebInspector.SourceCodeTextEditor.prototype._dismissEditingController):
2730         (WebInspector.SourceCodeTextEditor.prototype.editingControllerDidFinishEditing):
2731
2732 2016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2733
2734         Uncaught Exception: TypeError: this.positionToOffset is not a function - seen hovering expressions with Type Profiler enabled
2735         https://bugs.webkit.org/show_bug.cgi?id=163405
2736         <rdar://problem/28763953>
2737
2738         Reviewed by Matt Baker.
2739
2740         * UserInterface/Views/SourceCodeTextEditor.js:
2741         Use correct method name, the old one must have gone away.
2742
2743 2016-10-12  Joseph Pecoraro  <pecoraro@apple.com>
2744
2745         Web Inspector: Improve support for logging Proxy objects in console
2746         https://bugs.webkit.org/show_bug.cgi?id=163323
2747         <rdar://problem/28432553>
2748
2749         Reviewed by Timothy Hatcher.
2750
2751         * UserInterface/Views/ConsoleMessageView.js:
2752         (WebInspector.ConsoleMessageView.prototype._formatParameter):
2753         Treat a Proxy like any other object.
2754
2755 2016-10-12  Joseph Pecoraro  <pecoraro@apple.com>
2756
2757         Emit DebugHooks uniformly with pause locations instead of having separate pause locations and op_debug emits
2758         https://bugs.webkit.org/show_bug.cgi?id=162809
2759
2760         Reviewed by Geoffrey Garen.
2761
2762         * UserInterface/Views/SourceCodeTextEditor.js:
2763         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2764         When pausing on the variable assignment inside for..of and for..in don't just
2765         highlight "var foo" but include the right hand side "var foo in ..." or
2766         "var foo of ...".
2767
2768 2016-10-12  Joseph Pecoraro  <pecoraro@apple.com>
2769
2770         Web Inspector: Whole program sometimes highlighted instead of just first statement
2771         https://bugs.webkit.org/show_bug.cgi?id=163300
2772         <rdar://problem/28723162>
2773
2774         Reviewed by Timothy Hatcher.
2775
2776         * UserInterface/Views/SourceCodeTextEditor.js:
2777         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2778         Avoid highlighting the entire program by skipping a Program type Node.
2779
2780         * UserInterface/Views/TextEditor.js:
2781         (WebInspector.TextEditor.prototype.setExecutionLineAndColumn):
2782         Avoid unnecessary work before content has loaded.
2783
2784         (WebInspector.TextEditor.prototype.currentPositionToOriginalOffset):
2785         Avoid unnecessary indirection to get the CodeMirror editor.
2786
2787 2016-10-11  Joseph Pecoraro  <pecoraro@apple.com>
2788
2789         Web Inspector: Remove line highlight on primary execution line while stepping because it is distracting
2790         https://bugs.webkit.org/show_bug.cgi?id=163294
2791         <rdar://problem/28721176>
2792
2793         Reviewed by Timothy Hatcher.
2794
2795         * UserInterface/Views/TextEditor.js:
2796         (WebInspector.TextEditor.prototype._updateExecutionLine):
2797         When setting the primary execution line, remove default line highlights.
2798
2799 2016-10-10  Matt Baker  <mattbaker@apple.com>
2800
2801         Web Inspector: Revealed line not highlighted in TextEditor while debugger paused
2802         https://bugs.webkit.org/show_bug.cgi?id=163197
2803
2804         Reviewed by Timothy Hatcher.
2805
2806         * UserInterface/Views/TextEditor.js:
2807         (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
2808         Avoid highlighting the execution line while debugging, but allow
2809         other lines to be highlighted.
2810
2811 2016-10-06  Devin Rousso  <dcrousso+webkit@gmail.com>
2812
2813         Inspector exception in `parseTextForRule()` when pasting into CSS rule selector
2814         https://bugs.webkit.org/show_bug.cgi?id=162792
2815
2816         Reviewed by Matt Baker.
2817
2818         * UserInterface/Views/CSSStyleDeclarationSection.js:
2819         (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
2820         Changed regular expression for matching CSS rules to allow newlines in pasted text.
2821
2822 2016-10-02  Devin Rousso  <dcrousso+webkit@gmail.com>
2823
2824         Web Inspector: Clicking twice on the color swatch square should hide the color picker
2825         https://bugs.webkit.org/show_bug.cgi?id=162759
2826
2827         Reviewed by Matt Baker.
2828
2829         * UserInterface/Views/InlineSwatch.js:
2830         (WebInspector.InlineSwatch):
2831         (WebInspector.InlineSwatch.prototype.didDismissPopover):
2832         (WebInspector.InlineSwatch.prototype._swatchElementClicked):
2833         Remove the "click" event listener when a popover is presented to prevent improper
2834         interaction.  Add the event listener back when the popover is dismissed.
2835
2836 2016-10-02  Matt Baker  <mattbaker@apple.com>
2837
2838         Web Inspector: Exception thrown when hovering network waterfall graphs during reload
2839         https://bugs.webkit.org/show_bug.cgi?id=162850
2840         <rdar://problem/28579653>
2841
2842         Reviewed by Brian Burg.
2843
2844         * UserInterface/Views/ResourceTimelineDataGridNode.js:
2845         (WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
2846         Check that the node's data grid reference is valid before use.
2847         (WebInspector.ResourceTimelineDataGridNode):
2848
2849 2016-10-01  Joseph Pecoraro  <pecoraro@apple.com>
2850
2851         Web Inspector: Selection does not show up over execution highlight ranges
2852         https://bugs.webkit.org/show_bug.cgi?id=162844
2853         <rdar://problem/28579121>
2854
2855         Reviewed by Matt Baker.
2856
2857         * Scripts/update-codemirror-resources.rb:
2858         * UserInterface/External/CodeMirror/mark-selection.js: Added.
2859         * UserInterface/Main.html:
2860         New add-on that makes selection a text marker so it can be styled
2861         at the same level as other text markers.
2862
2863         * UserInterface/Views/TextEditor.css:
2864         (.text-editor > .CodeMirror .execution-range-highlight:not(.CodeMirror-selectedtext)):
2865         Don't use execution-range-highlight styles if the text is selected.
2866
2867         * UserInterface/Views/TextEditor.js:
2868         (WebInspector.TextEditor):
2869         Enable the text selection as text markers addon.
2870
2871 2016-09-30  Joseph Pecoraro  <pecoraro@apple.com>
2872
2873         Web Inspector: Make debugger stepping highlights work in inline <script>s
2874         https://bugs.webkit.org/show_bug.cgi?id=162753
2875         <rdar://problem/28551332>
2876
2877         Reviewed by Brian Burg.
2878
2879         * UserInterface/Models/TextRange.js:
2880         (WebInspector.TextRange.prototype.contains):
2881         Check if a given line/column falls within this range.
2882
2883         * UserInterface/Views/SourceCodeTextEditor.js:
2884         (WebInspector.SourceCodeTextEditor.prototype._getAssociatedScript):
2885         If we are in a Document resource find the associated script at a given position.
2886
2887         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2888         When comparing offsets to SyntaxTree offsets, the SyntaxTree's offset of 0 is the
2889         first character of the Script, which differs from the current SourceCode's offset.
2890         Adjust the offset by the Script's startOffset.
2891
2892         * UserInterface/Views/TextEditor.js:
2893         (WebInspector.TextEditor.prototype.currentPositionToOriginalPosition):
2894         (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
2895         Pass both the original offset and original position to the delegate.
2896
2897 2016-09-30  Joseph Pecoraro  <pecoraro@apple.com>
2898
2899         Web Inspector: Stepping through `a(); b(); c();` it is unclear where we are and what is about to execute
2900         https://bugs.webkit.org/show_bug.cgi?id=161658
2901         <rdar://problem/28181254>
2902
2903         Reviewed by Geoffrey Garen.
2904
2905         * UserInterface/Models/Script.js:
2906         (WebInspector.Script.prototype.requestScriptSyntaxTree):
2907         Fix first calls to requestScriptSyntaxTree. They were getting an uncaught
2908         exception because the content argument was missing.
2909
2910         * UserInterface/Models/ScriptSyntaxTree.js:
2911         (WebInspector.ScriptSyntaxTree.prototype.containersOfOffset):
2912         Find all AST nodes that contain a particular offset.
2913
2914         * UserInterface/Views/SourceCodeTextEditor.js:
2915         (WebInspector.SourceCodeTextEditor):
2916         (WebInspector.SourceCodeTextEditor.prototype.close):
2917         (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
2918         (WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
2919         (WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2920         Provide a good highlight range for a given offset. This is normally the start
2921         of a statement/expression, inside a statement/expression, or the closing brace
2922         of a function (leaving a function). Provide good ranges for each of these.
2923
2924         * UserInterface/Views/TextEditor.js:
2925         (WebInspector.TextEditor):
2926         (WebInspector.TextEditor.set string.update):
2927         (WebInspector.TextEditor.prototype.set string):
2928         (WebInspector.TextEditor.prototype.setExecutionLineAndColumn):
2929         (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
2930         (WebInspector.TextEditor.prototype.revealPosition):
2931         (WebInspector.TextEditor.prototype.currentPositionToOriginalOffset):
2932         (WebInspector.TextEditor.prototype._updateAfterFormatting):
2933         (WebInspector.TextEditor.prototype.set executionLineNumber): Deleted.
2934         (WebInspector.TextEditor.prototype.set executionColumnNumber): Deleted.
2935         (WebInspector.TextEditor.prototype._updateExecutionLine.update): Deleted.
2936         Always set the execution line and column together, to simplify how we update highlights.
2937
2938         (WebInspector.TextEditor.prototype._clearMultilineExecutionLineHighlights):
2939         (WebInspector.TextEditor.prototype._updateExecutionLine):
2940         When updating the main highlight clear any multi-line highlights.
2941
2942         (WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
2943         Ask the delegate for a specific highlight range. If provided use that range,
2944         otherwise just highlight the end of the line. Once we know the range, if it
2945         is multiple lines, give the extra lines the full line highlight as well.
2946         Also make adjustments, such as not highlighting trailing whitespace.
2947
2948         * UserInterface/Views/TextEditor.css:
2949         (.text-editor > .CodeMirror .execution-line.primary .CodeMirror-linenumber::after):
2950         (.text-editor > .CodeMirror .execution-line):
2951         (.text-editor > .CodeMirror .execution-line .CodeMirror-matchingbracket):
2952         (.text-editor > .CodeMirror .execution-range-highlight):
2953         Styles for execution lines and execution range highlights.
2954
2955 2016-09-29  Aaron Chu  <aaron_chu@apple.com>
2956
2957         Web Inspector: AXI: linkified refs to #document and #text are not usually navigable nodes; consider delinkifying them
2958         https://bugs.webkit.org/show_bug.cgi?id=130600
2959         <rdar://problem/16391333>
2960
2961         Reviewed by Brian Burg.
2962
2963         Removing link style for non-navigable nodes by first
2964         checking nodeType of the node.
2965
2966         * UserInterface/Base/DOMUtilities.js:
2967         (WebInspector.linkifyNodeReference):
2968
2969 2016-09-27  Matt Baker  <mattbaker@apple.com>
2970
2971         Web Inspector: Refreshing while in Timelines-tab causes negative timestamps in Network-tab
2972         https://bugs.webkit.org/show_bug.cgi?id=160051
2973         <rdar://problem/27480122>
2974
2975         Reviewed by Brian Burg.
2976
2977         * UserInterface/Views/NetworkGridContentView.js:
2978         (WebInspector.NetworkGridContentView.prototype.get startTime):
2979         (WebInspector.NetworkGridContentView.prototype.get zeroTime):
2980         Use the cached start time for graph data source properties instead of
2981         relying on the ruler, which requires a layout in order to be updated
2982         for the first time.
2983
2984 2016-09-27  Matt Baker  <mattbaker@apple.com>
2985
2986         Web Inspector: Unfocusing / Focusing inspector window should not change ContentView
2987         https://bugs.webkit.org/show_bug.cgi?id=162572
2988         <rdar://problem/28479562>
2989
2990         Reviewed by Brian Burg.
2991
2992         Improve NavigationSidebarPanel logic for coordinating selection between trees.
2993         When tree selection changes, the most recent selection should be restored
2994         the next time the tree is focused.
2995
2996         The sidebar should also handle focusing a tree for the first time, in
2997         which no previous selection exists, and focusing a tree that has had its
2998         previous selection filtered out (hidden).
2999
3000         * UserInterface/Views/NavigationSidebarPanel.js:
3001         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineDidFocus):
3002         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange):
3003         Restoring the last deselected element, instead of the last selected element
3004         only works when the selection is moving from one tree to another. When
3005         the elements belong to the same tree the newly selected element won't
3006         be saved until the next selection change. If the window loses and regains
3007         the focus before then, the tree will restore the previous selection,
3008         effectively reverting the last selection change.
3009
3010 2016-09-27  Tomas Popela  <tpopela@redhat.com>
3011
3012         [GTK] Mac defaults are used for key shortcuts on Linux
3013         https://bugs.webkit.org/show_bug.cgi?id=162564
3014
3015         Don't set Mac's default keymap as a fallthrough for CodeMirror when we
3016         are not on Mac.
3017
3018         Reviewed by Carlos Garcia Campos.
3019
3020         * UserInterface/Test.html: Include Platform.js for the
3021         WebInspector.Platform definition.
3022         * UserInterface/Views/CodeMirrorAdditions.js:
3023
3024 2016-09-26  Matt Baker  <mattbaker@apple.com>
3025
3026         Web Inspector: Box Model values not updated when DOM node styles change
3027         https://bugs.webkit.org/show_bug.cgi?id=162525
3028
3029         Reviewed by Brian Burg.
3030
3031         The Box Model section should refresh itself when the selected node's
3032         computed style changes. This is necessary since the Styles sidebar
3033         doesn't always refresh its sections on node changes.
3034
3035         * UserInterface/Views/BoxModelDetailsSectionRow.js:
3036         (WebInspector.BoxModelDetailsSectionRow.prototype.set nodeStyles):
3037         Refresh metrics whenever the computed style changes.
3038
3039         (WebInspector.BoxModelDetailsSectionRow.prototype._getBox):
3040         (WebInspector.BoxModelDetailsSectionRow.prototype._getComponentSuffix):
3041         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createValueElement):
3042         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
3043         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
3044         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
3045         Drive-by cleanup to make this large function easier to read.
3046         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement): Deleted.
3047         Renamed createValueElement.
3048         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement): Deleted.
3049         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement): Deleted.
3050         Combined these into a single function taking a property name (width or height).
3051
3052 == Rolled over to ChangeLog-2016-09-26 ==