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