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