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