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