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