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