Web Inspector: View.removeSubview not removing the element properly when not parented
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Web Inspector: View.removeSubview not removing the element properly when not parented
4         https://bugs.webkit.org/show_bug.cgi?id=195146
5
6         Reviewed by Matt Baker.
7
8         * UserInterface/Views/View.js:
9         (WI.View.prototype.removeSubview):
10         Since the element may not be a direct child, just use Element.prototype.remove.
11
12 2019-02-28  Matt Baker  <mattbaker@apple.com>
13
14         Web Inspector: Debugger: disabled breakpoint color is too dark
15         https://bugs.webkit.org/show_bug.cgi?id=195103
16         <rdar://problem/48440678>
17
18         Reviewed by Devin Rousso.
19
20         Increase the disabled breakpoint contrast, as well as the contrast between
21         disabled and auto-continue breakpoints. Disabled breakpoints stand out by
22         being somewhat brighter and less saturated. Using the same strategy for
23         auto-continue breakpoints is too subtle to provide sufficient contrast.
24
25         We can adopt the technique used by Xcode, and overlay a white triangle
26         marker on the breakpoint arrow to indicate an auto-continue breakpoint.
27
28         * UserInterface/Views/BreakpointTreeElement.css:
29         (.item.breakpoint .status > .status-image):
30         (.item.breakpoint.selected .status > .status-image.resolved):
31         Add white outline to make selected breakpoint button stand out.
32         (.item.breakpoint .status > .status-image.auto-continue::after):
33         (.item.breakpoint .status > .status-image.disabled):
34         (.item.breakpoint .status > .status-image.auto-continue): Deleted.
35
36
37         * UserInterface/Views/DOMTreeContentView.css:
38         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
39         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled):
40         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.subtree):
41         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled,): Deleted.
42
43         * UserInterface/Views/TextEditor.css:
44         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
45         (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.execution-line.primary) .CodeMirror-linenumber::after):
46         (.text-editor > .CodeMirror .breakpoint-disabled .CodeMirror-linenumber::before):
47         (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.breakpoint-disabled) .CodeMirror-linenumber::before): Deleted.
48
49         * UserInterface/Views/Variables.css:
50         (:root):
51         Add breakpoint color variables to use across all breakpoint controls.
52         Use system colors if available, otherwise fall back to hard-coded values
53         based on sampling the default (blue) accent color on Mojave.
54
55 2019-02-28  Nikita Vasilyev  <nvasilyev@apple.com>
56
57         Web Inspector: Styles: Control-Space should force completion
58         https://bugs.webkit.org/show_bug.cgi?id=194796
59         <rdar://problem/48180822>
60
61         Reviewed by Matt Baker.
62
63         Pressing Control-Space when editing CSS property should show completion popover,
64         even if the value is empty.
65
66         * UserInterface/Models/CSSCompletions.js:
67         (WI.CSSCompletions.prototype.startsWith):
68         Performance optimization: exit early when `prefix` is empty.
69
70         * UserInterface/Views/SpreadsheetStyleProperty.js:
71         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
72         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
73         * UserInterface/Views/SpreadsheetTextField.js:
74         (WI.SpreadsheetTextField):
75         (WI.SpreadsheetTextField.prototype._handleKeyDown):
76         (WI.SpreadsheetTextField.prototype._updateCompletions):
77
78 2019-02-28  Devin Rousso  <drousso@apple.com>
79
80         Web Inspector: Canvas: enabling auto-capture if the frame count is empty triggers an assertion
81         https://bugs.webkit.org/show_bug.cgi?id=195060
82
83         Reviewed by Matt Baker.
84
85         * UserInterface/Views/CanvasOverviewContentView.js:
86         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
87         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
88         (WI.CanvasOverviewContentView.prototype._handleRecordingAutoCaptureCheckedDidChange):
89
90 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
91
92         Web Inspector: Revert -webkit-border-end changes that are unreliable
93         https://bugs.webkit.org/show_bug.cgi?id=195149
94
95         Reviewed by Matt Baker.
96
97         * UserInterface/Views/CPUUsageIndicatorView.css:
98         (.cpu-usage-indicator-view > .details):
99         (body[dir=ltr] .cpu-usage-indicator-view > .details):
100         (body[dir=rtl] .cpu-usage-indicator-view > .details):
101         * UserInterface/Views/CPUUsageStackedView.css:
102         (.cpu-usage-stacked-view > .details):
103         (body[dir=ltr] .cpu-usage-stacked-view > .details):
104         (body[dir=rtl] .cpu-usage-stacked-view > .details):
105         * UserInterface/Views/CPUUsageView.css:
106         (.cpu-usage-view > .details):
107         (body[dir=ltr] .cpu-usage-view > .details):
108         (body[dir=rtl] .cpu-usage-view > .details):
109         * UserInterface/Views/MemoryCategoryView.css:
110         (.memory-category-view > .details):
111         (body[dir=ltr] .memory-category-view > .details):
112         (body[dir=rtl] .memory-category-view > .details):
113
114 2019-02-28  Joseph Pecoraro  <pecoraro@apple.com>
115
116         Web Inspector: Cleanup some Chart code
117         https://bugs.webkit.org/show_bug.cgi?id=195147
118
119         Reviewed by Matt Baker.
120
121         * UserInterface/Views/RangeChart.js:
122         (WI.RangeChart.prototype.layout):
123         (WI.RangeChart):
124         * UserInterface/Views/StackedColumnChart.js:
125         (WI.StackedColumnChart.prototype.layout):
126         (WI.StackedColumnChart):
127
128 2019-02-27  Joseph Pecoraro  <pecoraro@apple.com>
129
130         Web Inspector: Add a new Scanner TimelineMarker to show up when mousing over TimelineView graphs
131         https://bugs.webkit.org/show_bug.cgi?id=195079
132
133         Reviewed by Devin Rousso.
134
135         * UserInterface/Base/Utilities.js:
136         (Note.prototype.enclosingNodeOrSelfWithClassInArray):
137         Helper for a set of classes.
138
139         * UserInterface/Models/TimelineMarker.js:
140         Add a new marker type, "Scanner".
141
142         * UserInterface/Views/CPUTimelineView.js:
143         (WI.CPUTimelineView.prototype.initialLayout):
144         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
145         (WI.CPUTimelineView.prototype._handleGraphMouseMove):
146         * UserInterface/Views/MemoryTimelineView.js:
147         (WI.MemoryTimelineView):
148         (WI.MemoryTimelineView.prototype._graphPositionForMouseEvent):
149         (WI.MemoryTimelineView.prototype._handleGraphMouseMove):
150         Update a scanner time when mousing over various graphs that span the entire time range.
151         These use the containing graph element because there was a single pixel between
152         adjacent graphs which would cause the scanner to flicker because the mouse event target
153         was not an svg element.
154
155         * UserInterface/Views/TimelineOverview.js:
156         (WI.TimelineOverview.prototype.hidden):
157         (WI.TimelineOverview.prototype.updateScannerTime):
158         (WI.TimelineOverview.prototype.clearScanner):
159         * UserInterface/Views/TimelineRecordingContentView.js:
160         (WI.TimelineRecordingContentView):
161         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerTimeDidChange):
162         (WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerDidClear):
163         Update the overview's ruler with scanner changes.
164
165         * UserInterface/Views/TimelineRuler.css:
166         (.timeline-ruler > .markers > .marker.scanner):
167         * UserInterface/Views/TimelineRuler.js:
168         (WI.TimelineRuler):
169         (WI.TimelineRuler.prototype.clearMarkers):
170         (WI.TimelineRuler.prototype.updateScannerTime):
171         (WI.TimelineRuler.prototype.clearScanner):
172         (WI.TimelineRuler.prototype._updateMarkers):
173         Have a special scanner marker that updates.
174
175         * UserInterface/Views/TimelineView.js:
176         New events that a TimelineView can dispatch to update the overview.
177
178         * UserInterface/Views/Variables.css:
179         (:root):
180         (@media (prefers-color-scheme: dark)):
181         Scanner marker colors.
182
183 2019-02-27  Devin Rousso  <drousso@apple.com>
184
185         Web Inspector: Use Element.closest for internal code
186         https://bugs.webkit.org/show_bug.cgi?id=173747
187
188         Reviewed by Joseph Pecoraro.
189
190         Replace usage of added utility functions on the `Node` prototype with the built-in
191         `Element.prototype.closest` as it's more flexible and is capable of doing the same thing.
192
193         * UserInterface/Base/Utilities.js:
194         (Node.prototype.enclosingNodeOrSelfWithClass): Deleted.
195         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Deleted.
196         (Node.prototype.enclosingNodeOrSelfWithNodeName): Deleted.
197         * UserInterface/Base/Main.js:
198         (WI.handlePossibleLinkClick):
199         (WI._focusedContentBrowser):
200         * UserInterface/Views/CPUTimelineView.js:
201         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
202         * UserInterface/Views/CompletionSuggestionsView.js:
203         (WI.CompletionSuggestionsView.prototype.set selectedIndex):
204         (WI.CompletionSuggestionsView.prototype.update):
205         (WI.CompletionSuggestionsView.prototype._itemClicked):
206         * UserInterface/Views/ConsoleGroup.js:
207         (WI.ConsoleGroup.prototype._titleClicked):
208         * UserInterface/Views/DOMTreeContentView.js:
209         (WI.DOMTreeContentView.prototype._mouseWasClicked):
210         * UserInterface/Views/DOMTreeElement.js:
211         (WI.DOMTreeElement.prototype._startEditingTarget):
212         (WI.DOMTreeElement.prototype._populateTagContextMenu):
213         * UserInterface/Views/DOMTreeOutline.js:
214         (WI.DOMTreeOutline.prototype.populateContextMenu):
215         * UserInterface/Views/DataGrid.js:
216         (WI.DataGrid.prototype._startEditing):
217         (WI.DataGrid.prototype._editingCancelled):
218         (WI.DataGrid.prototype.dataGridNodeFromNode):
219         (WI.DataGrid.prototype.dataGridNodeFromPoint):
220         (WI.DataGrid.prototype._headerCellClicked):
221         (WI.DataGrid.prototype._mouseoverColumnCollapser):
222         (WI.DataGrid.prototype._mouseoutColumnCollapser):
223         (WI.DataGrid.prototype._clickInColumnCollapser):
224         (WI.DataGrid.prototype._contextMenuInHeader):
225         (WI.DataGrid.prototype._contextMenuInDataTable):
226         * UserInterface/Views/DataGridNode.js:
227         (WI.DataGridNode.prototype.isEventWithinDisclosureTriangle):
228         * UserInterface/Views/LegacyTabBar.js:
229         (WI.LegacyTabBar.prototype._handleMouseDown):
230         (WI.LegacyTabBar.prototype._handleClick):
231         * UserInterface/Views/LogContentView.js:
232         (WI.LogContentView.prototype._handleContextMenuEvent):
233         (WI.LogContentView.prototype._mousedown):
234         (WI.LogContentView.prototype._targetInMessageCanBeSelected):
235         (WI.LogContentView.prototype._mousemove):
236         (WI.LogContentView.prototype._mouseup):
237         (WI.LogContentView.prototype._ondragstart):
238         * UserInterface/Views/NavigationBar.js:
239         (WI.NavigationBar.prototype._mouseDown):
240         (WI.NavigationBar.prototype._mouseMoved):
241         * UserInterface/Views/Popover.js:
242         (WI.Popover.prototype.handleEvent):
243         * UserInterface/Views/TabBar.js:
244         (WI.TabBar.prototype._handleMouseDown):
245         (WI.TabBar.prototype._handleClick):
246         * UserInterface/Views/Table.js:
247         (WI.Table.prototype._handleMouseDown):
248         (WI.Table.prototype._handleContextMenu):
249         * UserInterface/Views/TreeOutline.js:
250         (WI.TreeOutline.prototype.treeElementFromNode):
251
252 2019-02-27  Devin Rousso  <drousso@apple.com>
253
254         Web Inspector: REGRESSION(r242118): Debugger: event breakpoints have no icon
255         https://bugs.webkit.org/show_bug.cgi?id=195119
256
257         Reviewed by Matt Baker.
258
259         * UserInterface/Views/EventBreakpointTreeElement.js:
260         (WI.EventBreakpointTreeElement):
261
262 2019-02-27  Devin Rousso  <drousso@apple.com>
263
264         Web Inspector: Dark Mode: unreadable text in bezier curve editor numeric input fields
265         https://bugs.webkit.org/show_bug.cgi?id=195018
266         <rdar://problem/48378541>
267
268         Reviewed by Matt Baker.
269
270         Simplify some styles using `-webkit-*` properties instead of `[dir=ltr]`/`[dir=rtl]` selectors.
271
272         * UserInterface/Views/BezierEditor.css:
273         (.bezier-editor):
274         (.bezier-editor > .bezier-preview):
275         (.bezier-editor > .bezier-preview-timing):
276         (.bezier-editor > .bezier-container .linear-curve):
277         (.bezier-editor > .bezier-container .bezier-curve):
278         (.bezier-editor > .bezier-container .control-line):
279         (.bezier-editor > .bezier-container .control-handle):
280         (.bezier-editor > .number-input-container):
281         (.bezier-editor > .number-input-container > input):
282         (body[dir=ltr] .bezier-editor > .bezier-preview-timing): Deleted.
283         (body[dir=rtl] .bezier-editor > .bezier-preview-timing): Deleted.
284         (body[dir=ltr] .bezier-editor > .number-input-container > input): Deleted.
285         (body[dir=rtl] .bezier-editor > .number-input-container > input): Deleted.
286         (@media (prefers-color-scheme: dark)): Deleted.
287         Remove all custom styling on any <input>s, as they look fine with their default styling.
288
289         * UserInterface/Views/SpringEditor.css:
290         (.spring-editor > .spring-preview):
291         (.spring-editor > .spring-preview > div):
292         (.spring-editor > .spring-timing > div):
293
294 2019-02-27  Devin Rousso  <drousso@apple.com>
295
296         Web Inspector: popover colors don't change when transitioning to/from dark mode
297         https://bugs.webkit.org/show_bug.cgi?id=195113
298         <rdar://problem/48444188>
299
300         Reviewed by Timothy Hatcher.
301
302         * UserInterface/Views/Popover.js:
303         (WI.Popover.prototype.dismiss):
304         (WI.Popover.prototype._addListenersIfNeeded):
305
306 2019-02-26  Matt Baker  <mattbaker@apple.com>
307
308         Web Inspector: Use system accent color throughout UI
309         https://bugs.webkit.org/show_bug.cgi?id=193507
310         <rdar://problem/47327971>
311
312         Reviewed by Timothy Hatcher.
313
314         * UserInterface/Images/Breakpoint.png: Removed.
315         * UserInterface/Images/Breakpoint.svg: Added.
316         * UserInterface/Images/Breakpoint@2x.png: Removed.
317         * UserInterface/Images/BreakpointInactive.png: Removed.
318         * UserInterface/Images/BreakpointInactive@2x.png: Removed.
319         Replace breakpoint pixel art with an SVG image that can be styled in CSS.
320
321         * UserInterface/Images/CSSVariable.svg:
322         * UserInterface/Images/CubicBezier.svg:
323         * UserInterface/Images/UserInputPrompt.svg:
324         Remove fill color since it is now styled in CSS.
325
326         * UserInterface/Views/BezierEditor.css:
327         (.bezier-editor > .bezier-preview > div):
328         (@media (prefers-color-scheme: dark)):
329         (.bezier-editor > .bezier-container .control-handle):
330         (.bezier-editor > .bezier-container .control-line):
331         Use system accent color for control handles.
332
333         * UserInterface/Views/BreakpointTreeElement.css:
334         (.item.breakpoint .status > .status-image):
335         (.item.breakpoint .status > .status-image.resolved):
336         Use system accent color for breakpoint fill, with a dark outline
337         to match Xcode and make the button stand out against the selection.
338
339         * UserInterface/Views/BreakpointTreeElement.js:
340         (WI.BreakpointTreeElement.prototype._updateStatus):
341
342         * UserInterface/Views/ButtonNavigationItem.css:
343         (.navigation-bar .item.button > .glyph):
344
345         * UserInterface/Views/ConsolePrompt.js:
346         (WI.ConsolePrompt):
347
348         * UserInterface/Views/DOMBreakpointTreeElement.js:
349         * UserInterface/Views/DOMTreeContentView.css:
350         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint):
351         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled,):
352         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.subtree):
353         (.content-view.dom-tree .tree-outline.dom li .status-image.breakpoint.disabled): Deleted.
354         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint): Deleted.
355         (.content-view.dom-tree .tree-outline.dom.breakpoints-disabled li .status-image.breakpoint.disabled): Deleted.
356
357         * UserInterface/Views/DOMTreeOutline.css:
358         (.tree-outline.dom li.selected .selection-area):
359         (.tree-outline.dom li.elements-drag-over .selection-area):
360         (.tree-outline.dom:focus li:matches(.selected, .hovered) .selection-area):
361         (.tree-outline.dom li.hovered:not(.selected) .selection-area):
362         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
363         Use the system accent color for the "pseudo-class enabled" marker.
364         (@media (prefers-color-scheme: dark)):
365         (.tree-outline.dom:focus li.selected .selection-area): Deleted.
366         Use --selected-background-color for selection and hover styles, which is
367         set to the system highlight color if available.
368
369         * UserInterface/Views/InlineSwatch.css:
370         (.inline-swatch:matches(.bezier, .spring, .variable)):
371         (.inline-swatch:matches(.bezier, .spring)): Deleted.
372         (.inline-swatch.variable): Deleted.
373
374         * UserInterface/Views/InlineSwatch.js:
375         (WI.InlineSwatch):
376
377         * UserInterface/Views/NetworkDetailView.css:
378         (.network .network-detail .navigation-bar .item.radio.button.text-only:before):
379         (.network .network-detail .navigation-bar .item.radio.button.text-only.selected):
380         (@media (prefers-color-scheme: dark)):
381         (.network-detail .item.close > .glyph):
382
383         * UserInterface/Views/QuickConsole.css:
384         (.quick-console > .console-prompt > .glyph):
385         (.quick-console > .console-prompt::before): Deleted.
386
387         * UserInterface/Views/RadioButtonNavigationItem.css:
388         (.navigation-bar .item.radio.button.text-only):
389         (.navigation-bar .item.radio.button.text-only::before):
390         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)):
391         (.navigation-bar .item.radio.button.text-only:matches(.selected, :hover)::before):
392         (.navigation-bar .item.radio.button.text-only:not(.selected):hover::before):
393         (.navigation-bar .item.radio.button.text-only.selected:active::before):
394         (.navigation-bar .item.radio.button.text-only:hover): Deleted.
395         (.navigation-bar .item.radio.button.text-only.selected): Deleted.
396         (.navigation-bar .item.radio.button.text-only:active): Deleted.
397         (.navigation-bar .item.radio.button.text-only.selected:active): Deleted.
398         Use system accent color for selection and hover styles. Since it isn't
399         yet possible to derive new colors from the accent color in CSS, fake it
400         with a ::before pseudo-element that can have have `filter` or `opacity`
401         effects applied to it without altering the button text color.
402
403         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
404         (.timeline-overview-graph.rendering-frame > .frame-marker):
405         Use system accent color for selected frame marker.
406
407         * UserInterface/Views/ScopeBar.css:
408         (.scope-bar > li):
409         (.scope-bar > li::before):
410         (.scope-bar.default-item-selected > li.multiple.selected::before):
411         (.scope-bar > li:matches(.selected, :hover)):
412         (.scope-bar > li:matches(.selected, :hover)::before):
413         (.scope-bar > li:not(.selected):hover::before):
414         (.scope-bar > li.selected:active::before):
415         (.scope-bar > li:hover): Deleted.
416         (.scope-bar > li.selected): Deleted.
417         (.scope-bar > li:active): Deleted.
418         (.scope-bar > li.selected:active): Deleted.
419
420         * UserInterface/Views/SettingsTabContentView.css:
421         (.content-view.settings .navigation-bar .item.radio.button.text-only:before):
422
423         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
424         (.spreadsheet-style-declaration-editor):
425         (@media (prefers-color-scheme: dark)):
426
427         * UserInterface/Views/TextEditor.css:
428         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
429         (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before):
430         (.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber::before):
431         (@keyframes text-editor-highlight-fadeout):
432         (@keyframes text-editor-hovered-expression-highlight-fadeout):
433         Replace breakpoint pixel art with a solid color (the system accent
434         color) clipped to the shape of a breakpoint.
435
436         * UserInterface/Views/TimelineRecordFrame.css:
437         (.timeline-record-frame.selected):
438
439         * UserInterface/Views/URLBreakpointTreeElement.js:
440
441         * UserInterface/Views/Variables.css:
442         (:root):
443         (body.window-inactive):
444         (@media (prefers-color-scheme: dark)):
445         (body.mac-platform:not(.sierra, .high-sierra)):
446         Add custom property overrides for system colors where supported.
447
448 2019-02-26  Devin Rousso  <drousso@apple.com>
449
450         Web Inspector: Search: no results when opening to Search tab
451         https://bugs.webkit.org/show_bug.cgi?id=195058
452         <rdar://problem/48407699>
453
454         Reviewed by Joseph Pecoraro.
455
456         * UserInterface/Views/SearchSidebarPanel.js:
457         (WI.SearchSidebarPanel.prototype.performSearch):
458         If targets aren't available, wait until they are and then perform the search.
459
460         * UserInterface/Base/Main.js:
461         (WI.targetsAvailable): Added.
462         Expose getter for indicating whether targets are available.
463
464 2019-02-26  Joseph Pecoraro  <pecoraro@apple.com>
465
466         Web Inspector: CPU Usage Timeline - Main Thread Indicator
467         https://bugs.webkit.org/show_bug.cgi?id=194972
468
469         Reviewed by Devin Rousso.
470
471         * UserInterface/Main.html:
472         * UserInterface/Base/Utilities.js:
473         (value):
474         The existing enclosingNode doesn't work for SVG because its names
475         are lowercase. Add a simplified version for the svg case.
476
477         * UserInterface/Views/RangeChart.js: Added.
478         (WI.RangeChart):
479         (WI.RangeChart.prototype.get size):
480         (WI.RangeChart.prototype.set size):
481         (WI.RangeChart.prototype.addRange):
482         (WI.RangeChart.prototype.clear):
483         (WI.RangeChart.prototype.layout):
484         A new chart that draws rects for given ranges.
485
486         * UserInterface/Models/Timeline.js:
487         (WI.Timeline.prototype.recordsOverlappingTimeRange):
488         Helper to specifically get records touching a range. Useful
489         for when we have a single pixel spanning (startTime -> endTime)
490         and we want to find records in that pixel.
491
492         * UserInterface/Views/CPUTimelineView.css:
493         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart rect):
494         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-script):
495         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-style):
496         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-layout):
497         (.timeline-view.cpu .cpu-usage-indicator-view > .graph > .range-chart .sample-type-paint):
498         * UserInterface/Views/CPUTimelineView.js:
499         (WI.CPUTimelineView.prototype.get indicatorViewHeight):
500         (WI.CPUTimelineView.prototype.clear):
501         (WI.CPUTimelineView.prototype.get scrollableElements):
502         (WI.CPUTimelineView.prototype.initialLayout):
503         (WI.CPUTimelineView.prototype.layout):
504         (WI.CPUTimelineView.prototype._graphPositionForMouseEvent):
505         (WI.CPUTimelineView.prototype._handleIndicatorClick):
506         (WI.CPUTimelineView.prototype._attemptSelectIndicatatorTimelineRecord):
507         (WI.CPUTimelineView.prototype._selectTimelineRecord):
508         Place the Main Thread Indicator view beneath the big graph.
509         Clicking inside it selects records in the Timeline Overview.
510
511         * UserInterface/Views/CPUUsageIndicatorView.css: Added.
512         (.cpu-usage-indicator-view):
513         (.cpu-usage-indicator-view > .details):
514         (body[dir=ltr] .cpu-usage-indicator-view > .details):
515         (body[dir=rtl] .cpu-usage-indicator-view > .details):
516         (body[dir=rtl] .cpu-usage-indicator-view > .graph):
517         (.cpu-usage-indicator-view > .graph):
518         (.cpu-usage-indicator-view > .graph,):
519         * UserInterface/Views/CPUUsageIndicatorView.js: Added.
520         (WI.CPUUsageIndicatorView):
521         (WI.CPUUsageIndicatorView.prototype.get chart):
522         (WI.CPUUsageIndicatorView.prototype.clear):
523         (WI.CPUUsageIndicatorView.prototype.updateChart):
524         Converts the CPU samples data into a RangeChart. It works to coalesce
525         many samples of the same type into a single range to reduce total ranges.
526
527         * UserInterface/Views/TimelineRecordingContentView.js:
528         (WI.TimelineRecordingContentView):
529         (WI.TimelineRecordingContentView.prototype._recordSelected):
530         (WI.TimelineRecordingContentView.prototype._recordWasSelected):
531         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineOverview):
532         (WI.TimelineRecordingContentView.prototype._selectRecordInTimelineView):
533         * UserInterface/Views/TimelineView.js:
534         Add a path for a TimelineView to dispatch a record selected event and cause
535         have the TimelineRecordingContentView react to it by updating the timeline
536         overview and relevent timeline view.
537
538 2019-02-26  Devin Rousso  <drousso@apple.com>
539
540         Web Inspector: navigation sidebar says "No Search Results" when a slow search is in progress
541         https://bugs.webkit.org/show_bug.cgi?id=170631
542         <rdar://problem/29473874>
543
544         Reviewed by Joseph Pecoraro.
545
546         Keep a count of all the backend commands (increment when firing, decrement when a result is
547         sent back to the frontend). Once the count comes back to `0`, attempt to show the "No Results"
548         placeholder, since we will have finished searching at that point. Since commands can be called
549         as a result of other commands, using `Promise.all` isn't possible.
550
551         * UserInterface/Views/SearchSidebarPanel.js:
552         (WI.SearchSidebarPanel.prototype.performSearch):
553         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon): Deleted.
554         (WI.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder): Deleted.
555         Drive-by: replace `bind` calls with arrow functions, and use for-of loops.
556
557         * Localizations/en.lproj/localizedStrings.js:
558
559 2019-02-26  Devin Rousso  <drousso@apple.com>
560
561         Web Inspector: Canvas: if no auto-capture value is specified, don't force the input to have "0" as the value
562         https://bugs.webkit.org/show_bug.cgi?id=194950
563         <rdar://problem/48276798>
564
565         Reviewed by Joseph Pecoraro.
566
567         Create a getter/setter for the value of the auto-capture frame count <input> so that all
568         code follows the same path.
569
570         If the <input> currently has no content and the frame count is 0, only set the placeholder.
571
572         * UserInterface/Views/CanvasOverviewContentView.js:
573         (WI.CanvasOverviewContentView):
574         (WI.CanvasOverviewContentView.prototype._setRecordingAutoCaptureFrameCount):
575         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureCheckboxLabel):
576         (WI.CanvasOverviewContentView.prototype.get _recordingAutoCaptureFrameCountInputElementValue): Added.
577         (WI.CanvasOverviewContentView.prototype.set _recordingAutoCaptureFrameCountInputElementValue): Added.
578         (WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
579         (WI.CanvasOverviewContentView.prototype._handleCanvasRecordingAutoCaptureFrameCountChanged):
580
581 2019-02-26  Devin Rousso  <drousso@apple.com>
582
583         Web Inspector: Console: dragging a selection outside the selected element clears the selection
584         https://bugs.webkit.org/show_bug.cgi?id=194660
585         <rdar://problem/46719239>
586
587         Reviewed by Joseph Pecoraro.
588
589         * UserInterface/Views/LogContentView.js:
590         (WI.LogContentView.prototype._mousemove):
591         Don't clear the selection if the target of the "mousemove" is outside of the view.
592
593         (WI.LogContentView.prototype._updateMessagesSelection):
594         Drive-by: clear the saved selected messages when we're just selecting a single message.
595
596 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
597
598         Web Inspector: Rename LineChart to AreaChart
599         https://bugs.webkit.org/show_bug.cgi?id=195038
600
601         Rubber-stamped by Matt Baker.
602
603         * UserInterface/Main.html:
604         New file names.
605
606         * UserInterface/Views/AreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/LineChart.js.
607         * UserInterface/Views/StackedAreaChart.js: Renamed from Source/WebInspectorUI/UserInterface/Views/StackedLineChart.js.
608         Renamed.
609
610         * UserInterface/Views/CPUTimelineView.css:
611         * UserInterface/Views/CPUUsageStackedView.css:
612         * UserInterface/Views/CPUUsageStackedView.js:
613         * UserInterface/Views/CPUUsageView.css:
614         * UserInterface/Views/CPUUsageView.js:
615         * UserInterface/Views/LegacyCPUTimelineView.css:
616         * UserInterface/Views/MemoryCategoryView.css:
617         * UserInterface/Views/MemoryCategoryView.js:
618         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
619         Update references.
620
621 2019-02-25  Devin Rousso  <drousso@apple.com>
622
623         Web Inspector: hovering a node inside an object preview should highlight it
624         https://bugs.webkit.org/show_bug.cgi?id=194862
625         <rdar://problem/48246433>
626
627         Reviewed by Joseph Pecoraro.
628
629         * UserInterface/Views/FormattedValue.js:
630         (WI.FormattedValue.createElementForNodePreview):
631         When provided a way to access the `WI.RemoteObject` for the given preview, add various mouse
632         event listeners that highlight the corresponding DOM node.
633
634         * UserInterface/Views/ObjectPreviewView.js:
635         (WI.ObjectPreviewView):
636         (WI.ObjectPreviewView.prototype._initTitleElement):
637         (WI.ObjectPreviewView.prototype._appendPropertyPreviews):
638         (WI.ObjectPreviewView.prototype._appendValuePreview):
639         Implement various ways of getting the `WI.RemoteObject` for a given preview.
640          - When the preview is for the actual `WI.RemoteObject`, simply return it
641          - If the preview is a property of the main object, get the `WI.RemoteObject` for that property
642
643         * UserInterface/Views/ObjectTreeView.js:
644         (WI.ObjectTreeView):
645         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
646         (WI.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
647         Pass the `WI.RemoteObject` to the preview so that it can utilize it.
648
649         * UserInterface/Controllers/ConsoleManager.js:
650         (WI.ConsoleManager):
651         (WI.ConsoleManager.prototype.releaseRemoteObjectWithConsoleClear): Added.
652         (WI.ConsoleManager.prototype.messagesCleared): Added.
653
654 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
655
656         Web Inspector: CPU Usage Timeline - Thread Breakdown
657         https://bugs.webkit.org/show_bug.cgi?id=194788
658
659         Reviewed by Devin Rousso.
660
661         * Localizations/en.lproj/localizedStrings.js:
662         * UserInterface/Main.html:
663         New strings and files.
664
665         * UserInterface/Views/Variables.css:
666         (:root):
667         New colors for cpu threads / activity breakdown.
668
669         * UserInterface/Models/CPUTimelineRecord.js:
670         (WI.CPUTimelineRecord.prototype.get workers):
671         (WI.CPUTimelineRecord):
672         Distinguish the workers in a CPU timeline record.
673
674         * UserInterface/Views/CPUTimelineOverviewGraph.js:
675         (WI.CPUTimelineOverviewGraph):
676         (WI.CPUTimelineOverviewGraph.prototype.layout):
677         * UserInterface/Views/CPUTimelineOverviewGraph.css:
678         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect):
679         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.main-thread-usage):
680         (.timeline-overview-graph.cpu > .stacked-column-chart > svg > rect.worker-thread-usage):
681         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
682         Stacked column chart for CPU in the overview graph.
683
684         * UserInterface/Views/CPUTimelineView.css:
685         (.timeline-view.cpu > .content > .overview):
686         (.timeline-view.cpu > .content > .details > .subtitle.threads):
687         (.timeline-view.cpu > .content > .overview > .chart):
688         (.timeline-view.cpu > .content > .overview > .chart > .subtitle):
689         (.timeline-view.cpu > .content > .overview > .chart > .container):
690         (.timeline-view.cpu > .content > .overview .samples,):
691         (.timeline-view.cpu .legend):
692         (.timeline-view.cpu .legend .row):
693         (.timeline-view.cpu .legend .row + .row):
694         (.timeline-view.cpu .legend .swatch):
695         (.timeline-view.cpu .legend > .row > .swatch.sample-type-idle):
696         (.timeline-view.cpu .legend > .row > .swatch.sample-type-script):
697         (.timeline-view.cpu .legend > .row > .swatch.sample-type-style):
698         (.timeline-view.cpu .legend > .row > .swatch.sample-type-layout):
699         (.timeline-view.cpu .legend > .row > .swatch.sample-type-paint):
700         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-idle):
701         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script):
702         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-style):
703         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-layout):
704         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-paint):
705         (.timeline-view.cpu svg > path):
706         (.timeline-view.cpu .main-thread svg > path,):
707         (.timeline-view.cpu .worker-thread svg > path,):
708         (.timeline-view.cpu .cpu-usage-view.empty):
709         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers):
710         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div):
711         (.timeline-view.cpu :matches(.line-chart, .stacked-line-chart) .markers > div > .label):
712         (.timeline-view.cpu > .content): Deleted.
713         (.cpu-usage-view .line-chart > svg > path): Deleted.
714         (.timeline-view.cpu .legend > .row > .swatch.current): Deleted.
715         * UserInterface/Views/CPUTimelineView.js:
716         (WI.CPUTimelineView):
717         (WI.CPUTimelineView.displayNameForSampleType):
718         (WI.CPUTimelineView.prototype.shown):
719         (WI.CPUTimelineView.prototype.clear.clearUsageView):
720         (WI.CPUTimelineView.prototype.clear):
721         (WI.CPUTimelineView.prototype.initialLayout.createChartContainer):
722         (WI.CPUTimelineView.prototype.initialLayout.appendLegendRow):
723         (WI.CPUTimelineView.prototype.initialLayout):
724         (WI.CPUTimelineView.prototype.layout.removeGreaterThan):
725         (WI.CPUTimelineView.prototype.layout):
726         (WI.CPUTimelineView.prototype.layout.layoutView):
727         (WI.CPUTimelineView.prototype.layout.yScale):
728         (WI.CPUTimelineView.prototype._computeSamplingData.markRecordEntries):
729         (WI.CPUTimelineView.prototype._computeSamplingData):
730         (WI.CPUTimelineView.prototype._removeWorkerThreadViews):
731         (WI.CPUTimelineView.prototype._clearBreakdownLegend):
732         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
733         Line charts and Circle Chart for threads and breakdowns.
734
735         * UserInterface/Views/CPUUsageStackedView.css:
736         (.cpu-usage-stacked-view):
737         (.cpu-usage-stacked-view > .details):
738         (body[dir=ltr] .cpu-usage-stacked-view > .details):
739         (body[dir=rtl] .cpu-usage-stacked-view > .details):
740         (.cpu-usage-stacked-view > .details > .name):
741         (body[dir=rtl] .cpu-usage-stacked-view > .graph):
742         (.cpu-usage-stacked-view > .graph):
743         (.cpu-usage-stacked-view > .graph,):
744         * UserInterface/Views/CPUUsageStackedView.js:
745         (WI.CPUUsageStackedView):
746         (WI.CPUUsageStackedView.prototype.get chart):
747         (WI.CPUUsageStackedView.prototype.clear):
748         (WI.CPUUsageStackedView.prototype.updateChart):
749         (WI.CPUUsageStackedView.prototype._updateDetails):
750         Same as CPUUsageView except Stacked for the total.
751
752         * UserInterface/Views/CPUUsageView.css:
753         (.cpu-usage-view):
754         (.cpu-usage-view > .details):
755         (.cpu-usage-view > .details > .name):
756         (.cpu-usage-view > .graph):
757         * UserInterface/Views/CPUUsageView.js:
758         (WI.CPUUsageView):
759         (WI.CPUUsageView.prototype.get chart):
760         (WI.CPUUsageView.prototype.clear):
761         (WI.CPUUsageView.prototype.updateChart):
762         (WI.CPUUsageView.prototype._updateDetails):
763         Slight modifications for the new UI.
764
765         * UserInterface/Views/LegacyCPUTimelineView.css:
766         (.timeline-view.legacy-cpu .cpu-usage-view .line-chart > svg > path):
767         * UserInterface/Views/LegacyCPUTimelineView.js:
768         (WI.LegacyCPUTimelineView.prototype.layout):
769         Update API calls in the legacy view for minor changes.
770
771         * UserInterface/Views/MemoryCategoryView.css:
772         (.memory-category-view > .details):
773         (.memory-category-view > .details > .name):
774         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
775         (WI.MemoryTimelineOverviewGraph.prototype.layout):
776         * UserInterface/Views/MemoryTimelineView.css:
777         (body .timeline-view.memory):
778         (.timeline-view.memory): Deleted.
779         Improvements ported from the CPU timeline views.
780
781         * UserInterface/Views/StackedColumnChart.js: Added.
782         (WI.StackedColumnChart):
783         (WI.StackedColumnChart.prototype.get size):
784         (WI.StackedColumnChart.prototype.set size):
785         (WI.StackedColumnChart.prototype.initializeSections):
786         (WI.StackedColumnChart.prototype.addColumnSet):
787         (WI.StackedColumnChart.prototype.clear):
788         (WI.StackedColumnChart.prototype.layout):
789         A stacked column chart implementation.
790
791         * UserInterface/Views/View.js:
792         (WI.View.prototype.removeUnparentedSubview):
793         Add a way to remove a subview that had its `element` moved
794         someplace other than a direct child of our element.
795
796 2019-02-25  Joseph Pecoraro  <pecoraro@apple.com>
797
798         Web Inspector: Dark Mode: Network Overview Graph segments have distracting white box shadow
799         https://bugs.webkit.org/show_bug.cgi?id=194966
800
801         Reviewed by Devin Rousso.
802
803         * UserInterface/Views/Variables.css:
804         (@media (prefers-color-scheme: dark)):
805         Make global timeline even/odd colors where odd is the default content background
806         color and even is slightly different. These were used in multiple places.
807
808         * UserInterface/Views/CPUTimelineOverviewGraph.css:
809         (.timeline-overview-graph.cpu > .legend):
810         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
811         (@media (prefers-color-scheme: dark)): Deleted.
812         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
813         (.timeline-overview-graph.memory > .legend):
814         (.timeline-overview-graph.memory:nth-child(even) > .legend):
815         (@media (prefers-color-scheme: dark)): Deleted.
816         * UserInterface/Views/NetworkTimelineOverviewGraph.css:
817         (.timeline-overview-graph.network > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
818         (.timeline-overview-graph.network:nth-child(even) > .graph-row > .timeline-record-bar > .segment:not(.inactive)):
819         Use the variable colors now and eliminate dark mode blocks.
820
821 2019-02-25  Nikita Vasilyev  <nvasilyev@apple.com>
822
823         Web Inspector: Styles: Command-/ should toggle edited property
824         https://bugs.webkit.org/show_bug.cgi?id=194967
825         <rdar://problem/48329852>
826
827         Reviewed by Devin Rousso.
828
829         * UserInterface/Models/CSSProperty.js:
830         (WI.CSSProperty.prototype.commentOut):
831         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
832         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelect):
833         * UserInterface/Views/SpreadsheetStyleProperty.js:
834         (WI.SpreadsheetStyleProperty.prototype.update):
835         (WI.SpreadsheetStyleProperty.prototype._toggle):
836         (WI.SpreadsheetStyleProperty.prototype._select):
837
838 2019-02-25  Devin Rousso  <drousso@apple.com>
839
840         Web Inspector: REGRESSION(r242018): Timelines shows no results
841         https://bugs.webkit.org/show_bug.cgi?id=195017
842
843         Reviewed by Joseph Pecoraro.
844
845         `simpleGlobStringToRegExp` can return `null` if the provided search query is an empty string.
846
847         * UserInterface/Base/SearchUtilities.js:
848         (WI.SearchUtilities.prototype.regExpForString):
849         Add assertions that the provided search query is a valid non-empty string.
850
851         * UserInterface/Views/DataGrid.js:
852         (WI.DataGrid.prototype._updateFilter):
853         If the search query is empty, don't attempt to create a `RegExp` for it.
854
855 2019-02-25  Matt Baker  <mattbaker@apple.com>
856
857         Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard should always be revealed
858         https://bugs.webkit.org/show_bug.cgi?id=194918
859         <rdar://problem/48289314>
860
861         Reviewed by Devin Rousso.
862
863         * UserInterface/Views/Table.js:
864         (WI.Table.prototype.selectionControllerSelectionDidChange):
865
866         * UserInterface/Views/TreeOutline.js:
867         (WI.TreeOutline.prototype._treeKeyDown):
868
869 2019-02-25  Devin Rousso  <drousso@apple.com>
870
871         Web Inspector: [META] Merge Resources and Debugger into a single Sources tab
872         https://bugs.webkit.org/show_bug.cgi?id=183420
873
874         Reviewed by Joseph Pecoraro.
875
876         * UserInterface/Views/SourcesNavigationSidebarPanel.js: Added.
877         (WI.SourcesNavigationSidebarPanel):
878         (WI.SourcesNavigationSidebarPanel.shouldPlaceResourcesAtTopLevel):
879         (WI.SourcesNavigationSidebarPanel.prototype.get minimumWidth):
880         (WI.SourcesNavigationSidebarPanel.prototype.closed):
881         (WI.SourcesNavigationSidebarPanel.prototype.showDefaultContentView):
882         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
883         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
884         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
885         (WI.SourcesNavigationSidebarPanel.prototype.resetFilter):
886         (WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
887         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
888         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
889         (WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
890         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
891         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
892         (WI.SourcesNavigationSidebarPanel.prototype._addTarget):
893         (WI.SourcesNavigationSidebarPanel.prototype._findCallStackTargetTreeElement):
894         (WI.SourcesNavigationSidebarPanel.prototype._updateCallStackTreeOutline):
895         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
896         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
897         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
898         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
899         (WI.SourcesNavigationSidebarPanel.prototype._addDebuggerTreeElementForSourceCode):
900         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
901         (WI.SourcesNavigationSidebarPanel.prototype._compareBreakpointTreeElements):
902         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
903         (WI.SourcesNavigationSidebarPanel.prototype._removeBreakpoint):
904         (WI.SourcesNavigationSidebarPanel.prototype._removeAllBreakpoints):
905         (WI.SourcesNavigationSidebarPanel.prototype._toggleAllBreakpoints):
906         (WI.SourcesNavigationSidebarPanel.prototype._breakpointsBeneathTreeElement):
907         (WI.SourcesNavigationSidebarPanel.prototype._addIssue):
908         (WI.SourcesNavigationSidebarPanel.prototype._removeDebuggerTreeElement):
909         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
910         (WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
911         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
912         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
913         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonGotoArrow):
914         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
915         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceTypeScopeBarSelectionChanged):
916         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
917         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
918         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked):
919         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
920         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceAdded):
921         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
922         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointAdded):
923         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointRemoved):
924         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointsEnabledDidChange):
925         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptAdded):
926         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptRemoved):
927         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptsCleared):
928         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
929         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
930         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange):
931         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerActiveCallFrameDidChange):
932         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerWaitingToPause):
933         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
934         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateDidChange):
935         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleIssueAdded):
936         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleCleared):
937         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
938         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
939         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
940         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetAdded):
941         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetRemoved):
942         (WI.SourcesNavigationSidebarPanel.prototype._handleExtraDomainsActivated):
943         * UserInterface/Views/SourcesNavigationSidebarPanel.css: Added.
944         (.sidebar > .panel.navigation.sources > .content):
945         (.sidebar > .panel.navigation.sources > .navigation-bar):
946         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints):
947         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints.activated):
948         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume):
949         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume.activated):
950         (.sidebar > .panel.navigation.sources > .content > .warning-banner):
951         (.sidebar > .panel.navigation.sources > .content > .details-section):
952         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
953         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
954         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)):
955         (.sidebar > .panel.navigation.sources > .content > .navigation-bar):
956         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread):
957         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread):
958         (@media (prefers-dark-interface) .sidebar > > .content > .panel.navigation.sources .warning-banner):
959
960         * UserInterface/Views/SourcesTabContentView.js: Added.
961         (WI.SourcesTabContentView):
962         (WI.SourcesTabContentView.tabInfo):
963         (WI.SourcesTabContentView.isTabAllowed):
964         (WI.SourcesTabContentView.prototype.get type):
965         (WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
966         (WI.SourcesTabContentView.prototype.canShowRepresentedObject):
967         (WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
968         (WI.SourcesTabContentView.prototype.showScopeChainDetailsSidebarPanel):
969         (WI.SourcesTabContentView.prototype.revealAndSelectBreakpoint):
970
971         * UserInterface/Views/CanvasSidebarPanel.js:
972         (WI.CanvasSidebarPanel):
973         * UserInterface/Views/DebuggerSidebarPanel.js:
974         (WI.DebuggerSidebarPanel):
975         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
976         * UserInterface/Views/NavigationSidebarPanel.js:
977         (WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
978         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
979         (WI.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
980         Rework `createContentTreeOutline` to allow for additional symbols.
981         Add another symbol to ensure that the `WI.TreeOutline` is not used for cookie restoration.
982
983         * UserInterface/Protocol/InspectorFrontendAPI.js:
984         (InspectorFrontendAPI.showResources):
985         * UserInterface/Views/ContextMenuUtilities.js:
986         (WI.appendContextMenuItemsForURL):
987         * UserInterface/Views/DefaultDashboardView.js:
988         (WI.DefaultDashboardView.prototype._resourcesItemWasClicked):
989         * UserInterface/Views/SourceCodeTextEditor.js:
990         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
991
992         * UserInterface/Views/TabBrowser.js:
993         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
994
995         * UserInterface/Base/Main.js:
996         (WI.contentLoaded):
997         (WI.showSourcesTab): Added.
998         (WI.isShowingSourcesTab): Added.
999         (WI.tabContentViewClassForRepresentedObject):
1000         (WI._debuggerDidPause):
1001
1002         * UserInterface/Views/DebuggerTabContentView.js:
1003         (WI.DebuggerTabContentView.isTabAllowed):
1004         * UserInterface/Views/ResourcesTabContentView.js:
1005         (WI.ResourcesTabContentView.isTabAllowed):
1006
1007         * UserInterface/Base/Setting.js:
1008         * UserInterface/Views/SettingsTabContentView.js:
1009         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1010
1011         * UserInterface/Main.html:
1012         * UserInterface/Images/Sources.svg: Added.
1013         * Localizations/en.lproj/localizedStrings.js:
1014
1015 2019-02-24  Devin Rousso  <drousso@apple.com>
1016
1017         Web Inspector: Change the InspectorOverlay to use native rather than canvas
1018         https://bugs.webkit.org/show_bug.cgi?id=105023
1019         <rdar://problem/13443692>
1020
1021         Reviewed by Brian Burg.
1022
1023         * UserInterface/Base/Main.js:
1024         (WI.initializeTarget):
1025
1026         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
1027         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
1028         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
1029         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
1030         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
1031         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
1032         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
1033         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
1034         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
1035         * Versions/Inspector-iOS-10.0.json:
1036         * Versions/Inspector-iOS-10.3.json:
1037         * Versions/Inspector-iOS-11.0.json:
1038         * Versions/Inspector-iOS-11.3.json:
1039         * Versions/Inspector-iOS-12.0.json:
1040         * Versions/Inspector-iOS-12.2.json:
1041         * Versions/Inspector-iOS-8.0.json:
1042         * Versions/Inspector-iOS-9.0.json:
1043         * Versions/Inspector-iOS-9.3.json:
1044         Remove `Debugger.setOverlayMessage` command as it hasn't been used and is no longer supported.
1045
1046 2019-02-24  Devin Rousso  <drousso@apple.com>
1047
1048         Web Inspector: provide a way to make searches case sensitive or use a regular expression
1049         https://bugs.webkit.org/show_bug.cgi?id=192527
1050
1051         Reviewed by Joseph Pecoraro.
1052
1053         * UserInterface/Base/SearchUtilities.js: Added.
1054         (WI.SearchUtilities.get defaultSettings):
1055         (WI.SearchUtilities.createSettings):
1056         (WI.SearchUtilities.regExpForString):
1057         (WI.SearchUtilities.createSettingsButton):
1058         (WI.SearchUtilities.createSettingsButton.toggleActive):
1059         * UserInterface/Views/Main.css:
1060         (.search-settings): Added.
1061         (.search-settings > .glyph): Added.
1062         (.search-settings:active > .glyph): Added.
1063         (.search-settings.active > .glyph): Added.
1064         (.search-settings:active.active > .glyph): Added.
1065         Create static utility class for handling settings related to searching/filtering.
1066
1067         * UserInterface/Base/Setting.js:
1068         * UserInterface/Views/SettingsTabContentView.js:
1069         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1070         Create default search settings that apply across WebInspector, unless a more specific
1071         setting has been created that overrides it (e.g. the navigation sidebar or Search tab).
1072
1073         * UserInterface/Views/SearchSidebarPanel.js:
1074         (WI.SearchSidebarPanel):
1075         (WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
1076         (WI.SearchSidebarPanel.prototype.performSearch.resourceCallback):
1077         (WI.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
1078         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
1079         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts):
1080         (WI.SearchSidebarPanel.prototype.performSearch.domSearchResults):
1081         (WI.SearchSidebarPanel.prototype.performSearch.domCallback):
1082         (WI.SearchSidebarPanel.prototype.performSearch):
1083         * UserInterface/Views/SearchSidebarPanel.css:
1084         (.sidebar > .panel.navigation.search > .search-bar):
1085         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
1086         Add a (*) settings "gear" after each `<input type="search">` that shows a contextmenu with
1087         checkboxes for each search setting. Any settings changed for each input take precedence over
1088         the default settings, but will match the corresponding default setting if it's changed.
1089
1090         * UserInterface/Views/SearchResultTreeElement.js:
1091         (WI.SearchResultTreeElement.truncateAndHighlightTitle):
1092         Use the length of the found text, rather than the length of the query.
1093
1094         * UserInterface/Views/DOMTreeElement.js:
1095         (WI.DOMTreeElement.prototype._highlightSearchResults):
1096         * UserInterface/Views/DataGrid.js:
1097         (WI.DataGrid.prototype._updateFilter):
1098         * UserInterface/Views/LogContentView.js:
1099         (WI.LogContentView.prototype.performSearch):
1100         * UserInterface/Views/NetworkTableContentView.js:
1101         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
1102         * UserInterface/Views/ResourceHeadersContentView.js:
1103         (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
1104         * UserInterface/Views/ResourceSecurityContentView.js:
1105         (WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
1106         * UserInterface/Views/SourceCodeTextEditor.js:
1107         (WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
1108         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
1109         * UserInterface/Views/TextEditor.js:
1110         (WI.TextEditor.prototype.performSearch):
1111         Use the default search settings when searching/filtering.
1112
1113         * UserInterface/Views/SearchBar.css:
1114         (.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Added.
1115         Drive-by: prevent the (x) from appearing when no text has been entered.
1116
1117         * Localizations/en.lproj/localizedStrings.js:
1118         * UserInterface/Main.html:
1119
1120 2019-02-24  Devin Rousso  <drousso@apple.com>
1121
1122         Web Inspector: make debounce Proxy into its own class
1123         https://bugs.webkit.org/show_bug.cgi?id=194721
1124
1125         Reviewed by Joseph Pecoraro.
1126
1127         The `debounce`/`throttle` functions leveraged a `Proxy` to intercept the function call and
1128         replace it with a "delayed" version. The issue with this is that it set the identifier for
1129         the timer on the function itself, which is shared across all instances of a given class.
1130         When different instances call the same delayed function, they'd clobber eachother's attempts
1131         to delay work.
1132
1133         * UserInterface/Base/Debouncer.js: Added.
1134         (Debouncer):
1135         (Debouncer.prototype.force):
1136         (Debouncer.prototype.delayForTime):
1137         (Debouncer.prototype.delayForFrame):
1138         (Debouncer.prototype.delayForMicrotask):
1139         (Debouncer.prototype.cancel):
1140         (Debouncer.prototype._execute):
1141         * UserInterface/Base/Throttler.js: Added.
1142         (Throttler):
1143         (Throttler.prototype.force):
1144         (Throttler.prototype.fire):
1145         (Throttler.prototype.cancel):
1146         (Throttler.prototype._execute):
1147         * UserInterface/Base/Utilities.js:
1148
1149         * UserInterface/Views/BezierEditor.js:
1150         (WI.BezierEditor):
1151         * UserInterface/Views/ContentBrowser.js:
1152         (WI.ContentBrowser):
1153         (WI.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
1154         (WI.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
1155         (WI.ContentBrowser.prototype._currentContentViewDidChange):
1156         (WI.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Deleted.
1157         * UserInterface/Views/DOMTreeUpdater.js:
1158         (WI.DOMTreeUpdater):
1159         (WI.DOMTreeUpdater.prototype._nodeAttributeModified):
1160         (WI.DOMTreeUpdater.prototype._nodeInserted):
1161         (WI.DOMTreeUpdater.prototype._nodeRemoved):
1162         * UserInterface/Views/NavigationSidebarPanel.js:
1163         (WI.NavigationSidebarPanel):
1164         (WI.NavigationSidebarPanel.prototype.closed):
1165         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
1166         (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
1167         (WI.NavigationSidebarPanel.prototype.updateFilter):
1168         (WI.NavigationSidebarPanel.prototype.shown):
1169         (WI.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
1170         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
1171         (WI.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
1172         * UserInterface/Views/RecordingContentView.js:
1173         (WI.RecordingContentView):
1174         (WI.RecordingContentView.prototype.updateActionIndex):
1175         (WI.RecordingContentView.prototype.hidden):
1176         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1177         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
1178         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
1179         (WI.ResourceDetailsSidebarPanel):
1180         * UserInterface/Views/ShaderProgramContentView.js:
1181         (WI.ShaderProgramContentView):
1182         * UserInterface/Views/SpringEditor.js:
1183         (WI.SpringEditor.prototype._resetPreviewAnimation):
1184         * UserInterface/Views/TreeElement.js:
1185         (WI.TreeElement.prototype.set hidden):
1186         (WI.TreeElement.prototype.didChange):
1187         (WI.TreeElement.prototype._attach):
1188         (WI.TreeElement.prototype._detach):
1189         (WI.TreeElement.prototype.collapse):
1190         (WI.TreeElement.prototype.expand):
1191         (WI.TreeElement.prototype.reveal):
1192         * UserInterface/Views/TreeOutline.js:
1193         (WI.TreeOutline):
1194         (WI.TreeOutline.prototype.registerScrollVirtualizer):
1195         (WI.TreeOutline.prototype.get updateVirtualizedElementsDebouncer): Added.
1196         (WI.TreeOutline.prototype._updateVirtualizedElements): Added.
1197         (WI.TreeOutline.prototype.updateVirtualizedElements.walk): Deleted.
1198         (WI.TreeOutline.prototype.updateVirtualizedElements): Deleted.
1199         * UserInterface/Views/WebSocketContentView.js:
1200         (WI.WebSocketContentView):
1201         (WI.WebSocketContentView.prototype.shown):
1202         (WI.WebSocketContentView.prototype._updateFramesSoon):
1203         (WI.WebSocketContentView.prototype._updateFrames):
1204
1205         * UserInterface/Main.html:
1206         * UserInterface/Test.html:
1207         * .eslintrc:
1208
1209 2019-02-24  Nikita Vasilyev  <nvasilyev@apple.com>
1210
1211         Unreviewed, fix indentation.
1212
1213         * UserInterface/Models/CSSStyleDeclaration.js:
1214         (WI.CSSStyleDeclaration.prototype.markModified):
1215
1216 2019-02-23  Keith Miller  <keith_miller@apple.com>
1217
1218         Add new mac target numbers
1219         https://bugs.webkit.org/show_bug.cgi?id=194955
1220
1221         Reviewed by Tim Horton.
1222
1223         * Configurations/Base.xcconfig:
1224         * Configurations/DebugRelease.xcconfig:
1225
1226 2019-02-22  Devin Rousso  <drousso@apple.com>
1227
1228         Web Inspector: Timelines: add UI for preventing auto-stop
1229         https://bugs.webkit.org/show_bug.cgi?id=194956
1230
1231         Reviewed by Joseph Pecoraro.
1232
1233         Add a checkbox to the navigation area of the Timelines tab that controls whether recordings
1234         automatically stop (e.g. after "load" or a period of inactivity).
1235
1236         * UserInterface/Views/TimelineRecordingContentView.js:
1237         (WI.TimelineRecordingContentView):
1238         (WI.TimelineRecordingContentView.prototype.get navigationItems):
1239         (WI.TimelineRecordingContentView.prototype._handleAutoStopCheckboxCheckedDidChange): Added.
1240         (WI.TimelineRecordingContentView.prototype._handleTimelinesAutoStopSettingChanged): Added.
1241
1242         * UserInterface/Controllers/TimelineManager.js:
1243         (WI.TimelineManager):
1244         (WI.TimelineManager.prototype.capturingStopped):
1245         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
1246         (WI.TimelineManager.prototype._resetAutoRecordingMaxTimeTimeout):
1247         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
1248         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
1249
1250         * UserInterface/Base/Setting.js:
1251         * Localizations/en.lproj/localizedStrings.js:
1252
1253 2019-02-22  Devin Rousso  <drousso@apple.com>
1254
1255         REGRESSION(r?): Web Inspector: Popovers have inset shadows
1256         https://bugs.webkit.org/show_bug.cgi?id=192963
1257         <rdar://problem/46888679>
1258
1259         Reviewed by Brian Burg.
1260
1261         * UserInterface/Views/Popover.js:
1262         (WI.Popover.prototype._drawBackground):
1263         (WI.Popover.prototype._drawBackground.isolate): Added.
1264         * UserInterface/Views/Popover.css:
1265         (.popover):
1266
1267 2019-02-22  Devin Rousso  <drousso@apple.com>
1268
1269         Web Inspector: Styles Redesign: clicking CSS property or selector should always select its text
1270         https://bugs.webkit.org/show_bug.cgi?id=180791
1271         <rdar://problem/36038366>
1272
1273         Reviewed by Brian Burg.
1274
1275         * UserInterface/Views/SpreadsheetSelectorField.js:
1276         (WI.SpreadsheetSelectorField):
1277         (WI.SpreadsheetSelectorField.prototype.startEditing):
1278         (WI.SpreadsheetSelectorField.prototype.stopEditing):
1279         (WI.SpreadsheetSelectorField.prototype._handleMouseDown): Added.
1280         (WI.SpreadsheetSelectorField.prototype._handleMouseUp): Added.
1281         (WI.SpreadsheetSelectorField.prototype._handleFocus): Deleted.
1282
1283         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1284         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
1285         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1286         (.spreadsheet-css-declaration .selector.editing:focus, .spreadsheet-css-declaration .selector > .matched): Added.
1287         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field):
1288         (.spreadsheet-css-declaration .selector:focus, .spreadsheet-css-declaration .selector > .matched): Deleted.
1289
1290 2019-02-22  Nikita Vasilyev  <nvasilyev@apple.com>
1291
1292         Web Inspector: Dark Mode: DOM Content Loaded blue marker is too dark
1293         https://bugs.webkit.org/show_bug.cgi?id=194970
1294         <rdar://problem/48330126>
1295
1296         Reviewed by Joseph Pecoraro.
1297
1298         * UserInterface/Views/TimelineRuler.css:
1299         (@media (prefers-color-scheme: dark)):
1300         (.timeline-ruler > .markers > .marker.dom-content-event):
1301         Make the marker lighter for the dark mode.
1302
1303 2019-02-22  Joseph Pecoraro  <pecoraro@apple.com>
1304
1305         Web Inspector: Remove unused Timeline record selection code path
1306         https://bugs.webkit.org/show_bug.cgi?id=194931
1307
1308         Reviewed by Devin Rousso.
1309
1310         * UserInterface/Views/TimelineOverview.js:
1311         (WI.TimelineOverview):
1312         (WI.TimelineOverview.prototype.userSelectedRecord): Deleted.
1313         * UserInterface/Views/TimelineRecordingContentView.js:
1314         (WI.TimelineRecordingContentView):
1315         (WI.TimelineRecordingContentView.prototype.timelineOverviewUserSelectedRecord): Deleted.
1316         * UserInterface/Views/TimelineView.js:
1317         (WI.TimelineView.prototype.userSelectedRecordFromOverview): Deleted.
1318
1319 2019-02-21  Darin Adler  <darin@apple.com>
1320
1321         Some refinements for Node and Document
1322         https://bugs.webkit.org/show_bug.cgi?id=194764
1323
1324         Reviewed by Ryosuke Niwa.
1325
1326         * UserInterface/Models/NativeFunctionParameters.js: Removed getOverrideStyle
1327         because this deprecated non-working function is no longer something web authors
1328         should be thinking about or typing.
1329
1330 2019-02-21  Devin Rousso  <drousso@apple.com>
1331
1332         Web Inspector: Canvas: recordings with a single frame sometimes missing TreeElement
1333         https://bugs.webkit.org/show_bug.cgi?id=194687
1334
1335         Reviewed by Joseph Pecoraro.
1336
1337         * UserInterface/Views/CanvasSidebarPanel.js:
1338         (WI.CanvasSidebarPanel):
1339         Wait until the entire `Recording` has been processed before setting the selected action.
1340
1341         * UserInterface/Views/CanvasSidebarPanel.css:
1342         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
1343         Drive-by: ensure that the recording `TreeOutline` container element has the full height to
1344         take advantage of for virtualization.
1345
1346         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
1347         (WI.RecordingStateDetailsSidebarPanel.prototype.set recording):
1348         Drive-by: clear the `DataGrid` list when changing recordings since we removed all subviews.
1349
1350 2019-02-21  Devin Rousso  <drousso@apple.com>
1351
1352         Web Inspector: DOM Debugger: node-specific event breakpoints aren't cleared/recalculated on navigation
1353         https://bugs.webkit.org/show_bug.cgi?id=194874
1354         <rdar://problem/48253415>
1355
1356         Reviewed by Joseph Pecoraro.
1357
1358         * UserInterface/Controllers/DOMManager.js:
1359         (WI.DOMManager.prototype._setDocument):
1360         (WI.DOMManager.prototype.removeBreakpointForEventListener):
1361
1362 2019-02-21  Devin Rousso  <drousso@apple.com>
1363
1364         Web Inspector: macOS user agent option should be available in device settings menu
1365         https://bugs.webkit.org/show_bug.cgi?id=194885
1366         <rdar://problem/48259253>
1367
1368         Reviewed by Joseph Pecoraro.
1369
1370         * UserInterface/Base/Main.js:
1371         (WI._handleDeviceSettingsToolbarButtonClicked):
1372
1373 2019-02-20  Joseph Pecoraro  <pecoraro@apple.com>
1374
1375         Web Inspector: RTL: Scripts Timeline loading indicator has incorrect margins
1376         https://bugs.webkit.org/show_bug.cgi?id=194882
1377
1378         Reviewed by Matt Baker.
1379
1380         * UserInterface/Views/TimelineRecordingContentView.css:
1381         (.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
1382
1383 2019-02-20  Andy Estes  <aestes@apple.com>
1384
1385         [Xcode] Add SDKVariant.xcconfig to various Xcode projects
1386         https://bugs.webkit.org/show_bug.cgi?id=194869
1387
1388         Rubber-stamped by Jer Noble.
1389
1390         * WebInspectorUI.xcodeproj/project.pbxproj:
1391
1392 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
1393
1394         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
1395         https://bugs.webkit.org/show_bug.cgi?id=172848
1396         <rdar://problem/25709212>
1397
1398         Reviewed by Mark Lam.
1399
1400         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1401         (HeapSnapshot):
1402         Support the new snapshot version. The only thing that changes are the
1403         node flags, and its actually completely compatible with version 1.
1404
1405         (HeapSnapshot.updateCategoriesAndMetadata):
1406         List the count of object type instances in each class category.
1407
1408         (HeapSnapshot.prototype.serializeNode):
1409         Include whether or not the node is an object type.
1410
1411         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
1412         (WebInspector.HeapSnapshotNodeProxy):
1413         (WebInspector.HeapSnapshotNodeProxy.deserialize):
1414         Add a new Node isObjectType property based on the new data.
1415
1416         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
1417         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
1418         * UserInterface/Views/HeapSnapshotClusterContentView.js:
1419         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
1420         If a class contains 50% or more object type instances then treat it as such
1421         instead of defaulting to native.
1422
1423         * UserInterface/Views/HeapSnapshotDataGridTree.js:
1424         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
1425         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1426         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
1427         We can be more specific than the default if the individual instance is
1428         known to be an object type.
1429
1430 2019-02-19  Truitt Savell  <tsavell@apple.com>
1431
1432         Unreviewed, rolling out r241784.
1433
1434         Broke all OpenSource builds.
1435
1436         Reverted changeset:
1437
1438         "Web Inspector: Improve ES6 Class instances in Heap Snapshot
1439         instances view"
1440         https://bugs.webkit.org/show_bug.cgi?id=172848
1441         https://trac.webkit.org/changeset/241784
1442
1443 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
1444
1445         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
1446         https://bugs.webkit.org/show_bug.cgi?id=172848
1447         <rdar://problem/25709212>
1448
1449         Reviewed by Mark Lam.
1450
1451         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1452         (HeapSnapshot):
1453         Support the new snapshot version. The only thing that changes are the
1454         node flags, and its actually completely compatible with version 1.
1455
1456         (HeapSnapshot.updateCategoriesAndMetadata):
1457         List the count of object type instances in each class category.
1458
1459         (HeapSnapshot.prototype.serializeNode):
1460         Include whether or not the node is an object type.
1461
1462         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
1463         (WebInspector.HeapSnapshotNodeProxy):
1464         (WebInspector.HeapSnapshotNodeProxy.deserialize):
1465         Add a new Node isObjectType property based on the new data.
1466
1467         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
1468         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
1469         * UserInterface/Views/HeapSnapshotClusterContentView.js:
1470         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
1471         If a class contains 50% or more object type instances then treat it as such
1472         instead of defaulting to native.
1473
1474         * UserInterface/Views/HeapSnapshotDataGridTree.js:
1475         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
1476         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1477         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
1478         We can be more specific than the default if the individual instance is
1479         known to be an object type.
1480
1481 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
1482
1483         Web Inspector: Scripts timeline on-going-recording text looks poor in dark mode
1484         https://bugs.webkit.org/show_bug.cgi?id=194809
1485
1486         Reviewed by Matt Baker.
1487
1488         * UserInterface/Views/TimelineRecordingContentView.css:
1489         (.content-view.timeline-recording > .content-browser .recording-progress > .status):
1490
1491 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
1492
1493         Web Inspector: Provide a way to avoid a recording auto-stop on reload
1494         https://bugs.webkit.org/show_bug.cgi?id=194793
1495
1496         Reviewed by Matt Baker.
1497
1498         * Localizations/en.lproj/localizedStrings.js:
1499         New tooltip.
1500
1501         * UserInterface/Controllers/TimelineManager.js:
1502         (WI.TimelineManager.prototype.willAutoStop):
1503         (WI.TimelineManager.prototype.relaxAutoStop):
1504         Getter and relaxer for auto stop behavior.
1505
1506         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1507         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
1508         Drive-by fix some whitespace issues.
1509
1510         * UserInterface/Views/TimelineTabContentView.js:
1511         (WI.TimelineTabContentView):
1512         (WI.TimelineTabContentView.prototype._showRecordButton):
1513         (WI.TimelineTabContentView.prototype._showContinueButton):
1514         (WI.TimelineTabContentView.prototype._updateNavigationBarButtons):
1515         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped):
1516         (WI.TimelineTabContentView.prototype._globalModifierKeysDidChange):
1517         (WI.TimelineTabContentView.prototype._continueButtonClicked):
1518         Show a "continue" like icon instead of the usual stop button when
1519         a recording would auto-stop and the alt key is down. When pressed
1520         this button will relax the auto-stop and continue the recording
1521         until explicitly stopped by the user.
1522
1523 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
1524
1525         Web Inspector: Fix a typo causing assertions in ConsoleManager
1526         https://bugs.webkit.org/show_bug.cgi?id=194792
1527
1528         Reviewed by Matt Baker.
1529
1530         * UserInterface/Controllers/ConsoleManager.js:
1531         (WI.ConsoleManager.prototype.initializeLogChannels):
1532         Extra comma produced an undefined value in the list.
1533
1534 2019-02-18  Nikita Vasilyev  <nvasilyev@apple.com>
1535
1536         Web Inspector: Styles: typing ";" shouldn't focus on the next property when there's open parenthesis or comment
1537         https://bugs.webkit.org/show_bug.cgi?id=194789
1538
1539         Reviewed by Matt Baker.
1540
1541         * UserInterface/Views/SpreadsheetStyleProperty.js:
1542         (WI.SpreadsheetStyleProperty.prototype._handleValueBeforeInput):
1543
1544 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
1545
1546         Web Inspector: Better categorize CPU usage per-thread / worker
1547         https://bugs.webkit.org/show_bug.cgi?id=194564
1548
1549         Reviewed by Devin Rousso.
1550
1551         * UserInterface/Controllers/TimelineManager.js:
1552         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
1553         * UserInterface/Models/CPUTimelineRecord.js:
1554         (WI.CPUTimelineRecord.prototype.get mainThreadUsage):
1555         (WI.CPUTimelineRecord.prototype.get webkitThreadUsage):
1556         (WI.CPUTimelineRecord.prototype.get workerThreadUsage):
1557         (WI.CPUTimelineRecord.prototype.get unknownThreadUsage):
1558         Build a better record from the protocol events.
1559
1560 2019-02-18  Devin Rousso  <drousso@apple.com>
1561
1562         Web Inspector: duplicate left double quotation mark (\u201C) in 'Unable to show certificate for ā€œ%sā€œ.'
1563         https://bugs.webkit.org/show_bug.cgi?id=194782
1564         <rdar://problem/48159683>
1565
1566         Reviewed by Joseph Pecoraro.
1567
1568         * UserInterface/Models/Resource.js:
1569         (WI.Resource.prototype.async showCertificate):
1570         * Localizations/en.lproj/localizedStrings.js:
1571
1572 2019-02-18  Eric Carlson  <eric.carlson@apple.com>
1573
1574         Add MSE logging configuration
1575         https://bugs.webkit.org/show_bug.cgi?id=194719
1576         <rdar://problem/48122151>
1577
1578         Reviewed by Joseph Pecoraro.
1579
1580         * Localizations/en.lproj/localizedStrings.js:
1581         * UserInterface/Models/ConsoleMessage.js:
1582         * UserInterface/Models/IssueMessage.js:
1583         (WI.IssueMessage):
1584         * UserInterface/Views/LogContentView.js:
1585         (WI.LogContentView):
1586         * UserInterface/Views/SettingsTabContentView.js:
1587         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1588
1589 2019-02-17  Nikita Vasilyev  <nvasilyev@apple.com>
1590
1591         Web Inspector: Move CSS completion logic from SpreadsheetTextField to SpreadsheetStyleProperty
1592         https://bugs.webkit.org/show_bug.cgi?id=194724
1593
1594         Reviewed by Devin Rousso.
1595
1596         Move CSS value completion logic from SpreadsheetTextField, a generic text field,
1597         to SpreadsheetStyleProperty.
1598
1599         * UserInterface/Views/SpreadsheetStyleProperty.js:
1600         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
1601         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
1602
1603         * UserInterface/Views/SpreadsheetTextField.js:
1604         (WI.SpreadsheetTextField):
1605         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
1606         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
1607         (WI.SpreadsheetTextField.prototype._updateCompletions):
1608         (WI.SpreadsheetTextField.prototype._showSuggestionsView):
1609         (WI.SpreadsheetTextField.prototype._getCompletionPrefix): Deleted.
1610
1611 2019-02-17  Matt Baker  <mattbaker@apple.com>
1612
1613         Web Inspector: Frontend performance is very slow reloading theverge.com - 50% of time in TreeOutline _indexOfTreeElement
1614         https://bugs.webkit.org/show_bug.cgi?id=193605
1615         <rdar://problem/47403986>
1616
1617         Reviewed by Devin Rousso.
1618
1619         SelectionController should track an unordered Set of represented objects
1620         instead of an ordered set of indexes. This eliminates the costly and
1621         error-prone updates needed to keep the selected indexes in sync as items
1622         are added and removed from TreeOutline (and Table, to a far lesser extent).
1623
1624         The SelectionController interface is largely the same. Class and delegate
1625         methods have been renamed to reflect the change from indexes to objects.
1626         SelectionController tracks selected items in selection order. For the
1627         operations that rely on objects being in insertion order, the controller
1628         uses a comparator function provided at construction time.
1629
1630         * UserInterface/Base/IndexSet.js: Removed.
1631         No longer used. SelectionController now uses a plain Set.
1632
1633         * UserInterface/Base/Utilities.js:
1634         (value):
1635         (get return):
1636         Add utilities previously supplied by IndexSet and used by SelectionController.
1637
1638         * UserInterface/Controllers/SelectionController.js:
1639         (WI.SelectionController):
1640         (WI.SelectionController.prototype.get lastSelectedItem):
1641         (WI.SelectionController.prototype.get selectedItems):
1642         (WI.SelectionController.prototype.set allowsMultipleSelection):
1643         (WI.SelectionController.prototype.hasSelectedItem):
1644         (WI.SelectionController.prototype.selectItem):
1645         (WI.SelectionController.prototype.deselectItem):
1646         (WI.SelectionController.prototype.selectAll):
1647         (WI.SelectionController.prototype.deselectAll):
1648         (WI.SelectionController.prototype.removeSelectedItems):
1649         (WI.SelectionController.prototype.reset):
1650         (WI.SelectionController.prototype.didRemoveItems):
1651         (WI.SelectionController.prototype.handleKeyDown):
1652         (WI.SelectionController.prototype.handleItemMouseDown):
1653         (WI.SelectionController.prototype._deselectAllAndSelect):
1654         (WI.SelectionController.prototype._selectItemsFromArrowKey):
1655         (WI.SelectionController.prototype._firstSelectableItem):
1656         (WI.SelectionController.prototype._lastSelectableItem):
1657         (WI.SelectionController.prototype._previousSelectableItem):
1658         (WI.SelectionController.prototype._nextSelectableItem):
1659         (WI.SelectionController.prototype._updateSelectedItems):
1660         (WI.SelectionController.prototype._addRange):
1661         (WI.SelectionController.prototype._deleteRange):
1662         (WI.SelectionController.prototype.get numberOfItems): Deleted.
1663         (WI.SelectionController.prototype.didInsertItem): Deleted.
1664         (WI.SelectionController.prototype.handleItemMouseDown.normalizeRange): Deleted.
1665         (WI.SelectionController.prototype._nextSelectableIndex): Deleted.
1666         (WI.SelectionController.prototype._previousSelectableIndex): Deleted.
1667
1668         * UserInterface/Main.html:
1669         * UserInterface/Test.html:
1670         Remove IndexSet.
1671
1672         * UserInterface/Views/CookieStorageContentView.js:
1673         (WI.CookieStorageContentView.prototype.tableIndexForRepresentedObject):
1674         (WI.CookieStorageContentView.prototype.tableRepresentedObjectForIndex):
1675
1676         * UserInterface/Views/DOMTreeOutline.js:
1677         (WI.DOMTreeOutline.prototype.objectForSelection):
1678
1679         * UserInterface/Views/NetworkTableContentView.js:
1680         (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject):
1681         (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex):
1682
1683         * UserInterface/Views/Table.js:
1684         (WI.Table):
1685         (WI.Table.prototype.get selectedRow):
1686         (WI.Table.prototype.get selectedRows):
1687         (WI.Table.prototype.isRowSelected):
1688         (WI.Table.prototype.selectRow):
1689         (WI.Table.prototype.deselectRow):
1690         (WI.Table.prototype.removeRow):
1691         (WI.Table.prototype.removeSelectedRows):
1692         (WI.Table.prototype.selectionControllerSelectionDidChange):
1693         (WI.Table.prototype.selectionControllerFirstSelectableItem):
1694         (WI.Table.prototype.selectionControllerLastSelectableItem):
1695         (WI.Table.prototype.selectionControllerPreviousSelectableItem):
1696         (WI.Table.prototype.selectionControllerNextSelectableItem):
1697         (WI.Table.prototype._handleMouseDown):
1698         (WI.Table.prototype._removeRows):
1699         (WI.Table.prototype._indexForRepresentedObject):
1700         (WI.Table.prototype._representedObjectForIndex):
1701         (WI.Table.prototype.selectionControllerNumberOfItems): Deleted.
1702         (WI.Table.prototype.selectionControllerNextSelectableIndex): Deleted.
1703         (WI.Table.prototype.selectionControllerPreviousSelectableIndex): Deleted.
1704         (WI.Table.prototype._toggleSelectedRowStyle): Deleted.
1705
1706         * UserInterface/Views/TreeOutline.js:
1707         (WI.TreeOutline.compareSiblings):
1708         (WI.TreeOutline):
1709         (WI.TreeOutline.prototype.get selectedTreeElement):
1710         (WI.TreeOutline.prototype.set selectedTreeElement):
1711         (WI.TreeOutline.prototype.get selectedTreeElements):
1712         (WI.TreeOutline.prototype.removeChildAtIndex):
1713         (WI.TreeOutline.prototype.removeChildren):
1714         (WI.TreeOutline.prototype._rememberTreeElement):
1715         (WI.TreeOutline.prototype.getCachedTreeElement):
1716         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
1717         (WI.TreeOutline.prototype.selectionControllerFirstSelectableItem):
1718         (WI.TreeOutline.prototype.selectionControllerLastSelectableItem):
1719         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
1720         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
1721         (WI.TreeOutline.prototype.objectForSelection):
1722         (WI.TreeOutline._generateStyleRulesIfNeeded):
1723         (WI.TreeOutline.prototype.selectionControllerNextSelectableIndex): Deleted.
1724         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableIndex): Deleted.
1725         (WI.TreeOutline._generateStyleRulesIfNeeded._indexesForSubtree.numberOfElementsInSubtree): Deleted.
1726
1727 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
1728
1729         Web Inspector: Logging a native function to the console, such as `alert`, produces unhandled rejection
1730         https://bugs.webkit.org/show_bug.cgi?id=194740
1731
1732         Reviewed by Matt Baker.
1733
1734         * UserInterface/Protocol/RemoteObject.js:
1735         (WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
1736         In case of a protocol error (common when attempting to get a location
1737         for a native function) produce the NoSourceFound result.
1738
1739         * UserInterface/Views/ConsoleMessageView.js:
1740         (WI.ConsoleMessageView.prototype._appendLocationLink):
1741         Simplify with an arrow function.
1742
1743 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
1744
1745         Web Inspector: Some timelines views work, show Legacy CPU timeline
1746         https://bugs.webkit.org/show_bug.cgi?id=194738
1747
1748         Reviewed by Yusuke Suzuki.
1749
1750         * UserInterface/Views/ContentView.js:
1751         (WI.ContentView.createFromRepresentedObject):
1752
1753 2019-02-15  Aaron Chu  <aaron_chu@apple.com>
1754
1755         AX: Audit tab should have built-in accessibility tests.
1756         https://bugs.webkit.org/show_bug.cgi?id=194005
1757         <rdar://problem/47657503>
1758
1759         Updated built-in accessibility audits test suite.
1760
1761         Reviewed by Devin Rousso.
1762
1763         * Localizations/en.lproj/localizedStrings.js:
1764         * UserInterface/Controllers/AuditManager.js:
1765         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
1766         (WI.AuditManager):
1767         (WI.AuditManager.prototype.addDefaultTestsIfNeeded.): Deleted.
1768
1769 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1770
1771         Web Inspector: Dark Mode: commas in CSS selectors are too dim
1772         https://bugs.webkit.org/show_bug.cgi?id=194729
1773         <rdar://problem/48128592>
1774
1775         Reviewed by Matt Baker.
1776
1777         Use `--text-color-tertiary` for both light and dark modes.
1778
1779         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1780         (.spreadsheet-style-declaration-editor):
1781         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
1782         (.spreadsheet-css-declaration):
1783         (.spreadsheet-css-declaration .selector > span):
1784         (@media (prefers-color-scheme: dark)):
1785         * UserInterface/Views/Variables.css:
1786         (:root):
1787
1788 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1789
1790         Unreviewed, fix intentation.
1791
1792         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
1793         (.sidebar > .panel.details.css-style .rules):
1794         (.sidebar > .panel.details.css-style > .content > .rules .section-header):
1795
1796 2019-02-15  Dean Jackson  <dino@apple.com>
1797
1798         Allow emulation of user gestures from Web Inspector console
1799         https://bugs.webkit.org/show_bug.cgi?id=194725
1800         <rdar://problem/48126604>
1801
1802         Reviewed by Joseph Pecoraro and Devin Rousso.
1803
1804         Add some UI for emulating a User Gesture when evaluating in the console. This
1805         allows the developer to do things that would otherwise require actual interaction
1806         with the page, such as start playback of media on iOS.
1807
1808         * Localizations/en.lproj/localizedStrings.js:
1809         * UserInterface/Base/Setting.js: Add a new setting for this option.
1810         * UserInterface/Controllers/JavaScriptLogViewController.js:
1811         (WI.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
1812         * UserInterface/Controllers/RuntimeManager.js: Call evaluate with this new option.
1813         (WI.RuntimeManager.prototype.evaluateInInspectedWindow):
1814         * UserInterface/Views/LogContentView.js: Add a new checkbox in the upper bar
1815         that allows the user to toggle the setting.
1816         (WI.LogContentView):
1817         (WI.LogContentView.prototype.get navigationItems):
1818         (WI.LogContentView.prototype._handleEmulateInUserGestureSettingChanged):
1819
1820         * UserInterface/Views/NetworkTableContentView.js: Two drive-by typo fixes :)
1821         (WI.NetworkTableContentView): perserve -> preserve
1822         (WI.NetworkTableContentView.prototype.get navigationItems): checkboxs -> checkboxes
1823
1824 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1825
1826         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
1827         https://bugs.webkit.org/show_bug.cgi?id=194619
1828         <rdar://problem/47917373>
1829
1830         Reviewed by Devin Rousso.
1831
1832         Payload of inline styles may contain `range` that doesn't match
1833         the actual text of the payload - it has an extra empty line at the end.
1834         Mismatching ranges caused data corruption.
1835
1836         * UserInterface/Models/DOMNodeStyles.js:
1837         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1838
1839 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1840
1841         Web Inspector: remove unused parameter in _parseStylePropertyPayload
1842         https://bugs.webkit.org/show_bug.cgi?id=194642
1843
1844         Reviewed by Devin Rousso.
1845
1846         * UserInterface/Models/DOMNodeStyles.js:
1847         (WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
1848         The `styleText` parameter was never used
1849
1850 2019-02-15  Devin Rousso  <drousso@apple.com>
1851
1852         Web Inspector: Canvas: all actions after an offscreen path modification are marked as offscreen path errors
1853         https://bugs.webkit.org/show_bug.cgi?id=194684
1854
1855         Reviewed by Joseph Pecoraro.
1856
1857         * UserInterface/Models/RecordingAction.js:
1858         (WI.RecordingAction.prototype.process):
1859
1860 2019-02-15  Devin Rousso  <drousso@apple.com>
1861
1862         Web Inspector: Canvas: taking a second recording doesn't select the Initial State by default
1863         https://bugs.webkit.org/show_bug.cgi?id=194685
1864
1865         Reviewed by Matt Baker.
1866
1867         * UserInterface/Views/CanvasSidebarPanel.js:
1868         (WI.CanvasSidebarPanel.prototype._recordingChanged):
1869
1870 2019-02-14  Commit Queue  <commit-queue@webkit.org>
1871
1872         Unreviewed, rolling out r241497.
1873         https://bugs.webkit.org/show_bug.cgi?id=194676
1874
1875         New test times out (Requested by NVI on #webkit).
1876
1877         Reverted changeset:
1878
1879         "Web Inspector: Styles: valid values in style attributes are
1880         reported as unsupported property values"
1881         https://bugs.webkit.org/show_bug.cgi?id=194619
1882         https://trac.webkit.org/changeset/241497
1883
1884 2019-02-13  Nikita Vasilyev  <nvasilyev@apple.com>
1885
1886         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
1887         https://bugs.webkit.org/show_bug.cgi?id=194619
1888         <rdar://problem/47917373>
1889
1890         Reviewed by Devin Rousso.
1891
1892         Payload of inline styles may contain `range` that doesn't match
1893         the actual text of the payload - it has an extra empty line at the end.
1894         Mismatching ranges caused data corruption.
1895
1896         * UserInterface/Models/DOMNodeStyles.js:
1897         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1898
1899 2019-02-13  Joseph Pecoraro  <pecoraro@apple.com>
1900
1901         Web Inspector: Update combined and minified copyright header for 2018-2019
1902         https://bugs.webkit.org/show_bug.cgi?id=194635
1903
1904         Reviewed by Devin Rousso.
1905
1906         * Scripts/copy-user-interface-resources.pl:
1907
1908 2019-02-13  Chris Dumez  <cdumez@apple.com>
1909
1910         Unreviewed, update localizable strings.
1911
1912         * Localizations/en.lproj/localizedStrings.js:
1913
1914 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1915
1916         Web Inspector: Experimental setting for CPU Usage Timeline improvements
1917         https://bugs.webkit.org/show_bug.cgi?id=194556
1918
1919         Reviewed by Matt Baker.
1920
1921         * UserInterface/Main.html:
1922         * UserInterface/Views/LegacyCPUTimelineView.css: Added.
1923         * UserInterface/Views/LegacyCPUTimelineView.js: Added.
1924         Copy of CPUTimelineView.js/css to be used when the setting is not set.
1925
1926         * UserInterface/Views/ContentView.js:
1927         (WI.ContentView.createFromRepresentedObject):
1928         ContentView to create based on the setting.
1929
1930         * UserInterface/Base/Setting.js:
1931         * UserInterface/Views/SettingsTabContentView.js:
1932         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1933         Experimental switch.
1934
1935 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1936
1937         Web Inspector: Timeline.prototype.recordsInTimeRange uses a property most records do not have
1938         https://bugs.webkit.org/show_bug.cgi?id=194549
1939
1940         Reviewed by Devin Rousso.
1941
1942         * UserInterface/Models/Timeline.js:
1943         (WI.Timeline.prototype.recordsInTimeRange):
1944
1945 2019-02-12  Devin Rousso  <drousso@apple.com>
1946
1947         Web Inspector: Timelines: clicking on an empty space in the overview should deselect any selected record bar
1948         https://bugs.webkit.org/show_bug.cgi?id=194365
1949         <rdar://problem/47868426>
1950
1951         Reviewed by Joseph Pecoraro.
1952
1953         * UserInterface/Views/TimelineRecordBar.js:
1954         (WI.TimelineRecordBar.prototype._handleClick):
1955         Mark the "click" event so that later listeners know it was handled by `WI.TimelineRecordBar`.
1956
1957         * UserInterface/Views/TimelineOverview.js:
1958         (WI.TimelineOverview):
1959         (WI.TimelineOverview.prototype._instrumentAdded):
1960         (WI.TimelineOverview.prototype._instrumentRemoved):
1961         (WI.TimelineOverview.prototype._handleGraphsContainerClick): Added.
1962         (WI.TimelineOverview.prototype._handleOverviewGraphRecordSelected): Added.
1963         (WI.TimelineOverview.prototype._recordSelected):
1964         Listen for "click" on the graph container and deselect all records when fired, unless the
1965         click was marked by a `WI.TimelineRecordBar`.
1966
1967         * UserInterface/Views/TimelineRecordingContentView.js:
1968         (WI.TimelineRecordingContentView.prototype._recordSelected):
1969         Ensure that all `WI.TimelineView` update their selected record whenever it changes for any
1970         other `WI.TimelineView` (or if there is no selected record).
1971
1972         * UserInterface/Views/TimelineOverviewGraph.js:
1973         (WI.TimelineOverviewGraph.prototype.didLayoutSubtree): Added.
1974         Drive-by: since `WI.TimelineRecordBar` are reused when combining, we need to re-determine
1975         which one holds the currently selected record.
1976
1977 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1978
1979         Web Inspector: Remove unused maxUsage in CPUTimelineView
1980         https://bugs.webkit.org/show_bug.cgi?id=194526
1981
1982         Reviewed by Devin Rousso.
1983
1984         * UserInterface/Views/CPUTimelineView.js:
1985         (WI.CPUTimelineView):
1986         (WI.CPUTimelineView.prototype.shown):
1987
1988 2019-02-11  Devin Rousso  <drousso@apple.com>
1989
1990         Web Inspector: add context menu items to copy a resource's HTTP request/response data
1991         https://bugs.webkit.org/show_bug.cgi?id=194261
1992         <rdar://problem/21693696>
1993
1994         Reviewed by Joseph Pecoraro.
1995
1996         * UserInterface/Models/Resource.js:
1997         (WI.Resource.prototype.stringifyHTTPRequest): Added.
1998         (WI.Resource.prototype.stringifyHTTPResponse): Added.
1999         Don't include the request/response data, as that can be very large, and can easily be
2000         accessed by actually selecting the resource in the Resources/Network tab.
2001
2002         * UserInterface/Views/ContextMenuUtilities.js:
2003         (WI.appendContextMenuItemsForSourceCode):
2004
2005         * Localizations/en.lproj/localizedStrings.js:
2006
2007 2019-02-08  Devin Rousso  <drousso@apple.com>
2008
2009         Web Inspector: Audit: show keyboard shortcut in export tooltip
2010         https://bugs.webkit.org/show_bug.cgi?id=194454
2011
2012         Reviewed by Matt Baker.
2013
2014         * UserInterface/Views/AuditTestContentView.js:
2015         (WI.AuditTestContentView):
2016         (WI.AuditTestContentView.prototype.get saveData):
2017         (WI.AuditTestContentView.prototype._exportResult): Added.
2018         (WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
2019         (WI.AuditTestContentView.prototype._exportAudit): Deleted.
2020
2021         * Localizations/en.lproj/localizedStrings.js:
2022
2023 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
2024
2025         Web Inspector: Styles: easier way to select a single line
2026         https://bugs.webkit.org/show_bug.cgi?id=193305
2027
2028         Reviewed by Devin Rousso.
2029
2030         Start property selection after mousedown when mouse cursor moves 8px,
2031         which is ~1.5 times the width of a text character in the style editor.
2032
2033         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2034         (WI.SpreadsheetCSSStyleDeclarationSection):
2035         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
2036         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added.
2037         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
2038
2039 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
2040
2041         Web Inspector: Debugger Popover should work with value in template string `${identifier}`
2042         https://bugs.webkit.org/show_bug.cgi?id=194459
2043         <rdar://problem/47932564>
2044
2045         Reviewed by Devin Rousso.
2046
2047         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
2048         (WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
2049         When walking backwards to get the full expression we were walking outside
2050         of the interpolation group `outside ${inside}`. Stop walking backwards once
2051         we cross the boundary.
2052
2053 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
2054
2055         Web Inspector: Import / Export Heap Snapshots
2056         https://bugs.webkit.org/show_bug.cgi?id=194448
2057         <rdar://problem/47928093>
2058
2059         Reviewed by Devin Rousso.
2060
2061         * Localizations/en.lproj/localizedStrings.js:
2062         New strings.
2063
2064         * UserInterface/Proxies/HeapSnapshotProxy.js:
2065         (WI.HeapSnapshotProxy):
2066         (WI.HeapSnapshotProxy.deserialize):
2067         (WI.HeapSnapshotProxy.prototype.get imported):
2068         (WI.HeapSnapshotProxy.prototype.get snapshotStringData):
2069         (WI.HeapSnapshotProxy.prototype.set snapshotStringData):
2070         Include an "imported" state on the HeapSnapshot and allow for
2071         stashing the snapshotStringData on the main thread side.
2072
2073         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
2074         (WI.HeapSnapshotWorkerProxy.prototype.createImportedSnapshot):
2075         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
2076         (HeapSnapshotWorker.prototype.clearSnapshots):
2077         (HeapSnapshotWorker.prototype.createSnapshot):
2078         Provide a specialized way to create an imported HeapSnapshot.
2079         Track imported snapshots separately since they won't want to
2080         be searched for live/dead objects due to active recording GCs.
2081
2082         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2083         (HeapSnapshot):
2084         (HeapSnapshot.updateCategoriesAndMetadata):
2085         (HeapSnapshot.allocationBucketCounts):
2086         (HeapSnapshot.instancesWithClassName):
2087         (HeapSnapshot.prototype.nodeWithIdentifier):
2088         (HeapSnapshot.prototype.dominatedNodes):
2089         (HeapSnapshot.prototype.retainedNodes):
2090         (HeapSnapshot.prototype.retainers):
2091         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
2092         (HeapSnapshot.prototype.serialize):
2093         (HeapSnapshot.prototype.serializeNode):
2094         (HeapSnapshot.prototype._buildPostOrderIndexes):
2095         (HeapSnapshot.prototype._buildDominatorIndexes):
2096         (HeapSnapshot.prototype._buildRetainedSizes):
2097         (HeapSnapshot.prototype._gcRootPathes.visitNode):
2098         (HeapSnapshot.prototype._gcRootPathes):
2099         Construct a HeapSnapshot knowinng whether or not it is imported.
2100         Imported snapshots may be the "GCDebugging" snapshot type which
2101         differs from "Inspector" by the number of node fields. So keep
2102         the node field count a member instead of a global constant
2103         in order to work with both snapshot types.
2104
2105         * UserInterface/Models/HeapAllocationsInstrument.js:
2106         (WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
2107         * UserInterface/Protocol/ConsoleObserver.js:
2108         (WI.ConsoleObserver.prototype.heapSnapshot):
2109         * UserInterface/Protocol/HeapObserver.js:
2110         (WI.HeapObserver.prototype.trackingStart):
2111         (WI.HeapObserver.prototype.trackingComplete):
2112         Stash the original string JSON data on the main thread side
2113         where we already have the data.
2114
2115         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
2116         (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
2117         Don't show [S] icons for imported snapshots with no timestamp.
2118
2119         * UserInterface/Views/HeapAllocationsTimelineView.js:
2120         (WI.HeapAllocationsTimelineView):
2121         (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
2122         (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
2123         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
2124         Import button that just creates a new snapshot.
2125
2126         * UserInterface/Views/HeapSnapshotContentView.js:
2127         (WI.HeapSnapshotContentView):
2128         (WI.HeapSnapshotContentView.prototype.get navigationItems):
2129         (WI.HeapSnapshotContentView.prototype.get supportsSave):
2130         (WI.HeapSnapshotContentView.prototype.get saveData):
2131         (WI.HeapSnapshotContentView.prototype._exportSnapshot):
2132         Export button that saves the original data.
2133
2134         * UserInterface/Views/TimelineTabContentView.js:
2135         (WI.TimelineTabContentView.displayNameForRecord):
2136         Specialized display string for imported snapshots.
2137
2138 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
2139
2140         Web Inspector: Add Debug setting to show Internal Object Classes in Heap Snapshot
2141         https://bugs.webkit.org/show_bug.cgi?id=194445
2142
2143         Reviewed by Devin Rousso.
2144
2145         * UserInterface/Base/Setting.js:
2146         * UserInterface/Views/HeapSnapshotDataGridTree.js:
2147         (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
2148         * UserInterface/Views/SettingsTabContentView.js:
2149         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
2150
2151 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
2152
2153         Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values
2154         https://bugs.webkit.org/show_bug.cgi?id=182523
2155         <rdar://problem/37260209>
2156
2157         Reviewed by Devin Rousso.
2158
2159         Close CSS comments, append missing closed quotes and right parenthesis.
2160
2161         * UserInterface/Models/CSSCompletions.js:
2162         (WI.CSSCompletions.completeUnbalancedValue):
2163         * UserInterface/Models/CSSProperty.js:
2164         (WI.CSSProperty.prototype.set rawValue):
2165
2166 2019-02-07  Joseph Pecoraro  <pecoraro@apple.com>
2167
2168         Web Inspector: Make Timeline markers light gray instead of black in dark mode
2169         https://bugs.webkit.org/show_bug.cgi?id=194417
2170
2171         Reviewed by Devin Rousso.
2172
2173         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
2174         (.timeline-overview-graph.rendering-frame > .divider):
2175         * UserInterface/Views/TimelineRuler.css:
2176         (.timeline-ruler > .markers > .divider):
2177
2178 2019-02-06  Devin Rousso  <drousso@apple.com>
2179
2180         Web Inspector: DOM: don't send the entire function string with each event listener
2181         https://bugs.webkit.org/show_bug.cgi?id=194293
2182         <rdar://problem/47822809>
2183
2184         Reviewed by Joseph Pecoraro.
2185
2186         * UserInterface/Views/EventListenerSectionGroup.js:
2187         (WI.EventListenerSectionGroup.prototype._functionTextOrLink):
2188
2189 2019-02-06  Joseph Pecoraro  <pecoraro@apple.com>
2190
2191         Web Inspector: "Worker not found" uncaught protocol errors
2192         https://bugs.webkit.org/show_bug.cgi?id=194319
2193
2194         Reviewed by Matt Baker.
2195
2196         * UserInterface/Base/Main.js:
2197         (WI.terminatePageTarget):
2198         Remove Worker targets associated with the Page on navigation.
2199         Eventually we will have to associate Workers with their parent
2200         frame, but for now a transition can only happen at the Page
2201         level, so we can eliminate all workers on the page.
2202
2203         * UserInterface/Controllers/WorkerManager.js:
2204         (WI.WorkerManager.prototype.workerCreated):
2205         * UserInterface/Protocol/Connection.js:
2206         (InspectorBackend.WorkerConnection.sendMessageToBackend):
2207         Allow any WorkerAgent domain message to fail silently. This can
2208         happen if a Worker is created and destroyed before the frontend
2209         hears about it and sends messages to the backend for that Worker.
2210
2211 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
2212
2213         Web Inspector: Styles: PropertiesChanged shouldn't fire when old and new text are both empty
2214         https://bugs.webkit.org/show_bug.cgi?id=194318
2215
2216         Reviewed by Devin Rousso.
2217
2218         Previously, WI.CSSStyleDeclaration.Event.PropertiesChanged fired when
2219         old text and new text were empty strings.
2220
2221         * UserInterface/Models/CSSStyleDeclaration.js:
2222
2223 2019-02-05  Devin Rousso  <drousso@apple.com>
2224
2225         Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
2226         https://bugs.webkit.org/show_bug.cgi?id=159577
2227         <rdar://problem/27251461>
2228
2229         Reviewed by Joseph Pecoraro.
2230
2231         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
2232         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
2233         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
2234
2235 2019-02-05  Matt Baker  <mattbaker@apple.com>
2236
2237         Web Inspector: Elements tab: selection is broken after deleting the selected node
2238         https://bugs.webkit.org/show_bug.cgi?id=194300
2239         <rdar://problem/47829275>
2240
2241         Reviewed by Devin Rousso.
2242
2243         Deleting a TreeElement can cause an IndexSet including indexes
2244         outside the deleted range to be passed to SelectionController,
2245         corrupting the internal selection state.
2246
2247         * UserInterface/Views/TreeOutline.js:
2248         (WI.TreeOutline.prototype._indexesForSubtree.numberOfElementsInSubtree): Added.
2249         (WI.TreeOutline.prototype._indexesForSubtree):
2250         Finding the last (rightmost leaf) TreeElement in the subtree used
2251         TreeElement.prototype.traverseNextElement to do a depth first traversal.
2252         This method did not stay within the subtree rooted at `treeElement`.
2253
2254 2019-02-05  Matt Baker  <mattbaker@apple.com>
2255
2256         Web Inspector: REGRESSION (r240947): Resources tab: can't select main frame after refreshing page
2257         https://bugs.webkit.org/show_bug.cgi?id=194254
2258         <rdar://problem/47805023>
2259
2260         Reviewed by Devin Rousso.
2261
2262         * UserInterface/Views/TreeOutline.js:
2263         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
2264         TreeOutline should always call the TreeElement `select` and `deselect`
2265         methods while processing selection changes. Having notifications
2266         suppressed by `this._suppressNextSelectionDidChangeEvent` should only
2267         affect the dispatching of TreeOutline events.
2268
2269 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
2270
2271         Web Inspector: Styles: remove harmless "property was unlocked" asserts
2272         https://bugs.webkit.org/show_bug.cgi?id=194262
2273
2274         Reviewed by Matt Baker.
2275
2276         * UserInterface/Views/SpreadsheetStyleProperty.js:
2277         (WI.SpreadsheetStyleProperty.prototype.remove):
2278         (WI.SpreadsheetStyleProperty.prototype.update):
2279         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
2280         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
2281
2282 2019-02-04  Devin Rousso  <drousso@apple.com>
2283
2284         Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'classes.includes')
2285         https://bugs.webkit.org/show_bug.cgi?id=194280
2286         <rdar://problem/47811159>
2287
2288         Reviewed by Matt Baker.
2289
2290         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
2291         (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
2292         Add a fallback value in case the `class` attribute isn't specified for the selected node.
2293
2294 2019-02-04  Devin Rousso  <drousso@apple.com>
2295
2296         Web Inspector: Resources: missing resource data for document on reload
2297         https://bugs.webkit.org/show_bug.cgi?id=194243
2298         <rdar://problem/47559021>
2299
2300         Reviewed by Joseph Pecoraro.
2301
2302         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
2303         (WI.ResourceDetailsSidebarPanel.prototype.set resource):
2304         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
2305
2306         * UserInterface/Base/Object.js:
2307         (WI.Object.removeEventListener):
2308         Drive-by: there's no need to iterate over the entire table to check if `thisObject` exists,
2309         as that is handled for us by `ListMultimap`, which we later call anyways.
2310
2311 2019-02-04  Matt Baker  <mattbaker@apple.com>
2312
2313         Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page
2314         https://bugs.webkit.org/show_bug.cgi?id=194242
2315         <rdar://problem/47802027>
2316
2317         Reviewed by Joseph Pecoraro.
2318
2319         * UserInterface/Views/FolderizedTreeElement.js:
2320         (WI.FolderizedTreeElement.prototype.removeChildren):
2321         FolderTreeElements are removed by the base class call to removeChildren.
2322         Calling `removeChildren` for detached TreeElements is unnecessary.
2323
2324 2019-02-04  Matt Baker  <mattbaker@apple.com>
2325
2326         Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
2327         https://bugs.webkit.org/show_bug.cgi?id=194169
2328         <rdar://problem/47743864>
2329
2330         Reviewed by Devin Rousso.
2331
2332         * UserInterface/Views/TreeOutline.js:
2333         (WI.TreeOutline.prototype._handleMouseDown):
2334         Add a special case for a single-selection TreeOutline with
2335         allowsRepeatSelection enabled. Since the element is already
2336         selected, bypass the SelectionCongroller and dispatch an
2337         event with event.data.selectedByUser set to true.
2338
2339 2019-02-04  Nikita Vasilyev  <nvasilyev@apple.com>
2340
2341         Web Inspector: Styles: fix race conditions when editing
2342         https://bugs.webkit.org/show_bug.cgi?id=192739
2343         <rdar://problem/46752925>
2344
2345         Reviewed by Devin Rousso.
2346
2347         Editing CSS property in the style editor syncronously updates CSSStyleDeclaration on the front-end
2348         and asyncronously updates the backend by calling CSSAgent.setStyleText. After the new style text is applied
2349         on the backend, CSSStyleDeclaration (on the front-end) gets updated.
2350
2351         Unsure there's no race conditions by introducing `_updatesInProgressCount`:
2352
2353           - Increment it before calling CSSAgent.setStyleText.
2354           - Decrement it after CSSAgent.setStyleText is finished.
2355
2356         Prevent updates of CSSStyleDeclaration when _updatesInProgressCount isn't 0.
2357
2358         * UserInterface/Models/CSSProperty.js:
2359         (WI.CSSProperty.prototype._updateOwnerStyleText):
2360         * UserInterface/Models/CSSStyleDeclaration.js:
2361         (WI.CSSStyleDeclaration):
2362         (WI.CSSStyleDeclaration.prototype.set text): Removed.
2363         (WI.CSSStyleDeclaration.prototype.setText): Added.
2364         Change the setter to a method since it has side effects including an asynchronous backend call.
2365
2366         * UserInterface/Models/DOMNodeStyles.js:
2367         (WI.DOMNodeStyles.prototype.changeStyleText):
2368
2369         * UserInterface/Views/SpreadsheetStyleProperty.js:
2370         (WI.SpreadsheetStyleProperty.prototype.get nameTextField): Removed.
2371         (WI.SpreadsheetStyleProperty.prototype.get valueTextField): Removed.
2372         Drive-by: remove unused code.
2373
2374 2019-02-01  Devin Rousso  <drousso@apple.com>
2375
2376         Web Inspector: create icons for media event types instead of using a blue circle
2377         https://bugs.webkit.org/show_bug.cgi?id=190381
2378         <rdar://problem/45507995>
2379
2380         Reviewed by Brian Burg.
2381
2382         * UserInterface/Models/DOMNode.js:
2383         (WI.DOMNode.isPlayEvent): Added.
2384         (WI.DOMNode.isPauseEvent): Added.
2385         (WI.DOMNode.isStopEvent): Added.
2386
2387         * UserInterface/Views/DOMEventsBreakdownView.js:
2388         (WI.DOMEventsBreakdownView.prototype.layout):
2389         * UserInterface/Views/DOMEventsBreakdownView.css:
2390         (.dom-events-breakdown tr > :matches(th, td)):
2391         (.dom-events-breakdown .graph):
2392         (.dom-events-breakdown .graph > :matches(img, .area)): Added.
2393         (.dom-events-breakdown .graph > img): Added.
2394         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > img): Added.
2395         (.dom-events-breakdown .graph > :matches(.point, .area)): Deleted.
2396         (.dom-events-breakdown .graph > .point): Deleted.
2397         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > .point): Deleted.
2398
2399         * UserInterface/Views/NetworkTableContentView.js:
2400         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine):
2401
2402         * UserInterface/Images/EventPause.svg: Added.
2403         * UserInterface/Images/EventPlay.svg: Added.
2404         * UserInterface/Images/EventProcessing.svg: Added.
2405         * UserInterface/Images/EventStop.svg: Added.
2406
2407 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2408
2409         Web Inspector: Make WI.ColumnChart a WI.View subclass
2410         https://bugs.webkit.org/show_bug.cgi?id=194171
2411
2412         Rubber-stamped by Devin Rousso.
2413
2414         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2415         (WI.CPUTimelineOverviewGraph):
2416         * UserInterface/Views/ColumnChart.js:
2417         (WI.ColumnChart):
2418         (WI.ColumnChart.prototype.set size):
2419         (WI.ColumnChart.prototype.layout):
2420         (WI.ColumnChart.prototype.get element): Deleted.
2421         (WI.ColumnChart.prototype.needsLayout): Deleted.
2422         (WI.ColumnChart.prototype.updateLayout): Deleted.
2423
2424 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2425
2426         Web Inspector: Make WI.StackedLineChart a WI.View subclass
2427         https://bugs.webkit.org/show_bug.cgi?id=194119
2428
2429         Rubber-stamped by Devin Rousso.
2430
2431         * UserInterface/Views/LineChart.js:
2432         (WI.LineChart.prototype.layout):
2433         (WI.LineChart):
2434         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
2435         (WI.MemoryTimelineOverviewGraph):
2436         * UserInterface/Views/StackedLineChart.js:
2437         (WI.StackedLineChart):
2438         (WI.StackedLineChart.prototype.set size):
2439         (WI.StackedLineChart.prototype.layout):
2440         (WI.StackedLineChart.prototype.get element): Deleted.
2441         (WI.StackedLineChart.prototype.get points): Deleted.
2442         (WI.StackedLineChart.prototype.needsLayout): Deleted.
2443         (WI.StackedLineChart.prototype.updateLayout): Deleted.
2444
2445 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2446
2447         Web Inspector: Make WI.CircleChart a WI.View subclass
2448         https://bugs.webkit.org/show_bug.cgi?id=194118
2449
2450         Reviewed by Matt Baker.
2451
2452         * UserInterface/Views/CircleChart.js:
2453         (WI.CircleChart.prototype.get centerElement):
2454         (WI.CircleChart.prototype.layout):
2455         (WI.CircleChart.prototype.get element): Deleted.
2456         (WI.CircleChart.prototype.needsLayout): Deleted.
2457         (WI.CircleChart.prototype.updateLayout): Deleted.
2458         * UserInterface/Views/MemoryTimelineView.js:
2459         (WI.MemoryTimelineView):
2460
2461 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2462
2463         Web Inspector: Timeline Detail Views do not reset properly when new time range selection contains nothing
2464         https://bugs.webkit.org/show_bug.cgi?id=194115
2465         <rdar://problem/47716693>
2466
2467         Rubber-stamped by Devin Rousso.
2468
2469         * UserInterface/Views/CPUTimelineView.js:
2470         (WI.CPUTimelineView.prototype.reset):
2471         (WI.CPUTimelineView.prototype.clear):
2472         (WI.CPUTimelineView.prototype.layout):
2473         * UserInterface/Views/MemoryTimelineView.js:
2474         (WI.MemoryTimelineView.prototype.reset):
2475         (WI.MemoryTimelineView.prototype.clear):
2476         (WI.MemoryTimelineView.prototype.layout):
2477         When there are no visible records in the selected range clear our UI.
2478         Introduce a `clear` method that clears the UI but keeps
2479         non-range-specific values (e.g. maximums).
2480
2481 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2482
2483         Web Inspector: Timeline graphs have drawing issues with multiple discontinuities
2484         https://bugs.webkit.org/show_bug.cgi?id=194110
2485         <rdar://problem/47714356>
2486
2487         Reviewed by Devin Rousso.
2488
2489         * UserInterface/Views/CPUTimelineView.js:
2490         (WI.CPUTimelineView):
2491         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
2492         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
2493         (WI.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
2494         (WI.MemoryTimelineOverviewGraph.prototype.layout):
2495         * UserInterface/Views/MemoryTimelineView.js:
2496         (WI.MemoryTimelineView.prototype.layout.xScale):
2497         (WI.MemoryTimelineView.prototype.layout.yScale):
2498         (WI.MemoryTimelineView.prototype.layout):
2499         Handle if multiple discontinuities exist between records.
2500
2501 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2502
2503         Web Inspector: Timeline time range selection should show duration alongside start and end
2504         https://bugs.webkit.org/show_bug.cgi?id=194109
2505         <rdar://problem/47714279>
2506
2507         Reviewed by Devin Rousso.
2508
2509         * Localizations/en.lproj/localizedStrings.js:
2510         * UserInterface/Views/TimelineRecordingContentView.js:
2511         (WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
2512         Include the duration when not obvious.
2513
2514 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
2515
2516         Web Inspector: Improve API and documentation of ColumnChart
2517         https://bugs.webkit.org/show_bug.cgi?id=193982
2518
2519         Reviewed by Devin Rousso.
2520
2521         This used to be named "BarChart". Convert remaining instances
2522         of "bar" to "column" and clean up related things.
2523
2524         * UserInterface/Views/CPUTimelineOverviewGraph.css:
2525         (body[dir=rtl] .timeline-overview-graph.cpu > .column-chart):
2526         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
2527         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart): Deleted.
2528         (.timeline-overview-graph.cpu > .bar-chart > svg > rect): Deleted.
2529         * UserInterface/Views/CPUTimelineOverviewGraph.js:
2530         (WI.CPUTimelineOverviewGraph.prototype.layout):
2531         * UserInterface/Views/ColumnChart.js:
2532         (WI.ColumnChart):
2533         (WI.ColumnChart.prototype.get columns):
2534         (WI.ColumnChart.prototype.addColumn):
2535         (WI.ColumnChart.prototype.clear):
2536         (WI.ColumnChart.prototype.updateLayout):
2537         (WI.ColumnChart.prototype.get bars): Deleted.
2538         (WI.ColumnChart.prototype.addBar): Deleted.
2539         * UserInterface/Views/StackedLineChart.js:
2540         (WI.StackedLineChart.prototype.get element):
2541         (WI.StackedLineChart.prototype.get points):
2542
2543 2019-01-31  Joseph Pecoraro  <pecoraro@apple.com>
2544
2545         Web Inspector: Timeline time range selection sometimes shows 0.000, should be just 0
2546         https://bugs.webkit.org/show_bug.cgi?id=194108
2547         <rdar://problem/47714273>
2548
2549         Reviewed by Devin Rousso.
2550
2551         * UserInterface/Base/Utilities.js:
2552         Check under epsilon for the zero case.
2553
2554 2019-01-31  Matt Baker  <mattbaker@apple.com>
2555
2556         REGRESSION(r?): Web Inspector: Clicking on text doesn't move text caret when editing innerHTML/tagName/attribute
2557         https://bugs.webkit.org/show_bug.cgi?id=192652
2558         <rdar://problem/46684612>
2559
2560         Reviewed by Devin Rousso.
2561
2562         * UserInterface/Views/DOMTreeElement.js:
2563         (WI.DOMTreeElement.prototype.canSelectOnMouseDown):
2564         Call to Event.preventDefault() should be made here instead of at the
2565         TreeOutline level.
2566
2567         * UserInterface/Views/TreeElement.js:
2568         (WI.TreeElement.prototype.selectOnMouseDown): Deleted.
2569         Remove dead code.
2570
2571         * UserInterface/Views/TreeOutline.js:
2572         (WI.TreeOutline._handleMouseDown):
2573         Do not prevent default event handling when the item cannot be selected.
2574         This matches TreeOutline behavior prior to introducing SelectionController.
2575
2576 2019-01-30  Devin Rousso  <drousso@apple.com>
2577
2578         Web Inspector: Memory Timeline View should be responsive / resizable
2579         https://bugs.webkit.org/show_bug.cgi?id=153758
2580         <rdar://problem/24444320>
2581
2582         Reviewed by Joseph Pecoraro.
2583
2584         Leverage the SVG `viewBox` (which was misspelled) to scale the graphs when the width of the
2585         container changes. The `viewBox` used is equal to the total amount of time that is visible.
2586
2587         Make `WI.LineChart` (and its container classes) into subclasses of `WI.View` to leverage the
2588         existing layout system.
2589
2590         Prevent any work from being done when resizing, as this is now handled by CSS/SVG.
2591
2592         * UserInterface/Views/LineChart.js:
2593         (WI.LineChart):
2594         (WI.LineChart.prototype.set size):
2595         (WI.LineChart.prototype.addPoint):
2596         (WI.LineChart.prototype.clear):
2597         (WI.LineChart.prototype.layout):
2598         (WI.LineChart.prototype.get element): Deleted.
2599         (WI.LineChart.prototype.get points): Deleted.
2600         (WI.LineChart.prototype.needsLayout): Deleted.
2601         (WI.LineChart.prototype.updateLayout): Deleted.
2602
2603         * UserInterface/Views/CPUUsageView.js:
2604         (WI.CPUUsageView):
2605         (WI.CPUUsageView.prototype.clear):
2606         (WI.CPUUsageView.prototype.updateChart): Added.
2607         (WI.CPUUsageView.prototype.get element): Deleted.
2608         (WI.CPUUsageView.prototype.layoutWithDataPoints): Deleted.
2609         * UserInterface/Views/CPUUsageView.css:
2610         (.cpu-usage-view):
2611         (.cpu-usage-view > .details):
2612         (.cpu-usage-view > .graph, .cpu-usage-view > .graph > .line-chart, .cpu-usage-view > .graph > .line-chart > svg): Added.
2613         (.cpu-usage-view > .graph): Deleted.
2614
2615         * UserInterface/Views/CPUTimelineView.js:
2616         (WI.CPUTimelineView):
2617         (WI.CPUTimelineView.prototype.layout):
2618         (WI.CPUTimelineView.prototype.layout.layoutView):
2619         (WI.CPUTimelineView.prototype.layout.layoutView.xScale):
2620         (WI.CPUTimelineView.prototype.layout.layoutView.yScale):
2621         * UserInterface/Views/CPUTimelineView.css:
2622         (body .timeline-view.cpu): Added.
2623         (.timeline-view.cpu > .content):
2624         (.timeline-view.cpu): Deleted.
2625
2626         * UserInterface/Views/MemoryCategoryView.js:
2627         (WI.MemoryCategoryView):
2628         (WI.MemoryCategoryView.prototype.clear):
2629         (WI.MemoryCategoryView.prototype.updateChart): Added.
2630         (WI.MemoryCategoryView.prototype.get element): Deleted.
2631         (WI.MemoryCategoryView.prototype.layoutWithDataPoints): Deleted.
2632         * UserInterface/Views/MemoryCategoryView.css:
2633         (.memory-category-view):
2634         (.memory-category-view > .details):
2635         (.memory-category-view > .graph, .memory-category-view > .graph > .line-chart, .memory-category-view > .graph > .line-chart > svg): Added.
2636         (.memory-category-view > .graph): Deleted.
2637
2638         * UserInterface/Views/MemoryTimelineView.js:
2639         (WI.MemoryTimelineView.prototype.layout):
2640         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView):
2641         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.xScale):
2642         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.yScale):
2643         (WI.MemoryTimelineView.prototype._initializeCategoryViews):
2644         (WI.MemoryTimelineView.prototype._initializeCategoryViews.appendLegendRow):
2645         * UserInterface/Views/MemoryTimelineView.css:
2646         (.timeline-view.memory > .content > .overview):
2647         (.timeline-view.memory > .content > .overview > .divider):
2648         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage, .timeline-view.memory > .content > .overview .legend .size): Added.
2649         (.timeline-view.memory .legend):
2650         (.timeline-view.memory .legend .row): Added.
2651         (.timeline-view.memory .legend .row + .row): Added.
2652         (.timeline-view.memory .legend .swatch): Addd.
2653         (.timeline-view.memory .legend .swatch.javascript): Addd.
2654         (.timeline-view.memory .legend .swatch.images): Addd.
2655         (.timeline-view.memory .legend .swatch.layers): Addd.
2656         (.timeline-view.memory .legend .swatch.page): Addd.
2657         (.timeline-view.memory .legend .swatch.current): Addd.
2658         (.timeline-view.memory > .content): Deleted.
2659         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage):
2660         (body[dir=ltr] .timeline-view.memory .legend): Deleted.
2661         (body[dir=rtl] .timeline-view.memory .legend): Deleted.
2662         (.timeline-view.memory .legend > .row): Deleted.
2663         (.timeline-view.memory .legend > .row > .swatch): Deleted.
2664         (body[dir=ltr] .timeline-view.memory .legend > .row > .swatch): Deleted.
2665         (body[dir=rtl] .timeline-view.memory .legend > .row > .swatch): Deleted.
2666         (.timeline-view.memory .legend > .row > p): Deleted.
2667         (body[dir=ltr] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
2668         (body[dir=rtl] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
2669         (.timeline-view.memory .legend > .row > .label): Deleted.
2670         (.timeline-view.memory .legend > .row > .size): Deleted.
2671         (.timeline-view.memory .legend > .row > .swatch.javascript): Deleted.
2672         (.timeline-view.memory .legend > .row > .swatch.images): Deleted.
2673         (.timeline-view.memory .legend > .row > .swatch.layers): Deleted.
2674         (.timeline-view.memory .legend > .row > .swatch.page): Deleted.
2675         (.timeline-view.memory .legend > .row > .swatch.current): Deleted.
2676
2677 2019-01-30  Nikita Vasilyev  <nvasilyev@apple.com>
2678
2679         Web Inspector: Changes: group CSS rules by resource
2680         https://bugs.webkit.org/show_bug.cgi?id=193940
2681         <rdar://problem/47617785>
2682
2683         Reviewed by Matt Baker.
2684
2685         Create resource sections with source links in their headers.
2686
2687         Also:
2688         - Use read-only WI.SpreadsheetStyleProperty to display inline swatches for colors;
2689         - Make the red and green background span the entire width of the panel.
2690
2691         * Localizations/en.lproj/localizedStrings.js:
2692         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
2693         (.sidebar > .panel.changes-panel):
2694         (.sidebar > .panel.changes-panel .css-rule):
2695         (.sidebar > .panel.selected.changes-panel.empty):
2696         (.changes-panel .resource-section):
2697         (.changes-panel .resource-section > .header):
2698         (.changes-panel .resource-section > .header > a:hover):
2699         (.sidebar > .panel.changes-panel .selector-line,):
2700         (.changes-panel .css-property-line > .property):
2701         (.changes-panel .css-property-line.unchanged):
2702         (.changes-panel .css-property-line.added):
2703         (.changes-panel .css-property-line.removed):
2704         (.changes-panel .css-property-line.removed::before):
2705         (.changes-panel .css-property-line.added::before):
2706         (@media (prefers-color-scheme: dark)):
2707
2708         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
2709         (WI.ChangesDetailsSidebarPanel.prototype.layout):
2710         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
2711         (WI.ChangesDetailsSidebarPanel.prototype._createLocationLink):
2712
2713         * UserInterface/Views/SpreadsheetStyleProperty.js:
2714         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
2715         Allow passing `null` as a delegate.
2716
2717 2019-01-30  Devin Rousso  <drousso@apple.com>
2718
2719         Web Inspector: change style of device settings override popover content
2720         https://bugs.webkit.org/show_bug.cgi?id=194049
2721
2722         Reviewed by Joseph Pecoraro.
2723
2724         * UserInterface/Base/Main.js:
2725         (WI._handleDeviceSettingsToolbarButtonClicked):
2726         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
2727         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer): Deleted.
2728         * UserInterface/Views/Main.css:
2729         (.device-settings-content):
2730         (.device-settings-content > tr > td:first-child): Added.
2731         (.device-settings-content .container):
2732         (.device-settings-content .container > * + *): Added.
2733         (.device-settings-content .column): Added.
2734         (.device-settings-content .user-agent select): Added.
2735         (.device-settings-content .user-agent input): Added.
2736         (.device-settings-content label + label): Added.
2737         (.device-settings-content label > input): Added.
2738         (.device-settings-content .columns): Deleted.
2739         (.device-settings-content .columns > .column): Deleted.
2740         (.device-settings-content .columns > .column + .column): Deleted.
2741         (.device-settings-content .user-agent-value): Deleted.
2742         (.device-settings-content .user-agent-value > select): Deleted.
2743         (.device-settings-content .user-agent-value > input): Deleted.
2744         (body[dir=ltr] .device-settings-content .user-agent-value > input): Deleted.
2745         (body[dir=rtl] .device-settings-content .user-agent-value > input): Deleted.
2746
2747 2019-01-30  Devin Rousso  <drousso@apple.com>
2748
2749         Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith')
2750         https://bugs.webkit.org/show_bug.cgi?id=194029
2751
2752         Reviewed by Matt Baker.
2753
2754         * UserInterface/Views/ConsoleMessageView.js:
2755         (WI.ConsoleMessageView.prototype._appendLocationLink):
2756
2757 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
2758
2759         Web Inspector: Enabled Changes panel in Elements tab by default
2760         https://bugs.webkit.org/show_bug.cgi?id=193986
2761         <rdar://problem/47647683>
2762
2763         Reviewed by Matt Baker.
2764
2765         * UserInterface/Base/Setting.js:
2766         * UserInterface/Views/ElementsTabContentView.js:
2767         (WI.ElementsTabContentView):
2768         * UserInterface/Views/SettingsTabContentView.js:
2769         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2770
2771 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
2772
2773         Web Inspector: Styles: enable computed style cascades by default
2774         https://bugs.webkit.org/show_bug.cgi?id=193983
2775         <rdar://problem/47645821>
2776
2777         Reviewed by Matt Baker.
2778
2779         * Localizations/en.lproj/localizedStrings.js:
2780         * UserInterface/Base/Setting.js:
2781         * UserInterface/Views/ComputedStyleDetailsPanel.css:
2782         (.computed-style-properties):
2783         (.computed-style-properties .property .go-to-arrow):
2784         (.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
2785         (.details-section.computed-style-properties > .content):
2786         (@media (prefers-color-scheme: dark)):
2787         (.computed-with-traces .computed-style-properties): Deleted.
2788         (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
2789         (.computed-with-traces .details-section.computed-style-properties > .content): Deleted.
2790         (.computed-with-traces .computed-style-properties .property .go-to-arrow): Deleted.
2791         * UserInterface/Views/ComputedStyleDetailsPanel.js:
2792         (WI.ComputedStyleDetailsPanel.prototype.refresh):
2793         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
2794         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
2795         (WI.ComputedStyleDetailsSidebarPanel):
2796         * UserInterface/Views/SettingsTabContentView.js:
2797         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2798
2799 2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
2800
2801         Web Inspector: Remove unnecessary promise rejection handlers now that we use the global onunhandledrejection handler
2802         https://bugs.webkit.org/show_bug.cgi?id=193921
2803
2804         Reviewed by Devin Rousso.
2805
2806         * UserInterface/Base/Utilities.js:
2807         * UserInterface/Debug/UncaughtExceptionReporter.js:
2808         * UserInterface/Views/NetworkTableContentView.js:
2809         (WI.NetworkTableContentView.prototype._exportHAR):
2810         * UserInterface/Views/TextEditor.js:
2811         (WI.TextEditor.prototype.updateFormattedState):
2812
2813 2019-01-28  Devin Rousso  <drousso@apple.com>
2814
2815         Web Inspector: provide a way to edit page WebRTC settings on a remote target
2816         https://bugs.webkit.org/show_bug.cgi?id=193863
2817         <rdar://problem/47572764>
2818
2819         Reviewed by Joseph Pecoraro.
2820
2821         * UserInterface/Base/Main.js:
2822         (WI.loaded):
2823         (WI.initializeTarget):
2824         (WI._handleDeviceSettingsToolbarButtonClicked):
2825         (WI._handleDeviceSettingsToolbarButtonClicked.createCheckbox):
2826         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns): Deleted.
2827         * UserInterface/Views/Main.css:
2828         (.device-settings-content .container): Added.
2829
2830         * Localizations/en.lproj/localizedStrings.js:
2831
2832 2019-01-28  Matt Baker  <mattbaker@apple.com>
2833
2834         Web Inspector: Elements tab should toggle visibility for all selected nodes
2835         https://bugs.webkit.org/show_bug.cgi?id=193089
2836         <rdar://problem/47009256>
2837
2838         Reviewed by Devin Rousso.
2839
2840         Update "Toggle Visibility" command in DOM tree for multiple selection.
2841         When both visible and hidden elements are selected in the DOM tree,
2842         the toggle command behaves contextually. If one or more elements are
2843         visible, they are hidden, otherwise they are shown. The context menu
2844         shows "Hide Elements" or "Show Elements", respectively.
2845
2846         When only one element is selected, or the context menu target element
2847         is not selected, the command continues to be "Toggle Visibility".
2848
2849         * Localizations/en.lproj/localizedStrings.js:
2850
2851         * UserInterface/Views/DOMTreeElement.js:
2852         (WI.DOMTreeElement.prototype.get isNodeHidden): Added.
2853         (WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass):
2854         (WI.DOMTreeElement.prototype.toggleElementVisibility):
2855         (WI.DOMTreeElement.prototype._populateTagContextMenu):
2856
2857         * UserInterface/Views/DOMTreeOutline.js:
2858         (WI.DOMTreeOutline):
2859         (WI.DOMTreeOutline.prototype.toggleSelectedElementsVisibility):  Added.
2860         Provide a public method for toggling the visibility of selected DOM nodes.
2861         Used by the "H" keyboard shortcut and DOMTreeElement context menu.
2862
2863         (WI.DOMTreeOutline.prototype._hideElements):
2864         (WI.DOMTreeOutline.prototype._hideElement): Deleted.
2865         Rename for multiple selection.
2866
2867 2019-01-28  Commit Queue  <commit-queue@webkit.org>
2868
2869         Unreviewed, rolling out r240351.
2870         https://bugs.webkit.org/show_bug.cgi?id=193918
2871
2872         Causes overlapping Timeline records, as some record types
2873         don't have an endTime (Requested by drousso on #webkit).
2874
2875         Reverted changeset:
2876
2877         "WebInspector: Confusingly nested events in the timeline for
2878         Mutation Observers"
2879         https://bugs.webkit.org/show_bug.cgi?id=192884
2880         https://trac.webkit.org/changeset/240351
2881
2882 2019-01-28  Matt Baker  <mattbaker@apple.com>
2883
2884         REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
2885         https://bugs.webkit.org/show_bug.cgi?id=193808
2886         <rdar://problem/47537734>
2887
2888         Reviewed by Devin Rousso.
2889
2890         * UserInterface/Controllers/SelectionController.js:
2891         (WI.SelectionController.prototype.didRemoveItems):
2892
2893         * UserInterface/Views/TreeOutline.js:
2894         (WI.TreeOutline.prototype._indexesForSubtree):
2895         Fix a bug where no IndexSet was returned when passed a TreeElement with
2896         no children. This caused the Timelines tree selection to be corrupted when
2897         entering and exiting edit mode, as TreeElements are inserted and removed.
2898
2899 2019-01-28  Nikita Vasilyev  <nvasilyev@apple.com>
2900
2901         Web Inspector: Add Changes panel to Elements tab
2902         https://bugs.webkit.org/show_bug.cgi?id=193803
2903
2904         Reviewed by Devin Rousso.
2905
2906         Introduce the new experimental Changes Panel. It shows a list of CSS changes
2907         made via Web Inspector, so the changes could be copied to the source files.
2908
2909         * Localizations/en.lproj/localizedStrings.js:
2910         * UserInterface/Base/Setting.js:
2911         * UserInterface/Base/Utilities.js:
2912         (Array.diffArrays): Added.
2913
2914         * UserInterface/Controllers/CSSManager.js:
2915         (WI.CSSManager):
2916         (WI.CSSManager.prototype.get modifiedCSSRules):
2917         (WI.CSSManager.prototype.addModifiedCSSRule):
2918         (WI.CSSManager.prototype.removeModifiedCSSRule):
2919         (WI.CSSManager.prototype._mainResourceDidChange):
2920
2921         * UserInterface/Main.html:
2922         * UserInterface/Models/CSSProperty.js:
2923         (WI.CSSProperty):
2924         (WI.CSSProperty.prototype.remove):
2925         (WI.CSSProperty.prototype.replaceWithText):
2926         (WI.CSSProperty.prototype.commentOut):
2927         (WI.CSSProperty.prototype.set text):
2928         (WI.CSSProperty.prototype.get modified):
2929         (WI.CSSProperty.prototype.set name):
2930         (WI.CSSProperty.prototype.set rawValue):
2931         (WI.CSSProperty.prototype.get initialState):
2932         (WI.CSSProperty.prototype._updateOwnerStyleText):
2933         (WI.CSSProperty.prototype._markModified):
2934         Mark CSSProperty modified *before* making any changes to copy its initial state.
2935
2936         * UserInterface/Models/CSSRule.js:
2937         (WI.CSSRule):
2938         (WI.CSSRule.prototype.get id):
2939         (WI.CSSRule.prototype.get initialState):
2940         (WI.CSSRule.prototype.get stringId):
2941         (WI.CSSRule.prototype.markModified):
2942
2943         * UserInterface/Models/CSSStyleDeclaration.js:
2944         (WI.CSSStyleDeclaration):
2945         (WI.CSSStyleDeclaration.prototype.get initialState):
2946         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
2947         (WI.CSSStyleDeclaration.prototype.get properties):
2948         (WI.CSSStyleDeclaration.prototype.set properties):
2949         (WI.CSSStyleDeclaration.prototype.propertyForName):
2950         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
2951         (WI.CSSStyleDeclaration.prototype.markModified):
2952
2953         * UserInterface/Views/ChangesDetailsSidebarPanel.css: Added.
2954         (.sidebar > .panel.changes-panel):
2955         (.sidebar > .panel.changes-panel:not(.empty)):
2956         (.sidebar > .panel.changes-panel.empty):
2957         (.changes-panel ins):
2958         (.changes-panel del):
2959         (.changes-panel del.css-property::before):
2960         (.changes-panel ins.css-property::before):
2961         (@media (prefers-color-scheme: dark)):
2962
2963         * UserInterface/Views/ChangesDetailsSidebarPanel.js: Added.
2964         (WI.ChangesDetailsSidebarPanel):
2965         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
2966         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
2967         (WI.ChangesDetailsSidebarPanel.prototype.shown):
2968         (WI.ChangesDetailsSidebarPanel.prototype.detached):
2969         (WI.ChangesDetailsSidebarPanel.prototype.layout):
2970         (WI.ChangesDetailsSidebarPanel.prototype._mainResourceDidChange):
2971
2972         * UserInterface/Views/ElementsTabContentView.js:
2973         (WI.ElementsTabContentView):
2974
2975         * UserInterface/Views/SettingsTabContentView.js:
2976         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2977
2978         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2979         (.spreadsheet-style-declaration-editor .property):
2980         (.spreadsheet-style-declaration-editor .property.modified):
2981         (.spreadsheet-style-declaration-editor .property.modified:not(.selected)):
2982         (@media (prefers-color-scheme: dark)):
2983
2984         * UserInterface/Views/SpreadsheetStyleProperty.js:
2985         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
2986
2987 2019-01-26  Devin Rousso  <drousso@apple.com>
2988
2989         Web Inspector: handle CSS Color 4 color syntaxes
2990         https://bugs.webkit.org/show_bug.cgi?id=193166
2991         <rdar://problem/47062403>
2992
2993         Reviewed by Simon Fraser.
2994
2995         * UserInterface/Models/Color.js:
2996         (WI.Color.fromString):
2997         (WI.Color.fromString.splitFunctionString): Added.
2998         (WI.Color.fromString.parseFunctionAlpha): Added.
2999         (WI.Color.fromString.parseFunctionComponent): Added.
3000         (WI.Color.fromString.parseHueComponent): Added.
3001         (WI.Color.fromString.parsePercentageComponent): Added.
3002
3003 2019-01-26  Devin Rousso  <drousso@apple.com>
3004
3005         Web Inspector: provide a way to edit the user agent of a remote target
3006         https://bugs.webkit.org/show_bug.cgi?id=193862
3007         <rdar://problem/47359292>
3008
3009         Reviewed by Joseph Pecoraro.
3010
3011         * UserInterface/Base/Main.js:
3012         (WI.loaded):
3013         (WI.contentLoaded):
3014         (WI.initializeTarget):
3015         (WI._handleDeviceSettingsToolbarButtonClicked):
3016         (WI._handleDeviceSettingsToolbarButtonClicked.updateActivatedState):
3017         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenUserAgent):
3018         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenSetting):
3019         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer):
3020         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns):
3021         (WI._handleDeviceSettingsToolbarButtonClicked.calculateTargetFrame):
3022         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
3023
3024         * UserInterface/Views/Main.css:
3025         (.device-settings-content):
3026         (.device-settings-content .user-agent-value): Added.
3027         (.device-settings-content .user-agent-value > select): Added.
3028         (.device-settings-content .user-agent-value > input): Added.
3029         (body[dir=ltr] .device-settings-content .user-agent-value > input): Added.
3030         (body[dir=rtl] .device-settings-content .user-agent-value > input): Added.
3031         (.device-settings-content label > input): Added.
3032         (body[dir=ltr] .device-settings-content label > input): Deleted.
3033         (body[dir=rtl] .device-settings-content label > input): Deleted.
3034
3035         * Localizations/en.lproj/localizedStrings.js:
3036
3037 2019-01-25  Devin Rousso  <drousso@apple.com>
3038
3039         Web Inspector: provide a way to edit page settings on a remote target
3040         https://bugs.webkit.org/show_bug.cgi?id=193813
3041         <rdar://problem/47359510>
3042
3043         Reviewed by Joseph Pecoraro.
3044
3045         Add toolbar button that shows a popover with the target's (page's) settings when clicked.
3046
3047         * UserInterface/Base/Main.js:
3048         (WI.loaded):
3049         (WI.contentLoaded):
3050         (WI.initializeTarget): Added.
3051         (WI._handleDeviceSettingsToolbarButtonClicked): Added.
3052         (WI.didDismissPopover): Added.
3053         * UserInterface/Views/Main.css:
3054         (.device-settings-content): Added.
3055         (.device-settings-content .columns): Added.
3056         (.device-settings-content .columns > .column): Added.
3057         (.device-settings-content .columns > .column + .column): Added.
3058         (body[dir=ltr] .device-settings-content label > input): Added.
3059         (body[dir=rtl] .device-settings-content label > input): Added.
3060
3061         * UserInterface/Views/Popover.js:
3062         (WI.Popover.prototype._update.area):
3063         (WI.Popover.prototype._update):
3064         (WI.Popover.prototype._drawBackground):
3065         (WI.Popover.prototype._bestMetricsForEdge):
3066         (WI.Popover.prototype._drawFrame):
3067         If the best area is negative, treat it as the worst area.
3068         Allow areas to be clamped so long as the clamped edge is not the preferred edge.
3069
3070         * UserInterface/Base/Test.js:
3071         (WI.initializeTarget): Added.
3072
3073         * UserInterface/Images/Device.svg: Added.
3074         * Localizations/en.lproj/localizedStrings.js:
3075
3076 2019-01-25  Devin Rousso  <drousso@apple.com>
3077
3078         Web Inspector: Audit: unable to import audits
3079         https://bugs.webkit.org/show_bug.cgi?id=193861
3080
3081         Reviewed by Joseph Pecoraro.
3082
3083         * UserInterface/Controllers/AuditManager.js:
3084         (WI.AuditManager.prototype.async processJSON):
3085
3086 2019-01-25  Devin Rousso  <drousso@apple.com>
3087
3088         Web Inspector: Uncaught Exception: No node with given id found
3089         https://bugs.webkit.org/show_bug.cgi?id=193833
3090
3091         Reviewed by Joseph Pecoraro.
3092
3093         * UserInterface/Views/CanvasContentView.js:
3094         (WI.CanvasContentView):
3095         (WI.CanvasContentView.prototype.initialLayout):
3096         (WI.CanvasContentView.prototype.layout):
3097         (WI.CanvasContentView.prototype._refreshPixelSize):
3098         Drive-by: show the refresh button when viewing a specific canvas.
3099
3100         * UserInterface/Views/CanvasTabContentView.js:
3101         (WI.CanvasTabContentView.prototype._removeCanvas):
3102         Reset to the overview if the canvas is removed.
3103
3104 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
3105
3106         Web Inspector: Improve Dark Mode appearance within Memory timeline
3107         https://bugs.webkit.org/show_bug.cgi?id=193804
3108
3109         Reviewed by Matt Baker.
3110
3111         * UserInterface/Views/TimelineOverview.css:
3112         (.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
3113         (.timeline-overview > .tree-outline.timelines .item.selected + .item,):
3114         (@media (prefers-color-scheme: dark)):
3115         (.timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
3116         (body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
3117         Fix some colors for Timelines edit mode.
3118
3119         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3120         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
3121         (@media (prefers-color-scheme: dark)):
3122         (.timeline-overview-graph.cpu > .legend):
3123         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
3124         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
3125         (.timeline-overview-graph.memory:nth-child(even) > .legend):
3126         (@media (prefers-color-scheme: dark)):
3127         (.timeline-overview-graph.memory > .legend):
3128         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
3129         Improved colors in CPU / Memory overview graph legends.
3130
3131         * UserInterface/Views/CPUUsageView.css:
3132         (.cpu-usage-view > .details):
3133         * UserInterface/Views/CircleChart.css:
3134         (.circle-chart > svg > path.background):
3135         * UserInterface/Views/MemoryCategoryView.css:
3136         (.memory-category-view > .details):
3137         (.memory-category-view > .details > .name):
3138         * UserInterface/Views/MemoryTimelineView.css:
3139         (.timeline-view.memory > .content > .overview .total-usage,):
3140         (.timeline-view.memory .legend > .row > .size):
3141         Improved colors in CPU / Memory detail views.
3142
3143         * UserInterface/Views/Variables.css:
3144         (:root):
3145         Add a default --text-secondary-color which will end up slightly
3146         lighter in dark mode where it was already implemented.
3147
3148         (@media (prefers-color-scheme: dark)):
3149         Improved max-comparison colors.
3150
3151 2019-01-25  Devin Rousso  <drousso@apple.com>
3152
3153         Web Inspector: Timelines: DOMContentLoaded and load event lines need to be more obvious
3154         https://bugs.webkit.org/show_bug.cgi?id=193186
3155         <rdar://problem/45100694>
3156
3157         Reviewed by Joseph Pecoraro.
3158
3159         Shift around z-index values to make Timelines markers appear behind record bars. Widen the
3160         marker hit region to make it easier to see the tooltip.
3161
3162         * UserInterface/Views/Variables.css:
3163         (:root):
3164
3165         * UserInterface/Views/TimelineRuler.css:
3166         (.timeline-ruler):
3167         (.timeline-ruler > .markers):
3168         (.timeline-ruler > .markers > .marker):
3169         (body[dir=ltr] .timeline-ruler > .markers > .marker):
3170         (body[dir=rtl] .timeline-ruler > .markers > .marker):
3171         (.timeline-ruler > .markers > .marker::before):
3172         (body[dir=ltr] .timeline-ruler > .markers > .marker::before):
3173         (body[dir=rtl] .timeline-ruler > .markers > .marker::before):
3174         (.timeline-ruler > .markers > .marker::after): Added.
3175         (body[dir=ltr] .timeline-ruler > .markers > .marker::after): Added.
3176         (body[dir=rtl] .timeline-ruler > .markers > .marker::after): Added.
3177         (.timeline-ruler > .markers > .marker.current-time):
3178         (.timeline-ruler > .markers > .marker.current-time::after): Added.
3179         (.timeline-ruler > .markers > .marker.load-event):
3180         (.timeline-ruler > .markers > .marker.dom-content-event):
3181         (.timeline-ruler > .markers > .marker.timestamp):
3182         (.timeline-ruler > .selection-handle):
3183         (.timeline-ruler.both-handles-clamped > .selection-handle):
3184         (.timeline-ruler > .shaded-area):
3185         (.timeline-ruler > .markers > .marker.current-time::before): Deleted.
3186
3187         * UserInterface/Views/TimelineRecordBar.css:
3188         (.timeline-record-bar):
3189         (.timeline-record-bar > .segment):
3190
3191         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3192         (.timeline-overview-graph.cpu > .legend):
3193         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
3194         (.timeline-overview-graph.memory > .legend):
3195
3196 2019-01-25  Devin Rousso  <drousso@apple.com>
3197
3198         Web Inspector: Audit: remove experimental setting
3199         https://bugs.webkit.org/show_bug.cgi?id=193743
3200         <rdar://problem/28234022>
3201
3202         Reviewed by Joseph Pecoraro.
3203
3204         * UserInterface/Base/Setting.js:
3205         (WI.Setting):
3206         (WI.Setting.localStorageKey): Added.
3207         (WI.Setting.migrateValue):
3208         Drive-by: add the localStorage key prefix to the key passed into `WI.Setting.migrateValue`.
3209
3210         * UserInterface/Base/Main.js:
3211         (WI.loaded):
3212
3213         * UserInterface/Views/AuditTabContentView.js:
3214         (WI.AuditTabContentView.isTabAllowed):
3215
3216         * UserInterface/Views/SettingsTabContentView.js:
3217         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3218
3219         * Localizations/en.lproj/localizedStrings.js:
3220
3221 2019-01-25  Devin Rousso  <drousso@apple.com>
3222
3223         Web Inspector: show uncaught exception view for unhandled promise rejections
3224         https://bugs.webkit.org/show_bug.cgi?id=193832
3225
3226         Reviewed by Matt Baker.
3227
3228         * UserInterface/Debug/UncaughtExceptionReporter.js:
3229         (handleUnhandledPromiseRejection): Added.
3230
3231 2019-01-25  Devin Rousso  <drousso@apple.com>
3232
3233         Web Inspector: REGRESSION (r237808): offscreen path warning doesn't work
3234         https://bugs.webkit.org/show_bug.cgi?id=193830
3235
3236         Reviewed by Matt Baker.
3237
3238         * UserInterface/Models/RecordingAction.js:
3239         (WI.RecordingAction.prototype.process):
3240
3241 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
3242
3243         Web Inspector: Add another Protocol Version (iOS 12.2)
3244         https://bugs.webkit.org/show_bug.cgi?id=193810
3245         <rdar://problem/42981838>
3246
3247         Reviewed by Matt Baker.
3248
3249         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js: Added.
3250         * Versions/Inspector-iOS-12.2.json: Added.
3251
3252 2019-01-25  Devin Rousso  <drousso@apple.com>
3253
3254         Web Inspector: `WI.Setting.migrateValue` doesn't take into account the key prefix
3255         https://bugs.webkit.org/show_bug.cgi?id=193814
3256
3257         Reviewed by Matt Baker.
3258
3259         * UserInterface/Base/Setting.js:
3260         (WI.Setting):
3261         (WI.Setting.migrateValue):
3262         (WI.Setting._localStorageKey): Added.
3263
3264 2019-01-25  Devin Rousso  <drousso@apple.com>
3265
3266         Web Inspector: improve invalid Audit/Recording JSON error messages
3267         https://bugs.webkit.org/show_bug.cgi?id=193476
3268         <rdar://problem/47303659>
3269
3270         Reviewed by Joseph Pecoraro.
3271
3272         * UserInterface/Models/AuditTestBase.js:
3273         (WI.AuditTestBase):
3274         * UserInterface/Models/AuditTestCase.js:
3275         (WI.AuditTestCase.async fromPayload):
3276         * UserInterface/Models/AuditTestGroup.js:
3277         (WI.AuditTestGroup.async fromPayload):
3278         * UserInterface/Models/AuditTestCaseResult.js:
3279         (WI.AuditTestCaseResult.async fromPayload.checkArray):
3280         (WI.AuditTestCaseResult.async fromPayload):
3281         * UserInterface/Models/AuditTestGroupResult.js:
3282         (WI.AuditTestGroupResult.async fromPayload):
3283         * UserInterface/Controllers/AuditManager.js:
3284         (WI.AuditManager.synthesizeWarning): Added.
3285         (WI.AuditManager.synthesizeError):
3286         (WI.AuditManager.prototype.async processJSON):
3287
3288         * UserInterface/Models/Recording.js:
3289         (WI.Recording.fromPayload):
3290         (WI.Recording.synthesizeWarning): Added.
3291         (WI.Recording.synthesizeError):
3292         * UserInterface/Models/RecordingFrame.js:
3293         (WI.RecordingFrame.fromPayload):
3294         * UserInterface/Models/RecordingAction.js:
3295         (WI.RecordingAction.fromPayload):
3296         (WI.RecordingAction.prototype.async swizzle):
3297         (WI.RecordingAction.prototype.apply):
3298         * UserInterface/Controllers/CanvasManager.js:
3299         (WI.CanvasManager.prototype.processJSON):
3300
3301         * Localizations/en.lproj/localizedStrings.js:
3302
3303 2019-01-24  Devin Rousso  <drousso@apple.com>
3304
3305         Web Inspector: Audit: add supports key to test/group for compatibility
3306         https://bugs.webkit.org/show_bug.cgi?id=193686
3307         <rdar://problem/47460872>
3308
3309         Reviewed by Joseph Pecoraro.
3310
3311         * UserInterface/Models/AuditTestBase.js:
3312         (WI.AuditTestBase):
3313         (WI.AuditTestBase.prototype.get supported): Added.
3314         (WI.AuditTestBase.prototype.set supported): Added.
3315         (WI.AuditTestBase.prototype.set disabled):
3316         (WI.AuditTestBase.prototype.async start):
3317         (WI.AuditTestBase.prototype.stop):
3318         (WI.AuditTestBase.toJSON):
3319         * UserInterface/Models/AuditTestCase.js:
3320         (WI.AuditTestCase.async fromPayload):
3321         * UserInterface/Models/AuditTestGroup.js:
3322         (WI.AuditTestGroup):
3323         (WI.AuditTestGroup.async fromPayload):
3324         (WI.AuditTestGroup.prototype.get supported): Added.
3325         (WI.AuditTestGroup.prototype.set supported): Added.
3326         Add support for a "supports" key in the test JSON that prevents the test from being run if
3327         it's value is lower than the frontend/backend version.
3328
3329         * UserInterface/Views/AuditTreeElement.js:
3330         (WI.AuditTreeElement.prototype.onattach):
3331         (WI.AuditTreeElement.prototype.ondelete):
3332         (WI.AuditTreeElement.prototype.populateContextMenu):
3333         (WI.AuditTreeElement.prototype._updateStatus): Added.
3334         (WI.AuditTreeElement.prototype._showRunningSpinner):
3335         (WI.AuditTreeElement.prototype._showRunningProgress):
3336         (WI.AuditTreeElement.prototype._updateTestGroupDisabled):
3337         (WI.AuditTreeElement.prototype._handleTestCaseCompleted):
3338         (WI.AuditTreeElement.prototype._handleTestResultCleared):
3339         (WI.AuditTreeElement.prototype._handleTestGroupCompleted):
3340         (WI.AuditTreeElement.prototype._handleManagerEditingChanged):
3341         (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Deleted.
3342         (WI.AuditTreeElement.prototype._updateLevel): Deleted.
3343         * UserInterface/Views/AuditTreeElement.css:
3344         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active) > .status:hover > img): Added.
3345         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.unsupported, .editing-audits) > .status:not(:hover)): Added.
3346         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status, .tree-outline .item.audit.unsupported + .children .item.audit.unsupported  > .status > img): Added.
3347         (.tree-outline .item.audit.unsupported:not(.selected) > :matches(.icon, .titles)): Added.
3348         (.tree-outline .item.audit.unsupported > .status > img): Added.
3349         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Deleted.
3350         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Deleted.
3351         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
3352         Hide unsupported tests unless in edit mode, where they are greyed out and cannot be enabled.
3353         Drive-by: only allow tests to be deleted when in edit mode.
3354
3355         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3356         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
3357
3358         * Localizations/en.lproj/localizedStrings.js:
3359
3360 2019-01-24  Joseph Pecoraro  <pecoraro@apple.com>
3361
3362         Web Inspector: CPU Usage Timeline
3363         https://bugs.webkit.org/show_bug.cgi?id=193730
3364         <rdar://problem/46797201>
3365
3366         Reviewed by Devin Rousso.
3367
3368         CPU Usage is gathered in the backend twice a second, the frequency of the
3369         ResourceUsageThread in WebCore. The frontend displays cpu usage in a few
3370         ways in the Timeline.
3371
3372         We use a column chart in the timeline overview to display the frequency and
3373         relative distance of samples. This helps show if the samples were close
3374         together or far apart, which indicates how meaningful they will be at a
3375         particular scale.
3376
3377         We use a line chart in the timeline detail view which will be easier to see
3378         the changes over a particular time range selection.
3379
3380         * Localizations/en.lproj/localizedStrings.js:
3381         New strings.
3382
3383         * UserInterface/Main.html:
3384         * UserInterface/Base/Main.js:
3385         (WI.loaded):
3386         * UserInterface/Test.html:
3387         * UserInterface/Test/Test.js:
3388         (WI.loaded):
3389         * UserInterface/Protocol/CPUProfilerObserver.js:
3390         (WI.CPUProfilerObserver.prototype.trackingStart):
3391         (WI.CPUProfilerObserver.prototype.trackingUpdate):
3392         (WI.CPUProfilerObserver.prototype.trackingComplete):
3393         (WI.CPUProfilerObserver):
3394         New files and default registration.
3395
3396         * UserInterface/Protocol/Target.js:
3397         (WI.Target.prototype.get CPUProfilerAgent):
3398         New Agent.
3399
3400         * UserInterface/Controllers/TimelineManager.js:
3401         (WI.TimelineManager.availableTimelineTypes):
3402         (WI.TimelineManager.prototype.cpuProfilerTrackingStarted):
3403         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
3404         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
3405         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
3406         (WI.TimelineManager.prototype.memoryTrackingStart): Renamed.
3407         (WI.TimelineManager.prototype.memoryTrackingUpdate): Renamed.
3408         (WI.TimelineManager.prototype.memoryTrackingComplete): Renamed.
3409         * UserInterface/Models/CPUInstrument.js:
3410         (WI.CPUInstrument):
3411         (WI.CPUInstrument.supported):
3412         (WI.CPUInstrument.prototype.get timelineRecordType):
3413         (WI.CPUInstrument.prototype.startInstrumentation):
3414         (WI.CPUInstrument.prototype.stopInstrumentation):
3415         * UserInterface/Models/CPUTimelineRecord.js:
3416         (WI.CPUTimelineRecord):
3417         (WI.CPUTimelineRecord.prototype.get timestamp):
3418         (WI.CPUTimelineRecord.prototype.get usage):
3419         * UserInterface/Models/Instrument.js:
3420         (WI.Instrument.createForTimelineType):
3421         * UserInterface/Models/TimelineRecord.js:
3422         * UserInterface/Models/TimelineRecording.js:
3423         (WI.TimelineRecording.prototype.addRecord):
3424         Expose a new CPU instrument and timeline.
3425
3426         * UserInterface/Views/ColumnChart.js: Added.
3427         (WI.ColumnChart):
3428         (WI.ColumnChart.prototype.get element):
3429         (WI.ColumnChart.prototype.get bars):
3430         (WI.ColumnChart.prototype.get size):
3431         (WI.ColumnChart.prototype.set size):
3432         (WI.ColumnChart.prototype.addBar):
3433         (WI.ColumnChart.prototype.clear):
3434         (WI.ColumnChart.prototype.needsLayout):
3435         (WI.ColumnChart.prototype.updateLayout):
3436         View that will draw vertical bars with independent widths.
3437         This is meant to be used similiar to WI.LineChart.
3438
3439         * UserInterface/Images/CPUInstrument.svg: Added.
3440         * UserInterface/Views/Variables.css:
3441         (:root):
3442         CPU timeline colors and icon.
3443
3444         * UserInterface/Views/CPUTimelineOverviewGraph.css:
3445         (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
3446         (.timeline-overview-graph.cpu):
3447         (.timeline-overview-graph.cpu > .legend):
3448         (body[dir=ltr] .timeline-overview-graph.cpu > .legend):
3449         (body[dir=rtl] .timeline-overview-graph.cpu > .legend):
3450         (.timeline-overview-graph:nth-child(even) > .legend):
3451         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart):
3452         (.timeline-overview-graph.cpu > .bar-chart > svg > g > rect):
3453         * UserInterface/Views/CPUTimelineOverviewGraph.js: Added.
3454         (WI.CPUTimelineOverviewGraph):
3455         (WI.CPUTimelineOverviewGraph.prototype.get height):
3456         (WI.CPUTimelineOverviewGraph.prototype.reset):
3457         (WI.CPUTimelineOverviewGraph.prototype.layout.xScale):
3458         (WI.CPUTimelineOverviewGraph.prototype.layout.yScale):
3459         (WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord):
3460         (WI.CPUTimelineOverviewGraph.prototype.layout):
3461         (WI.CPUTimelineOverviewGraph.prototype._updateLegend):
3462         (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
3463         * UserInterface/Views/CPUTimelineView.css:
3464         (.timeline-view.cpu):
3465         (.timeline-view.cpu > .content):
3466         (.timeline-view.cpu > .content .subtitle):
3467         (.timeline-view.cpu > .content > .details):
3468         (.timeline-view.cpu > .content > .details > .timeline-ruler):
3469         (body[dir=ltr] .timeline-view.cpu > .content > .details > .timeline-ruler):
3470         (body[dir=rtl] .timeline-view.cpu > .content > .details > .timeline-ruler):
3471         (.timeline-view.cpu > .content > .details > .subtitle):
3472         (.cpu-usage-view .line-chart > svg > path):
3473         (.timeline-view.cpu .legend > .row > .swatch.current):
3474         * UserInterface/Views/CPUTimelineView.js: Added.
3475         (WI.CPUTimelineView):
3476         (WI.CPUTimelineView.prototype.shown):
3477         (WI.CPUTimelineView.prototype.hidden):
3478         (WI.CPUTimelineView.prototype.closed):
3479         (WI.CPUTimelineView.prototype.reset):
3480         (WI.CPUTimelineView.prototype.get scrollableElements):
3481         (WI.CPUTimelineView.prototype.get showsFilterBar):
3482         (WI.CPUTimelineView.prototype.layout.layoutView):
3483         (WI.CPUTimelineView.prototype.layout.xScale):
3484         (WI.CPUTimelineView.prototype.layout.yScale):
3485         (WI.CPUTimelineView.prototype.layout):
3486         (WI.CPUTimelineView.prototype._cpuTimelineRecordAdded):
3487         * UserInterface/Views/CPUUsageView.css:
3488         (.cpu-usage-view):
3489         (.cpu-usage-view > .details):
3490         (body[dir=ltr] .cpu-usage-view > .details):
3491         (body[dir=rtl] .cpu-usage-view > .details):
3492         (.cpu-usage-view > .graph):
3493         (body[dir=rtl] .cpu-usage-view > .graph):
3494         * UserInterface/Views/CPUUsageView.js:
3495         (WI.CPUUsageView):
3496         (WI.CPUUsageView.prototype.get element):
3497         (WI.CPUUsageView.prototype.clear):
3498         (WI.CPUUsageView.prototype.layoutWithDataPoints):
3499         (WI.CPUUsageView.prototype._updateDetails):
3500         * UserInterface/Views/ContentView.js:
3501         (WI.ContentView.createFromRepresentedObject):
3502         * UserInterface/Views/TimelineIcons.css:
3503         (.cpu-icon .icon):
3504         * UserInterface/Views/TimelineOverviewGraph.js:
3505         (WI.TimelineOverviewGraph.createForTimeline):
3506         * UserInterface/Views/TimelineTabContentView.js:
3507         (WI.TimelineTabContentView.displayNameForTimelineType):
3508         (WI.TimelineTabContentView.iconClassNameForTimelineType):
3509         (WI.TimelineTabContentView.genericClassNameForTimelineType):
3510         (WI.TimelineTabContentView.iconClassNameForRecord):
3511         (WI.TimelineTabContentView.displayNameForRecord):
3512         Timeline views for CPU usage.
3513
3514         * UserInterface/Views/MemoryCategoryView.js:
3515         (WI.MemoryCategoryView):
3516         * UserInterface/Views/MemoryTimelineView.js:
3517         (WI.MemoryTimelineView.createChartContainer):
3518         (WI.MemoryTimelineView):
3519         (WI.MemoryTimelineView.prototype._clearMaxComparisonLegend):
3520         Minor updates to style and comments.
3521
3522 2019-01-23  Nikita Vasilyev  <nvasilyev@apple.com>
3523
3524         Web Inspector: Refactor WI.CSSStyleDeclaration.prototype.update
3525         https://bugs.webkit.org/show_bug.cgi?id=193737
3526
3527         Reviewed by Matt Baker.
3528
3529         Remove unused event data from the WI.CSSStyleDeclaration.Event.PropertiesChanged event.
3530
3531         * UserInterface/Models/CSSStyleDeclaration.js:
3532         (WI.CSSStyleDeclaration.prototype.update):
3533
3534 2019-01-23  Devin Rousso  <drousso@apple.com>
3535
3536         WebInspector: Confusingly nested events in the timeline for Mutation Observers
3537         https://bugs.webkit.org/show_bug.cgi?id=192884
3538         <rdar://problem/46854178>
3539
3540         Reviewed by Joseph Pecoraro.
3541
3542         If a microtask event (e.g. `ObserverCallback`) is contained within a `EvaluatedScript`
3543         event, move that microtask event to be a sibling of the `EvaluateScript`, subtracting the
3544         microtask's time taken from the `EvaluateScript`'s time. If there are no other children
3545         after this move, then remove the `EvaluateScript` altogether.
3546
3547         * UserInterface/Controllers/TimelineManager.js:
3548         (WI.TimelineManager.prototype.eventRecorded.fixMicrotaskPlacement): Added.
3549         (WI.TimelineManager.prototype.eventRecorded):
3550         (WI.TimelineManager.prototype._mergeScriptProfileRecords):
3551
3552 2019-01-23  Joseph Pecoraro  <pecoraro@apple.com>
3553
3554         Web Inspector: Network Waterfall column should redraw when adding/removing new columns
3555         https://bugs.webkit.org/show_bug.cgi?id=193696
3556         <rdar://problem/47464149>
3557
3558         Reviewed by Devin Rousso.
3559
3560         * UserInterface/Views/TableColumn.js:
3561         (WI.TableColumn.prototype.get needsReloadOnResize):
3562         * UserInterface/Views/NetworkTableContentView.js:
3563         (WI.NetworkTableContentView.prototype.initialLayout):
3564         Mark the waterfall column as sensitive to any resizes.
3565
3566         * UserInterface/Views/Table.js:
3567         (WI.Table.prototype.showColumn):
3568         (WI.Table.prototype.hideColumn):
3569         Update column widths and reload any columns that may be sensitive to resizes.
3570
3571 2019-01-22  Devin Rousso  <drousso@apple.com>
3572
3573         Web Inspector: InspectorInstrumentation::willEvaluateScript should include column number
3574         https://bugs.webkit.org/show_bug.cgi?id=116191
3575         <rdar://problem/13905910>
3576
3577         Reviewed by Joseph Pecoraro.
3578
3579         * UserInterface/Controllers/TimelineManager.js:
3580         (WI.TimelineManager.prototype._processRecord):
3581
3582 2019-01-22  Devin Rousso  <drousso@apple.com>
3583
3584         Web Inspector: expose Audit and Recording versions to the frontend
3585         https://bugs.webkit.org/show_bug.cgi?id=193262
3586         <rdar://problem/47130684>
3587
3588         Reviewed by Joseph Pecoraro.
3589
3590         * UserInterface/Protocol/InspectorBackend.js:
3591         (InspectorBackendClass.prototype.registerVersion): Added.
3592
3593         * UserInterface/Models/AuditTestCase.js:
3594         * UserInterface/Models/Recording.js:
3595         (WI.Recording.fromPayload):
3596         Add Interface version values.
3597
3598 2019-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
3599
3600         Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
3601         https://bugs.webkit.org/show_bug.cgi?id=193615
3602
3603         Reviewed by Devin Rousso.
3604
3605         Remove unused visibleProperties.
3606
3607         Rename:
3608         - properties to enabledProperties;
3609         - allProperties to properties;
3610         - allVisibleProperties to visibleProperties.
3611
3612         * UserInterface/Models/CSSProperty.js:
3613         (WI.CSSProperty.prototype._prependSemicolonIfNeeded):
3614         (WI.CSSProperty):
3615         * UserInterface/Models/CSSStyleDeclaration.js:
3616         (WI.CSSStyleDeclaration):
3617         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
3618         (WI.CSSStyleDeclaration.prototype.get properties):
3619         (WI.CSSStyleDeclaration.prototype.propertyForName):
3620         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
3621         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
3622         (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
3623         * UserInterface/Models/DOMNodeStyles.js:
3624         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
3625         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
3626         (WI.DOMNodeStyles.prototype._associateRelatedProperties):
3627         (WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
3628         (WI.DOMNodeStyles):
3629         * UserInterface/Views/BoxModelDetailsSectionRow.js:
3630         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
3631         * UserInterface/Views/ComputedStyleDetailsPanel.js:
3632         (WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):
3633         * UserInterface/Views/ComputedStyleSection.js:
3634         (WI.ComputedStyleSection.prototype.get propertiesToRender):
3635         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3636         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
3637         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3638         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
3639         * UserInterface/Views/SpreadsheetStyleProperty.js:
3640         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
3641
3642 2019-01-22  Joseph Pecoraro  <pecoraro@apple.com>
3643
3644         Web Inspector: Network Table appears broken after filter - rows look collapsed
3645         https://bugs.webkit.org/show_bug.cgi?id=192730
3646         <rdar://problem/46853158>
3647
3648         Reviewed by Devin Rousso.
3649
3650         * UserInterface/Views/Table.js:
3651         (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
3652         Affect the filler row like the other applyColumnWidths calls since this
3653         now may be the initial call to size visible columns.
3654
3655 2019-01-22  Devin Rousso  <drousso@apple.com>
3656
3657         Web Inspector: Audit: use plural strings for Passed, Failed, and Unsupported
3658         https://bugs.webkit.org/show_bug.cgi?id=193675
3659         <rdar://problem/46628680>
3660
3661         Reviewed by Joseph Pecoraro.
3662
3663         * UserInterface/Views/AuditTestGroupContentView.js:
3664         (WI.AuditTestGroupContentView.prototype.layout):
3665
3666         * Localizations/en.lproj/localizedStrings.js:
3667
3668 2019-01-18  Jer Noble  <jer.noble@apple.com>
3669
3670         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
3671         https://bugs.webkit.org/show_bug.cgi?id=189553
3672
3673         Reviewed by Tim Horton.
3674
3675         * Configurations/Base.xcconfig:
3676         * Configurations/SDKVariant.xcconfig: Added.
3677
3678 2019-01-18  Devin Rousso  <drousso@apple.com>
3679
3680         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'resource.finished')
3681         https://bugs.webkit.org/show_bug.cgi?id=193589
3682
3683         Reviewed by Joseph Pecoraro.
3684
3685         * UserInterface/Views/NetworkTableContentView.js:
3686         (WI.NetworkTableContentView.prototype.get supportsSave):
3687         (WI.NetworkTableContentView.prototype._HARResources):
3688
3689 2019-01-17  Truitt Savell  <tsavell@apple.com>
3690
3691         Unreviewed, rolling out r240124.
3692
3693         This commit broke an internal build.
3694
3695         Reverted changeset:
3696
3697         "SDK_VARIANT build destinations should be separate from non-
3698         SDK_VARIANT builds"
3699         https://bugs.webkit.org/show_bug.cgi?id=189553
3700         https://trac.webkit.org/changeset/240124
3701
3702 2019-01-17  Jer Noble  <jer.noble@apple.com>
3703
3704         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
3705         https://bugs.webkit.org/show_bug.cgi?id=189553
3706
3707         Reviewed by Tim Horton.
3708
3709         * Configurations/Base.xcconfig:
3710         * Configurations/SDKVariant.xcconfig: Added.
3711
3712 2019-01-16  Matt Baker  <mattbaker@apple.com>
3713
3714         Web Inspector: Fix TreeOutline TypeError:ā€‹ this._indexesForSubtree is not a function
3715         https://bugs.webkit.org/show_bug.cgi?id=193501
3716         <rdar://problem/47323967>
3717
3718         Reviewed by Joseph Pecoraro.
3719
3720         * UserInterface/Views/TreeOutline.js:
3721         (WI.TreeOutline.prototype.removeChildAtIndex):
3722
3723 2019-01-15  Devin Rousso  <drousso@apple.com>
3724
3725         Web Inspector: Audit: create new IDL type for exposing special functionality in test context
3726         https://bugs.webkit.org/show_bug.cgi?id=193149
3727         <rdar://problem/46801218>
3728
3729         Reviewed by Joseph Pecoraro.
3730
3731         Add `AuditAgent` getters and plumbing.
3732
3733         * UserInterface/Protocol/Target.js:
3734         (WI.Target.prototype.get AuditAgent): Added.
3735
3736         * UserInterface/Models/AuditTestCase.js:
3737         (WI.AuditTestCase.prototype.async run):
3738
3739         * UserInterface/Controllers/AuditManager.js:
3740         (WI.AuditManager.prototype.async start):
3741
3742         * .eslintrc:
3743
3744 2019-01-14  Devin Rousso  <drousso@apple.com>
3745
3746         Web Inspector: Event breakpoints: typing uppercase "DOM" doesn't show completions for events that start with "DOM"
3747         https://bugs.webkit.org/show_bug.cgi?id=193384
3748
3749         Reviewed by Joseph Pecoraro.
3750
3751         * UserInterface/Views/EventBreakpointPopover.js:
3752         (WI.EventBreakpointPopover.prototype.show):
3753
3754 2019-01-14  Devin Rousso  <drousso@apple.com>
3755
3756         Web Inspector: Event breakpoints: text field and completion popover fonts should match
3757         https://bugs.webkit.org/show_bug.cgi?id=193249
3758
3759         Reviewed by Matt Baker.
3760
3761         * UserInterface/Views/EventBreakpointPopover.css:
3762         (.popover .event-breakpoint-content > .event-type > input): Added.
3763         (.popover .event-breakpoint-content > .event-type > input::placeholder): Added.
3764         * UserInterface/Views/EventBreakpointPopover.js:
3765         (WI.EventBreakpointPopover.prototype.show):
3766         (WI.EventBreakpointPopover.prototype._showSuggestionsView):
3767         Subtract the <input> border and padding from the bounds position so the <input> text lines
3768         up with the `WI.CompletionSuggestionsView` text.
3769
3770         * UserInterface/Views/CompletionSuggestionsView.js:
3771         (WI.CompletionSuggestionsView):
3772         Drive-by: force `dir=ltr` to match the `text-align: left;` CSS styling.
3773
3774 2019-01-14  Nikita Vasilyev  <nvasilyev@apple.com>
3775
3776         Web Inspector: Styles: pressing Down key on empty value field shouldn't discard completion popover
3777         https://bugs.webkit.org/show_bug.cgi?id=193098
3778         <rdar://problem/47016036>
3779
3780         Reviewed by Devin Rousso.
3781
3782         Hide CompletionSuggestionsView when SpreadsheetTextField moves, e.g. by scrolling or resizing the sidebar.
3783         Update CompletionSuggestionsView position after pressing Up or Down key, because SpreadsheetTextField may
3784         move from wrapping text.
3785
3786         * UserInterface/Views/CompletionSuggestionsView.js:
3787         (WI.CompletionSuggestionsView.prototype.hide):
3788         (WI.CompletionSuggestionsView.prototype.show):
3789         (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves): Removed.
3790         (WI.CompletionSuggestionsView.prototype.hideWhenElementMoves): Added.
3791         (WI.CompletionSuggestionsView.prototype._stopMoveTimer): Added.
3792         (WI.CompletionSuggestionsView):
3793
3794         * UserInterface/Views/SpreadsheetTextField.js:
3795         (WI.SpreadsheetTextField.prototype.set suggestionHint):
3796         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
3797         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
3798         (WI.SpreadsheetTextField.prototype._updateCompletions):
3799         (WI.SpreadsheetTextField.prototype._showSuggestionsView): Added.
3800
3801         (WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
3802         Drive-by: abstract out repeating code into a private method.
3803
3804 2019-01-14  Devin Rousso  <drousso@apple.com>
3805
3806         Web Inspector: Settings: group titles should vertically align with the first editor
3807         https://bugs.webkit.org/show_bug.cgi?id=193391
3808
3809         Reviewed by Dean Jackson.
3810
3811         * UserInterface/Views/SettingsTabContentView.css:
3812         (.content-view.settings > .settings-view > .container):
3813         (.content-view.settings > .settings-view > .container > .editor-group > .editor): Added.
3814         (.content-view.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Added.
3815         (.content-view.settings > .settings-view > .container > .editor-group > .editor select):
3816         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="number"]):
3817
3818 2019-01-11  Matt Baker  <mattbaker@apple.com>
3819
3820         Web Inspector: REGRESSION: deleting an audit puts selection in a selected but invisible state
3821         https://bugs.webkit.org/show_bug.cgi?id=192917
3822         <rdar://problem/46875285>
3823
3824         Reviewed by Devin Rousso.
3825
3826         SelectionController should not be notified of removed children until the
3827         child items have been removed from the TreeOutline. Doing so at this stage
3828         is unsafe, since this method checks `this.selectedTreeElement`, which could
3829         return the adjusted index from the SelectionController before anything has
3830         actually been removed from the TreeOutline.
3831
3832         The number of calls to SelectionController.prototype.didRemoveItems is also
3833         reduced somewhat, since we're no longer calling it for every TreeElement.
3834
3835         * UserInterface/Views/TreeOutline.js:
3836         (WI.TreeOutline.prototype.removeChildAtIndex):
3837         (WI.TreeOutline.prototype.removeChildren):
3838         (WI.TreeOutline.prototype._forgetTreeElement):
3839         (WI.TreeOutline.prototype._indexesForSubtree): Added.        
3840
3841 2019-01-10  Devin Rousso  <drousso@apple.com>
3842
3843         Web Inspector: Audit: allow audits to be enabled/disabled
3844         https://bugs.webkit.org/show_bug.cgi?id=192210
3845         <rdar://problem/46423583>
3846
3847         Reviewed by Joseph Pecoraro.
3848
3849         * UserInterface/Controllers/AuditManager.js:
3850         (WI.AuditManager.prototype.get editing): Added.
3851         (WI.AuditManager.prototype.set editing): Added.
3852         (WI.AuditManager.prototype.stop):
3853         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
3854         Since default audits aren't stored, keep a list of disabled default tests in a `WI.Setting`.
3855
3856         * UserInterface/Models/AuditTestBase.js:
3857         (WI.AuditTestBase):
3858         (WI.AuditTestBase.prototype.get disabled): Added.
3859         (WI.AuditTestBase.prototype.set disabled): Added.
3860         (WI.AuditTestBase.prototype.async start):
3861         (WI.AuditTestBase.prototype.stop):
3862         (WI.AuditTestBase.toJSON):
3863
3864         * UserInterface/Models/AuditTestCase.js:
3865         (WI.AuditTestCase):
3866         (WI.AuditTestCase.async fromPayload):
3867         (WI.AuditTestCase.prototype.toJSON):
3868
3869         * UserInterface/Models/AuditTestGroup.js:
3870         (WI.AuditTestGroup):
3871         (WI.AuditTestGroup.async fromPayload):
3872         (WI.AuditTestGroup.prototype.get disabled): Added.
3873         (WI.AuditTestGroup.prototype.set disabled): Added.
3874         (WI.AuditTestGroup.prototype.toJSON):
3875         (WI.AuditTestGroup.prototype.async run):
3876         (WI.AuditTestGroup.prototype._handleTestDisabledChanged): Added.
3877         (WI.AuditTestGroup.prototype._handleTestProgress):
3878         Propagate `disabled` changes to all sub-tests, unless the change was caused by one of the
3879         sub-tests, in which case we are now in an intermediate state.
3880
3881         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3882         (WI.AuditNavigationSidebarPanel):
3883         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
3884         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
3885         (WI.AuditNavigationSidebarPanel.prototype.hasCustomFilters): Added.
3886         (WI.AuditNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): Added.
3887         (WI.AuditNavigationSidebarPanel.prototype._addTest):
3888         (WI.AuditNavigationSidebarPanel.prototype._addResult):
3889         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
3890         (WI.AuditNavigationSidebarPanel.prototype._updateEditButtonNavigationItemState): Added.
3891         (WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerEditingChanged): Added.
3892         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
3893         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestScheduled):
3894         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
3895         (WI.AuditNavigationSidebarPanel.prototype._handleEditButtonNavigationItemClicked): Added.
3896         * UserInterface/Views/AuditNavigationSidebarPanel.css:
3897         (.sidebar > .panel.navigation.audit > .content):
3898         (.sidebar > .panel.navigation.audit > .content > .tree-outline): Added.
3899         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled):active): Added.
3900         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated): Added.
3901         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated:active): Added.
3902         (.sidebar > .panel.navigation.audit > .content .edit-audits.disabled): Added.
3903         (.finish-editing-audits-placeholder.message-text-view .navigation-item-help .navigation-bar): Added.
3904         Leverage custom filters to ensure that disabled audits arent shown when not editing and that
3905         result tree elements aren't shown while editing.