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