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