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