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