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