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