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