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