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