Web Inspector: provide a way to view XML/HTML/SVG resource responses as a DOM tree
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-09-03  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: provide a way to view XML/HTML/SVG resource responses as a DOM tree
4         https://bugs.webkit.org/show_bug.cgi?id=201046
5         <rdar://problem/54446087>
6
7         Reviewed by Joseph Pecoraro.
8
9         * UserInterface/Views/ResourceClusterContentView.js:
10         (WI.ResourceClusterContentView):
11         (WI.ResourceClusterContentView.prototype.showRequest):
12         (WI.ResourceClusterContentView.prototype.showResponse):
13         (WI.ResourceClusterContentView.prototype.get customRequestDOMContentView): Added.
14         (WI.ResourceClusterContentView.prototype.get customRequestJSONContentView): Added.
15         (WI.ResourceClusterContentView.prototype.get customResponseDOMContentView): Added.
16         (WI.ResourceClusterContentView.prototype.get customResponseJSONContentView): Added.
17         (WI.ResourceClusterContentView.prototype.get customResponseTextContentView): Added.
18         (WI.ResourceClusterContentView.prototype._createPathComponent): Added.
19         (WI.ResourceClusterContentView.prototype._canShowCustomRequestContentView):
20         (WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
21         (WI.ResourceClusterContentView.prototype._contentViewForResourceType):
22         (WI.ResourceClusterContentView.prototype._pathComponentForContentView):
23         (WI.ResourceClusterContentView.prototype._identifierForContentView):
24         (WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
25         (WI.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
26         (WI.ResourceClusterContentView.prototype._canUseDOMContentViewForContent): Added.
27         (WI.ResourceClusterContentView.prototype._normalizeMIMETypeForDOM): Added.
28         (WI.ResourceClusterContentView.prototype._tryEnableCustomRequestContentViews): Added.
29         (WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentViews): Added.
30         (WI.ResourceClusterContentView.createPathComponent): Deleted.
31         (WI.ResourceClusterContentView.prototype._tryEnableCustomRequestContentView): Deleted.
32         (WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView): Deleted.
33         * UserInterface/Base/Main.js:
34         (WI.showResourceRequest):
35         * UserInterface/Views/PathComponentIcons.css:
36         (.object-icon .icon): Added.
37         * UserInterface/Main.html:
38         * UserInterface/Views/SVGImageResourceClusterContentView.js: Removed.
39         Reworked to allow more than one custom request/response content view at the same time. As
40         such, merge the `WI.SVGImageResourceClusterContentView` into this class.
41
42         * UserInterface/Views/LocalRemoteObjectContentView.js: Added.
43         (WI.LocalRemoteObjectContentView):
44         (WI.LocalRemoteObjectContentView.prototype.get expression):
45         (WI.LocalRemoteObjectContentView.prototype.renderRemoteObject):
46         (WI.LocalRemoteObjectContentView.prototype.initialLayout):
47         (WI.LocalRemoteObjectContentView.prototype.attached):
48         (WI.LocalRemoteObjectContentView.prototype.closed):
49         * UserInterface/Views/LocalRemoteObjectContentView.css: Added.
50         (.content-view.local-remote-object):
51         * UserInterface/Views/LocalDOMContentView.js: Added.
52         (WI.LocalDOMContentView):
53         (WI.LocalDOMContentView.prototype.get expression):
54         (WI.LocalDOMContentView.prototype.renderRemoteObject):
55         * UserInterface/Views/LocalJSONContentView.js: Added.
56         (WI.LocalJSONContentView):
57         (WI.LocalJSONContentView.prototype.get expression):
58         (WI.LocalJSONContentView.prototype.renderRemoteObject):
59         * UserInterface/Views/JSONContentView.js: Removed.
60         * UserInterface/Views/JSONContentView.css: Removed.
61         Rework `WI.JSONContentView` into a more generic set of classes that render an object we send
62         to the inspected page for instrumentation.
63
64         * UserInterface/Views/DOMTreeOutline.js:
65         (WI.DOMTreeOutline.prototype.populateContextMenu):
66         (WI.DOMTreeOutline.prototype._onmousemove):
67         (WI.DOMTreeOutline.prototype._onmouseout):
68         (WI.DOMTreeOutline.prototype._ondragstart):
69         (WI.DOMTreeOutline.prototype._ondragover):
70         (WI.DOMTreeOutline.prototype._ondragleave):
71         (WI.DOMTreeOutline.prototype._ondragend):
72         (WI.DOMTreeOutline.prototype._hideElements):
73         * UserInterface/Views/DOMTreeElement.js:
74         (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
75         * UserInterface/Views/ContextMenuUtilities.js:
76         (WI.appendContextMenuItemsForDOMNode):
77         Ensure that interactions that would modify the DOM tree only happen when editable. If the
78         `WI.DOMTreeOutline` represents a "local" `WI.DOMNode` (one that's been sent to the inspected
79         page for instrumentation, and shouldn't be part of the main #document), don't allow any
80         editing actions to be performed.
81
82         * UserInterface/Views/TextContentView.js:
83         (WI.TextContentView):
84         Allow a `representedObject` object to be provided and used instead of the given `string`.
85
86         * Localizations/en.lproj/localizedStrings.js:
87         * UserInterface/Images/Object.svg: Added.
88
89 2019-09-03  Devin Rousso  <drousso@apple.com>
90
91         Web Inspector: implement blackboxing of script resources
92         https://bugs.webkit.org/show_bug.cgi?id=17240
93         <rdar://problem/5732847>
94
95         Reviewed by Joseph Pecoraro.
96
97         When a script is blackboxed and the debugger attempts to pause in that script, the pause
98         reason/data will be saved and execution will continue until it has left the blackboxed
99         script. Once outside, execution is paused with the saved reason/data.
100
101         This is especially useful when debugging issues using libraries/frameworks, as it allows the
102         developer to "skip" the internal logic of the library/framework and instead focus only on
103         how they're using it.
104
105         * UserInterface/Controllers/DebuggerManager.js:
106         (WI.DebuggerManager):
107         (WI.DebuggerManager.prototype.initializeTarget):
108         (WI.DebuggerManager.supportsBlackboxingScripts): Added.
109         (WI.DebuggerManager.pauseReasonFromPayload): Added.
110         (WI.DebuggerManager.prototype.isScriptBlackboxed): Added.
111         (WI.DebuggerManager.prototype.setShouldBlackboxScript): Added.
112         (WI.DebuggerManager.prototype._pauseReasonFromPayload):
113         (WI.DebuggerManager.prototype._pauseReasonFromPayload): Deleted.
114
115         * UserInterface/Models/SourceCode.js:
116         (WI.SourceCode.prototype.get isScript): Added.
117         (WI.SourceCode.prototype.get supportsScriptBlackboxing): Added.
118         * UserInterface/Models/Script.js:
119         (WI.Script.prototype.get isScript): Added.
120         * UserInterface/Models/Resource.js:
121         (WI.Resource.prototype.get isScript): Added.
122         Provide a more straightforward way of determining if a `WI.SourceCode` is a script.
123
124         * UserInterface/Views/DebuggerSidebarPanel.js:
125         (WI.DebuggerSidebarPanel.prototype._updatePauseReason):
126         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
127         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
128         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
129         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
130         Display the original pause reason and breakpoint (if applicable) when pausing after leaving
131         a blackboxed script.
132
133         * UserInterface/Views/SourceCodeTreeElement.js:
134         (WI.SourceCodeTreeElement.prototype.canSelectOnMouseDown): Added.
135         (WI.SourceCodeTreeElement.prototype.updateStatus): Added.
136         (WI.SourceCodeTreeElement.prototype._updateSourceCode):
137         (WI.SourceCodeTreeElement.prototype._updateToggleBlackboxImageElementState): Added.
138         (WI.SourceCodeTreeElement.prototype._handleToggleBlackboxedImageElementClick): Added.
139         * UserInterface/Views/SourceCodeTreeElement.css: Added.
140         (.tree-outline .item .status > .toggle-script-blackboxed):
141         (.tree-outline:not(.navigation-sidebar-panel-content-tree-outline) .item .status > .toggle-script-blackboxed,):
142         (.tree-outline:focus .item.selected .status > .toggle-script-blackboxed):
143         (.tree-outline .item .status > .toggle-script-blackboxed.blackboxed):
144         (@media (prefers-color-scheme: dark) .tree-outline .item .status > .toggle-script-blackboxed):
145
146         * UserInterface/Views/ResourceTreeElement.js:
147         (WI.ResourceTreeElement.prototype._updateResource):
148         (WI.ResourceTreeElement.prototype.updateStatus): Added.
149         (WI.ResourceTreeElement.prototype._updateStatus): Deleted.
150         Make sure that the loading indicator doesn't override the blackbox toggle.
151
152         * UserInterface/Base/Setting.js:
153         (WI.Setting.prototype.set value):
154         (WI.Setting.prototype.save): Added.
155         When modifying an array value, that doesn't go through `WI.Setting.prototype.set value`, so
156         we need a more "manual" way of saving the new value.
157
158         * UserInterface/Main.html:
159         * Localizations/en.lproj/localizedStrings.js:
160
161         * UserInterface/Test/TestHarness.js:
162         (TestHarness.prototype.newline): Added.
163         (TestHarness.prototype.expectException):
164         Add a special case for logging error message objects when running protocol tests.
165
166 2019-08-29  Keith Rollin  <krollin@apple.com>
167
168         Update .xcconfig symbols to reflect the current set of past and future product versions.
169         https://bugs.webkit.org/show_bug.cgi?id=200720
170         <rdar://problem/54305032>
171
172         Reviewed by Alex Christensen.
173
174         Remove version symbols related to old OS's we no longer support,
175         ensure that version symbols are defined for OS's we do support.
176
177         * Configurations/Base.xcconfig:
178         * Configurations/DebugRelease.xcconfig:
179         * Configurations/Version.xcconfig:
180
181 2019-08-29  Devin Rousso  <drousso@apple.com>
182
183         Web Inspector: DOMDebugger: support event breakpoints in Worker contexts
184         https://bugs.webkit.org/show_bug.cgi?id=200651
185
186         Reviewed by Joseph Pecoraro.
187
188         * UserInterface/Controllers/DOMDebuggerManager.js:
189         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
190         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
191         Add assertions when adding/removing DOM breakpoints or animation frame event breakpoints if
192         the target is a `WI.WorkerTarget`, as neither are supported by `Worker`s.
193
194 2019-08-29  Devin Rousso  <drousso@apple.com>
195
196         Web Inspector: replace uses of `Array.prototype.concat` with `Array.prototype.push`
197         https://bugs.webkit.org/show_bug.cgi?id=201082
198
199         Reviewed by Joseph Pecoraro.
200
201         `x = x.concat(y)` is very slow, as `x` has to be fully copied in order to add `y` to it.
202         Introduce `Array.prototype.pushIterable`, which iterates the given `iterable` and adds each
203         item to the `this` array.
204
205         * UserInterface/Controllers/DOMDebuggerManager.js:
206         (WI.DOMDebuggerManager.prototype.get domBreakpoints):
207         (WI.DOMDebuggerManager.prototype.domBreakpointsInSubtree):
208         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
209         (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
210         * UserInterface/Models/CSSCompletions.js:
211         (WI.CSSCompletions):
212         * UserInterface/Models/CSSKeywordCompletions.js:
213         (WI.CSSKeywordCompletions.forProperty):
214         (WI.CSSKeywordCompletions.forProperty.addKeywordsForName):
215         (WI.CSSKeywordCompletions.forFunction):
216         * UserInterface/Models/Canvas.js:
217         (WI.Canvas.prototype.recordingProgress):
218         * UserInterface/Models/DOMNodeStyles.js:
219         (WI.DOMNodeStyles.prototype._updateStyleCascade):
220         (WI.DOMNodeStyles.prototype._collectStylesInCascadeOrder):
221         * UserInterface/Models/TimelineRecording.js:
222         (WI.TimelineRecording.prototype.get sourceCodeTimelines):
223         (WI.TimelineRecording.prototype.initializeCallingContextTrees):
224         * UserInterface/Protocol/RemoteObject.js:
225         (WI.RemoteObject.prototype._getPropertyDescriptorsResolver):
226         * UserInterface/Views/ConsoleMessageView.js:
227         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
228         * UserInterface/Views/ContentBrowser.js:
229         (WI.ContentBrowser.prototype.get currentRepresentedObjects):
230         * UserInterface/Views/DOMTreeElement.js:
231         (WI.DOMTreeElement.prototype._visibleChildren):
232         * UserInterface/Views/DataGridNode.js:
233         (WI.DataGridNode.prototype.get filterableData):
234         * UserInterface/Views/HeapAllocationsTimelineView.js:
235         (WI.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
236         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
237         (WI.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData.processEntries):
238         * UserInterface/Views/NavigationItem.js:
239         (WI.NavigationItem.prototype.get _classNames):
240         * UserInterface/Views/ObjectTreeView.js:
241         (WI.ObjectTreeView.prototype._updateProperties):
242         * UserInterface/Views/OpenResourceDialog.js:
243         (WI.OpenResourceDialog.prototype._addResourcesForFrame):
244         * UserInterface/Views/OverviewTimelineView.js:
245         (WI.OverviewTimelineView.prototype._loadExistingRecords):
246         * UserInterface/Views/ResourceCollectionContentView.js:
247         (WI.ResourceCollectionContentView.prototype.get navigationItems):
248         * UserInterface/Views/ResourceHeadersContentView.js:
249         (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
250         * UserInterface/Views/ResourceSecurityContentView.js:
251         (WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
252         * UserInterface/Views/ScriptClusterTimelineView.js:
253         (WI.ScriptClusterTimelineView.prototype.get selectionPathComponents):
254         * UserInterface/Views/ScrubberNavigationItem.js:
255         (WI.ScrubberNavigationItem.prototype.get additionalClassNames):
256         * UserInterface/Views/SpreadsheetStyleProperty.js:
257         (WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
258         (WI.SpreadsheetStyleProperty.prototype._addColorTokens.pushPossibleColorToken):
259         (WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
260         (WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
261         * UserInterface/Views/TreeOutline.js:
262         (WI.TreeOutline.prototype.selfOrDescendant):
263         * UserInterface/Views/View.js:
264         (WI.View._visitViewTreeForLayout):
265
266 2019-08-29  Devin Rousso  <drousso@apple.com>
267
268         Web Inspector: REGRESSION (r248873): Debugger: pressing delete on a breakpoint will also delete any resource/element parent immediately before it in the list
269         https://bugs.webkit.org/show_bug.cgi?id=200939
270
271         Reviewed by Joseph Pecoraro.
272
273         * UserInterface/Views/DebuggerSidebarPanel.js:
274         (WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
275         (WI.DebuggerSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
276         (WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement.checkIfSelectionAdjustmentNeeded): Deleted.
277         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
278         (WI.SourcesNavigationSidebarPanel):
279         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
280         (WI.SourcesNavigationSidebarPanel.this._breakpointsTreeOutline.ondelete.checkIfSelectionAdjustmentNeeded): Deleted.
281         When the `WI.TreeOutline`'s own `ondelete` is called, that means we must be handling a
282         delete that was _not_ handled by a `WI.TreeElement`. This means that the `selectedTreeElement`
283         has to be a resource/script, the `window` object, or one of the non-deletable breakpoints.
284
285         In the case of a non-deletable breakpoint, since they're never removed from their parent
286         `WI.TreeOutline`, we just shift the selection to the next selectable `WI.TreeElement`.
287
288         Otherwise, wait for the `WI.TreeOutline.Event.ElementRemoved` event to be fired, and adjust
289         the selection then based on whether the new `selectedTreeElement` is one of the "top" items,
290         namely the "All Exceptions", "Uncaught Exceptions", and "Assertion Failures" breakpoints.
291
292         * UserInterface/Views/BreakpointTreeElement.js:
293         (WI.BreakpointTreeElement.prototype.ondelete):
294         * UserInterface/Views/DOMBreakpointTreeElement.js:
295         (WI.DOMBreakpointTreeElement.prototype.ondelete):
296         * UserInterface/Views/DOMNodeTreeElement.js:
297         (WI.DOMNodeTreeElement.prototype.ondelete):
298         * UserInterface/Views/EventBreakpointTreeElement.js:
299         (WI.EventBreakpointTreeElement.prototype.ondelete):
300         * UserInterface/Views/URLBreakpointTreeElement.js:
301         (WI.URLBreakpointTreeElement.prototype.ondelete):
302         Add `return true;` to let the parent `WI.TreeOutline` know that the delete event was handled.
303         This prevents the parent `WI.TreeOutline`'s own `ondelete` from being called, which would
304         cause a double-delete as there would be a different `selectedTreeElement`.
305
306 2019-08-29  Keith Rollin  <krollin@apple.com>
307
308         Remove support for macOS < 10.13 (part 3)
309         https://bugs.webkit.org/show_bug.cgi?id=201224
310         <rdar://problem/54795934>
311
312         Reviewed by Darin Adler.
313
314         Remove symbols in WebKitTargetConditionals.xcconfig related to macOS
315         10.13, including WK_MACOS_1013 and WK_MACOS_BEFORE_1013, and suffixes
316         like _MACOS_SINCE_1013.
317
318         Also added some macOS target numbers.
319
320         * Configurations/WebKitTargetConditionals.xcconfig:
321
322 2019-08-29  Joseph Pecoraro  <pecoraro@apple.com>
323
324         Web Inspector: Import file pickers sometimes do not import
325         https://bugs.webkit.org/show_bug.cgi?id=201290
326         <rdar://problem/54826117>
327
328         Reviewed by Devin Rousso.
329
330         * UserInterface/Base/FileUtilities.js:
331         (WI.FileUtilities.importText):
332         (WI.FileUtilities.importJSON):
333         Keep the input element alive so it doesn't get garbage collected,
334         which makes the file chooser do nothing.
335
336         (WI.FileUtilities.save):
337         (WI.FileUtilities.async.readText):
338         Place read operations after event handlers are setup in case the
339         read operations can happen synchronously and events may not fire.
340
341 2019-08-28  Devin Rousso  <drousso@apple.com>
342
343         Web Inspector: REGRESSION(r249078): JavaScript autocomplete doesn't work when evaluating properties of values
344         https://bugs.webkit.org/show_bug.cgi?id=201226
345
346         Reviewed by Joseph Pecoraro.
347
348         r249078 modified `WI.JavaScriptRuntimeCompletionProvider` to use arrays of property names
349         instead of objects for completion, but a few code paths were missed.
350
351         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
352         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
353         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNamesFromEvaluate):
354         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedObjectPropertyNames): Added.
355         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedArrayPropertyNames):
356
357         * UserInterface/Models/CallFrame.js:
358         (WI.CallFrame.prototype.collectScopeChainVariableNames):
359         (WI.CallFrame.prototype.collectScopeChainVariableNames.propertiesCollected):
360
361 2019-08-27  Devin Rousso  <drousso@apple.com>
362
363         Web Inspector: replace uses of added utility `Array.prototype.keySet` with an actual `Set`
364         https://bugs.webkit.org/show_bug.cgi?id=201194
365
366         Reviewed by Ross Kirsling.
367
368         They both have basically the same functionality, with one difference being that a `Set` can
369         work with arrays that have non-string values.
370
371         * UserInterface/Base/Utilities.js:
372         (Array.prototype.keySet): Deleted.
373         * UserInterface/Controllers/CodeMirrorCompletionController.js:
374         (WI.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
375         (WI.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchKeywords):
376         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
377         (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
378
379 2019-08-27  Devin Rousso  <drousso@apple.com>
380
381         Web Inspector: change the styling of the special log "bubble" to match WI.ScopeBar
382         https://bugs.webkit.org/show_bug.cgi?id=201152
383
384         Reviewed by Joseph Pecoraro.
385
386         * UserInterface/Views/ConsoleMessageView.css:
387         (.console-user-command.special-user-log > .console-message-body):
388
389 2019-08-26  Devin Rousso  <drousso@apple.com>
390
391         Web Inspector: decrease horizontal padding of `WI.ScopeBar` to have more room
392         https://bugs.webkit.org/show_bug.cgi?id=201090
393
394         Reviewed by Joseph Pecoraro.
395
396         There's a lot of "wasted" padding space around each item that we could reuse (or "move") for
397         other navigation items.
398
399         * UserInterface/Views/FilterBar.css:
400         (.filter-bar > .navigation-bar > .item.scope-bar):
401         * UserInterface/Views/RadioButtonNavigationItem.css:
402         (.navigation-bar .item.radio.button.text-only):
403         * UserInterface/Views/ScopeBar.css:
404         (.scope-bar):
405         (body[dir=ltr] .scope-bar > li.multiple > select):
406         (body[dir=rtl] .scope-bar > li.multiple > select):
407         (.scope-bar > li.multiple > .arrows):
408
409         * UserInterface/Views/RadioButtonNavigationItem.js:
410         (WI.RadioButtonNavigationItem):
411         (WI.RadioButtonNavigationItem.prototype.update): Deleted.
412         There's no reason to forcibly set the `min-width` since all instances are just text.
413
414         * UserInterface/Views/AuditTestGroupContentView.js:
415         (WI.AuditTestGroupContentView.prototype.initialLayout):
416         * UserInterface/Views/AuditTestGroupContentView.css:
417         (.content-view.audit-test-group > header > nav:not(:empty):before): Deleted.
418         Remove the unnecessary "Showing: " prefix before the `WI.ScopeBar`.
419
420         * UserInterface/Views/ScopeRadioButtonNavigationItem.js: Removed.
421         * UserInterface/Views/ScopeRadioButtonNavigationItem.css: Removed.
422         These classes were never used.
423
424         * Localizations/en.lproj/localizedStrings.js:
425
426 2019-08-24  Devin Rousso  <drousso@apple.com>
427
428         Web Inspector: "Copy Rule" menu item does not propagate comments properly
429         https://bugs.webkit.org/show_bug.cgi?id=201095
430
431         Reviewed by Joseph Pecoraro.
432
433         * UserInterface/Models/CSSProperty.js:
434         (WI.CSSProperty.prototype.commentOut):
435         (WI.CSSProperty.prototype.get formattedText):
436         Wrap the `text` in `/* ${text} */` if the `WI.CSSProperty` isn't `enabled` (e.g. commented out).
437
438 2019-08-23  Devin Rousso  <drousso@apple.com>
439
440         Web Inspector: create additional command line api functions for other console methods
441         https://bugs.webkit.org/show_bug.cgi?id=200971
442
443         Reviewed by Joseph Pecoraro.
444
445         Expose all `console.*` functions in the command line API, since they're all already able to
446         be referenced via the `console` object.
447
448         Provide a simpler interface for other injected scripts to modify the command line API.
449
450         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
451         (WI.JavaScriptRuntimeCompletionProvider.prototype.get _commandLineAPIKeys): Added.
452         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.updateLastPropertyNames):
453         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):
454
455 2019-08-23  Devin Rousso  <drousso@apple.com>
456
457         Web Inspector: transparency checkerboard is too bright in dark mode
458         https://bugs.webkit.org/show_bug.cgi?id=201067
459
460         Reviewed by Joseph Pecoraro.
461
462         * UserInterface/Views/Main.css:
463         (@media (prefers-color-scheme: dark) :matches(img, canvas).show-grid):
464         * UserInterface/Views/ConsoleMessageView.css:
465         (.console-message-body > .show-grid):
466
467 2019-08-22  Devin Rousso  <drousso@apple.com>
468
469         Web Inspector: Console: automatically select the "Evaluations" filter whenever running commands
470         https://bugs.webkit.org/show_bug.cgi?id=201060
471
472         Reviewed by Timothy Hatcher.
473
474         If the Console is actively being filtered (e.g. not "All"), it can be confusing to run a
475         command, only to not see any results. We should automatically enable the "Evaluations"
476         filter in addition to any other existing filters in these cases.
477
478         * UserInterface/Views/LogContentView.js:
479         (WI.LogContentView.prototype.didAppendConsoleMessageView):
480         * UserInterface/Views/ScopeBarItem.js:
481         (WI.ScopeBarItem.prototype.set selected):
482         (WI.ScopeBarItem.prototype.toggle): Added.
483
484 2019-08-22  Devin Rousso  <drousso@apple.com>
485
486         Web Inspector: REGRESSION(r248485): stack overflow when viewing a source map generated from inline content
487         https://bugs.webkit.org/show_bug.cgi?id=201042
488         <rdar://problem/54509750>
489
490         Reviewed by Antoine Quint.
491
492         In r248485, `WI.ResourceClusterContentView` was changed to `requestContent` whenever the
493         given resource finished loading (by listening for `WI.Resource.Event.LoadingDidFinish`).
494
495         Even though retrieving a source map's contents uses `Promise`s, in the case that the content
496         was inlined in the "original" source code, the code path would mark the source map as being
497         finished (which would fire a `WI.Resource.Event.LoadingDidFinish`) _before_ it could return
498         a `Promise`, which would've been cached (`WI.SourceCode.prototype.requestContent`) and
499         preventend any reentrancy.
500
501         Wrapping the inline code path in a `Promise.resolve()` gives the `WI.SourceCode` a chance to
502         cache the `Promise` before any events are fired.
503
504         * UserInterface/Models/SourceMapResource.js:
505         (WI.SourceMapResource.prototype.requestContentFromBackend):
506
507 2019-08-22  Nikita Vasilyev  <nvasilyev@apple.com>
508
509         Web Inspector: console.dir should expand objects
510         https://bugs.webkit.org/show_bug.cgi?id=152039
511         <rdar://problem/23816853>
512
513         Reviewed by Joseph Pecoraro.
514
515         Expand objects logged by console.dir but keep them collapsed when logged by console.log.
516
517         * UserInterface/Views/ConsoleMessageView.js:
518         (WI.ConsoleMessageView.prototype.render):
519
520 2019-08-22  Joseph Pecoraro  <pecoraro@apple.com>
521
522         Web Inspector: Cleanup some unused code
523         https://bugs.webkit.org/show_bug.cgi?id=201041
524
525         Reviewed by Alex Christensen.
526
527         * UserInterface/Views/CPUUsageCombinedView.css:
528         (.cpu-usage-combined-view > .graph > .stacked-area-chart):
529         * UserInterface/Views/CPUUsageCombinedView.js:
530         (WI.CPUUsageCombinedView):
531         * UserInterface/Views/MediaTimelineOverviewGraph.js:
532         (WI.MediaTimelineOverviewGraph):
533
534 2019-08-22  Joseph Pecoraro  <pecoraro@apple.com>
535
536         Web Inspector: Provide an engineering option to log protocol traffic as text
537         https://bugs.webkit.org/show_bug.cgi?id=200969
538
539         Reviewed by Devin Rousso.
540
541         * UserInterface/Base/Setting.js:
542         * UserInterface/Protocol/LoggingProtocolTracer.js:
543         (WI.LoggingProtocolTracer.prototype._processEntry):
544         (WI.LoggingProtocolTracer):
545         * UserInterface/Views/SettingsTabContentView.js:
546         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
547
548 2019-08-21  Nikita Vasilyev  <nvasilyev@apple.com>
549
550         Web Inspector: RTL: DOM outline in Elements tab should be LTR
551         https://bugs.webkit.org/show_bug.cgi?id=200601
552
553         Reviewed by Timothy Hatcher.
554
555         Make DOM outlines in Console and Elements tab always LTR,
556         and unsure that Left and Right arrow keys continue working correctly.
557
558         * UserInterface/Base/Main.js:
559         (WI.resolveLayoutDirectionForElement): Added.
560         The existing WI.resolvedLayoutDirection function returns the value of the root DOM element.
561         The newly added resolveLayoutDirectionForElement function returns the correct value for any element,
562         including elements with `dir=ltr` inside of `<body dir=rtl>`.
563
564         * UserInterface/Views/DOMTreeOutline.css:
565         (.tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
566         (.tree-outline.dom li:not(.editing)):
567         (.tree-outline.dom li.editing):
568         (.tree-outline.dom li .pseudo-class-indicator):
569         (.tree-outline.dom.single-node li):
570         (.tree-outline.dom li.parent):
571         (.tree-outline.dom li .html-tag.close):
572         (.tree-outline.dom li.parent::before):
573         (.tree-outline.dom li.parent.shadow::after):
574         Remove RTL logic.
575
576         * UserInterface/Views/DOMTreeOutline.js:
577         * UserInterface/Views/TreeOutline.js:
578         (WI.TreeOutline.prototype._treeKeyDown):
579         Make Left and Right arrow keys work correctly for LTR DOM outlines inside of the global RTL.
580
581 2019-08-21  Devin Rousso  <drousso@apple.com>
582
583         Web Inspector: Page: re-add enable/disable after r248454
584         https://bugs.webkit.org/show_bug.cgi?id=200947
585
586         Reviewed by Joseph Pecoraro.
587
588         We shouldn't design the agent system with only Web Inspector in mind. Other clients may want
589         to have different functionality, not being told about frames creation/updates/destruction.
590         In these cases, we should have graceful error message failures for other agents that rely on
591         the Page agent.
592
593         * UserInterface/Controllers/NetworkManager.js:
594         (WI.NetworkManager.prototype.initializeTarget):
595
596 2019-08-21  Devin Rousso  <drousso@apple.com>
597
598         Web Inspector: Sources: increase the filter bar's width when it's focused if a resource type filter is active
599         https://bugs.webkit.org/show_bug.cgi?id=200940
600
601         Reviewed by Joseph Pecoraro.
602
603         * UserInterface/Views/FilterBar.js:
604         (WI.FilterBar.prototype._handleFilterChanged):
605         (WI.FilterBar.prototype.get indicatingProgress): Deleted.
606         (WI.FilterBar.prototype.set indicatingProgress): Deleted.
607         (WI.FilterBar.prototype.get indicatingActive): Deleted.
608         (WI.FilterBar.prototype.set indicatingActive): Deleted.
609         If escape is pressed when the <input> is empty, unfocus (blur) the <input>.
610         Drive-by: remove unused/unnecessary functions.
611
612         * UserInterface/Views/FilterBar.css:
613         (.filter-bar > input[type="search"]):
614         (:matches(.filter-bar, .search-bar) > input[type="search"]): Added.
615         (:matches(.filter-bar, .search-bar) > input[type="search"]:matches(:focus, :not(:placeholder-shown))): Added.
616         (:matches(.filter-bar, .search-bar) > input[type="search"]::-webkit-search-decoration): Added.
617         (:matches(.filter-bar, .search-bar) > input[type="search"]::-webkit-search-results-button): Added.
618         (:matches(.filter-bar, .search-bar) > input[type="search"]::placeholder): Added.
619         (:matches(.filter-bar, .search-bar) > input[type="search"]:matches(:not(:focus), :placeholder-shown)::-webkit-search-cancel-button): Added.
620         (:matches(.filter-bar, .search-bar) > .navigation-bar + input[type="search"]): Added.
621         (:matches(.filter-bar, .search-bar) > input[type="search"]:focus): Added.
622         (:matches(.filter-bar, .search-bar) > input[type="search"] + :empty): Added.
623         (:matches(.filter-bar, .search-bar) > input[type="search"]:focus ~ *): Added.
624         (:matches(.filter-bar, .search-bar) > input[type="search"] + .navigation-bar > .item.scope-bar:last-child): Added.
625         (.filter-bar > input[type="search"] + .navigation-bar > .item.scope-bar:last-child): Deleted.
626         (.filter-bar > .navigation-bar + input[type="search"]): Deleted.
627         (.filter-bar > input[type="search"]::placeholder): Deleted.
628         (.filter-bar > input[type="search"]:focus): Deleted.
629         (.filter-bar > input[type="search"]::-webkit-search-decoration): Deleted.
630         (.filter-bar.active > input[type="search"]::-webkit-search-decoration): Deleted.
631         (.filter-bar.indicating-progress > input[type="search"]::-webkit-search-decoration): Deleted.
632         (.filter-bar > input[type="search"] + .navigation-bar:empty): Deleted.
633         When the <input> is `:focus`, hide the following `WI.NavigationBar` (if it's being used) so
634         that there's more room to show the filter text.
635         Drive-by: fix background, border, and text color styling when `:focus`.
636
637         * UserInterface/Views/SearchBar.css:
638         (.search-bar > input[type="search"]):
639         (.search-bar > input[type="search"]::placeholder): Deleted.
640         (.search-bar > input[type="search"]:focus): Deleted.
641         (.search-bar > input[type="search"]:not(:placeholder-shown)): Deleted.
642         (.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Deleted.
643         (@media (prefers-color-scheme: dark)): Deleted.
644         (:matches(.search-bar, .filter-bar) > input[type="search"],): Deleted.
645         (:matches(.search-bar, .filter-bar) > input[type="search"]::placeholder): Deleted.
646         (:matches(.search-bar, .filter-bar) > input[type="search"]:focus): Deleted.
647         * UserInterface/Views/SearchSidebarPanel.css:
648         (.sidebar > .panel.navigation.search > .search-bar):
649         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
650         (.sidebar > .panel.navigation.search > .search-bar > .search-settings): Added.
651         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]::-webkit-search-results-button): Deleted.
652         * UserInterface/Views/Toolbar.css:
653         (.toolbar .search-bar > input[type="search"]::-webkit-textfield-decoration-container): Deleted.
654         Move shared styles to FilterBar.css as `WI.FilterBar` are more common.
655
656         * UserInterface/Views/Variables.css:
657         (:root):
658         (@media (prefers-color-scheme: dark) :root):
659         Expose some CSS variables in light mode that were previously only defined in dark mode.
660
661         * UserInterface/Views/NetworkTableContentView.js:
662         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
663         (WI.NetworkTableContentView.prototype._updateURLFilterActiveIndicator): Deleted.
664         * UserInterface/Images/FilterFieldActiveGlyph.svg: Removed.
665
666 2019-08-21  Joseph Pecoraro  <pecoraro@apple.com>
667
668         Web Inspector: Remove unnecessary properties on SVGs
669         https://bugs.webkit.org/show_bug.cgi?id=200968
670
671         Reviewed by Devin Rousso.
672
673         * UserInterface/Images/EventPause.svg:
674         * UserInterface/Images/EventPlay.svg:
675         * UserInterface/Images/EventProcessing.svg:
676         * UserInterface/Images/EventStop.svg:
677         * UserInterface/Images/MediaInstrument.svg:
678
679 2019-08-20  Devin Rousso  <drousso@apple.com>
680
681         Web Inspector: Implement `queryHolders` Command Line API
682         https://bugs.webkit.org/show_bug.cgi?id=200458
683
684         Reviewed by Joseph Pecoraro.
685
686         Call `queryHolders(object)` from the Console to return an array of objects that strongly
687         reference the given `object`. This could be very useful for finding JavaScript "leaks".
688
689         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
690
691 2019-08-20  Joseph Pecoraro  <pecoraro@apple.com>
692
693         Web Inspector: Address a few Esprima issues preventing pretty printing of resources
694         https://bugs.webkit.org/show_bug.cgi?id=200935
695
696         Reviewed by Timothy Hatcher.
697
698         Address a few Esprima issues:
699
700             Issue #1991 - Failure to parse template literal with destructuring assignment expression
701             https://github.com/jquery/esprima/issues/1991
702
703             Issue #1920 - Invalid Left Hand Side in for-in
704             https://github.com/jquery/esprima/issues/1920
705
706         * UserInterface/External/Esprima/esprima.js:
707
708 2019-08-20  Joseph Pecoraro  <pecoraro@apple.com>
709
710         Web Inspector: Update CodeMirror to support numeric separators in JavaScript numbers
711         https://bugs.webkit.org/show_bug.cgi?id=200942
712
713         Cherry-pick a few CodeMirror changes:
714         
715             [javascript mode] Support numeric separators
716             https://github.com/codemirror/CodeMirror/commit/beab8ed123683416bfec934df73d13401ec086b5#diff-9812850bb71d31e8dd60b476abb2bae8
717
718             [javascript mode] fix tokenizing of underscore properties
719             https://github.com/codemirror/CodeMirror/commit/463ea2c34ab442c0cae1d9732305219ca9b04dfe#diff-9812850bb71d31e8dd60b476abb2bae8
720
721         Reviewed by Timothy Hatcher.
722
723         * UserInterface/External/CodeMirror/javascript.js:
724
725 2019-08-20  Devin Rousso  <drousso@apple.com>
726
727         Web Inspector: Sources: move the resource type scope bar to be next to the filter
728         https://bugs.webkit.org/show_bug.cgi?id=200891
729
730         Reviewed by Joseph Pecoraro.
731
732         It's odd to have UI for controlling the active filters in two different places. Move the
733         resource type `WI.ScopeBar` to the filter bar area, and "promote" the resource grouping mode
734         items from a context menu to an always visible `WI.ScopeBar` in the space left by the
735         resource type `WI.ScopeBar` (switching between grouping modes quickly is a useful workflow).
736
737         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
738         (WI.SourcesNavigationSidebarPanel):
739         (WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
740         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeScopeBarSelectionChanged): Added.
741         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
742         (WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu.addOption): Deleted.
743         (WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu): Deleted.
744         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
745         (.sidebar > .panel.navigation.sources > .filter-bar .sources-resource-type-scope-bar.default-item-selected:not(:hover)): Added.
746         (.sidebar > .panel.navigation.sources > .filter-bar .sources-resource-type-scope-bar.default-item-selected:hover): Added.
747
748         * UserInterface/Views/FilterBar.js:
749         (WI.FilterBar.prototype.addFilterNavigationItem): Added.
750         (WI.FilterBar.prototype.addFilterBarButton):
751         * UserInterface/Views/FilterBar.css:
752         (.filter-bar > .navigation-bar > .item):
753         (.filter-bar > .navigation-bar > .item.button): Added.
754         (.filter-bar > .navigation-bar > .item.scope-bar): Added.
755         (.filter-bar > input[type="search"] + .navigation-bar > .item.scope-bar:last-child): Added.
756         Provide a way to add arbitrary `WI.NavigationItem` to the contained `WI.NavigationBar`.
757         Slightly adjust the spacing of the items (depending on their type) in the `WI.NavigationBar`
758         so they are all centered.
759
760         * UserInterface/Views/ScopeBar.css:
761         (.scope-bar):
762         (.scope-bar > li):
763         (.scope-bar > li::after):
764         (.scope-bar > li:not(.selected):hover): Added.
765         (body[dir=ltr] .scope-bar > li.multiple > select):
766         (body[dir=rtl] .scope-bar > li.multiple > select):
767         (.scope-bar > li:not(.selected):hover::after): Added.
768         Introduce CSS variables for `margin`, `padding`, and `opacity` that callers can override to
769         customize the appearance of the `WI.ScopeBar`.
770
771         * Localizations/en.lproj/localizedStrings.js:
772
773 2019-08-20  Joseph Pecoraro  <pecoraro@apple.com>
774
775         Web Inspector: Sources: Give Origins their own icon in the Sources sidebar
776         https://bugs.webkit.org/show_bug.cgi?id=200683
777         <rdar://problem/54269044>
778
779         Reviewed by Devin Rousso.
780
781         * UserInterface/Images/Origin.svg: Added.
782         * UserInterface/Main.html:
783         New resources.
784
785         * UserInterface/Views/FolderIcon.css:
786         (.origin-icon .icon):
787         Light and Dark appearances for Origin icons.
788
789         (@media (prefers-color-scheme: dark)):
790         * UserInterface/Views/OriginTreeElement.js:
791         (WI.OriginTreeElement):
792         Very much like a folder with different classes.
793
794         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
795         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
796         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
797         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
798         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
799         Use OriginTreeElement in a few places.
800
801 2019-08-20  Joseph Pecoraro  <pecoraro@apple.com>
802
803         Web Inspector: Support for JavaScript BigInt
804         https://bugs.webkit.org/show_bug.cgi?id=180731
805         <rdar://problem/36298748>
806
807         Reviewed by Devin Rousso.
808
809         * UserInterface/External/CodeMirror/javascript.js:
810         (expressionAllowed):
811         Cherry-pick BigInt JavaScript mode support from CodeMirror:
812         https://github.com/codemirror/CodeMirror/pull/5411
813
814         * UserInterface/Images/TypeBigInt.svg: Added.
815         * UserInterface/Views/Variables.css:
816         (:root):
817         (@media (prefers-color-scheme: dark)):
818         * UserInterface/Views/CodeMirrorAdditions.js:
819         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
820         (.cm-s-default .cm-number.cm-bigint,):
821         * UserInterface/Views/ObjectTreePropertyTreeElement.css:
822         (.object-tree-property.bigint > .icon):
823         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
824         (.heap-snapshot .icon.bigint):
825         Style BigInt similiar but different from numbers but with
826         a [B] icon instead of [N].
827
828         * UserInterface/Views/FormattedValue.css:
829         (.formatted-bigint):
830         * UserInterface/Views/FormattedValue.js:
831         (WI.FormattedValue.hasSimpleDisplay):
832         * UserInterface/Views/SourceCodeTextEditor.js:
833         (WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
834         (WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
835         Simple value formatting for the new type.
836
837         * UserInterface/Models/TypeSet.js:
838         (WI.TypeSet):
839         (WI.TypeSet.prototype.get primitiveTypeNames):
840         * UserInterface/Views/TypeTokenView.css:
841         (.type-token-bigint):
842         * UserInterface/Views/TypeTokenView.js:
843         (WI.TypeTokenView.prototype._displayTypeName):
844         (WI.TypeTokenView):
845         New type handling for the Type profiler.
846
847         * UserInterface/Protocol/RemoteObject.js:
848         (WI.RemoteObject):
849         (WI.RemoteObject.createBigIntFromDescriptionString):
850         * UserInterface/Views/HeapSnapshotClusterContentView.js:
851         (WI.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
852         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
853         (WI.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
854         BigInt values are not tied to a GlobalObject, so do some special casing
855         in the Heap output (like Strings) so we get a preview.
856
857 2019-08-20  Devin Rousso  <drousso@apple.com>
858
859         Web Inspector: Use URL constructor to better handle all kinds of URLs
860         https://bugs.webkit.org/show_bug.cgi?id=165155
861
862         Reviewed by Joseph Pecoraro.
863
864         * UserInterface/Base/URLUtilities.js:
865         (parseURL):
866
867 2019-08-19  Devin Rousso  <drousso@apple.com>
868
869         Web Inspector: Debugger: add a global breakpoint for pausing in the next microtask
870         https://bugs.webkit.org/show_bug.cgi?id=200652
871
872         Reviewed by Joseph Pecoraro.
873
874         * UserInterface/Controllers/DebuggerManager.js:
875         (WI.DebuggerManager):
876         (WI.DebuggerManager.prototype.initializeTarget):
877         (WI.DebuggerManager.prototype.get allMicrotasksBreakpoint): ADded.
878         (WI.DebuggerManager.prototype.isBreakpointSpecial):
879         (WI.DebuggerManager.prototype._pauseReasonFromPayload):
880         (WI.DebuggerManager.prototype._breakpointDisabledStateDidChange):
881
882         * UserInterface/Views/DebuggerSidebarPanel.js:
883         (WI.DebuggerSidebarPanel):
884         (WI.DebuggerSidebarPanel.prototype.saveStateToCookie):
885         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
886         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
887         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
888         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
889         (WI.DebuggerSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
890         (WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu):
891         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
892         (WI.SourcesNavigationSidebarPanel):
893         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
894         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
895         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
896         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
897         (WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
898
899         * UserInterface/Views/BreakpointTreeElement.css:
900         (.breakpoint-microtask-icon .icon): Added.
901         * UserInterface/Images/Microtask.svg: Added.
902
903         * UserInterface/Base/Setting.js:
904         * Localizations/en.lproj/localizedStrings.js:
905
906 2019-08-19  Devin Rousso  <drousso@apple.com>
907
908         Web Inspector: REGRESSION(r248682): Elements: Computed: go-to arrows in the Variables section are misaligned
909         https://bugs.webkit.org/show_bug.cgi?id=200841
910
911         Reviewed by Joseph Pecoraro.
912
913         The Variables section uses a different CSS class since it's identifier changed in r248682.
914
915         * UserInterface/Views/ComputedStyleDetailsPanel.css:
916         (.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables)): Added.
917         (.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) .property): Added.
918         (.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) .property .go-to-arrow): Added.
919         (.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) .property:not(:hover) .go-to-arrow): Added.
920         (.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties): Deleted.
921         (.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property .go-to-arrow): Deleted.
922         (.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property:hover .go-to-arrow): Deleted.
923
924 2019-08-19  Devin Rousso  <drousso@apple.com>
925
926         Web Inspector: have more aggressive checks for dataURLs provided to `console.screenshot`
927         https://bugs.webkit.org/show_bug.cgi?id=200747
928
929         Reviewed by Joseph Pecoraro.
930
931         Always send any /data:*+/ strings to the frontend and have it render there. If that doesn't
932         work, have the frontend "spoof" an error message look and feel.
933
934         * UserInterface/Views/ConsoleMessageView.js:
935         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
936
937         * Localizations/en.lproj/localizedStrings.js:
938
939 2019-08-19  Nikita Vasilyev  <nvasilyev@apple.com>
940
941         Web Inspector: RTL: Network headers values should be preserved
942         https://bugs.webkit.org/show_bug.cgi?id=200873
943
944         Reviewed by Joseph Pecoraro.
945
946         Replace spans with bdi elements, which have `unicode-bidi: isolate` User Agent style.
947         This works well with both LTR and RTL values.
948
949         * UserInterface/Views/ResourceDetailsSection.js:
950         (WI.ResourceDetailsSection.prototype.appendKeyValuePair):
951         Drive-by: remove unnecessary if/else statement and use `append` instead.
952
953 2019-08-19  Devin Rousso  <drousso@apple.com>
954
955         Web Inspector: REGRESSION: Debugger: pressing delete when the all/uncaught exceptions breakpoint is selected should select the next tree element
956         https://bugs.webkit.org/show_bug.cgi?id=200876
957
958         Reviewed by Joseph Pecoraro.
959
960         Removing the `return true;` from the various `WI.TreeElement` breakpoint classes allows the
961         owner `WI.TreeOutline` to also handle the delete event. In the Debugger/Sources navigation
962         sidebar, the owner `WI.TreeOutline` checks to see if the currently selected `WI.TreeElement`
963         is one of the "top" items ("All Exceptions", "Uncaught Exceptions", "Assertion Failures")
964         and if so, select the next tree element (if able) instead of the previous one.
965
966         This is a preferred experience because the "top" items can only be disabled, not deleted, so
967         trying to delete them wouldn't actually change the selection. They should only ever be
968         selected if there's nothing else that can be selected.
969
970         * UserInterface/Views/DebuggerSidebarPanel.js:
971         (WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
972         (WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement.checkIfSelectionAdjustmentNeeded): Added.
973         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
974         (WI.SourcesNavigationSidebarPanel):
975         (WI.SourcesNavigationSidebarPanel.checkIfSelectionAdjustmentNeeded): Added.
976
977         * UserInterface/Views/BreakpointTreeElement.js:
978         (WI.BreakpointTreeElement.prototype.ondelete):
979         * UserInterface/Views/DOMBreakpointTreeElement.js:
980         (WI.DOMBreakpointTreeElement.prototype.ondelete):
981         * UserInterface/Views/DOMNodeTreeElement.js:
982         (WI.DOMNodeTreeElement.prototype.ondelete):
983         * UserInterface/Views/EventBreakpointTreeElement.js:
984         (WI.EventBreakpointTreeElement.prototype.ondelete):
985         * UserInterface/Views/URLBreakpointTreeElement.js:
986         (WI.URLBreakpointTreeElement.prototype.ondelete):
987
988 2019-08-19  Devin Rousso  <drousso@apple.com>
989
990         Web Inspector: Debugger: don't show the All Requests breakpoint by default
991         https://bugs.webkit.org/show_bug.cgi?id=200892
992
993         Reviewed by Joseph Pecoraro.
994
995         * UserInterface/Base/Setting.js:
996
997 2019-08-17  Devin Rousso  <drousso@apple.com>
998
999         Web Inspector: Sources: gear icons moves to 2nd line when sidebar is narrow
1000         https://bugs.webkit.org/show_bug.cgi?id=198017
1001
1002         Reviewed by Joseph Pecoraro.
1003
1004         * UserInterface/Views/NavigationBar.js:
1005         (WI.NavigationBar):
1006         (WI.NavigationBar.prototype.layout):
1007         (WI.NavigationBar.prototype.layout.forceItemHidden): Added.
1008         (WI.NavigationBar.prototype.layout.isDivider): Added.
1009         (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth): Added.
1010         (WI.NavigationBar.prototype.needsLayout): Deleted.
1011         (WI.NavigationBar.prototype.sizeDidChange): Deleted.
1012         (WI.NavigationBar.prototype._updateContent): Deleted.
1013         (WI.NavigationBar.prototype._updateContent.forceItemHidden): Deleted.
1014         (WI.NavigationBar.prototype._updateContent.isDivider): Deleted.
1015         (WI.NavigationBar.prototype._updateContent.calculateVisibleItemWidth): Deleted.
1016         Reset the cached `_minimumWidth` whenever updating in `layout()`.
1017
1018         * UserInterface/Views/NavigationItem.js:
1019         (WI.NavigationItem.prototype.get width):
1020         (WI.NavigationItem.prototype.update): Added.
1021         (WI.NavigationItem.prototype.updateLayout): Deleted.
1022         (WI.NavigationItem.prototype.get totalMargin): Added.
1023         * UserInterface/Views/ButtonNavigationItem.js:
1024         (WI.ButtonNavigationItem.prototype.get totalMargin): Added.
1025         * UserInterface/Views/ButtonNavigationItem.css:
1026         * UserInterface/Views/TextNavigationItem.js:
1027         (WI.TextNavigationItem.prototype.get totalMargin): Added.
1028         * UserInterface/Views/TextNavigationItem.css:
1029         `Element.prototype.getBoundingClientRect` doesn't include the `margin` box of an element.
1030         Rather than create a CSS variable and parse a computed style, save the total `margin` amount
1031         to a getter that can then be added when computing the minimum width.
1032
1033         * UserInterface/Views/Sidebar.js:
1034         (WI.Sidebar):
1035         (WI.Sidebar.prototype._recalculateWidth):
1036         * UserInterface/Views/FlexibleSpaceNavigationItem.js:
1037         (WI.FlexibleSpaceNavigationItem.prototype.update): Added.
1038         (WI.FlexibleSpaceNavigationItem.prototype.updateLayout): Deleted.
1039         * UserInterface/Views/GroupNavigationItem.js:
1040         (WI.GroupNavigationItem.prototype.update): Added.
1041         (WI.GroupNavigationItem.prototype.updateLayout): Deleted.
1042         * UserInterface/Views/HierarchicalPathNavigationItem.js:
1043         (WI.HierarchicalPathNavigationItem.prototype.update): Added.
1044         (WI.HierarchicalPathNavigationItem.prototype.updateLayout): Deleted.
1045         * UserInterface/Views/RadioButtonNavigationItem.js:
1046         (WI.RadioButtonNavigationItem.prototype.update): Added.
1047         (WI.RadioButtonNavigationItem.prototype.updateLayout): Deleted.
1048         Rename `updateLayout` to `update` so it doesn't clash with `WI.View` naming.
1049
1050         * UserInterface/Views/SidebarNavigationBar.js: Removed.
1051         * UserInterface/Main.html:
1052         * UserInterface/Views/NavigationBar.css:
1053         (.navigation-bar .item): Added.
1054         (.navigation-bar .item, .sidebar-navigation-bar > .holder .item): Deleted.
1055         (.sidebar-navigation-bar): Deleted.
1056         (.sidebar-navigation-bar .holder): Deleted.
1057         Remove unnecessary class.
1058
1059 2019-08-16  Joseph Pecoraro  <pecoraro@apple.com>
1060
1061         Web Inspector: Syntax Highlight more CSS media queries
1062         https://bugs.webkit.org/show_bug.cgi?id=200824
1063
1064         Reviewed by Devin Rousso.
1065
1066         * UserInterface/Views/CodeMirrorAdditions.js:
1067         Special case CSS "error" tokenized values from CodeMirror inside @ rules
1068         to treat some as properties.
1069
1070 2019-08-16  Joseph Pecoraro  <pecoraro@apple.com>
1071
1072         Web Inspector: JavaScript formatting of single statement arrow function can be poor
1073         https://bugs.webkit.org/show_bug.cgi?id=200800
1074
1075         Reviewed by Ross Kirsling.
1076
1077         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
1078         (EsprimaFormatter.prototype._isLikelyToHaveNewline):
1079         (EsprimaFormatter.prototype._handleTokenAtNode):
1080         Better heuristic for single statement arrow functions.
1081
1082 2019-08-16  Devin Rousso  <drousso@apple.com>
1083
1084         Web Inspector: there should be an opposite icon for Eye.svg when we want to hide things instead of showing them
1085         https://bugs.webkit.org/show_bug.cgi?id=200736
1086
1087         Reviewed by Joseph Pecoraro.
1088
1089         We currently use Eye.svg for disabling, or turning "off", Shader Programs, but it's not very
1090         clear that clicking on the eye (which looks like "show me this", not "hide this") will do
1091         that. Furthermore, a greyed out version also isn't clear that the Shader Program is disabled,
1092         instead making the user think that the disable toggle is somehow "not working".
1093
1094         The new hide icon is clearer, as it uses a strikethrough, rather than some shading/greying.
1095
1096         * UserInterface/Views/ShaderProgramTreeElement.css:
1097         (.item.shader-program .status > img):
1098         (.item.shader-program.disabled:matches:hover .status > img): Added.
1099         (.item.shader-program.disabled > :not(.status)): Added.
1100         (.item.shader-program.disabled > *): Deleted.
1101         * UserInterface/Images/Hide.svg: Added.
1102
1103         * UserInterface/Views/ObjectTreePropertyTreeElement.css:
1104         (.object-tree-property .getter):
1105         * UserInterface/Images/Show.svg: Renamed from UserInterface/Images/Eye.svg.
1106
1107 2019-08-16  Devin Rousso  <drousso@apple.com>
1108
1109         Web Inspector: rename "Invalid Characters" to "Invisible Characters" for clarity
1110         https://bugs.webkit.org/show_bug.cgi?id=200808
1111
1112         Reviewed by Joseph Pecoraro.
1113
1114         * UserInterface/Base/Setting.js:
1115         * UserInterface/Views/SettingsTabContentView.js:
1116         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1117
1118         * UserInterface/Base/Main.js:
1119         (setInvisibleCharacterClassName): Added.
1120         (setInvalidCharacterClassName): Deleted.
1121         * UserInterface/Views/CodeMirrorOverrides.css:
1122         (.show-invisible-characters .CodeMirror .cm-invalidchar): Added.
1123         (.show-invalid-characters .CodeMirror .cm-invalidchar): Deleted.
1124
1125         * Localizations/en.lproj/localizedStrings.js:
1126
1127 2019-08-16  Nikita Vasilyev  <nvasilyev@apple.com>
1128
1129         Web Inspector: RTL: Console should be always LTR
1130         https://bugs.webkit.org/show_bug.cgi?id=200482
1131
1132         Reviewed by Joseph Pecoraro.
1133
1134         * UserInterface/Views/ConsoleCommandView.js:
1135         (WI.ConsoleCommandView.prototype.render):
1136         * UserInterface/Views/ConsoleMessageView.css:
1137         * UserInterface/Views/ConsoleMessageView.js:
1138         (WI.ConsoleMessageView.prototype.render):
1139         Make console messages always LTR.
1140
1141         * UserInterface/Views/LogContentView.js:
1142         (WI.LogContentView.prototype._keyDown):
1143         Since the console is always LTR now, we can remove code that flips left and right
1144         arrow keys.
1145
1146         * UserInterface/Views/ObjectTreeView.css:
1147         JS objects should always be LTR.
1148
1149         * UserInterface/Views/TreeElement.js:
1150         Look at "direction" CSS property because Element's text direction can be LTR even
1151         when `WI.resolvedLayoutDirection()` is RTL.
1152
1153         (WI.TreeElement.prototype.isEventWithinDisclosureTriangle):
1154         * UserInterface/Views/TreeOutline.css:
1155         (body[dir=ltr] .tree-outline .item :matches(.disclosure-button, .icon),):
1156         (body[dir=rtl] [dir=ltr] .tree-outline .item .disclosure-button):
1157
1158 2019-08-16  Devin Rousso  <drousso@apple.com>
1159
1160         Web Inspector: Elements: setting a breakpoint on a specific listener should enable the event listener
1161         https://bugs.webkit.org/show_bug.cgi?id=200551
1162
1163         Reviewed by Joseph Pecoraro.
1164
1165         * UserInterface/Views/EventListenerSectionGroup.js:
1166         (WI.EventListenerSectionGroup):
1167
1168 2019-08-15  Joseph Pecoraro  <pecoraro@apple.com>
1169
1170         Web Inspector: Update Esprima to support modern JavaScript language features
1171         https://bugs.webkit.org/show_bug.cgi?id=200796
1172
1173         Reviewed by Ross Kirsling.
1174
1175         Use a fork of Esprima to support modern JavaScript language features
1176         while going through the process to upstream support:
1177
1178           ES2018 Feature: Async Iteration (for-await-of)
1179           https://github.com/jquery/esprima/issues/1990
1180
1181           ES2019 Feature: Numeric Separator
1182           https://github.com/jquery/esprima/issues/1989
1183
1184           ES2019 Feature: Optional catch binding
1185           https://github.com/jquery/esprima/issues/1953
1186
1187           ES2020 Feature: BigInt
1188           https://github.com/jquery/esprima/issues/1988
1189
1190         ESTree compatible AST changes are summarized as:
1191
1192           - CatchClause `param` property is now nullable
1193           - ForOfStatement now has a boolean `await` property
1194           - Literal can be a `"bigint"` type (works if the environment has BigInt or not)
1195
1196         The pretty printer only needed to have additional handling for `for-await-of`.
1197
1198         * UserInterface/External/Esprima/esprima.js:
1199         New version. Typescript output expects a modern JavaScript environment
1200         instead of just ES6.
1201
1202         * Tools/Formatting/index.html:
1203         Update the formatting tool for easier use in case of errors.
1204
1205         * UserInterface/Models/ScriptSyntaxTree.js:
1206         (WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
1207
1208         * UserInterface/Test/TestHarness.js:
1209         (TestHarness.prototype.passOrFail):
1210         Convenience for pass/fail with the same message based on a condition.
1211
1212         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
1213         (EsprimaFormatter.prototype._handleTokenAtNode):
1214         Ensure a space after `await` in `for await` syntax.
1215
1216 2019-08-15  Devin Rousso  <drousso@apple.com>
1217
1218         Web Inspector: REGRESSION(r244268): "Show Scope Chain on pause" setting has no effect
1219         https://bugs.webkit.org/show_bug.cgi?id=200797
1220
1221         Reviewed by Joseph Pecoraro.
1222
1223         * UserInterface/Views/DebuggerTabContentView.js:
1224         (WI.DebuggerTabContentView.prototype.showDetailsSidebarPanels):
1225         * UserInterface/Views/SourcesTabContentView.js:
1226         (WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
1227         When the sidebar panel isn't visible `parentSidebar` is `null`. Use `WI.DetailsSidebar` instead.
1228
1229 2019-08-15  Devin Rousso  <drousso@apple.com>
1230
1231         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._resource.initiatorSourceCodeLocation')
1232         https://bugs.webkit.org/show_bug.cgi?id=200798
1233
1234         Reviewed by Joseph Pecoraro.
1235
1236         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1237         (WI.ResourceDetailsSidebarPanel.prototype.set resource):
1238         (WI.ResourceDetailsSidebarPanel.prototype.layout):
1239         Cancel the `Throttler` whenever the `_resource` is updated, as otherwise the `Throttler` may
1240         fire later on with an unset `_resource`.
1241
1242 2019-08-15  Devin Rousso  <drousso@apple.com>
1243
1244         Web Inspector: Sources: provide a way to create an arbitrary Inspector Style Sheet
1245         https://bugs.webkit.org/show_bug.cgi?id=200425
1246
1247         Reviewed by Joseph Pecoraro.
1248
1249         Right now, the only way to create an Inspector Style Sheet is by creating a new rule in the
1250         Styles sidebar of the Elements Tab. This is unnecessarily restrictive, especially for those
1251         who don't use the Elements tab.
1252
1253         Add a + button after the filter bar in the Navigation sidebar. Clicking on the + button will
1254         show a menu with the following (more likely to be added later):
1255          - Inspector Style Sheet
1256          - Frames (if there are subframes)
1257            - (name of subframe)
1258               - Inspector Style Sheet
1259
1260         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1261         (WI.SourcesNavigationSidebarPanel):
1262         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject): Added.
1263         (WI.SourcesNavigationSidebarPanel.prototype._filterByResourcesWithIssues): Added.
1264         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
1265         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
1266         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
1267         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
1268         (WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu): Added.
1269         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
1270         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameWasAdded): Added.
1271         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange): Deleted.
1272         * UserInterface/Views/GeneralTreeElement.js:
1273         (WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath):
1274         Drive-by: sort `WI.ResourceTreeElement`s alongside `WI.FolderTreeElement`s for easier readability.
1275
1276         * UserInterface/Views/FrameTreeElement.js:
1277         (WI.FrameTreeElement.prototype.onpopulate):
1278         Add all `inspectorStyleSheetsForFrame` instead of just the preferred one so that they all
1279         are visible/selectable for editing.
1280
1281         * UserInterface/Views/FilterBar.js:
1282         (WI.FilterBar):
1283         * UserInterface/Views/FilterBar.css:
1284         (.filter-bar > .navigation-bar > .item):
1285         (.filter-bar > input[type="search"]):
1286         (.filter-bar > .navigation-bar + input[type="search"]): Added.
1287         (.filter-bar > input[type="search"] + .navigation-bar:empty): Added.
1288         Move the position of the filter bar buttons to be after the filter bar itself, so that other
1289         parents can add action items before the filter bar to keep a consistent positioning.
1290          - to the left of the filter bar are action items (e.g. "+")
1291          - the filter bar itself
1292          - to the right of the filter bar are filter buttons (e.g. "filter by resoure with issue")
1293
1294         * UserInterface/Controllers/NetworkManager.js:
1295         (WI.NetworkManager.prototype.get frames):
1296         Drive-by: use `Array.from`, instead of `[...map.values()]`.
1297
1298         * UserInterface/Models/Frame.js:
1299         (WI.Frame.prototype.get url):
1300         (WI.Frame.prototype.get urlComponents): Added.
1301
1302         * UserInterface/Base/URLUtilities.js.js:
1303         (parseURL):
1304         Calculate and include the `origin` string with the output.
1305
1306         * UserInterface/Controllers/CSSManager.js:
1307         (WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
1308         Remove `doNotCreateIfMissing` now that the last caller has been removed.
1309
1310         * Localizations/en.lproj/localizedStrings.js:
1311
1312 2019-08-15  Devin Rousso  <drousso@apple.com>
1313
1314         Web Inspector: CodeMirror still inserts a tab even when "Prefer indent using" is set to "Spaces"
1315         https://bugs.webkit.org/show_bug.cgi?id=200770
1316
1317         Reviewed by Ross Kirsling.
1318
1319         * UserInterface/Views/CodeMirrorAdditions.js:
1320         Remap the `insertTab` command to use `insertSoftTab` when "Prefer indent using" is set to
1321         "Spaces" so that CodeMirror inserts the number of spaces that would match a tab ("\t") being
1322         inserted at the same spot.
1323
1324 2019-08-15  Devin Rousso  <drousso@apple.com>
1325
1326         Web Inspector: Sources: the "No Filter Results" message sits on top of all of the content, preventing any interaction
1327         https://bugs.webkit.org/show_bug.cgi?id=200755
1328
1329         Reviewed by Joseph Pecoraro.
1330
1331         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1332         (WI.SourcesNavigationSidebarPanel):
1333         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1334         (.sidebar > .panel.navigation.sources > .content > .resources-container): Added.
1335         (@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Added.
1336         (@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .call-stack-container):
1337         (@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .breakpoints-container):
1338         (@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .resources-container): Added.
1339         (@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources)): Deleted.
1340         (@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .resources): Deleted.
1341         Wrap the resources `WI.TreeOutline` in a <div> so the empty message placeholder that gets
1342         inserted after it can be constrained to the size of the `WI.TreeOutline`.
1343
1344 2019-08-15  Devin Rousso  <drousso@apple.com>
1345
1346         Web Inspector: Layers: background of 3D area doesn't update when transitioning to/from Dark mode
1347         https://bugs.webkit.org/show_bug.cgi?id=200775
1348
1349         Reviewed by Ross Kirsling.
1350
1351         * UserInterface/Views/Layers3DContentView.js:
1352         (WI.Layers3DContentView.prototype.initialLayout):
1353         Add a `matchMedia` listener for `(prefers-color-scheme: dark)` and update the clear color
1354         of the WebGL renderer whenever it changes.
1355
1356         * UserInterface/Views/ErrorObjectView.css:
1357         (@media (prefers-color-scheme: dark)): Added.
1358         (@media (prefers-dark-interface)): Deleted.
1359         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1360         (@media (prefers-color-scheme: dark)): Added.
1361         (@media (prefers-dark-interface)): Deleted.
1362         Drive-by: replace older `prefers-dark-interface` with modern `prefers-color-scheme: dark`.
1363
1364 2019-08-15  Joseph Pecoraro  <pecoraro@apple.com>
1365
1366         Web Inspector: Update Esprima to trunk (minor fixes)
1367         https://bugs.webkit.org/show_bug.cgi?id=200691
1368         <rdar://problem/54276170>
1369
1370         Rubber-stamped by Devin Rousso.
1371
1372         * UserInterface/External/Esprima/esprima.js:
1373         Updated to jquery/esprima@5e55171feb5adbc2b1d28ef4b2628d5ea9af0848.
1374
1375         * UserInterface/Models/ScriptSyntaxTree.js:
1376         (WI.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
1377         (WI.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
1378         (WI.ScriptSyntaxTree.prototype._recurse):
1379         (WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
1380         (WI.ScriptSyntaxTree):
1381         * UserInterface/Workers/Formatter/ESTreeWalker.js:
1382         (ESTreeWalker.prototype._walkChildren):
1383         (ESTreeWalker):
1384         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
1385         (EsprimaFormatter.prototype._handleTokenAtNode):
1386         - SpreadProperty => SpreadElement.
1387         - RestProperty => RestElement.
1388
1389 2019-08-15  Devin Rousso  <drousso@apple.com>
1390
1391         Web Inspector: Uncaught Exception: Content request failed.
1392         https://bugs.webkit.org/show_bug.cgi?id=200704
1393         <rdar://problem/54279372>
1394
1395         Reviewed by Brian Burg.
1396
1397         * UserInterface/Models/WebSocketResource.js:
1398         (WI.WebSocketResource.prototype.requestContentFromBackend): Added.
1399         Add an "assert not reached", as WebSocket resources don't really have "content", instead
1400         having a list of send/receive frames.
1401
1402         * UserInterface/Views/ResourceClusterContentView.js:
1403         (WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
1404         Don't attempt to request the content of any `WI.WebSocketResource` for the reason above.
1405
1406 2019-08-14  Devin Rousso  <drousso@apple.com>
1407
1408         Web Inspector: Elements: Computed: move the Box Model section to the top
1409         https://bugs.webkit.org/show_bug.cgi?id=200555
1410
1411         Reviewed by Joseph Pecoraro.
1412
1413         For nodes that use a lot of different CSS properties, having the Box Model section all the
1414         way at the bottom isn't as useful for taking a quick glance at the node's box model data.
1415
1416         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1417         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
1418
1419 2019-08-14  Devin Rousso  <drousso@apple.com>
1420
1421         Web Inspector: Elements: Computed: the collapsed state of the Variables section should be separate from the collapsed state of the Properties section
1422         https://bugs.webkit.org/show_bug.cgi?id=200725
1423
1424         Reviewed by Joseph Pecoraro.
1425
1426         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1427         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
1428         Use a different identifier string for the Variable section so it preserves its own collapsed
1429         collapsed state independent of the Properties section.
1430
1431 2019-08-14  Devin Rousso  <drousso@apple.com>
1432
1433         Web Inspector: Elements: Computed: the background of the Properties/Variables sections should match the Box Model section when expanded
1434         https://bugs.webkit.org/show_bug.cgi?id=200724
1435
1436         Reviewed by Joseph Pecoraro.
1437
1438         * UserInterface/Views/ComputedStyleDetailsPanel.css:
1439         (.sidebar > .panel.details.css-style > .content > .computed > .details-section:not(.collapsed) > :matches(.header, .content)): Added.
1440         (.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties): Added.
1441         (.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property .go-to-arrow): Added.
1442         (.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property:hover .go-to-arrow): Added.
1443         (.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) > .content): Added.
1444         (.details-section:matches(.computed-style-properties, .computed-style-box-model):not(.collapsed) > :matches(.header, .content)): Deleted.
1445         (.computed-style-properties): Deleted.
1446         (.computed-style-properties .property .go-to-arrow): Deleted.
1447         (.computed-style-properties .property:hover .go-to-arrow): Deleted.
1448         (.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
1449         (.details-section.computed-style-properties > .content): Deleted.
1450         (@media (prefers-color-scheme: dark)): Deleted.
1451         Use more specific selectors to match overall Web Inspector style.
1452
1453         * UserInterface/Views/ComputedStyleSection.css:
1454         (.computed-style-section .computed-property-item.expanded):
1455         Darken the background of any expanded computed property in light mode.
1456
1457 2019-08-13  Joseph Pecoraro  <pecoraro@apple.com>
1458
1459         Uncaught Exception: content.isJSON is not a function selecting image resource
1460         https://bugs.webkit.org/show_bug.cgi?id=200680
1461
1462         Reviewed by Devin Rousso.
1463
1464         * UserInterface/Views/ResourceClusterContentView.js:
1465         (WI.ResourceClusterContentView.prototype._canUseJSONContentViewForContent):
1466         Protect against non-string data, such as Blob response content.
1467
1468 2019-08-13  Devin Rousso  <drousso@apple.com>
1469
1470         Web Inspector: Styles: show @supports CSS groupings
1471         https://bugs.webkit.org/show_bug.cgi?id=200419
1472         <rdar://problem/53971948>
1473
1474         Reviewed by Joseph Pecoraro.
1475
1476         * UserInterface/Models/CSSGrouping.js: Renamed from Source/WebInspectorUI/UserInterface/Models/CSSMedia.js.
1477         (WI.CSSGrouping):
1478         (WI.CSSGrouping.prototype.get type):
1479         (WI.CSSGrouping.prototype.get text):
1480         (WI.CSSGrouping.prototype.get sourceCodeLocation):
1481         (WI.CSSGrouping.prototype.get isMedia): Added.
1482         (WI.CSSGrouping.prototype.get isSupports): Added.
1483         (WI.CSSGrouping.prototype.get prefix): Added.
1484
1485         * UserInterface/Models/CSSStyleDeclaration.js:
1486         (WI.CSSStyleDeclaration.prototype.get groupings): Added.
1487         (WI.CSSStyleDeclaration.prototype.generateCSSRuleString):
1488         (WI.CSSStyleDeclaration.prototype.get mediaList): Deleted.
1489
1490         * UserInterface/Models/CSSRule.js:
1491         (WI.CSSRule):
1492         (WI.CSSRule.prototype.get groupings): Added.
1493         (WI.CSSRule.prototype.update):
1494         (WI.CSSRule.prototype._selectorResolved):
1495         (WI.CSSRule.prototype.get mediaList): Deleted.
1496
1497         * UserInterface/Models/DOMNodeStyles.js:
1498         (WI.DOMNodeStyles.prototype._parseRulePayload):
1499         (WI.DOMNodeStyles.prototype.rulesForSelector): Deleted.
1500
1501         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1502         (WI.SpreadsheetCSSStyleDeclarationSection):
1503         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
1504         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied):
1505         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader): Deleted.
1506         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1507         (.spreadsheet-css-declaration :matches(.header, .header-groupings)): Added.
1508         (.spreadsheet-css-declaration :matches(.header, .header-groupings):first-child): Added.
1509         (.spreadsheet-css-declaration .header-groupings > .grouping): Added.
1510         (.spreadsheet-css-declaration :matches(.header, .header-media)): Deleted.
1511         (.spreadsheet-css-declaration :matches(.header, .header-media):first-child): Deleted.
1512         (.spreadsheet-css-declaration .media-label): Deleted.
1513
1514         * UserInterface/Controllers/CSSManager.js:
1515         (WI.CSSManager.protocolGroupingTypeToEnum): Added.
1516         (WI.CSSManager.protocolMediaSourceToEnum): Deleted.
1517
1518         * UserInterface/Main.html:
1519         * UserInterface/Test.html:
1520
1521 2019-08-12  Devin Rousso  <drousso@apple.com>
1522
1523         REGRESSION(r248391): Web Inspector: changing Layout Direction Debug setting no longer adds dir="ltr" to body element
1524         https://bugs.webkit.org/show_bug.cgi?id=200564
1525
1526         Reviewed by Joseph Pecoraro.
1527
1528         `WI.resolvedLayoutDirection` was called before `WI.runBootstrapOperations`, which is what
1529         instantiates `WI.showDebugUISetting`. Without it, `WI.resolvedLayoutDirection` will ignore
1530         the value of `WI.settings.debugLayoutDirection` and instead use the system.
1531
1532         Moving the instantiation of `WI.showDebugUISetting` outside `WI.runBootstrapOperations`
1533         allows the setting to be created when the Bootstrap.js script is loaded, rather than after
1534         the `DOMContentLoaded` event is fired. This means that it's guaranteed to exist before any
1535         interface/view code runs.
1536
1537         * UserInterface/Debug/Bootstrap.js:
1538         (WI.runBootstrapOperations):
1539
1540 2019-08-12  Devin Rousso  <drousso@apple.com>
1541
1542         Web Inspector: remove WI.DeprecatedRemoteObjectProperty
1543         https://bugs.webkit.org/show_bug.cgi?id=200549
1544
1545         Reviewed by Joseph Pecoraro.
1546
1547         * UserInterface/Protocol/RemoteObject.js:
1548         (WI.RemoteObject.prototype.deprecatedGetOwnProperties): Deleted.
1549         (WI.RemoteObject.prototype.deprecatedGetAllProperties): Deleted.
1550         (WI.RemoteObject.prototype.deprecatedGetDisplayableProperties): Deleted.
1551         (WI.RemoteObject.prototype._deprecatedGetProperties): Deleted.
1552         (WI.RemoteObject.prototype._deprecatedGetPropertiesResolver): Deleted.
1553         (WI.DeprecatedRemoteObjectProperty): Deleted.
1554         (WI.DeprecatedRemoteObjectProperty.prototype.fromPrimitiveValue): Deleted.
1555
1556         * UserInterface/Models/CallFrame.js:
1557         (WI.CallFrame.prototype.collectScopeChainVariableNames):
1558
1559         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1560         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
1561
1562 2019-08-12  Devin Rousso  <drousso@apple.com>
1563
1564         Web Inspector: REGRESSION(r248201): DOMDebugger: unable to add event breakpoint when All Events breakpoint is enabled
1565         https://bugs.webkit.org/show_bug.cgi?id=200561
1566
1567         Reviewed by Joseph Pecoraro.
1568
1569         * UserInterface/Controllers/DOMDebuggerManager.js:
1570         (WI.DOMDebuggerManager.prototype.addEventBreakpoint):
1571         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
1572
1573 2019-08-12  Devin Rousso  <drousso@apple.com>
1574
1575         Web Inspector: REGRESSION: DOMDebugger: breakpoints are forcibly enabled when resolving DOM breakpoints for newly added nodes
1576         https://bugs.webkit.org/show_bug.cgi?id=200639
1577
1578         Reviewed by Joseph Pecoraro.
1579
1580         Since DOM breakpoints revolve around a given DOM node, we attempt to restore DOM breakpoints
1581         whenever new nodes are added by matching them to the path of the DOM breakpoint. When doing
1582         so, we should be in a "temporarily restoring breakpoints" mode so that we don't forcibly
1583         enable all breakpoints.
1584
1585         * UserInterface/Controllers/DOMDebuggerManager.js:
1586         (WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
1587         (WI.DOMDebuggerManager.prototype._nodeInserted):
1588
1589 2019-08-12  Devin Rousso  <drousso@apple.com>
1590
1591         Web Inspector: Elements: Styles: add space between media query and style icon
1592         https://bugs.webkit.org/show_bug.cgi?id=200623
1593
1594         Reviewed by Joseph Pecoraro.
1595
1596         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1597         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
1598         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1599         (.spreadsheet-css-declaration .header:not(:first-child), .spreadsheet-css-declaration .header:not(.editing-selector) .selector, .spreadsheet-css-declaration.has-icon .header.editing-selector .selector): Added.
1600         (.spreadsheet-css-declaration .header.editing-selector .selector): Deleted.
1601         Ensure the selector field doesn't shift vertically when entering/exiting editing mode.
1602
1603 2019-08-09  Joseph Pecoraro  <pecoraro@apple.com>
1604
1605         Web Inspector: Address some ESLint warnings
1606         https://bugs.webkit.org/show_bug.cgi?id=200598
1607
1608         Reviewed by Devin Rousso.
1609
1610         * UserInterface/Base/Utilities.js:
1611         * UserInterface/Controllers/TimelineManager.js:
1612         * UserInterface/Models/DOMNodeStyles.js:
1613         * UserInterface/Models/LayoutTimelineRecord.js:
1614         * UserInterface/Models/ServerTimingEntry.js:
1615         * UserInterface/Models/TimelineRecording.js:
1616         * UserInterface/Protocol/RemoteObject.js:
1617         * UserInterface/Test/FrontendTestHarness.js:
1618         * UserInterface/Test/Test.js:
1619         * UserInterface/Views/CPUTimelineView.js:
1620         * UserInterface/Views/CPUUsageCombinedView.js:
1621         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
1622         * UserInterface/Views/DOMTreeContentView.js:
1623         * UserInterface/Views/DOMTreeElement.js:
1624         * UserInterface/Views/DebuggerSidebarPanel.js:
1625         * UserInterface/Views/NetworkTableContentView.js:
1626         * UserInterface/Views/ResourceTimingBreakdownView.js:
1627         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1628         * UserInterface/Views/TreeOutline.js:
1629
1630 2019-08-09  Joseph Pecoraro  <pecoraro@apple.com>
1631
1632         Web Inspector: Better organize manager / observer API groups
1633         https://bugs.webkit.org/show_bug.cgi?id=200594
1634
1635         Reviewed by Devin Rousso.
1636
1637         * UserInterface/Controllers/DebuggerManager.js:
1638         (WI.DebuggerManager.prototype.globalObjectCleared):
1639         (WI.DebuggerManager.prototype.reset): Deleted.
1640         Renamed.
1641
1642         * UserInterface/Protocol/DebuggerObserver.js:
1643         (WI.DebuggerObserver.prototype.globalObjectCleared):
1644
1645         * UserInterface/Controllers/CSSManager.js:
1646         * UserInterface/Controllers/CanvasManager.js:
1647         * UserInterface/Controllers/ConsoleManager.js:
1648         * UserInterface/Controllers/DOMManager.js:
1649         * UserInterface/Controllers/DOMStorageManager.js:
1650         * UserInterface/Controllers/LayerTreeManager.js:
1651         * UserInterface/Controllers/NetworkManager.js:
1652         * UserInterface/Controllers/TargetManager.js:
1653         * UserInterface/Controllers/TimelineManager.js:
1654         * UserInterface/Controllers/WorkerManager.js:
1655
1656 2019-08-10  Devin Rousso  <drousso@apple.com>
1657
1658         Web Inspector: REGRESSION(r248454): WK1 inspector frontend client doesn't queue messages to the frontend before it's loaded
1659         https://bugs.webkit.org/show_bug.cgi?id=200587
1660
1661         Reviewed by Joseph Pecoraro.
1662
1663         WK1 inspector sends messages to the frontend using `WebCore::InspectorClient::doDispatchMessageOnFrontendPage`,
1664         which does not do any sort of queueing to wait until the frontend is loaded (`InspectorFrontendHost.loaded()`).
1665
1666         Now that we are sending messages immediately, we should always queue.
1667
1668         * UserInterface/Test/TestStub.js:
1669         (InspectorFrontendAPI.dispatch): Added.
1670
1671         * UserInterface/Models/Frame.js:
1672         (WI.Frame.prototype.markDOMContentReadyEvent):
1673         (WI.Frame.prototype.markLoadEvent):
1674
1675         * UserInterface/Controllers/TimelineManager.js:
1676         (WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
1677         (WI.TimelineManager.prototype.pageLoadEventFired):
1678
1679 2019-08-09  Joseph Pecoraro  <pecoraro@apple.com>
1680
1681         Web Inspector: Node details sidebar sections have unclear delineation in Dark Mode
1682         https://bugs.webkit.org/show_bug.cgi?id=200603
1683         <rdar://problem/54146925>
1684
1685         Reviewed by Devin Rousso.
1686
1687         * UserInterface/Views/DetailsSection.css:
1688         (@media (prefers-color-scheme: dark)):
1689         (.details-section .details-section,):
1690         Give a details section header a different color than a normal sidebar header.
1691
1692 2019-08-09  Devin Rousso  <drousso@apple.com>
1693
1694         Web Inspector: REGRESSION(r248480): Sources: the Pause Reason section takes the entire vertical space when there are few breakpoints/resources
1695         https://bugs.webkit.org/show_bug.cgi?id=200597
1696
1697         Reviewed by Joseph Pecoraro.
1698
1699         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1700         (@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .pause-reason-container): Deleted.
1701         Don't `flex-grow` or `flex-shrink` the Pause Reason section so it always displays its full
1702         content. The rest of the sections can grow/shrink as needed.
1703
1704 2019-08-09  Devin Rousso  <drousso@apple.com>
1705
1706         REGRESSION (Safari 6): Web Inspector: JSON may not be pretty printed if served as text/html
1707         https://bugs.webkit.org/show_bug.cgi?id=122898
1708         <rdar://problem/15241419>
1709
1710         Reviewed by Joseph Pecoraro.
1711
1712         Check the request/response data to see if it's JSON parsable. If so, allow the user to elect
1713         to view the request/response as a JSON preview instead of raw (or pretty printed) text.
1714
1715         Prefer the JSON view wherever possible.
1716
1717         * UserInterface/Views/ResourceClusterContentView.js:
1718         (WI.ResourceClusterContentView):
1719         (WI.ResourceClusterContentView.prototype.get requestContentView):
1720         (WI.ResourceClusterContentView.prototype.get customRequestContentView): Added.
1721         (WI.ResourceClusterContentView.prototype.get customResponseContentView):
1722         (WI.ResourceClusterContentView.prototype.get selectionPathComponents):
1723         (WI.ResourceClusterContentView.prototype.showRequest):
1724         (WI.ResourceClusterContentView.prototype._canShowCustomRequestContentView): Added.
1725         (WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
1726         (WI.ResourceClusterContentView.prototype._contentViewForResourceType):
1727         (WI.ResourceClusterContentView.prototype._pathComponentForContentView):
1728         (WI.ResourceClusterContentView.prototype._identifierForContentView):
1729         (WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
1730         (WI.ResourceClusterContentView.prototype._canUseJSONContentViewForContent): Added.
1731         (WI.ResourceClusterContentView.prototype._tryEnableCustomRequestContentView): Added.
1732         (WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
1733         (WI.ResourceClusterContentView.prototype.saveToCookie): Deleted.
1734         (WI.ResourceClusterContentView.prototype._customContentViewConstructorForResource): Deleted.
1735         Since the current view is already saved in a `WI.Setting`, there's no need to save that
1736         state to a cookie, as it'll be restored elsewhere.
1737
1738         * UserInterface/Base/Main.js:
1739         (WI.showResourceRequest):
1740
1741         * UserInterface/Main.html:
1742         * UserInterface/Views/JSONContentView.js: Added.
1743         (WI.JSONContentView):
1744         (WI.JSONContentView.prototype.initialLayout):
1745         (WI.JSONContentView.prototype.attached):
1746         (WI.JSONContentView.prototype.closed):
1747         * UserInterface/Views/JSONContentView.css: Added.
1748         (.content-view.json):
1749         * Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.js: Deleted.
1750         * Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.css: Deleted.
1751         Create a more generic content view that shows a preview for the given JSON parsable string.
1752
1753         * UserInterface/Base/Utilities.js:
1754         (String.prototype.isJSON): Added.
1755         * UserInterface/Views/WebSocketDataGridNode.js:
1756         (WI.WebSocketDataGridNode.prototype.appendContextMenuItems):
1757         Utility function for checking if a string is JSON parsable.
1758
1759         * Localizations/en.lproj/localizedStrings.js:
1760
1761 2019-08-09  Devin Rousso  <drousso@apple.com>
1762
1763         Web Inspector: Sources: increase the vertical space allocated to the call stack when paused
1764         https://bugs.webkit.org/show_bug.cgi?id=200236
1765
1766         Reviewed by Joseph Pecoraro.
1767
1768         Rather than uniformly constrict the height of the Call Stack and Breakpoints sections, they
1769         should "flex" based on their importance, which can likely be derived from the current state.
1770         This way, it's possible to see information from each section at the same time, but still
1771         have enough space in each section to be able to do something useful.
1772
1773         When paused, the most useful data is the call stack, so give the Call Stack section the most
1774         vertical space (the Pause Reason is also important, but it usually needs very little space).
1775
1776         When not paused, it's likely that the user cares more about the resources with breakpoints
1777         than those without, so favor the Breakpoints section.
1778
1779         Each section will only expand to fit it's maximum content height.
1780
1781         If the inspector window becomes too short, remove the "flex" entirely and have all the
1782         content be part of a single scroll area instead.
1783
1784         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1785         (WI.SourcesNavigationSidebarPanel):
1786         (WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
1787         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
1788         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
1789         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
1790         (WI.SourcesNavigationSidebarPanel.prototype._handleCallStackElementAddedOrRemoved): Deleted.
1791         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1792         (.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Added.
1793         (.sidebar > .panel.navigation.sources > .content .details-section): Added.
1794         (.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .header > .options, .sidebar > .panel.navigation.sources > .content .details-section:not(.collapsed) > .content, .sidebar > .panel.navigation.sources > .content .details-section:not(.collapsed) > .content > .group): Added.
1795         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Added.
1796         (.sidebar > .panel.navigation.sources > .content > .navigation-bar): Added.
1797         (@media (min-height: 650px)): Added.
1798         (.sidebar > .panel.navigation.sources > .content > .pause-reason-container): Added.
1799         (.sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources)): Added.
1800         (.sidebar > .panel.navigation.sources > .content > .call-stack-container): Added.
1801         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Added.
1802         (.sidebar > .panel.navigation.sources > .content > .resources): Added.
1803         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container .tree-outline .item.event-target-window .icon): Added.
1804         (.sidebar > .panel.navigation.sources > .content > .details-section): Deleted.
1805         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoints).collapsed > .header > .options,): Deleted.
1806         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content): Deleted.
1807         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Deleted.
1808         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.pause-reason, .call-stack, .breakpoints) > .content,): Deleted.
1809         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints) > .content): Deleted.
1810         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content): Deleted.
1811         (.sidebar > .panel.navigation.sources > .content > .details-section.call-stack): Deleted.
1812         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints): Deleted.
1813         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .create-breakpoint): Deleted.
1814         (@media (min-height: 600px)): Deleted.
1815         (.sidebar > .panel.navigation.sources > .content > .pause-reason): Deleted.
1816         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content,): Deleted.
1817         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .tree-outline .item.event-target-window .icon): Deleted.
1818         Wrap the Pause Reason, Call Stack, and Breakpoints `WI.DetailsSection`s in a container
1819         element so that the styling of the sticky header doesn't get affected by the clamping of the
1820         container's height.
1821
1822         * UserInterface/Views/DetailsSection.css:
1823         (.details-section):
1824         (.details-section > .header):
1825         Create CSS variables for styles that will be overridden by the Sources navigation sidebar.
1826
1827 2019-08-08  Devin Rousso  <drousso@apple.com>
1828
1829         Web Inspector: Page: don't allow the domain to be disabled
1830         https://bugs.webkit.org/show_bug.cgi?id=200109
1831
1832         Reviewed by Brian Burg.
1833
1834         The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
1835         sense to support the ability to "disable" (as well as "enable") the agent.
1836
1837         When the first frontend connects, we should treat the `PageAgent` as active and available.
1838
1839         * UserInterface/Controllers/NetworkManager.js:
1840         (WI.NetworkManager.prototype.initializeTarget):
1841
1842         * Test/Test.js:
1843         (WI.loaded):
1844         (WI.initializeBackendTarget):
1845         (WI.contentLoaded):
1846         (WI.targetsAvailable): Added.
1847         (WI.whenTargetsAvailable): Added.
1848         * Test/TestStub.js:
1849         Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
1850         messages being sent to the frontend are batched.
1851
1852 2019-08-08  Devin Rousso  <drousso@apple.com>
1853
1854         Web Inspector: rename `queryObjects` to `queryInstances` for clarity
1855         https://bugs.webkit.org/show_bug.cgi?id=200520
1856
1857         Reviewed by Brian Burg.
1858
1859         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1860
1861 2019-08-07  Devin Rousso  <drousso@apple.com>
1862
1863         Fix construction of `WI.EventBreakpoint` after r248201
1864
1865         Reviewed by Joseph Pecoraro.
1866
1867         * UserInterface/Controllers/DOMManager.js:
1868         (WI.DOMManager.prototype.setBreakpointForEventListener):
1869
1870 2019-08-07  Devin Rousso  <drousso@apple.com>
1871
1872         Web Inspector: Settings: add an Engineering pane to expose useful settings for other WebKit engineers
1873         https://bugs.webkit.org/show_bug.cgi?id=200492
1874
1875         Reviewed by Joseph Pecoraro.
1876
1877         Other WebKit engineers might find being able to see internal objects or pause in internal
1878         scripts useful, so we should allow them to do so without having to enable Web Inspector's
1879         debug "mode".
1880
1881         A new "Engineering" pane is added to the Settings Tab:
1882          - Debugging
1883             - Show WebKit-internal scripts
1884             - Pause in WebKit-internal scripts
1885          - Heap Snapshot
1886             - Show Internal Objects
1887             - Show Private Symbols
1888
1889         * UserInterface/Base/Setting.js:
1890         * UserInterface/Views/SettingsTabContentView.js:
1891         (WI.SettingsTabContentView.prototype.initialLayout):
1892         (WI.SettingsTabContentView.prototype._createEngineeringSettingsView): Added.
1893         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
1894
1895         * UserInterface/Base/Main.js:
1896         (WI.resolvedLayoutDirection):
1897         (WI.setLayoutDirection):
1898         * UserInterface/Base/Object.js:
1899
1900         * UserInterface/Protocol/InspectorBackend.js:
1901         (InspectorBackendClass):
1902         (InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
1903         (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
1904         (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
1905         (InspectorBackendClass.prototype.get dumpInspectorTimeStats):
1906         (InspectorBackendClass.prototype.set filterMultiplexingBackendInspectorProtocolMessages):
1907         (InspectorBackendClass.prototype.get filterMultiplexingBackendInspectorProtocolMessages):
1908         * UserInterface/Protocol/RemoteObject.js:
1909         (WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
1910         * UserInterface/Debug/Bootstrap.js:
1911         (WI.runBootstrapOperations):
1912         * UserInterface/Debug/UncaughtExceptionReporter.js:
1913         (handleUncaughtExceptionRecord):
1914         * UserInterface/Models/CSSProperty.js:
1915         (WI.CSSProperty.prototype._updateOwnerStyleText):
1916         * UserInterface/Models/CSSStyleDeclaration.js:
1917         (WI.CSSStyleDeclaration.prototype.update):
1918         * UserInterface/Controllers/DebuggerManager.js:
1919         (WI.DebuggerManager):
1920         (WI.DebuggerManager.prototype.initializeTarget):
1921         (WI.DebuggerManager.prototype.get knownNonResourceScripts):
1922         (WI.DebuggerManager.prototype.debuggerDidPause):
1923         (WI.DebuggerManager.prototype.scriptDidParse):
1924         (WI.DebuggerManager.prototype._handleEngineeringShowInternalScriptsSettingChanged): Added.
1925         (WI.DebuggerManager.prototype._handleEngineeringPauseForInternalScriptsSettingChanged): Added.
1926         (WI.DebuggerManager.prototype._pauseForInternalScriptsDidChange): Deleted.
1927         (WI.DebuggerManager.prototype._debugUIEnabledDidChange): Deleted.
1928         * UserInterface/Views/ConsoleMessageView.js:
1929         (WI.ConsoleMessageView.prototype._appendLocationLink):
1930         * UserInterface/Views/HeapSnapshotDataGridTree.js:
1931         (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
1932         * UserInterface/Views/OpenResourceDialog.js:
1933         (WI.OpenResourceDialog.prototype._addScriptsForTarget):
1934         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1935         (WI.SpreadsheetCSSStyleDeclarationEditor):
1936         * UserInterface/Views/StackTraceView.js:
1937         (WI.StackTraceView):
1938         * UserInterface/Views/View.js:
1939         (WI.View.prototype._layoutSubtree):
1940
1941 2019-08-07  Nikita Vasilyev  <nvasilyev@apple.com>
1942
1943         Web Inspector: RTL: content of Variables section should always be LTR
1944         https://bugs.webkit.org/show_bug.cgi?id=200481
1945
1946         Reviewed by Devin Rousso.
1947
1948         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1949         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
1950
1951 2019-08-07  Devin Rousso  <drousso@apple.com>
1952
1953         Web Inspector: Uncaught Exception: TimelineAgent already enabled
1954         https://bugs.webkit.org/show_bug.cgi?id=200513
1955
1956         Reviewed by Joseph Pecoraro.
1957
1958         Update some incorrect compatibility comments from r248286.
1959
1960         * UserInterface/Protocol/InspectorFrontendAPI.js:
1961         * UserInterface/Controllers/TimelineManager.js:
1962
1963 2019-08-06  Devin Rousso  <drousso@apple.com>
1964
1965         Web Inspector: Show radius values in box model metrics view
1966         https://bugs.webkit.org/show_bug.cgi?id=160993
1967         <rdar://problem/27919035>
1968
1969         Reviewed by Brian Burg.
1970
1971         * UserInterface/Views/BoxModelDetailsSectionRow.js:
1972         (WI.BoxModelDetailsSectionRow.prototype._getPropertyValue): Added.
1973         (WI.BoxModelDetailsSectionRow.prototype._getPropertyValueAsPx):
1974         (WI.BoxModelDetailsSectionRow.prototype._getBox):
1975         (WI.BoxModelDetailsSectionRow.prototype._getComponentPrefix): Added.
1976         (WI.BoxModelDetailsSectionRow.prototype._getComponentSuffix):
1977         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
1978         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
1979         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
1980         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput):
1981         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.inspectedPage_node_toggleInlineStyleProperty):
1982         * UserInterface/Views/BoxModelDetailsSectionRow.css:
1983         (.details-section .row.box-model .box): Added.
1984         (.details-section .row.box-model .box > .label): Added.
1985         (.details-section .row.box-model .box.position): Added.
1986         (.details-section .row.box-model .box.margin): Added.
1987         (.details-section .row.box-model:not(.hovered) .box.margin, .details-section .row.box-model .box.margin.active): Added.
1988         (.details-section .row.box-model .box.border): Added.
1989         (.details-section .row.box-model:not(.hovered) .box.border, .details-section .row.box-model .box.border.active): Added.
1990         (.details-section .row.box-model .box.border > .label): Added.
1991         (.details-section .row.box-model .box.border.has-top-left-radius, .details-section .row.box-model .box.border.has-top-left-radius .box): Added.
1992         (.details-section .row.box-model .box.border.has-top-right-radius, .details-section .row.box-model .box.border.has-top-right-radius .box): Added.
1993         (.details-section .row.box-model .box.border.has-bottom-right-radius, .details-section .row.box-model .box.border.has-bottom-right-radius .box): Added.
1994         (.details-section .row.box-model .box.border.has-bottom-left-radius, .details-section .row.box-model .box.border.has-bottom-left-radius .box): Added.
1995         (.details-section .row.box-model .box.padding): Added.
1996         (.details-section .row.box-model:not(.hovered) .box.padding, .details-section .row.box-model .box.padding.active): Added.
1997         (.details-section .row.box-model .box.content): Added.
1998         (.details-section .row.box-model:not(.hovered) .box.content, .details-section .row.box-model .box.content.active): Added.
1999         (.details-section .row.box-model :matches(.top, .right, .bottom, .left)): Added.
2000         (.details-section .row.box-model :matches(.top, .right, .bottom, .left):not(.editing), .details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
2001         (.details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
2002         (.details-section .row.box-model :matches(.top-left, .top-right)): Added.
2003         (.details-section .row.box-model :matches(.bottom-left, .bottom-right):not(.editing)): Added.
2004         (.details-section .row.box-model :matches(.bottom-left, .bottom-right).editing): Added.
2005         (.details-section .row.box-model :matches(.top-left, .bottom-left):not(.editing)): Added.
2006         (.details-section .row.box-model :matches(.top-left, .bottom-left).editing): Added.
2007         (.details-section .row.box-model :matches(.top-right, .bottom-right):not(.editing)): Added.
2008         (.details-section .row.box-model :matches(.top-right, .bottom-right).editing): Added.
2009         (@media (prefers-color-scheme: dark) .details-section .row.box-model .box): Added.
2010         (@media (prefers-color-scheme: dark) .details-section .row.box-model:not(.hovered) .box:matches(.margin, .border, .padding, .content), .details-section .row.box-model .box.active:matches(.margin, .border, .padding, .content)): Added.
2011         (@media (prefers-color-scheme: dark) .details-section .row.box-model .box.margin): Added.
2012         (@media (prefers-color-scheme: dark) .details-section .row.box-model .box.border): Added.
2013         (.details-section .row.box-model :matches(.position, .margin, .border, .padding, .content)): Deleted.
2014         (.details-section .row.box-model .position): Deleted.
2015         (.details-section .row.box-model .margin): Deleted.
2016         (.details-section .row.box-model:not(.hovered) .margin, .details-section .row.box-model .margin.active): Deleted.
2017         (.details-section .row.box-model .border): Deleted.
2018         (.details-section .row.box-model:not(.hovered) .border, .details-section .row.box-model .border.active): Deleted.
2019         (.details-section .row.box-model .padding): Deleted.
2020         (.details-section .row.box-model:not(.hovered) .padding, .details-section .row.box-model .padding.active): Deleted.
2021         (.details-section .row.box-model .content): Deleted.
2022         (.details-section .row.box-model:not(.hovered) .content, .details-section .row.box-model .content.active): Deleted.
2023         (.details-section .row.box-model :matches(.content span, .top, .right, .bottom, .left)): Deleted.
2024         (.details-section .row.box-model :matches(.right, .left)): Deleted.
2025         (.details-section .row.box-model:not(.hovered) :matches(.margin, .border, .padding, .content), .details-section .row.box-model .active:matches(.margin, .border, .padding, .content)): Deleted.
2026
2027         * UserInterface/Models/CSSProperty.js:
2028         (WI.CSSProperty.prototype.update):
2029         Ensure that the `_value` is updated whenever the `_rawValue` is updated.
2030
2031 2019-08-06  Commit Queue  <commit-queue@webkit.org>
2032
2033         Unreviewed, rolling out r248289.
2034         https://bugs.webkit.org/show_bug.cgi?id=200488
2035
2036         Broke internal builds (Requested by drousso on #webkit).
2037
2038         Reverted changeset:
2039
2040         "Web Inspector: Styles: show @supports CSS groupings"
2041         https://bugs.webkit.org/show_bug.cgi?id=200419
2042         https://trac.webkit.org/changeset/248289
2043
2044 2019-08-06  Nikita Vasilyev  <nvasilyev@apple.com>
2045
2046         Web Inspector: RTL: go-to arrows and expand triangles in Computed panel should match their context
2047         https://bugs.webkit.org/show_bug.cgi?id=200449
2048
2049         Reviewed by Joseph Pecoraro.
2050
2051         * UserInterface/Views/ComputedStyleSection.css:
2052         (body[dir=rtl] .computed-style-section .computed-property-item .disclosure-button): Deleted.
2053
2054         * UserInterface/Views/Main.css:
2055         (body[dir=rtl] [dir=ltr] .go-to-arrow): Added.
2056         In the RTL mode, LTR "islands" should have their contents to be still LTR.
2057
2058 2019-08-05  Devin Rousso  <drousso@apple.com>
2059
2060         Web Inspector: Styles: show @supports CSS groupings
2061         https://bugs.webkit.org/show_bug.cgi?id=200419
2062
2063         Reviewed by Joseph Pecoraro.
2064
2065         * UserInterface/Models/CSSGrouping.js: Renamed from Source/WebInspectorUI/UserInterface/Models/CSSMedia.js.
2066         (WI.CSSGrouping):
2067         (WI.CSSGrouping.prototype.get type):
2068         (WI.CSSGrouping.prototype.get text):
2069         (WI.CSSGrouping.prototype.get sourceCodeLocation):
2070         (WI.CSSGrouping.prototype.get isMedia): Added.
2071         (WI.CSSGrouping.prototype.get isSupports): Added.
2072         (WI.CSSGrouping.prototype.get prefix): Added.
2073
2074         * UserInterface/Models/CSSStyleDeclaration.js:
2075         (WI.CSSStyleDeclaration.prototype.get groupings): Added.
2076         (WI.CSSStyleDeclaration.prototype.generateCSSRuleString):
2077         (WI.CSSStyleDeclaration.prototype.get mediaList): Deleted.
2078
2079         * UserInterface/Models/CSSRule.js:
2080         (WI.CSSRule):
2081         (WI.CSSRule.prototype.get groupings): Added.
2082         (WI.CSSRule.prototype.update):
2083         (WI.CSSRule.prototype._selectorResolved):
2084         (WI.CSSRule.prototype.get mediaList): Deleted.
2085
2086         * UserInterface/Models/DOMNodeStyles.js:
2087         (WI.DOMNodeStyles.prototype._parseRulePayload):
2088         (WI.DOMNodeStyles.prototype.rulesForSelector): Deleted.
2089
2090         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2091         (WI.SpreadsheetCSSStyleDeclarationSection):
2092         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
2093         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied):
2094         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader): Deleted.
2095         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2096         (.spreadsheet-css-declaration :matches(.header, .header-groupings)): Added.
2097         (.spreadsheet-css-declaration :matches(.header, .header-groupings):first-child): Added.
2098         (.spreadsheet-css-declaration .header-groupings > .grouping): Added.
2099         (.spreadsheet-css-declaration .header-groupings + .header > .selector > .icon): Added.
2100         (.spreadsheet-css-declaration :matches(.header, .header-media)): Deleted.
2101         (.spreadsheet-css-declaration :matches(.header, .header-media):first-child): Deleted.
2102         (.spreadsheet-css-declaration .media-label): Deleted.
2103
2104         * UserInterface/Controllers/CSSManager.js:
2105         (WI.CSSManager.protocolGroupingTypeToEnum): Added.
2106         (WI.CSSManager.protocolMediaSourceToEnum): Deleted.
2107
2108         * UserInterface/Main.html:
2109         * UserInterface/Test.html:
2110
2111 2019-08-05  Devin Rousso  <drousso@apple.com>
2112
2113         Can't use $0, $1 etc when inspecting Google Docs pages because the content uses these for function names
2114         https://bugs.webkit.org/show_bug.cgi?id=195834
2115
2116         Reviewed by Joseph Pecoraro.
2117
2118         Allow the user to alias saved results by providing a different prefix (e.g. "$") from within
2119         Web Inspector. When changing the alias, all existing saved results will update to be
2120         reference-able from the new alias.
2121
2122         * UserInterface/Controllers/RuntimeManager.js:
2123         (WI.RuntimeManager):
2124         (WI.RuntimeManager.preferredSavedResultPrefix): Added.
2125         (WI.RuntimeManager.prototype.initializeTarget):
2126         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2127         (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
2128
2129         * UserInterface/Base/Setting.js:
2130         * UserInterface/Base/Main.js:
2131         (WI.contentLoaded):
2132         (WI.contentLoaded.updateConsoleSavedResultPrefixCSSVariable): Added.
2133         * UserInterface/Views/ConsoleMessageView.js:
2134         (WI.ConsoleMessageView.prototype.toClipboardString):
2135         (WI.ConsoleMessageView.prototype.removeEventListeners): Added.
2136         (WI.ConsoleMessageView.prototype._appendSavedResultIndex):
2137         (WI.ConsoleMessageView.prototype._appendSavedResultIndex.updateSavedVariableText): Added.
2138         (WI.ConsoleMessageView.prototype._rootPropertyPathForObject):
2139         (WI.ConsoleMessageView.prototype._rootPropertyPathForObject.prefixSavedResultIndex): Added.
2140         * UserInterface/Views/LogContentView.js:
2141         (WI.LogContentView.prototype._sessionStarted):
2142         (WI.LogContentView.prototype._logCleared):
2143         * UserInterface/Views/DOMTreeOutline.css:
2144         (.tree-outline.dom.show-last-selected li.last-selected > span::after):
2145         * UserInterface/Views/QuickConsole.js:
2146         (WI.QuickConsole):
2147         (WI.QuickConsole.prototype.closed):
2148         (WI.QuickConsole.prototype._updateAutomaticExecutionContextPathComponentTooltip): Added.
2149         Listen for changes to the setting that holds the current saved result alias and update any
2150         related UI accordingly.
2151
2152         * UserInterface/Views/SettingsTabContentView.js:
2153         (WI.SettingsTabContentView.prototype._createConsoleSettingsView):
2154         * UserInterface/Views/SettingsTabContentView.css:
2155         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Added.
2156         * UserInterface/Views/SettingsGroup.js:
2157         (WI.SettingsGroup.prototype.addCustomEditor): Added.
2158         Add an input to the Settings tab that controls the saved result prefix alias. Only allow
2159         [a-zA-Z0-9_$] as values (but [0-9] cannot be used as the start).
2160
2161         * UserInterface/Models/PropertyPath.js:
2162         (WI.PropertyPath.prototype.set pathComponent): Added.
2163         Miscellaneous getters/setters.
2164
2165         * Localizations/en.lproj/localizedStrings.js:
2166
2167         * UserInterface/Test/TestHarness.js:
2168         (TestHarness.prototype.newline): Added.
2169         Convenience function for adding newlines to test results.
2170
2171 2019-08-05  Devin Rousso  <drousso@apple.com>
2172
2173         Web Inspector: Timelines: disable related agents when the tab is closed
2174         https://bugs.webkit.org/show_bug.cgi?id=200118
2175
2176         Reviewed by Joseph Pecoraro.
2177
2178         Rework how `enable`/`disable` is used for timeline-related agents so that events are not sent
2179         and data isn't kept alive when the Timelines tab isn't enabled.
2180
2181         * UserInterface/Controllers/TimelineManager.js:
2182         (WI.TimelineManager):
2183         (WI.TimelineManager.prototype.get domains): Added.
2184         (WI.TimelineManager.prototype.activateExtraDomain): Added.
2185         (WI.TimelineManager.prototype.initializeTarget):
2186         (WI.TimelineManager.prototype.reset):
2187         (WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
2188         (WI.TimelineManager.prototype.enable): Added.
2189         (WI.TimelineManager.prototype.disable): Added.
2190         (WI.TimelineManager.prototype.startCapturing):
2191         (WI.TimelineManager.prototype.stopCapturing):
2192         (WI.TimelineManager.prototype.async processJSON):
2193         (WI.TimelineManager.prototype.capturingStarted):
2194         (WI.TimelineManager.prototype.capturingStopped):
2195         (WI.TimelineManager.prototype.autoCaptureStarted):
2196         (WI.TimelineManager.prototype.eventRecorded):
2197         (WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
2198         (WI.TimelineManager.prototype.pageLoadEventFired):
2199         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
2200         (WI.TimelineManager.prototype.memoryTrackingUpdated):
2201         (WI.TimelineManager.prototype.heapTrackingStarted):
2202         (WI.TimelineManager.prototype.heapTrackingCompleted):
2203         (WI.TimelineManager.prototype.heapSnapshotAdded):
2204         (WI.TimelineManager.prototype._loadNewRecording):
2205         (WI.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
2206         (WI.TimelineManager.prototype._provisionalLoadStarted):
2207         (WI.TimelineManager.prototype._mainResourceDidChange):
2208         (WI.TimelineManager.prototype._resourceWasAdded):
2209         (WI.TimelineManager.prototype._garbageCollected):
2210         (WI.TimelineManager.prototype._memoryPressure):
2211         (WI.TimelineManager.prototype.scriptProfilerTrackingUpdated):
2212         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
2213         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
2214         (WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
2215         (WI.TimelineManager.prototype._handleDOMNodePowerEfficientPlaybackStateChanged):
2216         * UserInterface/Models/Instrument.js:
2217         (WI.Instrument.startLegacyTimelineAgent):
2218         (WI.Instrument.stopLegacyTimelineAgent):
2219
2220         * UserInterface/Controllers/HeapManager.js:
2221         (WI.HeapManager): Added.
2222         (WI.HeapManager.prototype.get domains): Added.
2223         (WI.HeapManager.prototype.activateExtraDomain): Added.
2224         (WI.HeapManager.prototype.initializeTarget):
2225         (WI.HeapManager.prototype.enable): Added.
2226         (WI.HeapManager.prototype.disable): Added.
2227         (WI.HeapManager.prototype.snapshot): Added.
2228         (WI.HeapManager.prototype.getPreview): Added.
2229         (WI.HeapManager.prototype.getRemoteObject): Added.
2230         (WI.HeapManager.prototype.garbageCollected):
2231
2232         * UserInterface/Controllers/MemoryManager.js:
2233         (WI.MemoryManager): Added.
2234         (WI.MemoryManager.prototype.get domains): Added.
2235         (WI.MemoryManager.prototype.activateExtraDomain): Added.
2236         (WI.MemoryManager.prototype.initializeTarget):
2237         (WI.MemoryManager.prototype.enable): Added.
2238         (WI.MemoryManager.prototype.disable): Added.
2239         (WI.MemoryManager.prototype.memoryPressure):
2240
2241         * UserInterface/Views/TimelineTabContentView.js:
2242         (WI.TimelineTabContentView):
2243         (WI.TimelineTabContentView.prototype.closed):
2244
2245         * UserInterface/Models/HeapAllocationsInstrument.js:
2246         (WI.HeapAllocationsInstrument):
2247         (WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
2248         * UserInterface/Views/HeapAllocationsTimelineView.js:
2249         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
2250         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2251         (WI.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
2252         (WI.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
2253         (WI.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
2254         Go through the `HeapManager` for `HeapAgent` commands so it can better manage state.
2255
2256         * UserInterface/Test/Test.js:
2257         (WI.contentLoaded):
2258
2259 2019-08-05  Nikita Vasilyev  <nvasilyev@apple.com>
2260
2261         Web Inspector: brotli-compressed resources have "Compressed: No" in Resources details sidebar
2262         https://bugs.webkit.org/show_bug.cgi?id=200452
2263
2264         Reviewed by Joseph Pecoraro.
2265
2266         * UserInterface/Models/Resource.js:
2267         (WI.Resource.prototype.get compressed):
2268         Add "br" - Brotli content encoding.
2269
2270 2019-08-05  Devin Rousso  <drousso@apple.com>
2271
2272         Web Inspector: Styles: variable swatch not shown for var() with a fallback
2273         https://bugs.webkit.org/show_bug.cgi?id=200237
2274
2275         Reviewed by Joseph Pecoraro.
2276
2277         * UserInterface/Views/SpreadsheetStyleProperty.js:
2278         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
2279         (WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens): Added.
2280         (WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
2281         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
2282         (WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
2283         (WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
2284         Check to see if there's a fallback value in the `var()` and tokenize it if there is. Mark
2285         the property as invalid if the `var()` doesn't end up resolving to anything.
2286
2287         * UserInterface/Views/InlineSwatch.js:
2288         (WI.InlineSwatch):
2289         (WI.InlineSwatch.prototype.get value):
2290         (WI.InlineSwatch.prototype._updateSwatch):
2291         (WI.InlineSwatch.prototype._handleContextMenuEvent):
2292         (WI.InlineSwatch.prototype._getNextValidHEXFormat.hexMatchesCurrentColor):
2293         (WI.InlineSwatch.prototype._getNextValidHEXFormat):
2294         Allow the `value` to be a function. In that case, use the getter `this.value` instead of the
2295         value `this._value` directly so that the function is invoked.
2296         This is needed for variable swatches because the fallback value could change after the
2297         swatch has been created (e.g. another swatch in a CSS property value that just modifies the
2298         text, rather than re-renders the entire CSS property value).
2299
2300         * UserInterface/Models/CSSStyleDeclaration.js:
2301         (WI.CSSStyleDeclaration.prototype.resolveVariableValue): Added.
2302         Follow the variable chain until an ultimate value is reached.
2303
2304         * UserInterface/Models/CSSKeywordCompletions.js:
2305         (WI.CSSKeywordCompletions.isColorAwareProperty):
2306         (WI.CSSKeywordCompletions.isTimingFunctionAwareProperty): Added.
2307         Limit `cubic-bezier` and `spring` tokens to only be shown for timing function properties.
2308
2309 2019-08-05  Devin Rousso  <drousso@apple.com>
2310
2311         Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
2312         https://bugs.webkit.org/show_bug.cgi?id=200422
2313
2314         Reviewed by Joseph Pecoraro.
2315
2316         * Localizations/en.lproj/localizedStrings.js:
2317
2318         * UserInterface/Controllers/CSSManager.js:
2319         (WI.CSSManager.prototype._resourceAdded):
2320         (WI.CSSManager.prototype._resourceTypeDidChange):
2321         (WI.CSSManager.prototype._clearStyleSheetsForResource):
2322         (WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
2323         * UserInterface/Models/CSSStyleSheet.js:
2324         (WI.CSSStyleSheet.prototype.get displayName):
2325         * UserInterface/Models/CollectionTypes.js:
2326         (WI.CSSStyleSheetCollection.prototype.get displayName):
2327         * UserInterface/Models/Resource.js:
2328         (WI.Resource.displayNameForType):
2329         (WI.Resource.prototype.get syntheticMIMEType):
2330         * UserInterface/Models/ResourceCollection.js:
2331         (WI.ResourceCollection.prototype.objectIsRequiredType):
2332         * UserInterface/Views/NetworkTableContentView.js:
2333         (WI.NetworkTableContentView):
2334         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
2335         * UserInterface/Views/ResourceClusterContentView.js:
2336         (WI.ResourceClusterContentView.prototype._contentViewForResourceType):
2337         * UserInterface/Views/ResourceSidebarPanel.js:
2338         (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
2339         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2340         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
2341         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2342         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._save):
2343         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):
2344         * UserInterface/Views/StyleOriginView.js:
2345         (WI.StyleOriginView.prototype.update):
2346         * UserInterface/Views/TextResourceContentView.js:
2347         (WI.TextResourceContentView.prototype._shouldBeEditable):
2348
2349         * UserInterface/Views/CSSStyleSheetTreeElement.js:
2350         (WI.CSSStyleSheetTreeElement):
2351         * UserInterface/Views/ResourceIcons.css:
2352         (:matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
2353         (.source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
2354         (.large :matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
2355         (.large .source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
2356         (:matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
2357         (.source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.
2358         (.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
2359         (.large .source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.
2360
2361 2019-08-03  Devin Rousso  <drousso@apple.com>
2362
2363         Web Inspector: Elements: Styles: move psuedo-selector rules before inherited rules
2364         https://bugs.webkit.org/show_bug.cgi?id=199950
2365
2366         Reviewed by Joseph Pecoraro.
2367
2368         Since pseudo-selector rules (usually) affect the selected element, or are related to its
2369         content, it's more useful to have them near that element's rules instead of after all of
2370         it's inherited rules.
2371
2372         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2373         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
2374
2375 2019-08-03  Devin Rousso  <drousso@apple.com>
2376
2377         Web Inspector: Elements: Styles: add icons for various CSS rule types
2378         https://bugs.webkit.org/show_bug.cgi?id=199946
2379
2380         Reviewed by Joseph Pecoraro.
2381
2382         * UserInterface/Controllers/CSSManager.js:
2383         (WI.CSSManager.displayNameForPseudoId):
2384         Add hardcoded pseudo-selector identifiers for older backends.
2385
2386         * UserInterface/Models/CSSSelector.js:
2387         (WI.CSSSelector.prototype.isPseudoSelector): Added.
2388         (WI.CSSSelector.prototype.isPseudoElementSelector): Deleted.
2389         There are more types of pseudo-selectors than just `:{before|after}`.
2390
2391         * UserInterface/Models/CSSStyleDeclaration.js:
2392         (WI.CSSStyleDeclaration.prototype.generateCSSRuleString): Added.
2393
2394         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2395         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionAddNewRule): Added.
2396         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
2397         Provide a delegate method for adding a new rule, so the `WI.SpreadsheetRulesStyleDetailsPanel`
2398         can know what selector to focus once the new rule gets added.
2399
2400         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2401         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
2402         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
2403         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu): Added.
2404         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2405         (.spreadsheet-css-declaration .header.editing-selector .selector): Added.
2406         (.spreadsheet-css-declaration .selector > .icon): Added.
2407         (.spreadsheet-css-declaration .selector > .icon + *): Added.
2408         (.spreadsheet-css-declaration .selector.style-attribute > span): Added.
2409         When "mousedown" (or "contextmenu") on the icon, show a context menu with helpful actions:
2410          - Copy Rule
2411          - {Disable|Enable} Rule
2412          - Duplicate Selector
2413          - Add :{active|focus|hover|visited} Rule
2414          - Create ::{before|after} Rule
2415          - Reveal in {Resources Tab|Sources Tab|Stylesheet}
2416         Drive-by: add an extra 0.5px of initial margin before the Style Attribute selector (which is
2417         sans-serif) so it properly aligns with the other selectors (which are monospaced).
2418
2419         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2420         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
2421         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2422         (.spreadsheet-style-declaration-editor:empty): Added.
2423         (.spreadsheet-style-declaration-editor.no-properties): Deleted.
2424         Add some extra space when there's no inline style so it looks a bit less cramped.
2425
2426         * UserInterface/Main.html:
2427         * UserInterface/Views/StyleRuleIcons.css: Added.
2428         (.author-style-rule-icon .icon):
2429         (.author-style-rule-icon.pseudo-selector .icon):
2430         (.user-style-rule-icon .icon):
2431         (.user-style-rule-icon.pseudo-selector .icon):
2432         (.user-agent-style-rule-icon .icon):
2433         (.user-agent-style-rule-icon.pseudo-selector .icon):
2434         (.inspector-style-rule-icon .icon):
2435         (.inspector-style-rule-icon.pseudo-selector .icon):
2436         (.inherited-style-rule-icon .icon):
2437         (.inherited-element-style-rule-icon .icon):
2438         * UserInterface/Images/StyleRule.svg: Added.
2439         * UserInterface/Images/StyleRuleInheritedElement.svg: Added.
2440         * UserInterface/Images/StyleRulePseudo.svg: Added.
2441         Add generic icon classes for style rule icons.
2442
2443         * UserInterface/Base/Setting.js:
2444         * UserInterface/Views/SettingsTabContentView.js:
2445         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2446         Add experimental setting.
2447
2448         * Localizations/en.lproj/localizedStrings.js:
2449
2450 2019-08-03  Devin Rousso  <drousso@apple.com>
2451
2452         Web Inspector: DOM: add a special breakpoint for "All Events"
2453         https://bugs.webkit.org/show_bug.cgi?id=200285
2454
2455         Reviewed by Joseph Pecoraro.
2456
2457         Similar to the existing "All Requests" breakpoint, there should be a way to set a breakpoint
2458         that would pause for any DOM event, regardless of the event's name. This is useful for
2459         situations where the event name isn't known, or where one simply want's to pause on the next
2460         entry to the event loop.
2461
2462         Along these lines, make the "requestAnimationFrame", "setTimeout", and "setInterval"
2463         event breakpoints into special breakpoints that can be added/removed via the create
2464         breakpoint context menu. This simplifies the process for setting these breakpoints, and also
2465         makes them more discoverable (most people wouldn't consider them to be "events").
2466
2467         * UserInterface/Models/EventBreakpoint.js:
2468         (WI.EventBreakpoint):
2469         (WI.EventBreakpoint.deserialize):
2470         (WI.EventBreakpoint.prototype.saveIdentityToCookie):
2471         (WI.EventBreakpoint.prototype.toJSON):
2472
2473         * UserInterface/Controllers/DebuggerManager.js:
2474         (WI.DebuggerManager.prototype._pauseReasonFromPayload):
2475
2476         * UserInterface/Controllers/DOMDebuggerManager.js:
2477         (WI.DOMDebuggerManager):
2478         (WI.DOMDebuggerManager.prototype.initializeTarget):
2479         (WI.DOMDebuggerManager.supportsDOMBreakpoints): Added.
2480         (WI.DOMDebuggerManager.supportsEventBreakpoints):
2481         (WI.DOMDebuggerManager.supportsEventListenerBreakpoints): Added.
2482         (WI.DOMDebuggerManager.supportsURLBreakpoints):
2483         (WI.DOMDebuggerManager.supportsXHRBreakpoints): Added.
2484         (WI.DOMDebuggerManager.supportsAllListenersBreakpoint): Added.
2485         (WI.DOMDebuggerManager.prototype.get allAnimationFramesBreakpoint): Added.
2486         (WI.DOMDebuggerManager.prototype.get allIntervalsBreakpoint): Added.
2487         (WI.DOMDebuggerManager.prototype.get allListenersBreakpoint): Added.
2488         (WI.DOMDebuggerManager.prototype.get allTimeoutsBreakpoint): Added.
2489         (WI.DOMDebuggerManager.prototype.get listenerBreakpoints): Added.
2490         (WI.DOMDebuggerManager.prototype.isBreakpointSpecial):
2491         (WI.DOMDebuggerManager.prototype.listenerBreakpointForEventName): Added.
2492         (WI.DOMDebuggerManager.prototype.addEventBreakpoint):
2493         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
2494         (WI.DOMDebuggerManager.prototype.addURLBreakpoint):
2495         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
2496         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
2497         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
2498         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
2499         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
2500         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
2501         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
2502         (WI.DOMDebuggerManager.prototype.get eventBreakpoints): Deleted.
2503         (WI.DOMDebuggerManager.prototype.eventBreakpointForTypeAndEventName): Deleted.
2504         Add additional target compatibility checks.
2505
2506         * UserInterface/Views/EventBreakpointPopover.js:
2507         (WI.EventBreakpointPopover.prototype.show):
2508         (WI.EventBreakpointPopover.prototype.dismiss):
2509         (WI.EventBreakpointPopover.prototype._handleTypeSelectChange): Deleted.
2510         * UserInterface/Views/EventBreakpointPopover.css:
2511         (.popover .event-breakpoint-content > input): Added.
2512         (.popover .event-breakpoint-content > input::placeholder): Added.
2513         (.popover .event-breakpoint-content > .event-type): Deleted.
2514         (.popover .event-breakpoint-content > .event-type > input): Deleted.
2515         (.popover .event-breakpoint-content > .event-type > input::placeholder): Deleted.
2516
2517         * UserInterface/Views/EventBreakpointTreeElement.css:
2518         (.breakpoint.event.breakpoint-for-interval:not(.breakpoint-paused-icon) .icon): Added.
2519         (.breakpoint.event.breakpoint-for-timeout:not(.breakpoint-paused-icon) .icon): Added.
2520         (.breakpoint.event.breakpoint-for-timer:not(.breakpoint-paused-icon) .icon): Deleted.
2521
2522         * UserInterface/Views/DebuggerSidebarPanel.js:
2523         (WI.DebuggerSidebarPanel):
2524         (WI.DebuggerSidebarPanel.prototype.saveStateToCookie):
2525         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
2526         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
2527         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
2528         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
2529         (WI.DebuggerSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
2530         (WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint): Added.
2531         (WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu):
2532         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2533         (WI.SourcesNavigationSidebarPanel):
2534         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
2535         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
2536         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
2537         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
2538         (WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint): Added.
2539         (WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
2540         Add create breakpoint context menu items (also sort the breakpoints in this order):
2541          - "All Animation Frames"  =>  [A] All Animation Frames
2542          - "All Timeouts"          =>  [T] All Timeouts
2543          - "All Intervals"         =>  [I] All Intervals
2544          - "All Events"            =>  [E] All Events
2545
2546         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2547         (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
2548
2549         * UserInterface/Base/Setting.js:
2550         * UserInterface/Images/EventBreakpointInterval.svg: Added.
2551         * UserInterface/Images/EventBreakpointTimeout.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/EventBreakpointTimer.svg.
2552         * Localizations/en.lproj/localizedStrings.js:
2553
2554 2019-08-03  Devin Rousso  <drousso@apple.com>
2555
2556         Web Inspector: Heap Snapshot Views should be searchable
2557         https://bugs.webkit.org/show_bug.cgi?id=157582
2558         <rdar://problem/26228629>
2559
2560         Reviewed by Joseph Pecoraro.
2561
2562         Without the ability to filter/search, it's far more difficult to find objects of interest.
2563         Rather than spending time scrolling through the entire heap snapshot or sorting by "Name",
2564         a simple filter/search (which also uses the global search settings) is almost instant.
2565
2566         * UserInterface/Views/HeapAllocationsTimelineView.js:
2567         (WI.HeapAllocationsTimelineView.prototype.updateFilter): Addded.
2568         (WI.HeapAllocationsTimelineView.prototype.get showsFilterBar): Deleted.
2569         * UserInterface/Views/HeapSnapshotClusterContentView.js:
2570         (WI.HeapSnapshotClusterContentView.prototype.updateFilter): Added.
2571         * UserInterface/Views/HeapSnapshotContentView.js:
2572         (WI.HeapSnapshotContentView):
2573         (WI.HeapSnapshotContentView.prototype.updateFilter): Added.
2574         (WI.HeapSnapshotContentView.prototype.dataGridMatchNodeAgainstCustomFilters): Added.
2575         (WI.HeapSnapshotContentView.prototype.dataGridMatchShouldPopulateWhenFilteringNode): Added.
2576         * UserInterface/Views/DataGrid.js:
2577         (WI.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
2578         Don't attempt to populate each heap snapshot `WI.DataGridNode` when filtering, as that can
2579         quickly exhaust memory due to the sheer size of a heap snapshot.
2580
2581         * UserInterface/Base/Main.js:
2582         (WI._find):
2583         * UserInterface/Views/TimelineTabContentView.js:
2584         (WI.TimelineTabContentView.prototype.get canHandleFindEvent): Added.
2585         (WI.TimelineTabContentView.prototype.handleFindEvent): Added.
2586         * UserInterface/Views/TimelineRecordingContentView.js:
2587         (WI.TimelineRecordingContentView.prototype.get canFocusFilterBar): Added.
2588         (WI.TimelineRecordingContentView.prototype.focusFilterBar): Added.
2589         * UserInterface/Views/FilterBar.js:
2590         (WI.FilterBar.prototype.focus): Added.
2591         Allow the current tab to intercept the find shortcut and do something custom. In the case
2592         of a `WI.TimelineTabContentView`, declare that it can handle the find event if the displayed
2593         content view (`WI.TimelineRecordingContentView`) can focus it's filter bar. If so, when the
2594         find shortcut is triggered, focus the filter bar.
2595
2596 2019-08-03  Devin Rousso  <drousso@apple.com>
2597
2598         Web Inspector: CSS Formatter: comments with an escape character aren't formatted
2599         https://bugs.webkit.org/show_bug.cgi?id=200168
2600
2601         Reviewed by Joseph Pecoraro.
2602
2603         Don't allow escaping of the "*" in CSS comments (e.g. `\*/`).
2604
2605         Add additional pretty printing rules for comments so that there's always some space between
2606         them and the surrounding text. This ensures that they don't interfere with readability.
2607
2608         * UserInterface/Workers/Formatter/CSSFormatter.js:
2609         (CSSFormatter.prototype._format):
2610
2611         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
2612         (FormatterContentBuilder.prototype.get indented): Added.
2613
2614 2019-08-03  Devin Rousso  <drousso@apple.com>
2615
2616         Web Inspector: Console: execution context picker doesn't update when switching to the inferred context from auto
2617         https://bugs.webkit.org/show_bug.cgi?id=200279
2618
2619         Reviewed by Joseph Pecoraro.
2620
2621         The `representedObject` of the "auto" execution context path component is shared with that
2622         execution context's actual path component, meaning that if the user switches from "auto" to
2623         that execution context's path component, the underlying `representedObject` wouldn't change,
2624         and therfore the `RuntimeManager.Event.ActiveExecutionContextChanged` wouldn't fire. In this
2625         case, update the visible ("selected") execution context path component manually.
2626
2627         * UserInterface/Views/QuickConsole.js:
2628         (WI.QuickConsole.prototype._selectExecutionContext):
2629         (WI.QuickConsole.prototype._pathComponentSelected):
2630
2631 2019-08-02  Devin Rousso  <drousso@apple.com>
2632
2633         Web Inspector: Console: all navigation items should be shown in the split console
2634         https://bugs.webkit.org/show_bug.cgi?id=200280
2635
2636         Reviewed by Joseph Pecoraro.
2637
2638         * UserInterface/Views/LogContentView.js:
2639         (WI.LogContentView):
2640         (WI.LogContentView.prototype.get navigationItems):
2641         Adjust the `visibilityPriority` of each `navigationItems` so that the filter/scope bars are
2642         kept visible for longer than the "Preserve Log"/"Emulate User Gesture" toggles.
2643
2644         * UserInterface/Views/FindBanner.js:
2645         (WI.FindBanner):
2646         * UserInterface/Views/FindBanner.css:
2647         (.find-banner.console-find-banner > input[type="search"]):
2648         (.find-banner.console-find-banner > :matches(input[type="search"], button)):
2649         (.find-banner.console-find-banner > input[type="search"]:focus, .find-banner.console-find-banner > input[type="search"]:focus ~ button, .find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown), .find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown) ~ button ): Added.
2650         (.find-banner.console-find-banner > input[type="search"]::placeholder): Deleted.
2651         (.find-banner.console-find-banner > input[type="search"]:focus): Deleted.
2652         (.find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown)): Deleted.
2653         (@media (prefers-color-scheme: dark) .find-banner.console-find-banner > input[type=search]:not(:placeholder-shown)): Deleted.
2654         Make the `WI.FindBanner` blend in with the surrounding content when it's not focused or has
2655         no content.
2656
2657 2019-08-02  Devin Rousso  <drousso@apple.com>
2658
2659         Web Inspector: Storage: disable related agents when the tab is closed
2660         https://bugs.webkit.org/show_bug.cgi?id=200117
2661
2662         Reviewed by Joseph Pecoraro.
2663
2664         Rework how `enable`/`disable` is used for storage-related agents so that events are not sent
2665         and data isn't kept alive when the Storage tab isn't enabled.
2666
2667         * UserInterface/Controllers/ApplicationCacheManager.js:
2668         (WI.ApplicationCacheManager):
2669         (WI.ApplicationCacheManage.prototype.get domains): Added.
2670         (WI.ApplicationCacheManage.prototype.activateExtraDomain): Added.
2671         (WI.ApplicationCacheManager.prototype.initializeTarget):
2672         (WI.ApplicationCacheManager.prototype.enable): Added.
2673         (WI.ApplicationCacheManager.prototype.disable): Added.
2674         (WI.ApplicationCacheManager.prototype.networkStateUpdated):
2675         (WI.ApplicationCacheManager.prototype.applicationCacheStatusUpdated):
2676         (WI.ApplicationCacheManager.prototype._reset): Added.
2677         (WI.ApplicationCacheManager.prototype._mainResourceDidChange):
2678         (WI.ApplicationCacheManager.prototype._manifestForFrameLoaded):
2679         (WI.ApplicationCacheManager.prototype._framesWithManifestsLoaded):
2680         (WI.ApplicationCacheManager.prototype.initialize): Deleted.
2681
2682         * UserInterface/Controllers/DOMStorageManager.js:
2683         (WI.DOMStorageManager):
2684         (WI.DOMStorageManager.prototype.get domains): Added.
2685         (WI.DOMStorageManager.prototype.activateExtraDomain): Added.
2686         (WI.DOMStorageManager.prototype.initializeTarget):
2687         (WI.DOMStorageManager.prototype.enable): Added.
2688         (WI.DOMStorageManager.prototype.disable): Added.
2689         (WI.DOMStorageManager.prototype.itemsCleared):
2690         (WI.DOMStorageManager.prototype.itemRemoved):
2691         (WI.DOMStorageManager.prototype.itemAdded):
2692         (WI.DOMStorageManager.prototype.itemUpdated):
2693         (WI.DOMStorageManager.prototype.inspectDOMStorage):
2694         (WI.DOMStorageManager.prototype._reset): Added.
2695         (WI.DOMStorageManager.prototype._addDOMStorageIfNeeded):
2696         (WI.DOMStorageManager.prototype._addCookieStorageIfNeeded):
2697         (WI.DOMStorageManager.prototype._mainResourceDidChange):
2698         (WI.DOMStorageManager.prototype.initialize): Deleted.
2699         (WI.DOMStorageManager.prototype.domStorageWasAdded): Deleted.
2700
2701         * UserInterface/Controllers/DatabaseManager.js:
2702         (WI.DatabaseManager):
2703         (WI.DatabaseManager.prototype.get domains): Added.
2704         (WI.DatabaseManager.prototype.activateExtraDomain): Added.
2705         (WI.DatabaseManager.prototype.initializeTarget):
2706         (WI.DatabaseManager.prototype.enable): Added.
2707         (WI.DatabaseManager.prototype.disable): Added.
2708         (WI.DatabaseManager.prototype.databaseWasAdded):
2709         (WI.DatabaseManager.prototype.inspectDatabase):
2710         (WI.DatabaseManager.prototype._reset): Added.
2711         (WI.DatabaseManager.prototype._mainResourceDidChange):
2712         (WI.DatabaseManager.prototype.initialize): Deleted.
2713
2714         * UserInterface/Controllers/IndexedDBManager.js:
2715         (WI.IndexedDBManager):
2716         (WI.IndexedDBManager.prototype.get domains): Added.
2717         (WI.IndexedDBManager.prototype.activateExtraDomain): Added.
2718         (WI.IndexedDBManager.prototype.initializeTarget):
2719         (WI.IndexedDBManager.prototype.enable): Added.
2720         (WI.IndexedDBManager.prototype.disable): Added.
2721         (WI.IndexedDBManager.prototype.clearObjectStore):
2722         (WI.IndexedDBManager.prototype._reset): Added.
2723         (WI.IndexedDBManager.prototype._mainResourceDidChange):
2724         (WI.IndexedDBManager.prototype.initialize): Deleted.
2725
2726         * UserInterface/Controllers/AppController.js:
2727         (WI.AppController.prototype.activateExtraDomains):
2728         * UserInterface/Controllers/CanvasManager.js:
2729         (WI.CanvasManager.prototype.get domains): Added.
2730         (WI.CanvasManager.prototype.activateExtraDomain): Added.
2731         Only call `enable` on any extra agents if the domain is not controlled by a manager.
2732
2733         * UserInterface/Views/StorageTabContentView.js:
2734         (WI.StorageTabContentView):
2735         (WI.StorageTabContentView.static isTabAllowed):
2736         (WI.StorageTabContentView.prototype.canShowRepresentedObject):
2737         (WI.StorageTabContentView.prototype.closed): Added.
2738
2739         * UserInterface/Test.html:
2740         * UserInterface/Test/Test.js:
2741         (WI.loaded):
2742         (WI.contentLoaded):
2743
2744 2019-08-02  Devin Rousso  <drousso@apple.com>
2745
2746         Web Inspector: Timelines: Develop > Start Timeline Recording doesn't work when focused on a detached inspector window
2747         https://bugs.webkit.org/show_bug.cgi?id=200125
2748         <rdar://problem/53543008>
2749
2750         Reviewed by Brian Burg.
2751
2752         Always show the Timelines tab in Web Inspector whenever timeline recording starts/stops.
2753         Notify the UIProcess whenever the timeline recording state changes.
2754
2755         * UserInterface/Protocol/InspectorFrontendAPI.js:
2756         (InspectorFrontendAPI.setTimelineProfilingEnabled):
2757
2758 2019-08-02  Devin Rousso  <drousso@apple.com>
2759
2760         Web Inspector: "Inspector.initialized" happens before breakpoints are set
2761         https://bugs.webkit.org/show_bug.cgi?id=200364
2762
2763         Reviewed by Joseph Pecoraro.
2764
2765         Allow managers to register a promise that will delay `Inspector.initialized`. This is needed
2766         when restoring breakpoints so that "Automatically Show Web Inspector for JSContexts" can set
2767         them before any scripts have evaluated, ensuring that no breakpoints are "skipped".
2768
2769         * UserInterface/Protocol/Target.js:
2770         (WI.Target.prototype.initialize):
2771         (WI.Target.registerInitializationPromise): Added.
2772
2773         * UserInterface/Controllers/DOMDebuggerManager.js:
2774         (WI.DOMDebuggerManager):
2775         * UserInterface/Controllers/DebuggerManager.js:
2776         (WI.DebuggerManager):
2777
2778 2019-08-01  Devin Rousso  <drousso@apple.com>
2779
2780         Unreviewed, remove `emulateUserGesture` parameter from `Debugger.evaluateOnCallFrame` for iOS 13
2781
2782         Rubber-stamped by Joseph Pecoraro.
2783
2784         * UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
2785         * Versions/Inspector-iOS-13.0.json:
2786         The iOS 13 protocol has already been decided, so these shouldn't have been added unless they
2787         were cherry-picked in.
2788
2789 2019-07-31  Devin Rousso  <drousso@apple.com>
2790
2791         Web Inspector: Debugger: support emulateUserGesture parameter in Debugger.evaluateOnCallFrame
2792         https://bugs.webkit.org/show_bug.cgi?id=200272
2793
2794         Reviewed by Joseph Pecoraro.
2795
2796         When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.
2797
2798         * UserInterface/Controllers/RuntimeManager.js:
2799         (WI.RuntimeManager.prototype.evaluateInInspectedWindow):
2800
2801         * UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
2802         * Versions/Inspector-iOS-13.0.json:
2803
2804 2019-07-31  Devin Rousso  <drousso@apple.com>
2805
2806         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'issueMessage.sourceCodeLocation.sourceCode')
2807         https://bugs.webkit.org/show_bug.cgi?id=200296
2808
2809         Reviewed by Joseph Pecoraro.
2810
2811         When fetching all `WI.IssueMessage`s for a given `WI.SourceCode`, the `WI.IssueMessage` may
2812         be associated in a different way (e.g. by url, instead of `WI.SourceCodeLocation`). As such,
2813         we should pass the `WI.SourceCode` along, and use it when adding the `WI.IssueTreeElement`.
2814
2815         * UserInterface/Views/DebuggerSidebarPanel.js:
2816         (WI.DebuggerSidebarPanel.prototype._addIssuesForSourceCode):
2817         (WI.DebuggerSidebarPanel.prototype._addIssue):
2818
2819         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2820         (WI.SourcesNavigationSidebarPanel.prototype._addIssue):
2821         (WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
2822
2823 2019-07-31  Devin Rousso  <drousso@apple.com>
2824
2825         Web Inspector: DOM: provide a way to disable/breakpoint all event listeners for a given DOM node or event type
2826         https://bugs.webkit.org/show_bug.cgi?id=200233
2827
2828         Reviewed by Joseph Pecoraro.
2829
2830         Often, when trying to debug issues with DOM events, it's extremely tedious to have to go
2831         through event listeners one by one and disable them (or set a breakpoint). This patch adds
2832         a way of performing these "state modifications" in batch operations, based on the current
2833         grouping method of the Event Listeners section.
2834
2835         * UserInterface/Controllers/DOMManager.js:
2836         (WI.DOMManager.supportsDisablingEventListeners): Added.
2837         (WI.DOMManager.supportsEventListenerBreakpoints): Added.
2838         Common convenience functions for checking for protocol support.
2839
2840         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2841         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.createEventListenerSection):
2842         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
2843         (.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners .details-section.event-listener-section > .header > .event-listener-options): Added.
2844         (.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners .details-section.event-listener-section:hover > .header > .event-listener-options): Added.
2845         Add an options element that shows a context menu:
2846          - "Disable Event Listeners"/"Enable Event Listeners"
2847          - "Add Breakpoints"/"Delete Breakpoints"
2848         Each action applies the corresponding state to all event listeners in that section.
2849
2850         * UserInterface/Views/EventListenerSectionGroup.js:
2851         (WI.EventListenerSectionGroup):
2852         (WI.EventListenerSectionGroup.prototype.get supportsStateModification): Added.
2853         (WI.EventListenerSectionGroup.prototype.get isEventListenerDisabled): Added.
2854         (WI.EventListenerSectionGroup.prototype.set isEventListenerDisabled): Added.
2855         (WI.EventListenerSectionGroup.prototype.get hasEventListenerBreakpoint): Added.
2856         (WI.EventListenerSectionGroup.prototype.set hasEventListenerBreakpoint): Added.
2857         (WI.EventListenerSectionGroup.prototype._updateDisabledToggle): Added.
2858         (WI.EventListenerSectionGroup.prototype._updateBreakpointToggle): Added.
2859         (WI.EventListenerSectionGroup.prototype._createDisabledToggleRow): Deleted.
2860         (WI.EventListenerSectionGroup.prototype._createBreakpointToggleRow): Deleted.
2861         Expose a way to modify the event listener's state so that the UI (e.g. checkbox and title)
2862         also get's updated.
2863
2864         * Localizations/en.lproj/localizedStrings.js:
2865
2866 2019-07-30  Nikita Vasilyev  <nvasilyev@apple.com>
2867
2868         Web Inspector: Resources: Display outline around images when viewing image collections
2869         https://bugs.webkit.org/show_bug.cgi?id=200212
2870
2871         Reviewed by Devin Rousso.
2872
2873         * UserInterface/Views/CollectionContentView.css:
2874         (.content-view.collection .resource.image img):
2875         (.content-view.collection .resource.image img:hover):
2876
2877 2019-07-29  Devin Rousso  <drousso@apple.com>
2878
2879         Web Inspector: Resources: add a "Show Grid" navigation item for the Images collection
2880         https://bugs.webkit.org/show_bug.cgi?id=200260
2881
2882         Reviewed by Joseph Pecoraro.
2883
2884         Each subview `WI.ImageResourceContentView` already listens for changes to the underlying
2885         `WI.settings.showImageGrid` and adds the `.show-grid` class if enabled. As such, this change
2886         just adds a `WI.ButtonNavigationItem` for toggling `WI.settings.showImageGrid` from the
2887         Images "folder".
2888
2889         * UserInterface/Views/ResourceCollectionContentView.js:
2890         (WI.ResourceCollectionContentView):
2891         (WI.ResourceCollectionContentView.prototype.get navigationItems):
2892         (WI.ResourceCollectionContentView.prototype.attached): Added.
2893         (WI.ResourceCollectionContentView.prototype.detached): Added.
2894         (WI.ResourceCollectionContentView.prototype._updateImageTypeScopeBar):
2895         Drive-by: hide the image type `WI.ScopeBar` if there's only one type of image.
2896         (WI.ResourceCollectionContentView.prototype._handleShowGridButtonClicked): Added.
2897         (WI.ResourceCollectionContentView.prototype._handleShowImageGridSettingChanged): Added.
2898
2899 2019-07-29  Devin Rousso  <drousso@apple.com>
2900
2901         Web Inspector: add -webkit-* keywords for *-height CSS properties
2902         https://bugs.webkit.org/show_bug.cgi?id=200240
2903
2904         Reviewed by Joseph Pecoraro.
2905
2906         * UserInterface/Models/CSSKeywordCompletions.js:
2907
2908         * UserInterface/Views/Main.css:
2909         (.message-text-view):
2910         * UserInterface/Views/Toolbar.css:
2911         (.toolbar .control-section):
2912         (.toolbar .item-section):
2913         Replace `-webkit-min-content` with `min-content`.
2914
2915 2019-07-26  Greg Doolittle  <gr3g@apple.com>
2916
2917         Web Inspector: AXI: Audit: Typo of "some" as "somee"
2918         https://bugs.webkit.org/show_bug.cgi?id=200166
2919
2920         Reviewed by Devin Rousso.
2921
2922         * Localizations/en.lproj/localizedStrings.js:
2923         * UserInterface/Controllers/AuditManager.js:
2924         (WI.AuditManager.prototype._addDefaultTests):
2925         (WI.AuditManager):
2926
2927 2019-07-24  Devin Rousso  <drousso@apple.com>
2928
2929         Web Inspector: REGRESSION: no context menu items work when context menu clicking on "Add Breakpoint"
2930         https://bugs.webkit.org/show_bug.cgi?id=199953
2931
2932         Reviewed by Joseph Pecoraro.
2933
2934         * UserInterface/Views/ContextMenuUtilities.js:
2935         (WI.addMouseDownContextMenuHandlers): Added.
2936         Create a helper function for managing elements that show a context menu on "mousedown".
2937
2938         * UserInterface/Base/SearchUtilities.js:
2939         (WI.SearchUtilities.createSettingsButton):
2940         * UserInterface/Views/CanvasContentView.js:
2941         (WI.CanvasContentView.prototype.initialLayout):
2942         (WI.CanvasContentView.prototype._populateCanvasElementButtonContextMenu): Added.
2943         (WI.CanvasContentView.prototype._populateViewShaderButtonContextMenu): Added.
2944         (WI.CanvasContentView.prototype._populateViewRecordingButtonContextMenu): Added.
2945         (WI.CanvasContentView.prototype._handleCanvasElementButtonMouseDown): Deleted.
2946         (WI.CanvasContentView.prototype._handleViewShaderButtonMouseDown): Deleted.
2947         (WI.CanvasContentView.prototype._handleViewRecordingButtonMouseDown): Deleted.
2948         * UserInterface/Views/DebuggerSidebarPanel.js:
2949         (WI.DebuggerSidebarPanel):
2950         (WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu): Added.
2951         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): Deleted.
2952         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2953         (WI.SourcesNavigationSidebarPanel):
2954         (WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu): Added.
2955         (WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu): Added.
2956         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown): Deleted.
2957         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): Deleted.
2958
2959         * UserInterface/Views/TabBar.js:
2960         (WI.TabBar):
2961         (WI.TabBar.prototype._handleTabPickerTabContextMenu): Deleted.
2962         * UserInterface/Views/LegacyTabBar.js:
2963         (WI.LegacyTabBar):
2964         (WI.LegacyTabBar.prototype._handleTabPickerTabContextMenu): Deleted.
2965         Remove the "contextmenu" handler on the tab picker, as that's already used by the entire
2966         tab bar to show/hide tabs.
2967
2968 2019-07-24  Devin Rousso  <drousso@apple.com>
2969
2970         Web Inspector: print the target of `console.screenshot` last so the target is the closest item to the image
2971         https://bugs.webkit.org/show_bug.cgi?id=199308
2972
2973         Reviewed by Joseph Pecoraro.
2974
2975         * UserInterface/Views/ConsoleMessageView.js:
2976         (WI.ConsoleMessageView.prototype.render):
2977         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
2978         (WI.ConsoleMessageView.prototype._handleContextMenu):
2979         * UserInterface/Views/ConsoleMessageView.css:
2980         (.console-image > .console-message-body > :matches(hr, img)): Added.
2981         (.console-image > .console-message-body > hr): Added.
2982         (.console-image > .console-message-body > img): Added.
2983         (.console-log-level.console-image::before): Added.
2984         (.console-message-body > .console-image): Deleted.
2985         (.console-log-level.console-image-container::before): Deleted.
2986         Allow `ConsoleMessage.MessageType.Image` to be an `ConsoleMessage.MessageLevel.Error`, and
2987         print the message (and extra parameters) in that case.
2988         Drive-by: reorganize the switch-case so all paths have the same `default` case.
2989
2990         * Localizations/en.lproj/localizedStrings.js:
2991
2992 2019-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
2993
2994         Web Inspector: Styles: Command-X should cut selected properties
2995         https://bugs.webkit.org/show_bug.cgi?id=199341
2996
2997         Reviewed by Devin Rousso.
2998
2999         Implement cutting of selected CSS properties in the style editor.
3000         Unify cutting and copying logic wherever possible.
3001
3002         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3003         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
3004         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.placeTextCaretInFocusedProperty): Added.
3005         Cut/copy events could only fire on SpreadsheetCSSStyleDeclarationEditor element if it
3006         has selection inside of it. Placing text caret at the beginning of the focused property
3007         ensures that.
3008
3009         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyCopy): Deleted.
3010         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
3011         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._copySelectedProperties): Added.
3012         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._removeSelectedProperties): Added.
3013         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3014         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
3015         * UserInterface/Views/SpreadsheetStyleProperty.js:
3016         Remove old copying logic.
3017
3018 2019-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
3019
3020         Web Inspector: Display "Resource has no content" for about:blank iframes instead of an error
3021         https://bugs.webkit.org/show_bug.cgi?id=198029
3022
3023         Reviewed by Devin Rousso.
3024
3025         Display "about:blank" in the middle of the content view when selecting "about:blank" resources.
3026         Previoulsly, we showed a misleading "An error occurred trying to load the resource" error
3027         message.
3028
3029         * UserInterface/Models/CSSStyleSheet.js:
3030         (WI.CSSStyleSheet.prototype.requestContentFromBackend):
3031         * UserInterface/Models/Resource.js:
3032         (WI.Resource.prototype.requestContentFromBackend):
3033         * UserInterface/Models/Script.js:
3034         (WI.Script.prototype.requestContentFromBackend):
3035         * UserInterface/Models/SourceCode.js:
3036         (WI.SourceCode.generateSpecialContentForURL):
3037         (WI.SourceCode.prototype._processContent):
3038         (WI.SourceCode):
3039         * UserInterface/Views/ResourceContentView.js:
3040         (WI.ResourceContentView.prototype._contentAvailable):
3041
3042         * UserInterface/Views/SourceCodeTextEditor.js:
3043         (WI.SourceCodeTextEditor.prototype._contentAvailable):
3044         (WI.SourceCodeTextEditor.prototype._showMessage):
3045         * UserInterface/Views/TextResourceContentView.js:
3046         (WI.TextResourceContentView.prototype._contentDidPopulate):
3047         Display empty text editor when it has no content instead of "Resource has no content" message.
3048
3049 2019-07-22  Devin Rousso  <drousso@apple.com>
3050
3051         Web Inspector: Uncaught Exception: Breakpoint at specified location already exists.
3052         https://bugs.webkit.org/show_bug.cgi?id=197034
3053         <rdar://problem/50049004>
3054
3055         Reviewed by Joseph Pecoraro.
3056
3057         When "adjusting" a `WI.Breakpoint` (e.g. removing and then re-adding with a different
3058         configuration), make sure to only re-add the `WI.Breakpoint` to the `WI.Target` it was just
3059         removed from, rather to all `WI.targets`.
3060
3061         Since we iterate over `WI.targets` in both `WI.DebuggerManager.prototype._setBreakpoint` and
3062         `WI.DebuggerManager.prototype._removeBreakpoint`, we ended up iterating `WI.targets` twice.
3063
3064         Each time the `WI.Breakpoint` is removed from a `WI.Target`, pass the `WI.Target` to the
3065         `callback` given to `WI.DebuggerManager.prototype._removeBreakpoint`, so that the eventual
3066         call to `WI.DebuggerManager.prototype._setBreakpoint` can reuse it as the `specificTarget`,
3067         instead of iterating `WI.targets` (meaning we only iterate it once).
3068
3069         * UserInterface/Controllers/DebuggerManager.js:
3070         (WI.DebuggerManager.prototype.addBreakpoint):
3071         (WI.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
3072         (WI.DebuggerManager.prototype._breakpointDisplayLocationDidChange):
3073         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
3074
3075 2019-07-22  Devin Rousso  <drousso@apple.com>
3076
3077         Localization: change fps to FPS
3078         <rdar://problem/53342508>
3079
3080         Rubber-stamped by Joseph Pecoraro.
3081
3082         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
3083         (WI.RenderingFrameTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition):
3084
3085         * Localizations/en.lproj/localizedStrings.js:
3086
3087 2019-07-19  Devin Rousso  <drousso@apple.com>
3088
3089         Web Inspector: Issues toggling multiple breakpoints on one line
3090         https://bugs.webkit.org/show_bug.cgi?id=199918
3091
3092         Reviewed by Joseph Pecoraro.
3093
3094         * UserInterface/Views/SourceCodeTextEditor.js:
3095         (WI.SourceCodeTextEditor):
3096         (WI.SourceCodeTextEditor.prototype.close):
3097         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
3098         (WI.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
3099         (WI.SourceCodeTextEditor.prototype._handleFormatterDidChange): Added.
3100         Listen for `WI.SourceCode.Event.FormatterDidChange` events as there may be multiple content
3101         views for the same `WI.SourceCode`. Previously, if there were, only the active one would
3102         properly update it's "line -> column -> breakpoint" mapping, causing an error to be thrown
3103         when the non-active content views tried to retrieve the breakpoint for the new line/column.
3104
3105 2019-07-17  Olivier Blin  <olivier.blin@softathome.com>
3106
3107         Web Inspector: application/xml content not shown
3108         https://bugs.webkit.org/show_bug.cgi?id=199861
3109
3110         Reviewed by Devin Rousso.
3111
3112         application/xml content from XHR requests was not shown in the
3113         inspector, an error message was displayed instead.
3114
3115         application/xml content should be treated as text, since
3116         application/xml is the standard mimetype for XML content.
3117         Apache serves XML content with the application/xml mimetype by
3118         default.
3119
3120         * UserInterface/Base/MIMETypeUtilities.js:
3121         (WI.fileExtensionForMIMEType):
3122         Report "xml" extension for "application/xml" mimetype.
3123         (WI.shouldTreatMIMETypeAsText):
3124         Treat XML files as text.
3125
3126 2019-07-16  Nikita Vasilyev  <nvasilyev@apple.com>
3127
3128         Web Inspector: Changes panel should be strictly LTR
3129         https://bugs.webkit.org/show_bug.cgi?id=199767
3130
3131         Reviewed by Joseph Pecoraro.
3132
3133         Changes panel is primarily CSS code and CSS is strictly LTR.
3134
3135         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
3136         (WI.ChangesDetailsSidebarPanel):
3137
3138 2019-07-15  Youenn Fablet  <youenn@apple.com>
3139
3140         Enable a debug WebRTC mode without any encryption
3141         https://bugs.webkit.org/show_bug.cgi?id=199177
3142         <rdar://problem/52074986>
3143
3144         Reviewed by Eric Carlson.
3145
3146         * Localizations/en.lproj/localizedStrings.js:
3147         * UserInterface/Base/Main.js:
3148
3149 2019-07-15  Greg Doolittle <gr3g@apple.com>
3150
3151         Web Inspector: AXI: Audit: Typos in Accessibility audits
3152         https://bugs.webkit.org/show_bug.cgi?id=199716
3153         <rdar://problem/52721711>
3154
3155         Reviewed by Devin Rousso.
3156
3157         * UserInterface/Controllers/AuditManager.js:
3158
3159 2019-07-15  Devin Rousso  <drousso@apple.com>
3160
3161         Web Inspector: Device Settings: update Safari user agent from 12.2 to 13.0
3162         https://bugs.webkit.org/show_bug.cgi?id=199758
3163
3164         Reviewed by Maciej Stachowiak.
3165
3166         * UserInterface/Base/Main.js:
3167         (WI._handleDeviceSettingsToolbarButtonClicked):
3168
3169 2019-07-12  Nikita Vasilyev  <nvasilyev@apple.com>
3170
3171         Web Inspector: Changes: dismissing a blank property makes style rule to show in Changes panel
3172         https://bugs.webkit.org/show_bug.cgi?id=199760
3173
3174         Reviewed by Devin Rousso.
3175
3176         * UserInterface/Models/CSSProperty.js:
3177         (WI.CSSProperty.prototype._updateOwnerStyleText):
3178         Call updatePropertiesModifiedState even when _updateOwnerStyleText returns early.
3179
3180 2019-07-12  Devin Rousso  <drousso@apple.com>
3181
3182         Web Inspector: Elements: always show all navigation bar items, but disable those that wouldn't work
3183         https://bugs.webkit.org/show_bug.cgi?id=199594
3184
3185         Reviewed by Ross Kirsling.
3186
3187         Reorder the navigation items of the Elements tab (left to right):
3188          - Show rulers
3189          - Force print media styles
3190          - Force Dark Appearance / Force Light Appearance
3191          - Show compositing borders
3192          - Enable paint flashing
3193          - Show shadow DOM nodes
3194         This way, "related" (e.g. print styles and dark/light appearance both relate to CSS media)
3195         toggles are grouped closer together.
3196
3197         * UserInterface/Views/DOMTreeContentView.js:
3198         (WI.DOMTreeContentView):
3199         (WI.DOMTreeContentView.prototype.get navigationItems):
3200         (WI.DOMTreeContentView.prototype._defaultAppearanceDidChange):
3201         (WI.DOMTreeContentView.prototype._toggleAppearance):
3202
3203         * Localizations/en.lproj/localizedStrings.js:
3204
3205 2019-07-11  Devin Rousso  <drousso@apple.com>
3206
3207         Web Inspector: Layers: Uncaught Exception: Request with id = 2 failed. {"code":-32601,"message":"'Page' domain was not found","data":[{"code":-32601,"message":"'Page' domain was not found"}]}
3208         https://bugs.webkit.org/show_bug.cgi?id=199555
3209
3210         Reviewed by Joseph Pecoraro.
3211
3212         Use modern inspected target support checking, and defer agent commands until a target is
3213         available.
3214
3215         * UserInterface/Views/Layers3DContentView.js:
3216         (WI.Layers3DContentView):
3217         (WI.Layers3DContentView.prototype._showPaintRectsSettingChanged):
3218         (WI.Layers3DContentView.prototype._updateCompositingBordersButtonState):
3219         (WI.Layers3DContentView.prototype._toggleCompositingBorders):
3220
3221         * UserInterface/Views/DOMTreeContentView.js:
3222         (WI.DOMTreeContentView):
3223         (WI.DOMTreeContentView.prototype._toggleCompositingBorders):
3224         (WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
3225         (WI.DOMTreeContentView.prototype._showPaintRectsSettingChanged):
3226         (WI.DOMTreeContentView.prototype._showPrintStylesChanged):
3227         (WI.DOMTreeContentView.prototype._showRulersChanged):
3228         Drive-by: apply the same changes to the Elements tab for when the Layers tab isn't enabled.
3229
3230 2019-07-09  Devin Rousso  <drousso@apple.com>
3231
3232         Web Inspector: Canvas: replace WTF::Vector with std::initializer_list in CallTracer to avoid dynamic allocations
3233         https://bugs.webkit.org/show_bug.cgi?id=199611
3234
3235         Reviewed by Joseph Pecoraro.
3236
3237         * UserInterface/Models/Recording.js:
3238         (WI.Recording.prototype.async swizzle):
3239         Drive-by: handle the situation where a parameter is an array of deduplicated strings, which
3240                   would otherwise be treated as an array of numbers.
3241
3242 2019-07-09  Joseph Pecoraro  <pecoraro@apple.com>
3243
3244         Web Inspector: Add another Protocol Version (iOS 13.0)
3245         https://bugs.webkit.org/show_bug.cgi?id=199631
3246         <rdar://problem/47538193>
3247
3248         Reviewed by Devin Rousso.
3249
3250         * UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js: Added.
3251         * Versions/Inspector-iOS-13.0.json: Added.
3252
3253 2019-07-08  Devin Rousso  <drousso@apple.com>
3254
3255         Web Inspector: Debugger: special breakpoints and event targets should be sorted into separate "areas"
3256         https://bugs.webkit.org/show_bug.cgi?id=199554
3257
3258         Reviewed by Joseph Pecoraro.
3259
3260         Move the special All Requests breakpoint down to be right above all other URL breakpoints.
3261         Move the `window` object tree element below other DOM node tree elements.
3262
3263         * UserInterface/Views/DebuggerSidebarPanel.js:
3264         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
3265         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
3266         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
3267
3268 2019-07-08  Devin Rousso  <drousso@apple.com>
3269
3270         Web Inspector: DOM Debugger: there should be different icons for each type of DOM breakpoint
3271         https://bugs.webkit.org/show_bug.cgi?id=199552
3272
3273         Reviewed by Joseph Pecoraro.
3274
3275         [S] for Subtree Modified
3276         [A] for Attribute Modified
3277         [R] for Node Removed
3278
3279         * UserInterface/Views/DOMBreakpointTreeElement.js:
3280         (WI.DOMBreakpointTreeElement):
3281         * UserInterface/Views/DOMBreakpointTreeElement.css: Added.
3282         (.breakpoint.dom.breakpoint-for-subtree-modified:not(.breakpoint-paused-icon) .icon):
3283         (.breakpoint.dom.breakpoint-for-attribute-modified:not(.breakpoint-paused-icon) .icon):
3284         (.breakpoint.dom.breakpoint-for-node-removed:not(.breakpoint-paused-icon) .icon):
3285
3286         * UserInterface/Main.html:
3287