Web Inspector: CSS Changes: modifications aren't shared for rules that match multiple...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-05-31  Nikita Vasilyev  <nvasilyev@apple.com>
2
3         Web Inspector: CSS Changes: modifications aren't shared for rules that match multiple elements
4         https://bugs.webkit.org/show_bug.cgi?id=195264
5         <rdar://problem/48550023>
6
7         Reviewed by Devin Rousso.
8
9         This patch fixes several cases when the diff was incorrect.
10
11         1. Perform diff based on CSSProperty content (name, value, and enabled property) instead
12            of strict equality of CSSProperty instances.
13
14         2. Copy all initial CSSProperty instances of CSSStyleDeclaration on 1st edit.
15            This removes the need to update `properties` on every single edit.
16
17         3. Do full diff to display modified property markers (green background) in Rules panel.
18            This fixes a few cases when the markers were inaccurate. E.g. a newly added property
19            matches removed property - no need to show the green background.
20
21         * UserInterface/Base/Utilities.js:
22         (Array.diffArrays):
23         Allow repeating items in the arrays.
24
25         * UserInterface/Controllers/CSSManager.js:
26         (WI.CSSManager.prototype.getModifiedStyle):
27         (WI.CSSManager.prototype.removeModifiedStyle):
28         * UserInterface/Models/CSSProperty.js:
29         (WI.CSSProperty):
30         (WI.CSSProperty.prototype.get modified):
31         (WI.CSSProperty.prototype.set modified):
32         (WI.CSSProperty.prototype.equals):
33         (WI.CSSProperty.prototype.clone):
34         (WI.CSSProperty.prototype._updateOwnerStyleText):
35         (WI.CSSProperty.prototype._markModified):
36         * UserInterface/Models/CSSStyleDeclaration.js:
37         (WI.CSSStyleDeclaration.prototype.markModified):
38         (WI.CSSStyleDeclaration.prototype.updatePropertiesModifiedState):
39         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
40         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
41         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
42         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
43         * UserInterface/Views/SpreadsheetStyleProperty.js:
44
45 2019-05-31  Devin Rousso  <drousso@apple.com>
46
47         Web Inspector: Timelines: CPU: gray (?) and (x) should be white
48         https://bugs.webkit.org/show_bug.cgi?id=198394
49
50         Reviewed by Joseph Pecoraro.
51
52         * UserInterface/Views/Variables.css:
53         (@media (prefers-color-scheme: dark)):
54         Remove the dark mode override for `--gray-foreground-color`, as the default `white` is a
55         better contrast.
56
57 2019-05-30  Devin Rousso  <drousso@apple.com>
58
59         Web Inspector: Audit: there should be a default test for WebInspectorAudit.Resources functionality
60         https://bugs.webkit.org/show_bug.cgi?id=196710
61         <rdar://problem/49712348>
62
63         Reviewed by Joseph Pecoraro.
64
65         Previously, there was no way to return data from Audit that wasn't a DOM node, a DOM
66         attribute (which wasn't "shown" anywhere, as it would highlight that attribute on any
67         returned DOM nodes), or an error string.
68
69         In order for Audits to be more flexible with the types of things they test, there needs to
70         be a way for other types of data to be sent back and displayed in the Audit tab.
71
72         This patch makes it so that an Audit result can now contain other keys/values that are all
73         expected to be JSON serializable. It will take all of the non-"special" (e.g. "domNodes" or
74         "errors") keys/values and display them as object trees. This way, any JSON serializable data
75         can be sent with the result and be displayed in the Audit tab.
76
77         * UserInterface/Models/AuditTestBase.js:
78         (WI.AuditTestBase.prototype.async setup):
79         (WI.AuditTestBase.prototype.clearResult):
80         * UserInterface/Models/AuditTestGroup.js:
81         (WI.AuditTestCase.prototype.clearResult):
82         (WI.AuditTestCase.prototype._updateResult):
83         * UserInterface/Models/AuditTestCase.js:
84         (WI.AuditTestCase.prototype.async run):
85         (WI.AuditTestCase.prototype.async run.async parseResponse):
86         (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty):
87         (WI.AuditTestCase.prototype.async run.async parseResponse.checkResultProperty.addErrorForValueType):
88         (WI.AuditTestCase.prototype.async run.async parseResponse.async resultArrayForEach):
89         (WI.AuditTestCase.prototype.async run.async parseResponse.inspectedPage_stringify): Added.
90         Rename `ResultCleared` to `ResultChanged` so that it can (semantically) be used whenever a
91         new result is set in addition to when an existing one is cleared. This is needed so that
92         `AuditTestCaseContentView` will refresh each time the result changes, instead of only in the
93         first `layout()` after the last result was cleared.
94
95         * UserInterface/Models/AuditTestCaseResult.js:
96         (WI.AuditTestCaseResult.async fromPayload):
97         (WI.AuditTestCaseResult.prototype.toJSON):
98         Drive-by: fix the check for optional `data` values to still warn if the value is `null`.
99
100         * UserInterface/Controllers/AuditManager.js:
101         (WI.AuditManager.prototype._addDefaultTests):
102         Add a default test "Demo Audit > Result Data > data-custom" as an example how to write an
103         Audit that returns custom data, as well as how that custom data is shown in the Audit tab.
104
105         * UserInterface/Views/AuditTestContentView.js:
106         (WI.AuditTestContentView.prototype.shown):
107         (WI.AuditTestContentView.prototype.handleResultChanged): Added.
108         * UserInterface/Views/AuditTestCaseContentView.js:
109         (WI.AuditTestCaseContentView):
110         (WI.AuditTestCaseContentView.prototype.layout):
111         (WI.AuditTestCaseContentView.prototype.handleResultChanged): Added.
112         Preserve the UI for each section across `layout()`s, so that expand/collapse states aren't
113         reset each time the user changes the selected Audit.
114
115         * UserInterface/Views/AuditTestCaseContentView.css:
116         (.content-view.audit-test-case > section table > tr > td + td): Added.
117         Drive-by: ensure that the "index" table column is never larger than it needs to be.
118
119         * UserInterface/Views/AuditTreeElement.js:
120         (WI.AuditTreeElement.prototype.onattach):
121         (WI.AuditTreeElement.prototype._handleTestResultChanged): Added.
122         (WI.AuditTreeElement.prototype._handleTestResultCleared): Deleted.
123
124         * Localizations/en.lproj/localizedStrings.js:
125
126 2019-05-28  Devin Rousso  <drousso@apple.com>
127
128         Web Inspector: Timelines: spacing around pie chart is different between CPU and Memory
129         https://bugs.webkit.org/show_bug.cgi?id=198299
130
131         Reviewed by Matt Baker.
132
133         "Style Resolution" is a much longer string than any of the legend strings in the Memory
134         timeline, and causes the CPU timeline legend to shift as a result.
135
136         Rename "Script" to "JavaScript" and "Style Resolution" to "Styles" so that the strings are
137         roughly the same length between the CPU and Memory timelines, meaning that they will appear
138         in the same spot with similar sizing.
139
140         * UserInterface/Views/CPUTimelineView.js:
141         (WI.CPUTimelineView.displayNameForSampleType):
142         (WI.CPUTimelineView.prototype.initialLayout):
143         (WI.CPUTimelineView.prototype._computeStatisticsData):
144         Drive-by: remove the `WI` prefix from all `CPUTimelineView.SampleType` since it's within the
145         same class.
146
147         * UserInterface/Views/CPUTimelineView.css:
148         (.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-javascript): Added.
149         (.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-script): Deleted.
150         Drive-by: move the `.overview` rules lower to be in the same area as the `.overview *` rules.
151
152         * UserInterface/Views/MemoryTimelineView.css:
153         (.timeline-view.memory > .content > .overview):
154         Drive-by: remove duplicate CSS rule.
155
156         * Localizations/en.lproj/localizedStrings.js:
157
158 2019-05-28  Nikita Vasilyev  <nvasilyev@apple.com>
159
160         Web Inspector: Provide UIString descriptions to improve localizations
161         https://bugs.webkit.org/show_bug.cgi?id=195132
162         <rdar://problem/48457817>
163
164         Reviewed by Devin Rousso.
165
166         * Localizations/en.lproj/localizedStrings.js:
167         * UserInterface/Base/LoadLocalizedStrings.js:
168         (WI.UIString):
169         (WI.repeatedUIString.timelineRecordLayout):
170         (WI.repeatedUIString.timelineRecordPaint):
171         (WI.repeatedUIString.timelineRecordComposite):
172         (WI.repeatedUIString.allExceptions):
173         (WI.repeatedUIString.uncaughtExceptions):
174         (WI.repeatedUIString.assertionFailures):
175         (WI.repeatedUIString.allRequests):
176         (WI.repeatedUIString.fetch):
177         (WI.repeatedUIString.revealInDOMTree):
178         * UserInterface/Models/LayoutTimelineRecord.js:
179         (WI.LayoutTimelineRecord.displayNameForEventType):
180         * UserInterface/Models/RenderingFrameTimelineRecord.js:
181         (WI.RenderingFrameTimelineRecord.displayNameForTaskType):
182         * UserInterface/Models/Resource.js:
183         (WI.Resource.displayNameForType):
184         * UserInterface/Views/AuditTestGroupContentView.js:
185         (WI.AuditTestGroupContentView.prototype.layout):
186         * UserInterface/Views/CPUTimelineView.js:
187         (WI.CPUTimelineView.displayNameForSampleType):
188         * UserInterface/Views/ContextMenuUtilities.js:
189         * UserInterface/Views/DOMBreakpointTreeElement.js:
190         (WI.DOMBreakpointTreeElement.displayNameForType):
191         * UserInterface/Views/DOMNodeTreeElement.js:
192         (WI.DOMNodeTreeElement.prototype.populateContextMenu):
193         (WI.DOMNodeTreeElement):
194         * UserInterface/Views/DOMTreeElement.js:
195         (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
196         * UserInterface/Views/DebuggerSidebarPanel.js:
197         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
198         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown):
199         (WI.DebuggerSidebarPanel):
200         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
201         (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
202         * UserInterface/Views/NetworkTableContentView.js:
203         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
204         (WI.NetworkTableContentView.prototype.initialLayout):
205         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
206         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
207         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown):
208         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
209         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
210         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
211         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
212
213 2019-05-24  Devin Rousso  <drousso@apple.com>
214
215         Web Inspector: Overlay: don't show setting for showing rulers/guides during element selection if it's not supported
216         https://bugs.webkit.org/show_bug.cgi?id=198221
217
218         Reviewed by Joseph Pecoraro.
219
220         * UserInterface/Views/SettingsTabContentView.js:
221         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
222
223 2019-05-23  Devin Rousso  <drousso@apple.com>
224
225         Web Inspector: prevent stripping `console.assert` if it's used inside a string
226         https://bugs.webkit.org/show_bug.cgi?id=198207
227
228         Reviewed by Joseph Pecoraro.
229
230         * Scripts/remove-console-asserts.pl:
231         (removeConsoleAssertsInFile):
232
233 2019-05-23  Devin Rousso  <drousso@apple.com>
234
235         Web Inspector: Overlay: rulers/guides should be shown whenever element selection is enabled
236         https://bugs.webkit.org/show_bug.cgi?id=198088
237
238         Reviewed by Timothy Hatcher.
239
240         When trying to "measure" the absolute position (to the viewport) or relative position (to
241         another element) of a given element, often the easiest way is to enable Element Selection
242         and Show Rulers at the same time.
243
244         This can have the undesired "side-effect" of having the rulers be always present, even when
245         not highlighting any nodes.
246
247         The ideal functionality is to allow the rulers/guides to be shown when element selection is
248         active and a node is hovered, regardless of whether "Show Rulers" is enabled.
249
250         * UserInterface/Base/Setting.js:
251         * UserInterface/Views/SettingsTabContentView.js:
252         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
253         Add a setting for controlling whether rulers/guides are shown during element selection.
254
255         * UserInterface/Controllers/DOMManager.js:
256         (WI.DOMManager.prototype.set inspectModeEnabled):
257         Pass the setting value as an optional parameter when calling `DOM.setInspectModeEnabled`.
258
259         * Localizations/en.lproj/localizedStrings.js:
260
261 2019-05-23  Commit Queue  <commit-queue@webkit.org>
262
263         Unreviewed, rolling out r245665.
264         https://bugs.webkit.org/show_bug.cgi?id=198203
265
266         Inspector appears blank, again. (Requested by NVI on #webkit).
267
268         Reverted changeset:
269
270         "Web Inspector: Provide UIString descriptions to improve
271         localizations"
272         https://bugs.webkit.org/show_bug.cgi?id=195132
273         https://trac.webkit.org/changeset/245665
274
275 2019-05-23  Matt Baker  <mattbaker@apple.com>
276
277         Web Inspector: Remove unused CSS class "offset-sections"
278         https://bugs.webkit.org/show_bug.cgi?id=198194
279         <rdar://problem/51080111>
280
281         Reviewed by Devin Rousso.
282
283         * UserInterface/Views/DebuggerSidebarPanel.js:
284         * UserInterface/Views/StyleDetailsPanel.js:
285         (WI.StyleDetailsPanel):
286
287 2019-05-23  Devin Rousso  <drousso@apple.com>
288
289         Web Inspector: clicking a source link should never open the Network tab
290         https://bugs.webkit.org/show_bug.cgi?id=197951
291
292         Reviewed by Timothy Hatcher.
293
294         The preview panel in the Network tab is really meant to be just that; a preview.
295
296         Opening resources in the preview panel is not a great experience, as the Network tab doesn't
297         have as much of the information one would expect when viewing a resource (namely the
298         Resource details sidebar panel).
299
300         Navigating within the Network tab also completely wipes out the current "state" of what
301         you're looking at (e.g. which panel), which could be unexpected.
302
303         The only way this could happen previously was if the Resources/Debugger/Sources tabs had
304         never been active at any point in the past. Selecting one of those tabs and then clicking on
305         an initiator link in the Network tab would re-select that other tab.
306
307         * UserInterface/Base/Main.js:
308         (WI.dialogWasDismissedWithRepresentedObject):
309
310         * UserInterface/Views/ResourceHeadersContentView.js:
311         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
312
313 2019-05-22  Nikita Vasilyev  <nvasilyev@apple.com>
314
315         Web Inspector: Provide UIString descriptions to improve localizations
316         https://bugs.webkit.org/show_bug.cgi?id=195132
317         <rdar://problem/48457817>
318
319         Reviewed by Devin Rousso.
320
321         * Localizations/en.lproj/localizedStrings.js:
322         * UserInterface/Base/LoadLocalizedStrings.js:
323         (WI.UIString):
324         (WI.repeatedUIString.timelineRecordLayout):
325         (WI.repeatedUIString.timelineRecordPaint):
326         (WI.repeatedUIString.timelineRecordComposite):
327         (WI.repeatedUIString.allExceptions):
328         (WI.repeatedUIString.uncaughtExceptions):
329         (WI.repeatedUIString.assertionFailures):
330         (WI.repeatedUIString.allRequests):
331         (WI.repeatedUIString.fetch):
332         (WI.repeatedUIString.revealInDOMTree):
333         * UserInterface/Models/LayoutTimelineRecord.js:
334         (WI.LayoutTimelineRecord.displayNameForEventType):
335         * UserInterface/Models/RenderingFrameTimelineRecord.js:
336         (WI.RenderingFrameTimelineRecord.displayNameForTaskType):
337         * UserInterface/Models/Resource.js:
338         (WI.Resource.displayNameForType):
339         * UserInterface/Views/AuditTestGroupContentView.js:
340         (WI.AuditTestGroupContentView.prototype.layout):
341         * UserInterface/Views/CPUTimelineView.js:
342         (WI.CPUTimelineView.displayNameForSampleType):
343         * UserInterface/Views/ContextMenuUtilities.js:
344         * UserInterface/Views/DOMBreakpointTreeElement.js:
345         (WI.DOMBreakpointTreeElement.displayNameForType):
346         * UserInterface/Views/DOMNodeTreeElement.js:
347         (WI.DOMNodeTreeElement.prototype.populateContextMenu):
348         (WI.DOMNodeTreeElement):
349         * UserInterface/Views/DOMTreeElement.js:
350         (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
351         * UserInterface/Views/DebuggerSidebarPanel.js:
352         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
353         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown):
354         (WI.DebuggerSidebarPanel):
355         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
356         (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
357         * UserInterface/Views/NetworkTableContentView.js:
358         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
359         (WI.NetworkTableContentView.prototype.initialLayout):
360         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
361         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
362         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown):
363         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
364         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
365         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
366         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
367
368 2019-05-22  Devin Rousso  <drousso@apple.com>
369
370         Web Inspector: provide a debug setting button to reset all settings for easier testing/presentation
371         https://bugs.webkit.org/show_bug.cgi?id=195777
372
373         Reviewed by Joseph Pecoraro.
374
375         * UserInterface/Base/Setting.js:
376         (WI.Setting.reset): Added.
377
378         * UserInterface/Views/SettingsTabContentView.js:
379         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
380
381 2019-05-20  Devin Rousso  <drousso@apple.com>
382
383         Web Inspector: Storage tab crashes easily when adding new local/session storage entries.
384         https://bugs.webkit.org/show_bug.cgi?id=198004
385
386         Reviewed by Ross Kirsling.
387
388         * UserInterface/Views/DataGrid.js:
389         (WI.DataGrid.prototype._startEditingNodeAtColumnIndex):
390         Force a layout in the case that a new `PlaceholderDataGridNode` was added to the end of the
391         `DataGrid` as part of the `editCallback`. Web Inspector won't crash without this, but it
392         won't properly select/focus the next row when tabbing from the last column to the next row.
393
394         (WI.DataGrid.prototype._editingCommitted):
395         Save the new value of the column before removing the editing styles, as that refreshes the
396         `DataGridNode`. If the new value isn't saved, the old value is used during the refresh.
397
398         (WI.DataGrid.prototype._keyDown):
399         Drive-by: use `get element` instead of using the member variable directly, as the underlying
400         value might not have been initialized yet.
401
402 2019-05-19  Nikita Vasilyev  <nvasilyev@apple.com>
403
404         Web Inspector: Decrease spacing before and after tooltip paragraphs
405         https://bugs.webkit.org/show_bug.cgi?id=198024
406
407         Reviewed by Joseph Pecoraro.
408
409         * UserInterface/Views/Popover.css:
410         (.popover p): Added.
411         (.popover p + p): Added.
412
413 2019-05-17  Devin Rousso  <drousso@apple.com>
414
415         Web Inspector: Timelines: CPU/memory timeline bars sometimes don't draw correctly and jump around on scrolling
416         https://bugs.webkit.org/show_bug.cgi?id=197440
417         <rdar://problem/46886315>
418
419         Reviewed by Joseph Pecoraro.
420
421         When drawing the Memory/CPU graphs, we need to know about the record immediately before/after
422         what's overlapping the visible range so that the graph correctly slopes off the screen.
423
424         * UserInterface/Models/Timeline.js:
425         (WI.Timeline.prototype.recordsInTimeRange):
426         (WI.Timeline.prototype.recordsOverlappingTimeRange): Deleted.
427         Merge `recordsOverlappingTimeRange` into `recordsInTimeRange` by accepting an options object
428         that determines whether to include the record before/after the first/last record that are
429         at all overlapping the range.
430
431         * UserInterface/Models/CPUTimelineRecord.js:
432         (WI.CPUTimelineRecord):
433         (WI.CPUTimelineRecord.get samplingRatePerSecond): Added.
434         (WI.CPUTimelineRecord.prototype.adjustStartTimeToLastRecord): Added.
435         * UserInterface/Models/MemoryTimelineRecord.js:
436         (WI.MemoryTimelineRecord):
437         (WI.MemoryTimelineRecord.get samplingRatePerSecond): Added.
438         (WI.MemoryTimelineRecord.prototype.adjustStartTimeToLastRecord): Added.
439         Adjust the `startTime` of the record by the sampling rate (which is 500ms).
440
441         * UserInterface/Models/CPUTimeline.js: Added.
442         (WI.CPUTimeline.prototype.addRecord):
443         * UserInterface/Models/MemoryTimeline.js:
444         (WI.MemoryTimeline.prototype.addRecord): Added.
445         Adjust the `startTime` of the new record to be equal to the `endTime` of the last record.
446
447         * UserInterface/Views/TimelineOverview.js:
448         (WI.TimelineOverview.prototype._recordSelected):
449         * UserInterface/Views/CPUTimelineView.js:
450         (WI.CPUTimelineView.prototype.layout):
451         (WI.CPUTimelineView.prototype._computeStatisticsData):
452         (WI.CPUTimelineView.prototype._attemptSelectIndicatatorTimelineRecord):
453         * UserInterface/Views/CPUTimelineOverviewGraph.js:
454         (WI.CPUTimelineOverviewGraph.prototype.layout):
455         (WI.CPUTimelineOverviewGraph.prototype._handleChartClick):
456         (WI.CPUTimelineOverviewGraph.prototype.get samplingRatePerSecond): Deleted.
457         (WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord): Deleted.
458
459         * UserInterface/Views/MemoryTimelineView.js:
460         (WI.MemoryTimelineView.prototype.layout):
461         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
462         (WI.MemoryTimelineOverviewGraph.prototype.layout):
463
464         * UserInterface/Main.html:
465         * UserInterface/Test.html:
466
467 2019-05-17  Devin Rousso  <drousso@apple.com>
468
469         Web Inspector: Audit: make it easier to jump to any returned DOM node in the Elements tab
470         https://bugs.webkit.org/show_bug.cgi?id=197470
471         <rdar://problem/50466774>
472
473         Reviewed by Joseph Pecoraro.
474
475         Right now, the only way to jump to the Elements tab for any DOM nodes returned by an audit
476         is to context menu and "Reveal in DOM Tree". Providing a more visible/discoverable way to
477         jump to the Elements tab will help developers diagnose issues easier.
478
479         * UserInterface/Views/AuditTestCaseContentView.js:
480         (WI.AuditTestCaseContentView.prototype.layout):
481         * UserInterface/Views/AuditTestCaseContentView.css:
482         (.content-view.audit-test-case > section table):
483
484         * UserInterface/Views/DOMTreeElement.js:
485         (WI.DOMTreeElement):
486         (WI.DOMTreeElement.prototype.set showGoToArrow): Added.
487         (WI.DOMTreeElement.prototype._buildTagDOM):
488         (WI.DOMTreeElement.prototype._nodeTitleInfo):
489         Provide a way to insert a go-to arrow right after the:
490          - open tag, if the close tag is rendered on a separate line
491          - close tag, if the close tag is rendered on the same line
492
493         * UserInterface/Views/DOMTreeOutline.js:
494         (WI.DOMTreeOutline):
495         Allow `DOMTreeOutline` to be non-selectable.
496
497         * UserInterface/Views/DOMTreeOutline.css:
498         (.tree-outline.dom:not(.non-selectable):focus li:matches(.selected, .hovered) .selection-area): Added.
499         (.tree-outline.dom:not(.non-selectable) li.hovered:not(.selected) .selection-area): Added.
500         (.tree-outline.dom li .html-tag ~ .go-to-arrow): Added.
501         (.tree-outline.dom li:not(.hovered) .html-tag ~ .go-to-arrow): Added.
502         (.tree-outline.dom:focus li:matches(.selected, .hovered) .selection-area): Deleted.
503         (.tree-outline.dom li.hovered:not(.selected) .selection-area): Deleted.
504         Ensure that hovering a non-selectable node doesn't change the background color.
505
506 2019-05-17  Devin Rousso  <drousso@apple.com>
507
508         Web Inspector: Elements: context menu items in DOM tree should work when not clicking directly on the node representation
509         https://bugs.webkit.org/show_bug.cgi?id=197541
510
511         Reviewed by Timothy Hatcher.
512
513         * UserInterface/Views/DOMTreeElement.js:
514         (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu): Added.
515         (WI.DOMTreeElement.prototype._populateTagContextMenu): Deleted.
516         (WI.DOMTreeElement.prototype._populateTextContextMenu): Deleted.
517         (WI.DOMTreeElement.prototype._populateNodeContextMenu): Deleted.
518         * UserInterface/Views/DOMTreeOutline.js:
519         (WI.DOMTreeOutline.prototype.populateContextMenu):
520         * UserInterface/Views/ContextMenuUtilities.js:
521         (WI.appendContextMenuItemsForDOMNode):
522
523 2019-05-17  Joonghun Park  <pjh0718@gmail.com>
524
525         Implement CSS `display: flow-root` (modern clearfix)
526         https://bugs.webkit.org/show_bug.cgi?id=165603
527
528         Reviewed by Zalan Bujtas.
529
530         This change follows https://drafts.csswg.org/css-display-3/#valdef-display-flow-root as below.
531
532         'display: flow-root' generates a block container box, and lays out its contents using flow layout.
533         It always establishes a new block formatting context for its contents.
534
535         * UserInterface/External/CodeMirror/css.js:
536
537 2019-05-17  Ross Kirsling  <ross.kirsling@sony.com>
538
539         REGRESSION(r244350): Web Inspector: Storage tab data grids aren't editable.
540         https://bugs.webkit.org/show_bug.cgi?id=198003
541
542         Reviewed by Devin Rousso.
543
544         * UserInterface/Views/DOMStorageContentView.js:
545         (WI.DOMStorageContentView):
546         Fix typo.
547
548 2019-05-17  Jamal Nasser  <jamaln@mail.com>
549
550         Web Inspector: Dark Mode: Fix colors in network table waterfall container
551         https://bugs.webkit.org/show_bug.cgi?id=197955
552
553         Reviewed by Devin Rousso.
554
555         * UserInterface/Views/NetworkTableContentView.css:
556         (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-event):
557         (.network-table :not(.header) .cell.waterfall .waterfall-container > .dom-activity):
558         (.network-table :not(.header) .cell.waterfall .waterfall-container > .area.dom-fullscreen):
559
560 2019-05-09  Devin Rousso  <drousso@apple.com>
561
562         Web Inspector: Uncaught Exception: null is not an object (evaluating 'resource.parentFrame.securityOrigin')
563         https://bugs.webkit.org/show_bug.cgi?id=196572
564         <rdar://problem/49578338>
565
566         Reviewed by Timothy Hatcher.
567
568         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
569         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
570
571 2019-05-09  Devin Rousso  <drousso@apple.com>
572
573         Web Inspector: REGRESSION: unable to expand/collapse non-selectable WI.TreeOutline
574         https://bugs.webkit.org/show_bug.cgi?id=197591
575
576         Reviewed by Timothy Hatcher.
577
578         * UserInterface/Views/TreeElement.js:
579         (WI.TreeElement.treeElementToggled):
580
581 2019-05-09  Devin Rousso  <drousso@apple.com>
582
583         Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith')
584         https://bugs.webkit.org/show_bug.cgi?id=196662
585         <rdar://problem/49659633>
586
587         Reviewed by Timothy Hatcher.
588
589         * UserInterface/Views/ConsoleMessageView.js:
590         (WI.ConsoleMessageView.prototype._appendLocationLink):
591         (WI.ConsoleMessageView.prototype._linkifyLocation): Deleted.
592
593         * UserInterface/Base/Main.js:
594         (WI.linkifyLocation):
595         (WI.linkifySourceCode): Added.
596         Split the logic into two functions, as there's no need to re-fetch the `SourceCode` from a
597         given url if you already have the `SourceCode` in the caller.
598
599 2019-05-08  Ryan Haddad  <ryanhaddad@apple.com>
600
601         Unreviewed, rolling out r244952.
602
603         Caused inspector to appear blank.
604
605         Reverted changeset:
606
607         "Web Inspector: Provide UIString descriptions to improve
608         localizations"
609         https://bugs.webkit.org/show_bug.cgi?id=195132
610         https://trac.webkit.org/changeset/244952
611
612 2019-05-04  Nikita Vasilyev  <nvasilyev@apple.com>
613
614         Web Inspector: Provide UIString descriptions to improve localizations
615         https://bugs.webkit.org/show_bug.cgi?id=195132
616         <rdar://problem/48457817>
617
618         Reviewed by Devin Rousso.
619
620         * Localizations/en.lproj/localizedStrings.js:
621         * UserInterface/Base/LoadLocalizedStrings.js:
622         (WI.UIString):
623         (WI.repeatedUIString.timelineRecordLayout):
624         (WI.repeatedUIString.timelineRecordPaint):
625         (WI.repeatedUIString.timelineRecordComposite):
626         (WI.repeatedUIString.allExceptions):
627         (WI.repeatedUIString.uncaughtExceptions):
628         (WI.repeatedUIString.assertionFailures):
629         (WI.repeatedUIString.allRequests):
630         (WI.repeatedUIString.fetch):
631         (WI.repeatedUIString.revealInDOMTree):
632         * UserInterface/Models/LayoutTimelineRecord.js:
633         (WI.LayoutTimelineRecord.displayNameForEventType):
634         * UserInterface/Models/RenderingFrameTimelineRecord.js:
635         (WI.RenderingFrameTimelineRecord.displayNameForTaskType):
636         * UserInterface/Models/Resource.js:
637         (WI.Resource.displayNameForType):
638         * UserInterface/Views/AuditTestGroupContentView.js:
639         (WI.AuditTestGroupContentView.prototype.layout):
640         * UserInterface/Views/CPUTimelineView.js:
641         (WI.CPUTimelineView.displayNameForSampleType):
642         * UserInterface/Views/ContextMenuUtilities.js:
643         * UserInterface/Views/DOMBreakpointTreeElement.js:
644         (WI.DOMBreakpointTreeElement.displayNameForType):
645         * UserInterface/Views/DOMNodeTreeElement.js:
646         (WI.DOMNodeTreeElement.prototype.populateContextMenu):
647         (WI.DOMNodeTreeElement):
648         * UserInterface/Views/DOMTreeElement.js:
649         (WI.DOMTreeElement.prototype._populateTagContextMenu):
650         (WI.DOMTreeElement.prototype._populateNodeContextMenu):
651         * UserInterface/Views/DebuggerSidebarPanel.js:
652         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
653         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown):
654         (WI.DebuggerSidebarPanel):
655         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
656         (WI.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
657         * UserInterface/Views/NetworkTableContentView.js:
658         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
659         (WI.NetworkTableContentView.prototype.initialLayout):
660         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
661         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
662         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown):
663         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
664         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
665         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
666         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
667
668 2019-05-04  Nikita Vasilyev  <nvasilyev@apple.com>
669
670         Web Inspector: Styles: use the same green color for modified properties as in Changes panel
671         https://bugs.webkit.org/show_bug.cgi?id=197538
672
673         Reviewed by Timothy Hatcher.
674
675         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
676         (.changes-panel .css-property-line.added):
677         (.changes-panel .css-property-line.removed):
678         (.changes-panel .css-property-line.added::before):
679         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
680         (.spreadsheet-style-declaration-editor .property.modified):
681         (.spreadsheet-style-declaration-editor .property.modified:not(.selected)):
682         (@media (prefers-color-scheme: dark)):
683         * UserInterface/Views/Variables.css:
684         (:root):
685         (@media (prefers-color-scheme: dark)):
686
687 2019-05-03  Devin Rousso  <drousso@apple.com>
688
689         Web Inspector: DOM: dragging a node to the console should log the node
690         https://bugs.webkit.org/show_bug.cgi?id=197330
691
692         Reviewed by Timothy Hatcher.
693
694         * UserInterface/Views/DOMTreeOutline.js:
695         (WI.DOMTreeOutline.prototype._ondragstart):
696         * UserInterface/Views/LogContentView.js:
697         (WI.LogContentView):
698         (WI.LogContentView.prototype._handleDragOver): Added.
699         (WI.LogContentView.prototype._handleDrop): Added.
700         * UserInterface/Views/QuickConsole.js:
701         (WI.QuickConsole):
702         (WI.QuickConsole.prototype._handleDragOver): Added.
703         (WI.QuickConsole.prototype._handleDrop): Added.
704
705         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
706         Drive-by: update the format to be more unique.
707
708         * Localizations/en.lproj/localizedStrings.js:
709
710 2019-05-03  Devin Rousso  <drousso@apple.com>
711
712         Web Inspector: DOM: rename "low power" to "display composited"
713         https://bugs.webkit.org/show_bug.cgi?id=197296
714
715         Reviewed by Joseph Pecoraro.
716
717         Removed specific ChangeLog entries since it is almost entirely mechanical changes.
718
719         * UserInterface/Protocol/DOMObserver.js:
720         * UserInterface/Controllers/DOMManager.js:
721         * UserInterface/Controllers/TimelineManager.js:
722         * UserInterface/Models/DOMNode.js:
723         * UserInterface/Models/MediaInstrument.js:
724         * UserInterface/Models/MediaTimelineRecord.js:
725         * UserInterface/Models/TimelineRecording.js:
726         * UserInterface/Views/DOMEventsBreakdownView.js:
727         * UserInterface/Views/DOMEventsBreakdownView.css:
728         * UserInterface/Views/NetworkTableContentView.js:
729         * UserInterface/Views/NetworkTableContentView.css:
730         * UserInterface/Views/TimelineIcons.css:
731         * UserInterface/Views/TimelineTabContentView.js:
732         * UserInterface/Images/PowerEfficientPlaybackStateChanged.svg: Added.
733         * UserInterface/Images/LowPower.svg: Removed.
734         * Localizations/en.lproj/localizedStrings.js:
735
736 2019-05-03  Devin Rousso  <drousso@apple.com>
737
738         Web Inspector: Record actions performed on WebGL2RenderingContext
739         https://bugs.webkit.org/show_bug.cgi?id=176008
740         <rdar://problem/34213884>
741
742         Reviewed by Joseph Pecoraro.
743
744         * UserInterface/Models/Recording.js:
745         (WI.Recording.fromPayload):
746         (WI.Recording.displayNameForSwizzleType):
747         (WI.Recording.prototype.async swizzle):
748         (WI.Recording.prototype.createContext):
749
750         * UserInterface/Models/RecordingAction.js:
751         (WI.RecordingAction.constantNameForParameter):
752         (WI.RecordingAction._prototypeForType):
753         (WI.RecordingAction.prototype.async swizzle):
754         Treat all actions with a snapshot as being a "visible" action.
755
756         * UserInterface/Views/CanvasTabContentView.css:
757         (.content-view.tab.canvas .navigation-bar > .item .canvas:matches(.webgl, .webgl2, .webgpu, .webmetal) .icon): Added.
758         (.content-view.tab.canvas .navigation-bar > .item .canvas.webgl): Deleted.
759         * UserInterface/Views/CanvasContentView.js:
760         (WI.CanvasContentView.prototype.initialLayout):
761         * UserInterface/Views/CanvasSidebarPanel.js:
762         (WI.CanvasSidebarPanel.prototype.shown):
763         (WI.CanvasSidebarPanel.prototype._canvasChanged):
764         (WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem):
765
766         * UserInterface/Views/RecordingContentView.js:
767         (WI.RecordingContentView):
768         (WI.RecordingContentView.prototype.get navigationItems):
769         (WI.RecordingContentView.prototype.shown):
770         (WI.RecordingContentView.prototype.initialLayout):
771         * UserInterface/Views/RecordingActionTreeElement.js:
772         (WI.RecordingActionTreeElement._generateDOM.createParameterElement):
773
774 2019-05-02  Nikita Vasilyev  <nvasilyev@apple.com>
775
776         Web Inspector: Dark Mode: borders between section should be lighter than background
777         https://bugs.webkit.org/show_bug.cgi?id=197551
778
779         Reviewed by Joseph Pecoraro.
780
781         * UserInterface/Views/DetailsSection.css:
782         (.details-section .details-section):
783
784 2019-04-29  Alex Christensen  <achristensen@webkit.org>
785
786         <rdar://problem/50299396> Fix internal High Sierra build
787         https://bugs.webkit.org/show_bug.cgi?id=197388
788
789         * Configurations/Base.xcconfig:
790
791 2019-04-26  Jessie Berlin  <jberlin@webkit.org>
792
793         Add new mac target numbers
794         https://bugs.webkit.org/show_bug.cgi?id=197313
795
796         Reviewed by Alex Christensen.
797
798         * Configurations/Version.xcconfig:
799
800 2019-04-25  Alex Christensen  <achristensen@webkit.org>
801
802         Start using C++17
803         https://bugs.webkit.org/show_bug.cgi?id=197131
804
805         Reviewed by Darin Adler.
806
807         * Configurations/Base.xcconfig:
808
809 2019-04-24  Nikita Vasilyev  <nvasilyev@apple.com>
810
811         Web Inspector: Styles: don't start property selection when pressing right mouse button
812         https://bugs.webkit.org/show_bug.cgi?id=197242
813         <rdar://problem/50180380>
814
815         Reviewed by Timothy Hatcher.
816
817         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
818         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
819
820 2019-04-24  Devin Rousso  <drousso@apple.com>
821
822         Web Inspector: Network: importing a HAR with an active detail view shows no content
823         https://bugs.webkit.org/show_bug.cgi?id=197223
824
825         Reviewed by Timothy Hatcher.
826
827         When hiding the detail view, we force a `layout` of the Network table, which causes the
828         cached row count to be set to `0`, which prevents the `reloadDataAddedToEndOnly` from
829         rendering anything since the `WI.Table` thinks it has no rows.
830
831         Given that all of the users of `WI.Table` are backed by an array, we don't need to cache the
832         number of rows since `.length` is an extremely cheap operation. In turn, this guarantees
833         that we are always rendering with an accurate value.
834
835         * UserInterface/Views/Table.js:
836         (WI.Table):
837         (WI.Table.prototype.get numberOfRows):
838         (WI.Table.prototype.reloadData):
839         (WI.Table.prototype._removeRows):
840
841 2019-04-23  Devin Rousso  <drousso@apple.com>
842
843         Web Inspector: REGRESSION(r238168): Network: preserve log doesn't show main frame main resource changes
844         https://bugs.webkit.org/show_bug.cgi?id=197220
845         <rdar://problem/49960464>
846
847         Reviewed by Timothy Hatcher.
848
849         * UserInterface/Views/NetworkTableContentView.js:
850         (WI.NetworkTableContentView.prototype.reset):
851         (WI.NetworkTableContentView.prototype._addCollection):
852         (WI.NetworkTableContentView.prototype._resetCollection): Added.
853         (WI.NetworkTableContentView.prototype._changeCollection):
854         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
855         We want to add the frame's main resource in the case that it's the main frame, but we also
856         want to clear the main collection of data (e.g. if viewing an imported HAR).
857         Drive-by: `_groupByDOMNodeNavigationItem` was renamed in a previous patch.
858
859 2019-04-23  Devin Rousso  <drousso@apple.com>
860
861         Web Inspector: Network: support drag/drop for importing
862         https://bugs.webkit.org/show_bug.cgi?id=197221
863
864         Reviewed by Timothy Hatcher.
865
866         * UserInterface/Views/NetworkTabContentView.js:
867         (WI.NetworkTabContentView.prototype.async.handleFileDrop): Added.
868         * UserInterface/Views/NetworkTableContentView.js:
869         (WI.NetworkTableContentView.prototype.processHAR): Added.
870         (WI.NetworkTableContentView.prototype._importHAR):
871
872         * UserInterface/Base/FileUtilities.js:
873         (WI.FileUtilities.async readText):
874         Only `await` if the result is a `Promise`.
875
876 2019-04-23  Devin Rousso  <drousso@apple.com>
877
878         Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.ownerDocument.frameIdentifier')
879         https://bugs.webkit.org/show_bug.cgi?id=196420
880         <rdar://problem/49444205>
881
882         Reviewed by Timothy Hatcher.
883
884         * UserInterface/Models/DOMNode.js:
885         (WI.DOMNode):
886         (WI.DOMNode.prototype.get frame): Added.
887         (WI.DOMNode.prototype.get frameIdentifier): Deleted.
888         Modify the existing `frameId` to represent the owner frame of the node, rather than the
889         frame it holds (in the case of an `<iframe>`).
890
891         * UserInterface/Controllers/DOMDebuggerManager.js:
892         (WI.DOMDebuggerManager.prototype.domBreakpointsForNode):
893         (WI.DOMDebuggerManager.prototype._detachDOMBreakpoint):
894         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
895         (WI.DOMDebuggerManager.prototype._nodeInserted):
896         (WI.DOMDebuggerManager.prototype._nodeRemoved):
897         * UserInterface/Views/DOMTreeElement.js:
898         (WI.DOMTreeElement.prototype._populateTagContextMenu):
899         (WI.DOMTreeElement.prototype._buildAttributeDOM):
900         * UserInterface/Views/QuickConsole.js:
901         (WI.QuickConsole.prototype._selectExecutionContext):
902         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
903         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._highlightNodesWithSelector):
904
905 2019-04-23  Devin Rousso  <drousso@apple.com>
906
907         Web Inspector: Canvas: no obvious way of switching to the overview when viewing an imported recording
908         https://bugs.webkit.org/show_bug.cgi?id=197178
909         <rdar://problem/50106641>
910
911         Reviewed by Timothy Hatcher.
912
913         Expand the idea of "imported" recordings to include "saved" recordings, ones whose
914         underlying <canvas> was destroyed.
915
916         * UserInterface/Views/CanvasTabContentView.js:
917         (WI.CanvasTabContentView):
918         (WI.CanvasTabContentView.prototype.attached):
919         (WI.CanvasTabContentView.prototype._removeCanvas):
920         (WI.CanvasTabContentView.prototype._addRecording):
921         (WI.CanvasTabContentView.prototype._handleRecordingSavedOrStopped): Added.
922         (WI.CanvasTabContentView.prototype.initialLayout): Deleted.
923         (WI.CanvasTabContentView.prototype._recordingImportedOrStopped): Deleted.
924         Make the "Saved Recordings" folder a child of the "Overview" so that the "Overview" path
925         component is always visible/clickable.
926
927         * UserInterface/Views/CanvasOverviewContentView.js:
928         (WI.CanvasOverviewContentView):
929         (WI.CanvasOverviewContentView.prototype.contentViewAdded):
930         (WI.CanvasOverviewContentView.prototype.attached):
931         (WI.CanvasOverviewContentView.prototype.detached):
932         (WI.CanvasOverviewContentView.prototype._addSavedRecording): Added.
933         (WI.CanvasOverviewContentView.prototype._handleRecordingSaved): Added.
934         (WI.CanvasOverviewContentView.prototype._handleSavedRecordingClicked): Added.
935         * UserInterface/Views/CanvasOverviewContentView.css:
936         (.content-view.canvas-overview .content-view.canvas.saved-recordings): Added.
937         (.content-view.canvas-overview .content-view.canvas.saved-recordings .tree-outline): Added.
938         (.content-view.canvas-overview .content-view.canvas.saved-recordings .tree-outline > .item.recording > .icon): Added.
939         Add a card for "Saved Recordings" that mimics the style of regular canvas cards.
940
941         * UserInterface/Controllers/CanvasManager.js:
942         (WI.CanvasManager):
943         (WI.CanvasManager.prototype.get savedRecordings): Added.
944         (WI.CanvasManager.prototype.async processJSON):
945         (WI.CanvasManager.prototype.disable):
946         (WI.CanvasManager.prototype._removeCanvas):
947         (WI.CanvasManager.prototype.get importedRecordings): Deleted.
948
949         * Localizations/en.lproj/localizedStrings.js:
950
951 2019-04-22  Devin Rousso  <drousso@apple.com>
952
953         Web Inspector: REGRESSION: Sources: auto-continue breakpoint triangle is incorrectly positioned
954         https://bugs.webkit.org/show_bug.cgi?id=197179
955
956         Reviewed by Joseph Pecoraro.
957
958         * UserInterface/Views/BreakpointTreeElement.css:
959         (.item.breakpoint .status): Added.
960         (.item.breakpoint .status > .status-image.auto-continue::after):
961
962 2019-04-19  Devin Rousso  <drousso@apple.com>
963
964         Web Inspector: Timelines: CPU: remove extra border under last section
965         https://bugs.webkit.org/show_bug.cgi?id=197120
966
967         Reviewed by Joseph Pecoraro.
968
969         * UserInterface/Views/CPUTimelineView.css:
970         (.timeline-view.cpu > .content > .overview):
971         (.timeline-view.cpu > .content > .overview:not(:last-child)): Added.
972
973 2019-04-19  Devin Rousso  <drousso@apple.com>
974
975         Web Inspector: Timelines: adjust default Media timeline column widths
976         https://bugs.webkit.org/show_bug.cgi?id=197114
977
978         Reviewed by Joseph Pecoraro.
979
980         * UserInterface/Views/MediaTimelineView.js:
981         (WI.MediaTimelineView):
982
983 2019-04-18  Devin Rousso  <drousso@apple.com>
984
985         Web Inspector: REGRESSION (r244155): pressing down expands folders in trees
986         https://bugs.webkit.org/show_bug.cgi?id=197051
987         <rdar://problem/50006414>
988
989         Reviewed by Timothy Hatcher.
990
991         * UserInterface/Views/TreeOutline.js:
992         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
993         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
994         Skip hidden items when traversing the tree.
995
996         * UserInterface/Views/DOMTreeOutline.js:
997         (WI.DOMTreeOutline.prototype.ondelete):
998         Reveal all items about to be deleted so that the above change won't skip any siblings.
999
1000 2019-04-18  Devin Rousso  <drousso@apple.com>
1001
1002         Web Inspector: Canvas: enable WebGL2 for inspector page
1003         https://bugs.webkit.org/show_bug.cgi?id=196932
1004         <rdar://problem/49916213>
1005
1006         Reviewed by Timothy Hatcher.
1007
1008         * UserInterface/Models/RecordingAction.js:
1009         (WI.RecordingAction._prototypeForType):
1010         (WI.RecordingAction.prototype.process.getContent):
1011         Add additional checks for `ImageBitmapRenderingContext` and `WebGLRenderingContext`.
1012
1013 2019-04-17  Nikita Vasilyev  <nvasilyev@apple.com>
1014
1015         Web Inspector: Navigating to resource sometimes shows different resource
1016         https://bugs.webkit.org/show_bug.cgi?id=195978
1017         <rdar://problem/49043191>
1018
1019         Reviewed by Timothy Hatcher.
1020
1021         * UserInterface/Views/NavigationSidebarPanel.js:
1022         (WI.NavigationSidebarPanel.prototype.cancelRestoringState):
1023         Reset _pendingViewStateCookie so _checkElementsForPendingViewStateCookie could exit early.
1024
1025         * UserInterface/Views/ResourceSidebarPanel.js:
1026         (WI.ResourceSidebarPanel.prototype.initialLayout):
1027         (WI.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange):
1028         (WI.ResourceSidebarPanel.prototype._createMainFrameTreeElement):
1029         Don't try to change content view on initialLayout.
1030
1031 2019-04-17  Joseph Pecoraro  <pecoraro@apple.com>
1032
1033         Web Inspector: CPU Usage Timeline - Include # of Network Requests in the Statistics section
1034         https://bugs.webkit.org/show_bug.cgi?id=197039
1035         <rdar://problem/49996299>
1036
1037         Reviewed by Timothy Hatcher.
1038
1039         * Localizations/en.lproj/localizedStrings.js:
1040         * UserInterface/Views/CPUTimelineView.js:
1041         (WI.CPUTimelineView.prototype.initialLayout):
1042         (WI.CPUTimelineView.prototype._computeStatisticsData):
1043         (WI.CPUTimelineView.prototype._clearStatistics):
1044         Add the number of network requests started in the selected range.
1045
1046 2019-04-17  Timothy Hatcher  <timothy@apple.com>
1047
1048         Rename `supported-color-schemes` to `color-scheme`.
1049         https://bugs.webkit.org/show_bug.cgi?id=197016
1050         rdar://problem/49980259
1051
1052         Reviewed by Simon Fraser.
1053
1054         * UserInterface/Views/Main.css:
1055         (:root):
1056
1057 2019-04-17  Devin Rousso  <drousso@apple.com>
1058
1059         Web Inspector: Canvas: imported recordings aren't processed when the navigation sidebar is collapsed
1060         https://bugs.webkit.org/show_bug.cgi?id=196921
1061         <rdar://problem/49910815>
1062
1063         Reviewed by Timothy Hatcher.
1064
1065         * UserInterface/Views/RecordingContentView.js:
1066         (WI.RecordingContentView.prototype.initialLayout):
1067
1068 2019-04-17  Joseph Pecoraro  <pecoraro@apple.com>
1069
1070         Web Inspector: Extension scripts with parse errors do not show up in Web Inspector
1071         https://bugs.webkit.org/show_bug.cgi?id=196996
1072         <rdar://problem/47054804>
1073
1074         Reviewed by Devin Rousso.
1075
1076         * UserInterface/Controllers/DebuggerManager.js:
1077         (WI.DebuggerManager.prototype.scriptDidFail):
1078         Create a LocalScript that can be linked to but ignore it
1079         if we already have a Resource for the URL.
1080
1081         * UserInterface/Protocol/DebuggerObserver.js:
1082         (WI.DebuggerObserver.prototype.scriptFailedToParse):
1083         Let DebuggerManager potentially create a script for this.
1084
1085         * UserInterface/Models/Script.js:
1086         (WI.Script):
1087         Local scripts provide a null id and id is not required below.
1088
1089 2019-04-16  Joseph Pecoraro  <pecoraro@apple.com>
1090
1091         Web Inspector: Worker imported scripts not showing up in Open Quickly dialog if inspector open after workers exist
1092         https://bugs.webkit.org/show_bug.cgi?id=196986
1093
1094         Reviewed by Devin Rousso.
1095
1096         * UserInterface/Views/OpenResourceDialog.js:
1097         (WI.OpenResourceDialog.prototype._addScriptsForTarget):
1098         We were unnecessary skipping Scripts that do not have a sourceURL but do
1099         have a URL, which ends up being Worker populated scripts.
1100
1101 2019-04-16  Joseph Pecoraro  <pecoraro@apple.com>
1102
1103         REGRESSION(r238168) Web Inspector: <iframe src=...> request does not show up in Network Tab
1104         https://bugs.webkit.org/show_bug.cgi?id=193505
1105         <rdar://problem/47325957>
1106
1107         Reviewed by Devin Rousso.
1108
1109         * UserInterface/Views/NetworkTableContentView.js:
1110         (WI.NetworkTableContentView):
1111         (WI.NetworkTableContentView.prototype._handleFrameWasAdded):
1112         Handle new frames by adding the frame's main resource.
1113
1114 2019-04-16  Devin Rousso  <drousso@apple.com>
1115
1116         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.selectionPathComponents')
1117         https://bugs.webkit.org/show_bug.cgi?id=196936
1118         <rdar://problem/49917789>
1119
1120         Reviewed by Joseph Pecoraro.
1121
1122         * UserInterface/Views/HeapAllocationsTimelineView.js:
1123         (WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
1124         (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
1125         (WI.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
1126         Drive-by: when selecting a record, force it to be visible before selecting it, as otherwise
1127         the selection events won't be fired.
1128
1129         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
1130         (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
1131         Drive-by: ensure that clicking on a [S] heap snapshot record icon actually selects the record.
1132
1133 2019-04-16  Devin Rousso  <drousso@apple.com>
1134
1135         Unprefix -webkit-sticky
1136         https://bugs.webkit.org/show_bug.cgi?id=196962
1137         <rdar://problem/40903458>
1138
1139         Reviewed by Simon Fraser.
1140
1141         Replace all `-webkit-sticky` with `sticky`.
1142
1143         * UserInterface/Models/CSSKeywordCompletions.js:
1144         * UserInterface/Views/AuditTestCaseContentView.css:
1145         (.content-view-container > .content-view.audit-test-case > header):
1146         * UserInterface/Views/AuditTestGroupContentView.css:
1147         (.content-view.audit-test-group.contains-test-case > header):
1148         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
1149         (.changes-panel .resource-section > .header):
1150         * UserInterface/Views/DetailsSection.css:
1151         (.details-section > .header):
1152         * UserInterface/Views/NetworkDetailView.css:
1153         (.network-detail .navigation-bar):
1154         * UserInterface/Views/SettingsTabContentView.css:
1155         (.content-view.settings .navigation-bar):
1156         * UserInterface/Views/Table.css:
1157         (.table > .header):
1158
1159 2019-04-16  Devin Rousso  <drousso@apple.com>
1160
1161         Web Inspector: remove unused WI.DOMTreeDataGrid
1162         https://bugs.webkit.org/show_bug.cgi?id=196958
1163         <rdar://problem/49931383>
1164
1165         Reviewed by Joseph Pecoraro.
1166
1167         * UserInterface/Views/DOMTreeDataGrid.css: Removed.
1168         * UserInterface/Views/DOMTreeDataGrid.js: Removed.
1169         * UserInterface/Views/DOMTreeDataGridNode.js: Removed.
1170         * UserInterface/Main.html:
1171
1172 2019-04-16  Devin Rousso  <drousso@apple.com>
1173
1174         Web Inspector: Storage: values truncated in Local/Session table
1175         https://bugs.webkit.org/show_bug.cgi?id=178318
1176         <rdar://problem/34998581>
1177
1178         Reviewed by Joseph Pecoraro.
1179
1180         * UserInterface/Views/DataGrid.js:
1181         (WI.DataGrid):
1182         (WI.DataGrid.prototype._copyTextForDataGridNode):
1183         * UserInterface/Views/TimelineDataGrid.js:
1184         (WI.TimelineDataGrid):
1185         Refactor `WI.DataGrid` constructor to allow for more optional arguments.
1186         Introduce a new optional argument `copyCallback` that can be used to override the text that
1187         would be copied for any `WI.DataGridNode` in any column.
1188
1189         * UserInterface/Views/DOMStorageContentView.js:
1190         (WI.DOMStorageContentView):
1191         (WI.DOMStorageContentView.prototype.itemAdded):
1192         (WI.DOMStorageContentView.prototype.itemUpdated):
1193         (WI.DOMStorageContentView.prototype._populate):
1194         (WI.DOMStorageContentView.prototype._dataGridCopy): Added.
1195         Save the full non-truncated value as part of the `WI.DataGridNode`'s `data`. When copying,
1196         use the full non-truncated value instead of what was shown in the DOM.
1197
1198 2019-04-15  Joseph Pecoraro  <pecoraro@apple.com>
1199
1200         Web Inspector: DOM Nodes should not show $0 when selected in Console area
1201         https://bugs.webkit.org/show_bug.cgi?id=196953
1202
1203         Reviewed by Devin Rousso.
1204
1205         * UserInterface/Views/DOMTreeContentView.js:
1206         (WI.DOMTreeContentView):
1207         Enable showing the last selected element.
1208
1209         * UserInterface/Views/DOMTreeOutline.js:
1210         Make parameters explicit. Drop "selectable" which was always true.
1211         And add a new option for adding a class name.
1212
1213         * UserInterface/Views/DOMTreeOutline.css:
1214         (.tree-outline.dom.show-last-selected li.last-selected > span::after):
1215         (.tree-outline.dom.show-last-selected:focus li.last-selected > span::after):
1216         Only show the "= $0" for a DOM tree that has enabled showing the last selected element.
1217
1218         * UserInterface/Views/FormattedValue.css:
1219         (.formatted-node > .tree-outline.dom li.selected .selection-area):
1220         Don't show the selection-area for a console formatted node.
1221
1222 2019-04-15  Devin Rousso  <drousso@apple.com>
1223
1224         Web Inspector: update sheet rect whenever inspector window size changes
1225         https://bugs.webkit.org/show_bug.cgi?id=196942
1226         <rdar://problem/49920241>
1227
1228         Reviewed by Joseph Pecoraro.
1229
1230         * UserInterface/Base/Main.js:
1231         (WI.contentLoaded):
1232         (WI._windowResized):
1233         (WI._updateSheetRect): Added.
1234
1235 2019-04-15  Nikita Vasilyev  <nvasilyev@apple.com>
1236
1237         Unreviewed, fix typo in a comment.
1238
1239         * UserInterface/Views/SearchSidebarPanel.js:
1240         (WI.SearchSidebarPanel.prototype.performSearch):
1241
1242 2019-04-15  Devin Rousso  <drousso@apple.com>
1243
1244         Web Inspector: Heap: don't use recursion when calculating root paths
1245         https://bugs.webkit.org/show_bug.cgi?id=196890
1246         <rdar://problem/49870751>
1247
1248         Reviewed by Joseph Pecoraro.
1249
1250         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1251         (HeapSnapshot.prototype.shortestGCRootPath):
1252         (HeapSnapshot.prototype._determineGCRootPaths):
1253         (HeapSnapshot.prototype._gcRootPathes.visitNode): Deleted.
1254         (HeapSnapshot.prototype._gcRootPathes): Deleted.
1255
1256 2019-04-15  Joseph Pecoraro  <pecoraro@apple.com>
1257
1258         Web Inspector: SameSite parsing should be stricter
1259         https://bugs.webkit.org/show_bug.cgi?id=196927
1260         <rdar://problem/42291601>
1261
1262         Reviewed by Devin Rousso.
1263
1264         * UserInterface/Models/Cookie.js:
1265         (WI.Cookie.parseSameSiteAttributeValue):
1266
1267 2019-04-15  Joseph Pecoraro  <pecoraro@apple.com>
1268
1269         Web Inspector: CPU Usage Timeline - Energy impact popover flickers
1270         https://bugs.webkit.org/show_bug.cgi?id=196931
1271         <rdar://problem/49569122>
1272
1273         Reviewed by Devin Rousso.
1274
1275         * UserInterface/Views/CPUTimelineView.js:
1276         (WI.CPUTimelineView.prototype.initialLayout):
1277
1278 2019-04-15  Devin Rousso  <drousso@apple.com>
1279
1280         Web Inspector: REGRESSION(r244268): Canvas: navigation sidebar no longer appears
1281         https://bugs.webkit.org/show_bug.cgi?id=196920
1282         <rdar://problem/49910618>
1283
1284         Reviewed by Timothy Hatcher.
1285
1286         * UserInterface/Views/ContentBrowserTabContentView.js:
1287         (WI.ContentBrowserTabContentView.prototype.showNavigationSidebarPanel):
1288         Now that we no longer call `addSubview` when adding a sidebar panel, we can't check to see
1289         if `parentSidebar` has been set, as that is just an alias for `parentView`.
1290
1291 2019-04-15  Devin Rousso  <drousso@apple.com>
1292
1293         Web Inspector: DOMDebugger: move breakpoint storage to use `WI.ObjectStore`
1294         https://bugs.webkit.org/show_bug.cgi?id=196231
1295         <rdar://problem/49236864>
1296
1297         Reviewed by Joseph Pecoraro.
1298
1299         * UserInterface/Controllers/DOMDebuggerManager.js:
1300         (WI.DOMDebuggerManager):
1301         (WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
1302         (WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
1303         (WI.DOMDebuggerManager.prototype.removeDOMBreakpointsForNode):
1304         (WI.DOMDebuggerManager.prototype.addEventBreakpoint):
1305         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
1306         (WI.DOMDebuggerManager.prototype.addURLBreakpoint):
1307         (WI.DOMDebuggerManager.prototype.removeURLBreakpoint):
1308         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
1309         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
1310         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
1311         (WI.DOMDebuggerManager.prototype._saveDOMBreakpoints): Deleted.
1312         (WI.DOMDebuggerManager.prototype._saveEventBreakpoints): Deleted.
1313         (WI.DOMDebuggerManager.prototype._saveURLBreakpoints): Deleted.
1314
1315         * UserInterface/Models/DOMBreakpoint.js:
1316         (WI.DOMBreakpoint.prototype.saveIdentityToCookie):
1317         (WI.DOMBreakpoint.prototype.toJSON): Added.
1318         (WI.DOMBreakpoint.prototype.get serializableInfo): Deleted.
1319         * UserInterface/Models/EventBreakpoint.js:
1320         (WI.EventBreakpoint.prototype.saveIdentityToCookie):
1321         (WI.EventBreakpoint.prototype.toJSON): Added.
1322         (WI.EventBreakpoint.prototype.get serializableInfo): Deleted.
1323         * UserInterface/Models/URLBreakpoint.js:
1324         (WI.URLBreakpoint.prototype.saveIdentityToCookie):
1325         (WI.URLBreakpoint.prototype.toJSON): Added.
1326         (WI.URLBreakpoint.prototype.get serializableInfo): Deleted.
1327         Replace `get serializableInfo` with `toJSON` as required by `WI.ObjectStore`.
1328
1329         * UserInterface/Base/ObjectStore.js:
1330         (WI.ObjectStore._open):
1331         Increment version.
1332
1333 2019-04-15  Devin Rousso  <drousso@apple.com>
1334
1335         Web Inspector: drag/drop over the sidebar should load an imported file in Canvas/Audit tab
1336         https://bugs.webkit.org/show_bug.cgi?id=196873
1337         <rdar://problem/49858190>
1338
1339         Reviewed by Timothy Hatcher.
1340
1341         * UserInterface/Base/Main.js:
1342         (WI.contentLoaded):
1343         (WI._handleDragOver): Added.
1344         (WI._handleDrop): Added.
1345         (WI._dragOver): Deleted.
1346         * UserInterface/Views/AuditTabContentView.js:
1347         (WI.AuditTabContentView):
1348         (WI.AuditTabContentView.prototype.async handleFileDrop): Added.
1349         (WI.AuditTabContentView.prototype._handleDragOver): Deleted.
1350         (WI.AuditTabContentView.prototype._handleDrop): Deleted.
1351         * UserInterface/Views/CanvasTabContentView.js:
1352         (WI.CanvasTabContentView):
1353         (WI.CanvasTabContentView.prototype.async handleFileDrop): Added.
1354         (WI.CanvasTabContentView.prototype._handleDragOver): Deleted.
1355         (WI.CanvasTabContentView.prototype._handleDrop): Deleted.
1356         * UserInterface/Views/TimelineTabContentView.js:
1357         (WI.TimelineTabContentView.prototype.async handleFileDrop): Added.
1358         Check whether the current tab is able to handle a file drop, and if so, don't prevent the
1359         drag from occuring. This now allows the user to drop anywhere on the Web Inspector area to
1360         import files, so long as the relevant tab is currently selected.
1361
1362         * UserInterface/Controllers/CanvasManager.js:
1363         (WI.CanvasManager.prototype.async processJSON): Added.
1364         (WI.CanvasManager.prototype.processJSON): Deleted.
1365         * UserInterface/Controllers/TimelineManager.js:
1366         (WI.TimelineManager.prototype.async processJSON): Added.
1367         (WI.TimelineManager.prototype.processJSON): Deleted.
1368         Make `async` to match other `processJSON` functions.
1369
1370 2019-04-15  Devin Rousso  <drousso@apple.com>
1371
1372         Web Inspector: Heap: logging an object from a snapshot shouldn't use the "special" style if the object is reachable
1373         https://bugs.webkit.org/show_bug.cgi?id=196889
1374         <rdar://problem/49870693>
1375
1376         Reviewed by Joseph Pecoraro.
1377
1378         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1379         (WI.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
1380
1381 2019-04-15  Devin Rousso  <drousso@apple.com>
1382
1383         Web Inspector: Debugger: deleting a special breakpoint should disable it
1384         https://bugs.webkit.org/show_bug.cgi?id=196737
1385         <rdar://problem/49740680>
1386
1387         Reviewed by Timothy Hatcher.
1388
1389         * UserInterface/Views/BreakpointTreeElement.js:
1390         (WI.BreakpointTreeElement.prototype.ondelete):
1391
1392 2019-04-15  Devin Rousso  <drousso@apple.com>
1393
1394         Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.selectedTreeElement.reveal')
1395         https://bugs.webkit.org/show_bug.cgi?id=196804
1396         <rdar://problem/49800708>
1397
1398         Reviewed by Timothy Hatcher.
1399
1400         * UserInterface/Views/DOMTreeOutline.js:
1401         (WI.DOMTreeOutline.prototype.update):
1402
1403 2019-04-15  Devin Rousso  <drousso@apple.com>
1404
1405         Web Inspector: Uncaught Exception: Can't find variable: WebGL2RenderingContext
1406         https://bugs.webkit.org/show_bug.cgi?id=196874
1407         <rdar://problem/49858912>
1408
1409         Reviewed by Timothy Hatcher.
1410
1411         * UserInterface/Models/Recording.js:
1412         (WI.Recording.prototype.createContext):
1413
1414         * UserInterface/Models/RecordingAction.js:
1415         (WI.RecordingAction.prototype.process.getContent):
1416
1417 2019-04-15  Devin Rousso  <drousso@apple.com>
1418
1419         Web Inspector: sidebar panels shouldn't be added as subviews unless visible
1420         https://bugs.webkit.org/show_bug.cgi?id=196888
1421         <rdar://problem/49870659>
1422
1423         Reviewed by Timothy Hatcher.
1424
1425         * UserInterface/Views/Sidebar.js:
1426         (WI.Sidebar.prototype.insertSidebarPanel):
1427         (WI.Sidebar.prototype.removeSidebarPanel):
1428         (WI.Sidebar.prototype.set selectedSidebarPanel):
1429
1430 2019-04-15  Devin Rousso  <drousso@apple.com>
1431
1432         Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
1433         https://bugs.webkit.org/show_bug.cgi?id=196887
1434         <rdar://problem/49870627>
1435
1436         Reviewed by Timothy Hatcher.
1437
1438         * UserInterface/Models/DOMNode.js:
1439         (WI.DOMNode.prototype.getEventListeners):
1440
1441 2019-04-15  Devin Rousso  <drousso@apple.com>
1442
1443         Web Inspector: replace all uses of `this` with `WI` in Main.js/Test.js
1444         https://bugs.webkit.org/show_bug.cgi?id=196795
1445         <rdar://problem/49796618>
1446
1447         Reviewed by Timothy Hatcher.
1448
1449         * UserInterface/Base/Main.js:
1450         * UserInterface/Test/Test.js:
1451
1452 2019-04-15  Devin Rousso  <drousso@apple.com>
1453
1454         Web Inspector: REGRESSION: Heap: snapshots taken manually don't appear in the list
1455         https://bugs.webkit.org/show_bug.cgi?id=196900
1456         <rdar://problem/49880278>
1457
1458         Reviewed by Timothy Hatcher.
1459
1460         * UserInterface/Views/HeapAllocationsTimelineView.js:
1461         (WI.HeapAllocationsTimelineView):
1462         (WI.HeapAllocationsTimelineView.prototype.layout):
1463         (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
1464         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
1465         Drive-by: only show heap snapshots for the selected range.
1466
1467         * UserInterface/Views/TimelineView.js:
1468         * UserInterface/Views/TimelineRecordingContentView.js:
1469         (WI.TimelineRecordingContentView):
1470         (WI.TimelineRecordingContentView.prototype._handleTimelineViewNeedsEntireSelectedRange): Added.
1471         Drive-by: taking (or importing) a heap snapshot should select the entire range so that the
1472         new record will appear in the list of heap snapshots.
1473
1474 2019-04-15  Devin Rousso  <drousso@apple.com>
1475
1476         Web Inspector: REGRESSION (r244157): Timelines: ruler size appears wrong on first layout
1477         https://bugs.webkit.org/show_bug.cgi?id=196901
1478         <rdar://problem/49880539>
1479
1480         Reviewed by Timothy Hatcher.
1481
1482         * UserInterface/Views/View.js:
1483         (WI.View.prototype._layoutSubtree):
1484         Ensure that the forced override of the layout reason during the initial layout doesn't
1485         affect subviews.
1486
1487         * UserInterface/Views/ConsoleDrawer.js:
1488         (WI.ConsoleDrawer.prototype.sizeDidChange): Added.
1489         (WI.ConsoleDrawer.prototype.layout): Deleted.
1490         * UserInterface/Views/ConsolePrompt.js:
1491         (WI.ConsolePrompt.prototype.sizeDidChange): Added.
1492         (WI.ConsolePrompt.prototype.layout): Deleted.
1493         * UserInterface/Views/DOMTreeContentView.js:
1494         (WI.DOMTreeContentView.prototype.sizeDidChange): Added.
1495         (WI.DOMTreeContentView.prototype.layout):
1496         * UserInterface/Views/NavigationBar.js:
1497         (WI.NavigationBar.prototype.sizeDidChange): Added.
1498         (WI.NavigationBar.prototype.layout):
1499         (WI.NavigationBar.prototype._updateContent): Added.
1500         (WI.NavigationBar.prototype._updateContent.forceItemHidden): Added.
1501         (WI.NavigationBar.prototype._updateContent.isDivider): Added.
1502         (WI.NavigationBar.prototype._updateContent.calculateVisibleItemWidth): Added.
1503         (WI.NavigationBar.prototype.layout.forceItemHidden): Deleted.
1504         (WI.NavigationBar.prototype.layout.isDivider): Deleted.
1505         (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth): Deleted.
1506         * UserInterface/Views/TabBrowser.js:
1507         (WI.TabBrowser.prototype.sizeDidChange): Added.
1508         (WI.TabBrowser.prototype.layout): Deleted.
1509         Move logic in `layout` to `sizeDidChange` where applicable.
1510
1511 2019-04-11  Devin Rousso  <drousso@apple.com>
1512
1513         Web Inspector: REGRESSION(r244195): Timelines: unable to take heap snapshot
1514         https://bugs.webkit.org/show_bug.cgi?id=196832
1515         <rdar://problem/49828862>
1516
1517         Reviewed by Simon Fraser.
1518
1519         * UserInterface/Controllers/TimelineManager.js:
1520         (WI.TimelineManager.prototype.heapSnapshotAdded):
1521         (WI.TimelineManager.prototype._addRecord):
1522         Heap snapshots can be taken outside of a timeline recording, so remove the early return (and
1523         assertion) that checks for an active recording before adding the heap snapshot record.
1524
1525 2019-04-11  Devin Rousso  <drousso@apple.com>
1526
1527         Web Inspector: Timelines: can't reliably stop/start a recording
1528         https://bugs.webkit.org/show_bug.cgi?id=196778
1529         <rdar://problem/47606798>
1530
1531         Reviewed by Timothy Hatcher.
1532
1533         Rather than have a binary state of capturing/not-capturing, we should use a four state:
1534          1. inactive (when the backend has stopped capturing)
1535          2. starting (when the frontend requests capturing to start)
1536          3. active (when the backend has started capturing)
1537          4. stopping (when the frontend requests capturing to stop)
1538
1539         Capturing is considered "on" when not in an "inactive" state. Prevent the frontend from
1540         starting/stopping capturing unless we're in a "stable" ("inactive" or "active") state, not a
1541         "transition" ("starting" or "stopping") state.
1542
1543         One "side effect" of this change is that since the capturing is considered active until the
1544         backend has stopped capturing, we will continue to process records in the frontend even if
1545         the frontend has requested to stop capturing. <https://webkit.org/b/152904>
1546
1547         * UserInterface/Controllers/TimelineManager.js:
1548         (WI.TimelineManager):
1549         (WI.TimelineManager.prototype.get capturingState): Added.
1550         (WI.TimelineManager.prototype.reset):
1551         (WI.TimelineManager.prototype.get activeRecording):
1552         (WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
1553         (WI.TimelineManager.prototype.isCapturing):
1554         (WI.TimelineManager.prototype.startCapturing):
1555         (WI.TimelineManager.prototype.stopCapturing):
1556         (WI.TimelineManager.prototype.processJSON):
1557         (WI.TimelineManager.prototype.capturingStarted):
1558         (WI.TimelineManager.prototype.capturingStopped):
1559         (WI.TimelineManager.prototype.autoCaptureStarted):
1560         (WI.TimelineManager.prototype.eventRecorded):
1561         (WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
1562         (WI.TimelineManager.prototype.pageLoadEventFired):
1563         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
1564         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
1565         (WI.TimelineManager.prototype.memoryTrackingUpdated):
1566         (WI.TimelineManager.prototype.memoryTrackingCompleted):
1567         (WI.TimelineManager.prototype.heapTrackingStarted):
1568         (WI.TimelineManager.prototype.heapTrackingCompleted):
1569         (WI.TimelineManager.prototype.heapSnapshotAdded):
1570         (WI.TimelineManager.prototype._updateCapturingState): Added.
1571         (WI.TimelineManager.prototype._processRecord):
1572         (WI.TimelineManager.prototype._processEvent):
1573         (WI.TimelineManager.prototype._loadNewRecording):
1574         (WI.TimelineManager.prototype._addRecord):
1575         (WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
1576         (WI.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
1577         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
1578         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
1579         (WI.TimelineManager.prototype._resourceWasAdded):
1580         (WI.TimelineManager.prototype._garbageCollected):
1581         (WI.TimelineManager.prototype._memoryPressure):
1582         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
1583         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
1584         (WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
1585         (WI.TimelineManager.prototype._handleDOMNodeLowPowerChanged):
1586         (WI.TimelineManager.prototype.unloadRecording): Deleted.
1587         (WI.TimelineManager.prototype.programmaticCaptureStarted): Deleted.
1588         (WI.TimelineManager.prototype.programmaticCaptureStopped): Deleted.
1589         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted): Deleted.
1590         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped): Deleted.
1591
1592         * UserInterface/Protocol/ScriptProfilerObserver.js:
1593         (WI.ScriptProfilerObserver.prototype.trackingComplete):
1594         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
1595         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
1596         * UserInterface/Protocol/TimelineObserver.js:
1597         (WI.TimelineObserver.prototype.programmaticCaptureStarted):
1598         (WI.TimelineObserver.prototype.programmaticCaptureStopped):
1599         It is possible to determine when programmatic capturing starts/stops in the frontend based
1600         on the state when the backend causes the state to change, such as if the state is "inactive"
1601         when the frontend is told that the backend has started capturing.
1602
1603         * UserInterface/Protocol/CPUProfilerObserver.js:
1604         (WI.CPUProfilerObserver.prototype.trackingComplete):
1605         * UserInterface/Protocol/MemoryObserver.js:
1606         (WI.MemoryObserver.prototype.trackingComplete):
1607         Send an end timestamp to match other instruments.
1608
1609         * UserInterface/Controllers/DebuggerManager.js:
1610         (WI.DebuggerManager):
1611         (WI.DebuggerManager.prototype._handleTimelineCapturingStateChanged): Added.
1612         (WI.DebuggerManager.prototype._timelineCapturingWillStart): Deleted.
1613         (WI.DebuggerManager.prototype._timelineCapturingStopped): Deleted.
1614         * UserInterface/Models/DefaultDashboard.js:
1615         (WI.DefaultDashboard):
1616         (WI.DefaultDashboard.prototype._handleTimelineCapturingStateChanged): Added.
1617         (WI.DefaultDashboard.prototype._capturingStopped): Deleted.
1618         * UserInterface/Views/DebuggerSidebarPanel.js:
1619         (WI.DebuggerSidebarPanel):
1620         (WI.DebuggerSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
1621         (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart): Deleted.
1622         (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped): Deleted.
1623         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1624         (WI.SourcesNavigationSidebarPanel):
1625         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
1626         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart): Deleted.
1627         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped): Deleted.
1628         * UserInterface/Views/TimelineOverview.js:
1629         (WI.TimelineOverview):
1630         (WI.TimelineOverview.prototype._handleTimelineCapturingStateChanged): Added.
1631         (WI.TimelineOverview.prototype._capturingStarted): Deleted.
1632         (WI.TimelineOverview.prototype._capturingStopped): Deleted.
1633         * UserInterface/Views/TimelineRecordingContentView.js:
1634         (WI.TimelineRecordingContentView):
1635         (WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged): Added.
1636         (WI.TimelineRecordingContentView.prototype._recordingUnloaded):
1637         (WI.TimelineRecordingContentView.prototype._capturingStarted): Deleted.
1638         (WI.TimelineRecordingContentView.prototype._capturingStopped): Deleted.
1639         * UserInterface/Views/TimelineTabContentView.js:
1640         (WI.TimelineTabContentView):
1641         (WI.TimelineTabContentView.prototype._handleTimelineCapturingStateChanged): Added.
1642         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped): Deleted.
1643         Use the new single event for all Timelines capture state changes.
1644         Prevent the record button from being clicked when capturing is in a transition state.
1645
1646 2019-04-11  Truitt Savell  <tsavell@apple.com>
1647
1648         Unreviewed, rolling out r244158.
1649
1650         Casued 8 inspector/timeline/ test failures.
1651
1652         Reverted changeset:
1653
1654         "Web Inspector: Timelines: can't reliably stop/start a
1655         recording"
1656         https://bugs.webkit.org/show_bug.cgi?id=196778
1657         https://trac.webkit.org/changeset/244158
1658
1659 2019-04-10  Devin Rousso  <drousso@apple.com>
1660
1661         Web Inspector: save sheet should be anchored underneath the tab bar when detached
1662         https://bugs.webkit.org/show_bug.cgi?id=196722
1663         <rdar://problem/49613280>
1664
1665         Reviewed by Timothy Hatcher.
1666
1667         * UserInterface/Base/Main.js:
1668         (WI.contentLoaded):
1669
1670 2019-04-10  Devin Rousso  <drousso@apple.com>
1671
1672         Web Inspector: Timelines: can't reliably stop/start a recording
1673         https://bugs.webkit.org/show_bug.cgi?id=196778
1674         <rdar://problem/47606798>
1675
1676         Reviewed by Timothy Hatcher.
1677
1678         Rather than have a binary state of capturing/not-capturing, we should use a four state:
1679          1. inactive (when the backend has stopped capturing)
1680          2. starting (when the frontend requests capturing to start)
1681          3. active (when the backend has started capturing)
1682          4. stopping (when the frontend requests capturing to stop)
1683
1684         Capturing is considered "on" when not in an "inactive" state. Prevent the frontend from
1685         starting/stopping capturing unless we're in a "stable" ("inactive" or "active") state, not a
1686         "transition" ("starting" or "stopping") state.
1687
1688         One "side effect" of this change is that since the capturing is considered active until the
1689         backend has stopped capturing, we will continue to process records in the frontend even if
1690         the frontend has requested to stop capturing. <https://webkit.org/b/152904>
1691
1692         * UserInterface/Controllers/TimelineManager.js:
1693         (WI.TimelineManager):
1694         (WI.TimelineManager.prototype.get capturingState): Added.
1695         (WI.TimelineManager.prototype.reset):
1696         (WI.TimelineManager.prototype.get activeRecording):
1697         (WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
1698         (WI.TimelineManager.prototype.isCapturing):
1699         (WI.TimelineManager.prototype.startCapturing):
1700         (WI.TimelineManager.prototype.stopCapturing):
1701         (WI.TimelineManager.prototype.processJSON):
1702         (WI.TimelineManager.prototype.capturingStarted):
1703         (WI.TimelineManager.prototype.capturingStopped):
1704         (WI.TimelineManager.prototype.autoCaptureStarted):
1705         (WI.TimelineManager.prototype.eventRecorded):
1706         (WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
1707         (WI.TimelineManager.prototype.pageLoadEventFired):
1708         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
1709         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
1710         (WI.TimelineManager.prototype.memoryTrackingUpdated):
1711         (WI.TimelineManager.prototype.memoryTrackingCompleted):
1712         (WI.TimelineManager.prototype.heapTrackingStarted):
1713         (WI.TimelineManager.prototype.heapTrackingCompleted):
1714         (WI.TimelineManager.prototype.heapSnapshotAdded):
1715         (WI.TimelineManager.prototype._updateCapturingState): Added.
1716         (WI.TimelineManager.prototype._processRecord):
1717         (WI.TimelineManager.prototype._processEvent):
1718         (WI.TimelineManager.prototype._loadNewRecording):
1719         (WI.TimelineManager.prototype._addRecord):
1720         (WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
1721         (WI.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
1722         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
1723         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
1724         (WI.TimelineManager.prototype._mainResourceDidChange):
1725         (WI.TimelineManager.prototype._resourceWasAdded):
1726         (WI.TimelineManager.prototype._garbageCollected):
1727         (WI.TimelineManager.prototype._memoryPressure):
1728         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
1729         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
1730         (WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
1731         (WI.TimelineManager.prototype._handleDOMNodeLowPowerChanged):
1732         (WI.TimelineManager.prototype.unloadRecording): Deleted.
1733         (WI.TimelineManager.prototype.programmaticCaptureStarted): Deleted.
1734         (WI.TimelineManager.prototype.programmaticCaptureStopped): Deleted.
1735         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted): Deleted.
1736         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped): Deleted.
1737
1738         * UserInterface/Protocol/ScriptProfilerObserver.js:
1739         (WI.ScriptProfilerObserver.prototype.trackingComplete):
1740         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
1741         (WI.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
1742         * UserInterface/Protocol/TimelineObserver.js:
1743         (WI.TimelineObserver.prototype.programmaticCaptureStarted):
1744         (WI.TimelineObserver.prototype.programmaticCaptureStopped):
1745         It is possible to determine when programmatic capturing starts/stops in the frontend based
1746         on the state when the backend causes the state to change, such as if the state is "inactive"
1747         when the frontend is told that the backend has started capturing.
1748
1749         * UserInterface/Protocol/CPUProfilerObserver.js:
1750         (WI.CPUProfilerObserver.prototype.trackingComplete):
1751         * UserInterface/Protocol/MemoryObserver.js:
1752         (WI.MemoryObserver.prototype.trackingComplete):
1753         Send an end timestamp to match other instruments.
1754
1755         * UserInterface/Controllers/DebuggerManager.js:
1756         (WI.DebuggerManager):
1757         (WI.DebuggerManager.prototype._handleTimelineCapturingStateChanged): Added.
1758         (WI.DebuggerManager.prototype._timelineCapturingWillStart): Deleted.
1759         (WI.DebuggerManager.prototype._timelineCapturingStopped): Deleted.
1760         * UserInterface/Models/DefaultDashboard.js:
1761         (WI.DefaultDashboard):
1762         (WI.DefaultDashboard.prototype._handleTimelineCapturingStateChanged): Added.
1763         (WI.DefaultDashboard.prototype._capturingStopped): Deleted.
1764         * UserInterface/Views/DebuggerSidebarPanel.js:
1765         (WI.DebuggerSidebarPanel):
1766         (WI.DebuggerSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
1767         (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart): Deleted.
1768         (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped): Deleted.
1769         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1770         (WI.SourcesNavigationSidebarPanel):
1771         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStateChanged): Added.
1772         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart): Deleted.
1773         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped): Deleted.
1774         * UserInterface/Views/TimelineOverview.js:
1775         (WI.TimelineOverview):
1776         (WI.TimelineOverview.prototype._handleTimelineCapturingStateChanged): Added.
1777         (WI.TimelineOverview.prototype._capturingStarted): Deleted.
1778         (WI.TimelineOverview.prototype._capturingStopped): Deleted.
1779         * UserInterface/Views/TimelineRecordingContentView.js:
1780         (WI.TimelineRecordingContentView):
1781         (WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged): Added.
1782         (WI.TimelineRecordingContentView.prototype._recordingUnloaded):
1783         (WI.TimelineRecordingContentView.prototype._capturingStarted): Deleted.
1784         (WI.TimelineRecordingContentView.prototype._capturingStopped): Deleted.
1785         * UserInterface/Views/TimelineTabContentView.js:
1786         (WI.TimelineTabContentView):
1787         (WI.TimelineTabContentView.prototype._handleTimelineCapturingStateChanged): Added.
1788         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped): Deleted.
1789         Use the new single event for all Timelines capture state changes.
1790         Prevent the record button from being clicked when capturing is in a transition state.
1791
1792 2019-04-10  Devin Rousso  <drousso@apple.com>
1793
1794         Web Inspector: REGRESSION: Audit: result UI shown on first open if an audit was previously selected
1795         https://bugs.webkit.org/show_bug.cgi?id=196723
1796         <rdar://problem/49722252>
1797
1798         Reviewed by Timothy Hatcher.
1799
1800         When opening Web Inspector for the first time, we will trigger resize `layout`s on the main
1801         content area as Web Inspector is resized to it's old window size.
1802
1803         Rather than treating this layout as a `View.LayoutReason.Resize`, we should treat the
1804         first `layout` (e.g. `initialLayout`) as a `View.LayoutReason.Dirty` instead, as there was
1805         previously no content.
1806
1807         * UserInterface/Views/View.js:
1808         (WI.View.prototype._layoutSubtree):
1809         (WI.View.prototype._setLayoutReason):
1810
1811         * UserInterface/Views/AuditTestContentView.js:
1812         (WI.AuditTestContentView):
1813         Drive-by: ensure that this class is not instantiated directly.
1814
1815 2019-04-10  Devin Rousso  <drousso@apple.com>
1816
1817         Web Inspector: Debugger: current call frame indicator is indented when there is more than one thread
1818         https://bugs.webkit.org/show_bug.cgi?id=196580
1819         <rdar://problem/49582138>
1820
1821         Reviewed by Timothy Hatcher.
1822
1823         * UserInterface/Views/CallFrameTreeElement.css:
1824         (.tree-outline .item.call-frame .status):
1825         (.tree-outline.single-thread .item.call-frame .status): Added.
1826
1827 2019-04-10  Devin Rousso  <drousso@apple.com>
1828
1829         Web Inspector: REGRESSION (r238602): Elements: deleting the last child of a collapsed parent selects the parent's next sibling
1830         https://bugs.webkit.org/show_bug.cgi?id=192711
1831         <rdar://problem/46738990>
1832
1833         Reviewed by Timothy Hatcher.
1834
1835         Original patch by Matt Baker <mattbaker@apple.com>.
1836
1837         * UserInterface/Controllers/SelectionController.js:
1838         (WI.SelectionController.prototype.removeSelectedItems):
1839         When looking for a new item to select, start with the item preceding the
1840         selection, instead of the item following the selection. This matches
1841         pre-multiple selection behavior, as well as Mail and Xcode.
1842
1843         * UserInterface/Views/DOMTreeElement.js:
1844         (WI.DOMTreeElement.prototype.onexpand):
1845         Drive-by fix: when a hidden node is selected, its selection area is drawn
1846         with a height of 0px. Update the selection area once the hidden node's
1847         parent is expanded. AFAIK, this has always been broken.
1848
1849         * UserInterface/Views/DOMTreeOutline.js:
1850         (WI.DOMTreeOutline.prototype.ondelete):
1851         After a delete the `SelectionController` may have chosen a child of a
1852         collapsed parent as the new selected item. If the item isn't the closing tag (e.g. after
1853         deleting the last child), reveal it.
1854
1855         (WI.DOMTreeOutline.prototype.selectionControllerPreviousSelectableItem):
1856
1857         * UserInterface/Views/TreeElement.js:
1858         (WI.TreeElement.prototype.get previousSelectableSibling): Added.
1859         (WI.TreeElement.prototype.get nextSelectableSibling): Added.
1860
1861         * UserInterface/Views/TreeOutline.js:
1862         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
1863         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
1864         Set `skipUnrevealed` to false, so that children of collapsed parent nodes
1865         are considered when looking for an item to selected after a delete. Hidden `TreeElement`s
1866         are still ignored as they aren't `selectable`.
1867
1868 2019-04-10  Devin Rousso  <drousso@apple.com>
1869
1870         Web Inspector: Elements tab: multiple selection lost after navigating to another tab
1871         https://bugs.webkit.org/show_bug.cgi?id=192681
1872         <rdar://problem/46709392>
1873
1874         Reviewed by Timothy Hatcher.
1875
1876         Orginal patch by Matt Baker <mattbaker@apple.com>.
1877
1878         * UserInterface/Controllers/SelectionController.js:
1879         (WI.SelectionController.prototype.selectItem):
1880         Simplify internal logic by removing an early return.
1881
1882         (WI.SelectionController.prototype.selectItems): Added.
1883         (WI.SelectionController.prototype.selectAll):
1884         Provide a means to select multiple items in a single operation.
1885         If `_lastSelectedItem` is not in the items to select, the last
1886         item being selected will become the last selected item.
1887
1888         (WI.SelectionController.prototype._deselectAllAndSelect):
1889         Drive-by fix: correct a logic error. If no items are selected, the item
1890         passed as an argument should still become selected.
1891
1892         * UserInterface/Views/TreeOutline.js:
1893         (WI.TreeOutline.prototype.selectTreeElements): Added.
1894
1895         * UserInterface/Views/DOMTreeElement.js:
1896         (WI.DOMTreeElement):
1897         (WI.DOMTreeElement.prototype.get closeTagTreeElement): Added.
1898         (WI.DOMTreeElement.prototype._updateChildren):
1899         Make the close tag `TreeElement` available from the open tag `TreeElement`.
1900
1901         * UserInterface/Views/DOMTreeOutline.js:
1902         (WI.DOMTreeOutline.prototype.update):
1903         Restore selected `TreeElement`s after updating.
1904
1905         * UserInterface/Base/Utilities.js:
1906         * UserInterface/Test.html:
1907
1908 2019-04-08  Matt Baker  <mattbaker@apple.com>
1909
1910         Web Inspector: Elements tab: Classes toggle should use accent color on hover
1911         https://bugs.webkit.org/show_bug.cgi?id=196266
1912
1913         Reviewed by Devin Rousso.
1914
1915         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
1916         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
1917         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle::before):
1918         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)):
1919         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:matches(.selected, :hover)::before):
1920         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover::before):
1921         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected:active::before):
1922         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle.selected): Deleted.
1923         (.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:not(.selected):hover): Deleted.
1924
1925 2019-04-08  Devin Rousso  <drousso@apple.com>
1926
1927         Web Inspector: REGRESSION: Audit: default audits aren't added when an existing audit is present
1928         https://bugs.webkit.org/show_bug.cgi?id=196663
1929         <rdar://problem/49660757>
1930
1931         Reviewed by Timothy Hatcher.
1932
1933         Rather than have a button that allows the user to re-add the default audits, prevent them
1934         from being deletable in the first place. "Deleting" a default audit will instead mark it as
1935         disabled (and beep if it is already disabled).
1936
1937         * UserInterface/Controllers/AuditManager.js:
1938         (WI.AuditManager.prototype.loadStoredTests):
1939         (WI.AuditManager.prototype.removeTest):
1940         (WI.AuditManager.prototype._addDefaultTests): Added.
1941         (WI.AuditManager.prototype.addDefaultTestsIfNeeded): Deleted.
1942
1943         * UserInterface/Views/AuditNavigationSidebarPanel.js:
1944         (WI.AuditNavigationSidebarPanel.prototype._addTest):
1945         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
1946         (WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
1947         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
1948         * UserInterface/Views/AuditNavigationSidebarPanel.css:
1949         (.sidebar > .panel.navigation.audit.has-results > .content > .message-text-view.no-enabled-audits): Added.
1950         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view): Deleted.
1951         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > .message): Deleted.
1952         (.sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view > button): Deleted.
1953
1954         * Localizations/en.lproj/localizedStrings.js:
1955
1956 2019-04-06  Nikita Vasilyev  <nvasilyev@apple.com>
1957
1958         REGRESSION(r237196): Web Inspector: Computed panel shouldn't update when it isn't visible
1959         https://bugs.webkit.org/show_bug.cgi?id=196667
1960         <rdar://problem/49664912>
1961
1962         Reviewed by Timothy Hatcher.
1963
1964         Explicitly define `hidden` and `shown` methods instead of relying on SidebarPanel's `visible` getter.
1965
1966         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
1967         (WI.GeneralStyleDetailsSidebarPanel.prototype.visibilityDidChange): Deleted.
1968         (WI.GeneralStyleDetailsSidebarPanel.prototype.hidden): Added.
1969         (WI.GeneralStyleDetailsSidebarPanel.prototype.shown): Added.
1970
1971 2019-04-05  Devin Rousso  <drousso@apple.com>
1972
1973         Web Inspector: TestSuite test cases should have their own timeout to ensure tests fail with output instead of timeout by test runner
1974         https://bugs.webkit.org/show_bug.cgi?id=162814
1975         <rdar://problem/28574102>
1976
1977         Reviewed by Brian Burg.
1978
1979         A 10s timer is started for every test case added to an async suite. The timer is cleared
1980         when the test finishes, but if the timer fires, the test is forcibly ended with an error.
1981
1982         This timer can be configured by setting a `timeout` value when adding the test case. Values
1983         are expected to be in milliseconds. The value `-1` will prevent a timer from being set.
1984
1985         This change also relaxes the expectation that any individual test case failure will stop the
1986         rest of the suite from running. Since timers are set per test case, it is possible to
1987         recover from a "bad" test case to still run the remaining test cases.
1988
1989         NOTE: there may be unexpected behaviour if a test times out, as the timer doesn't actually
1990         stop the execution of the test, so it may still run and log information, which may appear
1991         "out of nowhere" in the middle of other tests.
1992
1993         * UserInterface/Test/TestSuite.js:
1994         (TestSuite.prototype.get passCount):
1995         (AsyncTestSuite.prototype.runTestCases):
1996         (SyncTestSuite.prototype.runTestCases):
1997
1998 2019-04-03  Devin Rousso  <drousso@apple.com>
1999
2000         Web Inspector: Single click on links in non-read-only TextEditors should not follow links
2001         https://bugs.webkit.org/show_bug.cgi?id=123364
2002         <rdar://problem/15323913>
2003
2004         Reviewed by Timothy Hatcher.
2005
2006         * UserInterface/Base/Main.js:
2007         (WI._updateModifierKeys):
2008         Add classes to the body whenever alt, shift, or ctrl are pressed.
2009
2010         * UserInterface/Views/CodeMirrorEditor.js:
2011         (WI.CodeMirrorEditor.create):
2012         Add a `read-only` class if the `CodeMirror` is readonly.
2013
2014         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
2015         (.cm-s-default .cm-link,):
2016         (.read-only.cm-s-default .cm-link:hover,):
2017         (.cm-s-default .cm-link:hover,): Deleted.
2018
2019         * UserInterface/Views/TextEditor.js:
2020         (WI.TextEditor.prototype.set readOnly):
2021         (WI.TextEditor.prototype._openClickedLinks):
2022
2023 2019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
2024
2025         Remove support for -apple-trailing-word
2026         https://bugs.webkit.org/show_bug.cgi?id=196525
2027
2028         Reviewed by Zalan Bujtas.
2029
2030         This CSS property is nonstandard and not used.
2031
2032         * UserInterface/Models/CSSKeywordCompletions.js:
2033
2034 2019-04-03  Nikita Vasilyev  <nvasilyev@apple.com>
2035
2036         Web Inspector: Uncaught Exception: TypeError: this._computedStyleSection.focus is not a function. (In 'this._computedStyleSection.focus()', 'this._computedStyleSection.focus' is undefined)
2037         https://bugs.webkit.org/show_bug.cgi?id=192108
2038         <rdar://problem/46685392>
2039
2040         Reviewed by Devin Rousso.
2041
2042         This patch fixes the uncaught exception. Tabbing to and from "Properties" section continues
2043         working the same way as before the patch.
2044
2045         * UserInterface/Views/ComputedStyleDetailsPanel.js:
2046         (WI.ComputedStyleDetailsPanel.prototype.focusFirstSection): Deleted.
2047         (WI.ComputedStyleDetailsPanel.prototype.focusLastSection): Deleted.
2048
2049 2019-04-02  Devin Rousso  <drousso@apple.com>
2050
2051         Web Inspector: Elements: DOM breakpoint icon should stroke when hovering selection area
2052         https://bugs.webkit.org/show_bug.cgi?id=196516
2053         <rdar://problem/49540494>
2054
2055         Reviewed by Timothy Hatcher.
2056
2057         * UserInterface/Views/DOMTreeContentView.css:
2058         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint,): Added.
2059         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Added.
2060         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, :hover) .status-image.breakpoint): Deleted.
2061         (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, :hover) .status-image.breakpoint.subtree): Deleted.
2062
2063 2019-04-01  Devin Rousso  <drousso@apple.com>
2064
2065         Web Inspector: Debugger: modernize serialization of breakpoints and the maps that hold them
2066         https://bugs.webkit.org/show_bug.cgi?id=196230
2067         <rdar://problem/49236485>
2068
2069         Reviewed by Joseph Pecoraro.
2070
2071         * UserInterface/Controllers/DebuggerManager.js:
2072         (WI.DebuggerManager):
2073         (WI.DebuggerManager.prototype.breakpointsForSourceCode):
2074         (WI.DebuggerManager.prototype.addBreakpoint):
2075         (WI.DebuggerManager.prototype.removeBreakpoint):
2076         (WI.DebuggerManager.prototype._setBreakpoint):
2077         (WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
2078
2079         * UserInterface/Models/Breakpoint.js:
2080         (WI.Breakpoint):
2081         (WI.Breakpoint.fromJSON): Added.
2082         (WI.Breakpoint.prototype.toJSON):
2083         (WI.Breakpoint.prototype.set resolved):
2084         (WI.Breakpoint.prototype.recreateAction):
2085         (WI.Breakpoint.prototype.saveIdentityToCookie):
2086         (WI.Breakpoint.prototype._isSpecial): Added.
2087         (WI.Breakpoint.set resolved.isSpecialBreakpoint): Deleted.
2088         (WI.Breakpoint.serializeOptions): Deleted.
2089
2090         * UserInterface/Models/BreakpointAction.js:
2091         (WI.BreakpointAction):
2092         (WI.BreakpointAction.fromJSON): Added.
2093         (WI.BreakpointAction.prototype.toProtocol): Added.
2094
2095         * UserInterface/Views/DebuggerSidebarPanel.js:
2096         (WI.DebuggerSidebarPanel.prototype._addBreakpointsForSourceCode):
2097
2098         * UserInterface/Views/SourceCodeTextEditor.js:
2099         (WI.SourceCodeTextEditor.prototype._prepareEditorForInitialContent):
2100         (WI.SourceCodeTextEditor.prototype._breakpointsEnabledDidChange):
2101
2102 2019-04-01  Devin Rousso  <drousso@apple.com>
2103
2104         Web Inspector: DOMDebugger: disabling a breakpoint for a specific event listener removes it from the UI
2105         https://bugs.webkit.org/show_bug.cgi?id=196453
2106         <rdar://problem/49489318>
2107
2108         Reviewed by Joseph Pecoraro.
2109
2110         Allow breakpoints for specific event listeners to be disabled, rather than immeditately
2111         removing/deleting them when they are about to become disabled. This preserves the existing
2112         functionality, but now allows for the tree element to stay in the UI in a disabled state.
2113
2114         * UserInterface/Controllers/DOMManager.js:
2115         (WI.DOMManager):
2116         (WI.DOMManager.prototype.setBreakpointForEventListener):
2117         (WI.DOMManager.prototype.removeBreakpointForEventListener):
2118         (WI.DOMManager.prototype.removeEventListenerBreakpointsForNode): Added.
2119         (WI.DOMManager.prototype._updateEventBreakpoint): Added.
2120         (WI.DOMManager.prototype._handleEventBreakpointDisabledStateChanged): Added.
2121
2122         * UserInterface/Controllers/DOMDebuggerManager.js:
2123         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
2124
2125         * UserInterface/Views/EventBreakpointTreeElement.js:
2126         (WI.EventBreakpointTreeElement.prototype.populateContextMenu):
2127         (WI.EventBreakpointTreeElement.prototype._toggleBreakpoint):
2128
2129         * UserInterface/Views/ContextMenuUtilities.js:
2130         (WI.appendContextMenuItemsForDOMNodeBreakpoints):
2131
2132         * UserInterface/Views/DOMNodeTreeElement.js:
2133         (WI.DOMNodeTreeElement.prototype.ondelete):
2134
2135 2019-04-01  Devin Rousso  <drousso@apple.com>
2136
2137         Web Inspector: Canvas: auto-record after page load sometimes shows the wrong UI
2138         https://bugs.webkit.org/show_bug.cgi?id=196320
2139         <rdar://problem/49356686>
2140
2141         Reviewed by Joseph Pecoraro.
2142
2143         It was previously possible that the timing of a recording being started and the preview
2144         image being loaded would not always be in the same order.
2145
2146         Utilize the existing `View.prototype.layout` mechanics to ensure that updates are coalesced
2147         and that the changes are always applied in a particular order.
2148
2149         * UserInterface/Views/CanvasContentView.js:
2150         (WI.CanvasContentView):
2151         (WI.CanvasContentView.prototype.refreshPreview): Added.
2152         (WI.CanvasContentView.prototype.initialLayout):
2153         (WI.CanvasContentView.prototype.layout):
2154         (WI.CanvasContentView.prototype.shown):
2155         (WI.CanvasContentView.prototype.attached):
2156         (WI.CanvasContentView.prototype._refreshPixelSize):
2157         (WI.CanvasContentView.prototype.refresh): Deleted.
2158         (WI.CanvasContentView.prototype._recordingStarted): Deleted.
2159         (WI.CanvasContentView.prototype._recordingProgress): Deleted.
2160         (WI.CanvasContentView.prototype._recordingStopped): Deleted.
2161         (WI.CanvasContentView.prototype._shaderProgramAdded): Deleted.
2162         (WI.CanvasContentView.prototype._shaderProgramRemoved): Deleted.
2163
2164         * UserInterface/Views/CanvasOverviewContentView.js:
2165         (WI.CanvasOverviewContentView.prototype._refreshPreviews):
2166
2167 2019-04-01  Devin Rousso  <drousso@apple.com>
2168
2169         Web Inspector: Canvas: add compatibility support for WebMetal
2170         https://bugs.webkit.org/show_bug.cgi?id=196412
2171         <rdar://problem/49439417>
2172
2173         Reviewed by Joseph Pecoraro.
2174
2175         * UserInterface/Models/Canvas.js:
2176         (WI.Canvas.fromPayload):
2177         (WI.Canvas.displayNameForContextType):
2178         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
2179         * Versions/Inspector-iOS-12.2.json:
2180
2181 2019-04-01  Devin Rousso  <drousso@apple.com>
2182
2183         Web Inspector: "Copy as HTML" appears twice when showing a context menu for a logged node
2184         https://bugs.webkit.org/show_bug.cgi?id=196271
2185         <rdar://problem/49290676>
2186
2187         Reviewed by Joseph Pecoraro.
2188
2189         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
2190         (WI.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
2191
2192         * Localizations/en.lproj/localizedStrings.js:
2193
2194 2019-04-01  Devin Rousso  <drousso@apple.com>
2195
2196         Web Inspector: Debugger: breakpoints don't populate in inspector2 on first load
2197         https://bugs.webkit.org/show_bug.cgi?id=196063
2198         <rdar://problem/49097787>
2199
2200         Reviewed by Joseph Pecoraro.
2201
2202         In the case that a breakpoint becomes resolved after the resource has finished loaded, there
2203         won't be an already existing `TreeElement` for the breakpoint to replace.
2204
2205         This can realistically only happen if the IndexedDB lookup is super slow, or the resource is
2206         extremely fast (e.g. a `data` url).
2207
2208         * UserInterface/Views/DebuggerSidebarPanel.js:
2209         (WI.DebuggerSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
2210         (WI.DebuggerSidebarPanel.prototype._addDebuggerObject): Deleted.
2211
2212         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2213         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
2214         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
2215         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
2216
2217 2019-04-01  Joseph Pecoraro  <pecoraro@apple.com>
2218
2219         Web Inspector: CPU Usage Timeline - Adjust Energy Impact Threshholds
2220         https://bugs.webkit.org/show_bug.cgi?id=196421
2221         <rdar://problem/49125703>
2222
2223         Reviewed by Devin Rousso.
2224
2225         - Low - Keep Below 3% to continue to encourage idle pages stay below 3%
2226           Might want to reduce to 2.5 or 2 after fixing bug 196419.
2227
2228         - High - Make Above 30% instead of 50% to encourage long running interactivity to stay below 30%
2229           Depends on interaction, but sustained (1-2min) at 30%+ will certainly impact battery.
2230
2231         - Very High - Make above 100% instead of 150%
2232           CPU Usage spikes around page load and is quite often still under 100% despite many threads.
2233           Drop this a bit as we dropped High down.
2234
2235         Reduce the size of the Medium section, and increase the High section
2236         Having 70% of the chart be "Medium" is just too much Medium, and
2237         we've now made it more possible to be in the High range.
2238
2239         * UserInterface/Views/CPUTimelineView.js:
2240         (WI.CPUTimelineView.prototype.get mediumEnergyThreshold):
2241         (WI.CPUTimelineView.prototype.get highEnergyThreshold):
2242         (WI.CPUTimelineView.prototype.get lowEnergyGraphBoundary):
2243         (WI.CPUTimelineView.prototype.get mediumEnergyGraphBoundary):
2244         (WI.CPUTimelineView.prototype.get highEnergyGraphBoundary):
2245         (WI.CPUTimelineView.prototype.initialLayout):
2246         (WI.CPUTimelineView.prototype.layout.bestThreadLayoutMax):
2247         (WI.CPUTimelineView.prototype._layoutEnergyChart):
2248
2249 2019-03-29  Myles C. Maxfield  <mmaxfield@apple.com>
2250
2251         Delete WebMetal implementation in favor of WebGPU
2252         https://bugs.webkit.org/show_bug.cgi?id=195418
2253
2254         Reviewed by Dean Jackson.
2255
2256         * UserInterface/Models/Canvas.js:
2257         (WI.Canvas.fromPayload):
2258         (WI.Canvas.displayNameForContextType):
2259         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
2260         * Versions/Inspector-iOS-12.2.json:
2261
2262 2019-03-29  Devin Rousso  <drousso@apple.com>
2263
2264         Web Inspector: Storage: some cookie column headers are not localized
2265         https://bugs.webkit.org/show_bug.cgi?id=196406
2266         <rdar://problem/48467422>
2267
2268         Reviewed by Joseph Pecoraro.
2269
2270         * UserInterface/Views/CookieStorageContentView.js:
2271         (WI.CookieStorageContentView.prototype.initialLayout):
2272
2273         * Localizations/en.lproj/localizedStrings.js:
2274
2275 2019-03-28  Joseph Pecoraro  <pecoraro@apple.com>
2276
2277         Web Inspector: Show Resource Initiator in Network Tab detail views
2278         https://bugs.webkit.org/show_bug.cgi?id=196316
2279         <rdar://problem/49352679>
2280
2281         Reviewed by Devin Rousso.
2282
2283         * UserInterface/Controllers/NetworkManager.js:
2284         (WI.NetworkManager.prototype.resourceRequestWillBeSent):
2285         (WI.NetworkManager.prototype.resourceRequestWasServedFromMemoryCache):
2286         (WI.NetworkManager.prototype._initiatorCallFramesFromPayload):
2287         Initialize call frames from the initiator payload.
2288
2289         * UserInterface/Models/Resource.js:
2290         (WI.Resource.prototype.get initiatorCallFrames):
2291         Initialization and accessor.
2292
2293         * UserInterface/Views/CallFrameTreeElement.js:
2294         (WI.CallFrameTreeElement):
2295         Selecting a native element won't do anything so just don't allow selection.
2296
2297         * UserInterface/Views/ResourceHeadersContentView.css:
2298         (.resource-headers .go-to-link):
2299         (.resource-headers .call-stack):
2300         (.resource-headers .call-stack:hover):
2301         (@media (prefers-color-scheme: dark)):
2302         * UserInterface/Views/ResourceHeadersContentView.js:
2303         (WI.ResourceHeadersContentView):
2304         (WI.ResourceHeadersContentView.prototype.hidden):
2305         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
2306         Add an "Initiator" line in the summary with a way to view the whole
2307         initiator backtrace if one exists.
2308
2309 2019-03-26  Devin Rousso  <drousso@apple.com>
2310
2311         Web Inspector: Sources: fix typo in CSS selector to always show add breakpoint button
2312         https://bugs.webkit.org/show_bug.cgi?id=196241
2313
2314         Reviewed by Matt Baker.
2315
2316         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
2317         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoints).collapsed > .header > .options,):
2318         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,): Deleted.
2319
2320 2019-03-25  Joseph Pecoraro  <pecoraro@apple.com>
2321
2322         Web Inspector: Page Weight indicator clears on pages with zero length resources (macrumors.com)
2323         https://bugs.webkit.org/show_bug.cgi?id=196170
2324
2325         Reviewed by Timothy Hatcher.
2326
2327         * UserInterface/Models/DefaultDashboard.js:
2328         (WI.DefaultDashboard.prototype._resourceSizeDidChange):
2329         Catch NaN earlier.
2330
2331         * UserInterface/Models/Resource.js:
2332         (WI.Resource.prototype.updateWithMetrics):
2333         When we receive exact metrics transition the estimated size to zero,
2334         since we won't receive any more updates for the resource.
2335
2336 2019-03-24  Devin Rousso  <drousso@apple.com>
2337
2338         Web Inspector: Canvas: WebGL action icon shouldn't invert when selected
2339         https://bugs.webkit.org/show_bug.cgi?id=196135
2340
2341         Reviewed by Timothy Hatcher.
2342
2343         * UserInterface/Views/RecordingActionTreeElement.js:
2344         (WI.RecordingActionTreeElement._classNameForAction):
2345         (WI.RecordingActionTreeElement._classNameForAction.classNameForActionName): Deleted.
2346         Remove unnecessary logging and memoization.
2347
2348         * UserInterface/Views/RecordingActionTreeElement.css:
2349         (.tree-outline:focus .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Added.
2350         (@media (prefers-color-scheme: dark)):
2351         (.item.recording-action:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Added.
2352         (.tree-outline:focus .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer) > .icon): Deleted.
2353         (.item.recording-action.has-context-replacer > .icon): Deleted.
2354         (.item.recording-action:not(.invalid, .initial-state, .has-context-replacer) > .icon): Deleted.
2355         Simplify styles between light and dark mode.
2356
2357 2019-03-24  Simon Welsh  <simon@welsh-au.com>
2358
2359         Web Inspector: testCellRoleForRequiredChidren accessibility audit checks for rows in cells
2360         https://bugs.webkit.org/show_bug.cgi?id=195988
2361
2362         Reviewed by Timothy Hatcher.
2363
2364         The audit now checks that rows contain cells, allowing any of the four
2365         cell-based roles.
2366
2367         * UserInterface/Controllers/AuditManager.js:
2368         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
2369         (WI.AuditManager):
2370         (WI.AuditManager.prototype.addDefaultTestsIfNeeded.const.testCellRoleForRequiredChidren): Deleted.
2371
2372 2019-03-24  Devin Rousso  <drousso@apple.com>
2373
2374         Web Inspector: Canvas: missing icons for WebGL2 contexts
2375         https://bugs.webkit.org/show_bug.cgi?id=196136
2376
2377         Reviewed by Timothy Hatcher.
2378
2379         * UserInterface/Views/CanvasSidebarPanel.css:
2380         (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled > .glyph): Added.
2381         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas:matches(.canvas-2d, .bitmaprenderer) .icon): Added.
2382         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas:matches(.webgl, .webgl2, .webgpu, .webmetal) .icon): Added.
2383         (@media (prefers-color-scheme: dark)):
2384         (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled): Deleted.
2385         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.canvas-2d .icon): Deleted.
2386         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.casnvas.webgl .icon): Deleted.
2387         Use the 2D icon for BitmapRenderer and the 3D icon for WebGL2, WebMetals, and WebGPU.
2388         Drive-by: the start/stop button text was too dark when disabled in dark mode.
2389
2390         * UserInterface/Models/Canvas.js:
2391         Drive-by: "gpu" => "webgpu", to match the protocol string.
2392
2393 2019-03-22  Devin Rousso  <drousso@apple.com>
2394
2395         Web Inspector: Sources: "Reveal in Resources Tab" still shown when Sources tab is enabled
2396         https://bugs.webkit.org/show_bug.cgi?id=196134
2397
2398         Reviewed by Joseph Pecoraro.
2399
2400         * UserInterface/Views/RecordingActionTreeElement.js:
2401         (WI.RecordingActionTreeElement.prototype.populateContextMenu):
2402         Drive-by: find the first call frame that has a source code location, rather than naively
2403         always using the top call frame.
2404
2405         * UserInterface/Views/SearchResultTreeElement.js:
2406         (WI.SearchResultTreeElement.prototype.populateContextMenu):
2407
2408 2019-03-22  Keith Rollin  <krollin@apple.com>
2409
2410         Enable ThinLTO support in Production builds
2411         https://bugs.webkit.org/show_bug.cgi?id=190758
2412         <rdar://problem/45413233>
2413
2414         Reviewed by Daniel Bates.
2415
2416         Enable building with Thin LTO in Production when using Xcode 10.2 or
2417         later. This change results in a 1.45% progression in PLT5. Full
2418         Production build times increase about 2-3%. Incremental build times
2419         are more severely affected, and so LTO is not enabled for local
2420         engineering builds.
2421
2422         LTO is enabled only on macOS for now, until rdar://problem/49013399,
2423         which affects ARM builds, is fixed.
2424
2425         To change the LTO setting when building locally:
2426
2427         - If building with `make`, specify WK_LTO_MODE={none,thin,full} on the
2428           command line.
2429         - If building with `build-webkit`, specify --lto-mode={none,thin,full}
2430           on the command line.
2431         - If building with `build-root`, specify --lto={none,thin,full} on the
2432           command line.
2433         - If building with Xcode, create a LocalOverrides.xcconfig file at the
2434           top level of your repository directory (if needed) and define
2435           WK_LTO_MODE to full, thin, or none.
2436
2437         * Configurations/Base.xcconfig:
2438
2439 2019-03-21  Joseph Pecoraro  <pecoraro@apple.com>
2440
2441         Web Inspector: Timelines - Cannot export on about:blank - suggested filename containing a colon silently fails
2442         https://bugs.webkit.org/show_bug.cgi?id=196109
2443
2444         Reviewed by Timothy Hatcher.
2445
2446         * UserInterface/Base/FileUtilities.js:
2447         (WI.FileUtilities.sanitizeFilename):
2448         (WI.FileUtilities.inspectorURLForFilename):
2449         New utility functions.
2450
2451         * UserInterface/Test.html:
2452         Include FileUtilities.
2453
2454         * UserInterface/Base/Main.js:
2455         * UserInterface/Controllers/AuditManager.js:
2456         (WI.AuditManager.prototype.export):
2457         * UserInterface/Debug/ProtocolTrace.js:
2458         (WI.ProtocolTrace.prototype.get saveData):
2459         (WI.ProtocolTrace):
2460         * UserInterface/Views/ConsoleMessageView.js:
2461         (WI.ConsoleMessageView.prototype._handleContextMenu):
2462         (WI.ConsoleMessageView):
2463         * UserInterface/Views/ContextMenuUtilities.js:
2464         * UserInterface/Views/HeapSnapshotContentView.js:
2465         (WI.HeapSnapshotContentView.prototype._exportSnapshot):
2466         * UserInterface/Views/LogContentView.js:
2467         (WI.LogContentView.prototype.get saveData):
2468         (WI.LogContentView.prototype._handleContextMenuEvent):
2469         * UserInterface/Views/NetworkTableContentView.js:
2470         (WI.NetworkTableContentView.prototype._exportHAR):
2471         * UserInterface/Views/RecordingContentView.js:
2472         (WI.RecordingContentView.prototype._exportRecording):
2473         (WI.RecordingContentView.prototype._exportReduction):
2474         * UserInterface/Views/ScriptContentView.js:
2475         (WI.ScriptContentView.prototype.get saveData):
2476         * UserInterface/Views/ShaderProgramContentView.js:
2477         (WI.ShaderProgramContentView.prototype.get saveData):
2478         * UserInterface/Views/TextContentView.js:
2479         (WI.TextContentView.prototype.get saveData):
2480         * UserInterface/Views/TextResourceContentView.js:
2481         (WI.TextResourceContentView.prototype.get saveData):
2482         * UserInterface/Views/TimelineRecordingContentView.js:
2483         (WI.TimelineRecordingContentView.prototype._exportTimelineRecording):
2484         Update "web-inspector:///" URL building code to use the utility.
2485
2486 2019-03-21  Nikita Vasilyev  <nvasilyev@apple.com>
2487
2488         Web Inspector: Use CSS variables for text color in Computed panel
2489         https://bugs.webkit.org/show_bug.cgi?id=196117
2490
2491         Reviewed by Timothy Hatcher.
2492
2493         * UserInterface/Views/ComputedStyleSection.css:
2494         (.computed-style-section):
2495         (.computed-style-section .computed-property-item .property-trace-item .selector):
2496         (.computed-style-section .computed-property-item .go-to-link):
2497
2498 2019-03-21  Devin Rousso  <drousso@apple.com>
2499
2500         Web Inspector: Timelines: flatten the overview to show all records, one per line
2501         https://bugs.webkit.org/show_bug.cgi?id=191901
2502         <rdar://problem/46423618>
2503
2504         Reviewed by Timothy Hatcher.
2505
2506         * UserInterface/Views/OverviewTimelineView.js:
2507         (WI.OverviewTimelineView):
2508         (WI.OverviewTimelineView.prototype.closed):
2509         (WI.OverviewTimelineView.prototype.get navigationItems): Added.
2510         (WI.OverviewTimelineView.prototype.reset):
2511         (WI.OverviewTimelineView.prototype.layout):
2512         (WI.OverviewTimelineView.prototype.get _relevantTimelines): Added.
2513         (WI.OverviewTimelineView.prototype.get _shouldGroupBySourceCode): Added.
2514         (WI.OverviewTimelineView.prototype._loadExistingRecords): Added.
2515         (WI.OverviewTimelineView.prototype._insertDataGridNode):
2516         (WI.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
2517         (WI.OverviewTimelineView.prototype._addSourceCodeTimeline):
2518         (WI.OverviewTimelineView.prototype._processPendingRepresentedObjects):
2519         (WI.OverviewTimelineView.prototype._handleGroupBySourceCodeSettingChanged): Added.
2520         (WI.OverviewTimelineView.prototype._handleGroupBySourceCodeNavigationItemCheckedDidChange): Added.
2521         (WI.OverviewTimelineView.prototype._handleTimelineRecordAdded): Added.
2522         (WI.OverviewTimelineView.prototype._sourceCodeTimelineAdded):
2523         (WI.OverviewTimelineView.prototype._networkTimelineRecordAdded): Deleted.
2524         Listen for new records on all timelines. Add each record as a new line. Since each timeline
2525         has different data to display, only show the "name" and "graph" for all records.
2526
2527         * UserInterface/Views/TimelineRecordingContentView.js:
2528         (WI.TimelineRecordingContentView):
2529         (WI.TimelineRecordingContentView.prototype._currentContentViewDidChange):
2530         (WI.TimelineRecordingContentView.prototype._updateImportedView): Deleted.
2531         When viewing the overview of an imported recording, show the non-grouped overview.
2532
2533         * UserInterface/Models/TimelineRecording.js:
2534         (WI.TimelineRecording.prototype.addRecord):
2535         (WI.TimelineRecording.prototype._keyForRecord):
2536         Drive-by: show Media timeline events under the owner frame's resource when grouped.
2537
2538         * UserInterface/Views/TimelineRecordBar.css:
2539         (.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment, .timeline-record-bar.timeline-record-type-heap-allocations > .segment): Added.
2540         (.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment): Deleted.
2541
2542         * UserInterface/Base/Setting.js:
2543         Add setting for controlling the Timeline overview grouping.
2544
2545         * UserInterface/Main.html:
2546         * UserInterface/Views/SourceCodeTimelineTreeElement.js: Removed.
2547         * UserInterface/Views/TimelineRecordingImportedView.js: Removed.
2548         * UserInterface/Views/TimelineRecordingImportedView.css: Removed.
2549         Remove unused files.
2550
2551         * Localizations/en.lproj/localizedStrings.js:
2552
2553 2019-03-21  Devin Rousso  <drousso@apple.com>
2554
2555         Web Inspector: Sources: the name of the file should not be used as a folder
2556         https://bugs.webkit.org/show_bug.cgi?id=196064
2557         <rdar://problem/49097710>
2558
2559         Reviewed by Timothy Hatcher.
2560
2561         * UserInterface/Views/GeneralTreeElement.js:
2562         (WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath):
2563
2564         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2565         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
2566         Drive-by: sort resources in each folder by name when grouping by path.
2567
2568 2019-03-20  Devin Rousso  <drousso@apple.com>
2569
2570         Web Inspector: Canvas: rework how Canvas.enable/Canvas.disable is used so that events are not sent when the Canvas tab isn't enabled
2571         https://bugs.webkit.org/show_bug.cgi?id=195828
2572         <rdar://problem/48941756>
2573
2574         Reviewed by Timothy Hatcher.
2575
2576         * UserInterface/Controllers/CanvasManager.js:
2577         (WI.CanvasManager):
2578         (WI.CanvasManager.prototype.initializeTarget):
2579         (WI.CanvasManager.prototype.enable): Added.
2580         (WI.CanvasManager.prototype.disable): Added.
2581
2582         * UserInterface/Views/CanvasTabContentView.js:
2583         (WI.CanvasTabContentView):
2584         (WI.CanvasTabContentView.prototype.closed): Added.
2585
2586         * UserInterface/Base/Test.js:
2587         (WI.contentLoaded):
2588
2589 2019-03-20  Devin Rousso  <drousso@apple.com>
2590
2591         Web Inspector: Sources: collapsing a section doesn't shrink the space used by that section
2592         https://bugs.webkit.org/show_bug.cgi?id=196045
2593
2594         Reviewed by Timothy Hatcher.
2595
2596         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2597         (WI.SourcesNavigationSidebarPanel):
2598         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
2599         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
2600         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
2601         (.sidebar > .panel.navigation.sources > .content > .details-section):
2602         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,):
2603         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
2604         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint):
2605         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.pause-reason, .call-stack, .breakpoints) > .content,):
2606         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints) > .content):
2607         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content):
2608         (.sidebar > .panel.navigation.sources > .content > .details-section.call-stack):
2609         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints):
2610         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .create-breakpoint):
2611         (.sidebar > .panel.navigation.sources > .content > .pause-reason):
2612         (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content,):
2613         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .tree-outline .item.event-target-window .icon):
2614         (.sidebar > .panel.navigation.sources > .content .details-section): Deleted.
2615         (.sidebar > .panel.navigation.sources > .content .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,): Deleted.
2616         (.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .content): Deleted.
2617         (.sidebar > .panel.navigation.sources > .content .details-section.breakpoints > .header > .options .create-breakpoint): Deleted.
2618         (.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
2619         (.sidebar > .panel.navigation.sources > .content > .call-stack-container): Deleted.
2620         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Deleted.
2621         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Deleted.
2622         (.sidebar > .panel.navigation.sources > .content > .resources-container): Deleted.
2623         (.sidebar > .panel.navigation.sources > .content > .pause-reason-container): Deleted.
2624         (.sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Deleted.
2625         (.sidebar > .panel.navigation.sources > .content > .breakpoints .tree-outline .item.event-target-window .icon): Deleted.
2626          - Apply the overflow scrolling to the content element of each `WI.DetailsSection`.
2627          - Ensure that there is a maximum height for each section.
2628          - When `.collapsed`, don't try to grow/shrink the section based on its contents.
2629
2630         * UserInterface/Views/CallFrameTreeElement.css:
2631         (.tree-outline .item.call-frame):
2632         (.tree-outline .item.call-frame .status):
2633         Make the container of the active call frame status indicator relatively positioned so that
2634         the active call frame status indicator will follow the container when scrolling.
2635
2636 2019-03-20  Devin Rousso  <drousso@apple.com>
2637
2638         Web Inspector: Timeline should show when events preventDefault() was called on an event or not
2639         https://bugs.webkit.org/show_bug.cgi?id=176824
2640         <rdar://problem/34290931>
2641
2642         Reviewed by Timothy Hatcher.
2643
2644         Original patch by Joseph Pecoraro <pecoraro@apple.com>.
2645
2646         * Localizations/en.lproj/localizedStrings.js:
2647         New string.
2648
2649         * UserInterface/Controllers/TimelineManager.js:
2650         (WI.TimelineManager.prototype._processRecord):
2651         Include the whole data object as extra details.
2652
2653         * UserInterface/Models/ScriptTimelineRecord.js:
2654         (WI.ScriptTimelineRecord):
2655         (WI.ScriptTimelineRecord.prototype.get eventType):
2656         Wholesale copy of the extra data instead of just a single property.
2657
2658         * UserInterface/Views/ScriptDetailsTimelineView.js:
2659         (WI.ScriptDetailsTimelineView):
2660         Give the name column more initial space, there is still extra space
2661         after this adjustment but name is comfortably larger (and the most
2662         likely to be expanded).
2663
2664         * UserInterface/Views/ScriptTimelineDataGridNode.js:
2665         (WI.ScriptTimelineDataGridNode.prototype.get subtitle):
2666         Include "default prevented" as the event's subtitle if it was prevented.
2667
2668 2019-03-20  Devin Rousso  <drousso@apple.com>
2669
2670         Web Inspector: Styles Redesign: Editing selector should not hide the rule
2671         https://bugs.webkit.org/show_bug.cgi?id=178489
2672         <rdar://problem/35062434>
2673
2674         Reviewed by Timothy Hatcher.
2675
2676         Extracts the selector payload parsing logic inside `WI.DOMNodeStyles` into static functions
2677         so that when the user changes the selector of a `WI.CSSRule`, it's able to process and
2678         update itself with the new selector. This is mainly useful in the case where the `WI.CSSRule`
2679         no longer applies to the selected node (meaning it won't be part of that node's
2680         `WI.DOMNodeStyles`) in that it allows the `WI.SpreadsheetCSSStyleDeclarationSection` to
2681         display the new selector text and the owner `WI.SpreadsheetRulesStyleDetailsPanel` to keep
2682         that section visible even though it isn't applicable to the current node anymore.
2683
2684         * UserInterface/Models/DOMNodeStyles.js:
2685         (WI.DOMNodeStyles):
2686         (WI.DOMNodeStyles.parseSelectorListPayload): Added.
2687         (WI.DOMNodeStyles.createSourceCodeLocation): Added.
2688         (WI.DOMNodeStyles.prototype.refresh):
2689         (WI.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
2690         (WI.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
2691         (WI.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
2692         (WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
2693         (WI.DOMNodeStyles.prototype._parseRulePayload):
2694         (WI.DOMNodeStyles.prototype._styleSheetContentDidChange):
2695         (WI.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload): Deleted.
2696         (WI.DOMNodeStyles.prototype._createSourceCodeLocation): Deleted.
2697         (WI.DOMNodeStyles.prototype._parseSelectorListPayload): Deleted.
2698         Keep track of all `WI.CSSRule` and `WI.CSSStyleDeclaration` that have ever been associated
2699         with this object, so that if a rule's selector is changed to no longer match, and then is
2700         changed back to match again, we are able to update that rule instead of creating a new one.
2701
2702         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2703         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
2704         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
2705         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionSelectorWillChange): Added.
2706         Attempt to preserve the position of any sections that are changed and no longer apply to the
2707         current node.
2708
2709         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2710         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
2711         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
2712         Drive-by: remove unused CSS classes.
2713
2714         * UserInterface/Models/CSSRule.js:
2715         (WI.CSSRule.prototype.update):
2716         (WI.CSSRule.prototype._selectorResolved):
2717         Drive-by: remove unused event.
2718
2719         * UserInterface/Base/Multimap.js:
2720         (Multimap.prototype.has): Added.
2721         (Multimap.prototype.sets): Added.
2722         (Multimap.prototype.copy): Added.
2723
2724 2019-03-20  Devin Rousso  <drousso@apple.com>
2725
2726         Web Inspector: no way to filter out all console messages or all evaluations/results
2727         https://bugs.webkit.org/show_bug.cgi?id=167035
2728         <rdar://problem/30023523>
2729
2730         Reviewed by Timothy Hatcher.
2731
2732         * UserInterface/Views/LogContentView.js:
2733         (WI.LogContentView):
2734         (WI.LogContentView.prototype.didAppendConsoleMessageView):
2735         (WI.LogContentView.prototype._markScopeBarItemUnread):
2736         (WI.LogContentView.prototype._markScopeBarItemForMessageLevelUnread): Added.
2737         (WI.LogContentView.prototype._previousMessageRepeatCountUpdated):
2738         (WI.LogContentView.prototype._messageSourceBarSelectionDidChange):
2739         (WI.LogContentView.prototype._scopeBarSelectionDidChange):
2740         (WI.LogContentView.prototype._filterMessageElements):
2741         (WI.LogContentView.prototype.performSearch):
2742         * UserInterface/Views/LogContentView.css:
2743         (.log-scope-bar > li.unread.evaluations::before): Added.
2744
2745         * UserInterface/Views/ConsoleCommandView.js:
2746         (WI.ConsoleCommandView):
2747         Drive-by: remove unnecessary super-class extends.
2748
2749         * Localizations/en.lproj/localizedStrings.js:
2750
2751 2019-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
2752
2753         Web Inspector: Styles: enabledProperties don't get invalidated after removing property
2754         https://bugs.webkit.org/show_bug.cgi?id=196038
2755
2756         Reviewed by Timothy Hatcher.
2757
2758         * UserInterface/Models/CSSStyleDeclaration.js:
2759         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
2760
2761 2019-03-20  Devin Rousso  <drousso@apple.com>
2762
2763         Web Inspector: DOM: include window as part of any event listener chain
2764         https://bugs.webkit.org/show_bug.cgi?id=195730
2765         <rdar://problem/48916872>
2766
2767         Reviewed by Timothy Hatcher.
2768
2769         Allow non-nodes (e.g. `window`) to be listed as the target of an event listener.
2770         Add support for the same concept when showing breakpoint details after pausing on a specific
2771         event listener in the Debugger/Sources navigation sidebar.
2772
2773         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2774         (WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
2775         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByEvent):
2776         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByTarget): Added.
2777         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback):
2778         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners):
2779         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode): Deleted.
2780
2781         * UserInterface/Views/EventListenerSectionGroup.js:
2782         (WI.EventListenerSectionGroup.prototype._targetTextOrLink): Added.
2783         (WI.EventListenerSectionGroup.prototype._nodeTextOrLink): Deleted.
2784
2785         * UserInterface/Views/DebuggerSidebarPanel.js:
2786         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
2787         (WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
2788         (WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
2789         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
2790         * UserInterface/Views/DebuggerSidebarPanel.css:
2791         (.sidebar > .panel.navigation.debugger > .content > .breakpoints .tree-outline .item.event-target-window .icon): Added.
2792
2793         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2794         (WI.SourcesNavigationSidebarPanel):
2795         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
2796         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
2797         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
2798         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
2799         (.sidebar > .panel.navigation.sources > .content > .breakpoints .tree-outline .item.event-target-window .icon): Added.
2800
2801         * Localizations/en.lproj/localizedStrings.js:
2802
2803 2019-03-20  Devin Rousso  <drousso@apple.com>
2804
2805         Web Inspector: Debugger: virtualize the list of variables in the Scope sidebar
2806         https://bugs.webkit.org/show_bug.cgi?id=192648
2807         <rdar://problem/46800949>
2808
2809         Reviewed by Joseph Pecoraro.
2810
2811         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2812         (WI.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
2813
2814         * UserInterface/Views/TreeElement.js:
2815         (WI.TreeElement.prototype.set hidden):
2816         (WI.TreeElement.prototype._attach):
2817         (WI.TreeElement.prototype._detach):
2818         (WI.TreeElement.prototype.collapse):
2819         (WI.TreeElement.prototype.expand):
2820         Move `updateVirtualizedElements` calls to the owner `WI.TreeOutline` to ensure that they get
2821         called. Make the remaining calls use rAF debouncing to better coalesce updates.
2822
2823         * UserInterface/Views/TreeOutline.js:
2824         (WI.TreeOutline.prototype._rememberTreeElement):
2825         (WI.TreeOutline.prototype._forgetTreeElement):
2826         (WI.TreeOutline.prototype.registerScrollVirtualizer):
2827         (WI.TreeOutline.prototype._updateVirtualizedElements.calculateOffsetFromContainer): Added.
2828         (WI.TreeOutline.prototype._updateVirtualizedElements):
2829         (WI.TreeOutline.prototype._calculateVirtualizedValues): Deleted.
2830         Calculate the `WI.TreeOutline`'s top offset within the scroll container so that it will only
2831         update when it's within the visual area.
2832
2833         * UserInterface/Views/Utilities.js:
2834         (Array.prototype.remove):
2835         Return whether the item was actually removed from the array.
2836
2837 2019-03-20  Joseph Pecoraro  <pecoraro@apple.com>
2838
2839         Web Inspector: Timelines - Export fails for MediaTimelineRecords with originator DOM Node - Cannot serialize cyclic structure
2840         https://bugs.webkit.org/show_bug.cgi?id=196027
2841
2842         Reviewed by Timothy Hatcher.
2843
2844         * UserInterface/Models/MediaTimelineRecord.js:
2845         (WI.MediaTimelineRecord.prototype.toJSON):
2846         Remove the originator since that is a WI.DOMNode and cannot
2847         be JSON serialized.
2848
2849 2019-03-20  Devin Rousso  <drousso@apple.com>
2850
2851         Web Inspector: Debugger: move breakpoint storage to use `WI.ObjectStore`
2852         https://bugs.webkit.org/show_bug.cgi?id=192719
2853         <rdar://problem/46746857>
2854
2855         Reviewed by Timothy Hatcher.
2856
2857         * UserInterface/Controllers/DebuggerManager.js:
2858         (WI.DebuggerManager):
2859         (WI.DebuggerManager.prototype.addBreakpoint):
2860         (WI.DebuggerManager.prototype.removeBreakpoint):
2861         (WI.DebuggerManager.prototype._debuggerBreakpointOptions):
2862         (WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
2863         (WI.DebuggerManager.prototype._setBreakpoint):
2864         (WI.DebuggerManager.prototype._breakpointDisabledStateDidChange):
2865         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
2866         (WI.DebuggerManager.prototype._saveBreakpoints): Deleted.
2867
2868         * UserInterface/Models/Breakpoint.js:
2869         (WI.Breakpoint.prototype.saveIdentityToCookie):
2870         (WI.Breakpoint.prototype.serializeOptions): Added.
2871         (WI.Breakpoint.prototype.toJSON): Added.
2872         (WI.Breakpoint.prototype.get options): Deleted.
2873         (WI.Breakpoint.prototype.get info): Deleted.
2874         (WI.Breakpoint.prototype._serializableActions): Deleted.
2875         * UserInterface/Models/BreakpointAction.js:
2876         (WI.BreakpointAction.prototype.toJSON): Added.
2877         (WI.BreakpointAction.prototype.get info): Deleted.
2878
2879         * UserInterface/Base/ObjectStore.js:
2880         (WI.ObjectStore.async reset): Added.
2881         (WI.ObjectStore._open):
2882         (WI.ObjectStore.prototype.get keyPath): Added.
2883         (WI.ObjectStore.prototype.async.getAll):
2884         (WI.ObjectStore.prototype.async.put): Added.
2885         (WI.ObjectStore.prototype.async.putObject): Added.
2886         (WI.ObjectStore.prototype.async.add): Deleted.
2887         (WI.ObjectStore.prototype.async.addObject): Deleted.
2888         Replace `add` with `put` so that if a key already exists, it is overridden.
2889
2890         * UserInterface/Controllers/AuditManager.js:
2891         (WI.AuditManager.prototype.set editing):
2892         (WI.AuditManager.prototype.async processJSON):
2893
2894         * UserInterface/Controllers/BreakpointPopoverController.js:
2895         (WI.BreakpointPopoverController.prototype._popoverActionsAddActionButtonClicked):
2896         Inline some `WI.Breakpoint` static values.
2897
2898 2019-03-20  Devin Rousso  <drousso@apple.com>
2899
2900         Web Inspector: Sources: disabled breakpoints banner should be sticky
2901         https://bugs.webkit.org/show_bug.cgi?id=195104
2902         <rdar://problem/48442259>
2903
2904         Reviewed by Timothy Hatcher.
2905
2906         Allow each of the individual sections to be scrolled separately from the entire sidebar.
2907
2908         Leverage CSS variables set via JavaScript to be able to calculate the maximum height of each
2909         `WI.TreeOutline` section based on the number of items.
2910
2911         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2912         (WI.SourcesNavigationSidebarPanel):
2913         (WI.SourcesNavigationSidebarPanel.prototype._handleCallStackElementAddedOrRemoved): Added.
2914         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
2915         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
2916         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
2917         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
2918         (.sidebar > .panel.navigation.sources > .content):
2919         (.sidebar > .panel.navigation.sources > .content .details-section): Added.
2920         (.sidebar > .panel.navigation.sources > .content .details-section.paused-reason.collapsed > .header > .options,): Added.
2921         (.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .content): Added.
2922         (.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Added.
2923         (.sidebar > .panel.navigation.sources > .content > .call-stack-container): Added.
2924         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Added.
2925         (.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Added.
2926         (.sidebar > .panel.navigation.sources > .content > .resources-container): Added.
2927         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread): Added.
2928         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread > .item.thread): Added.
2929         (@media (min-height: 600px) .sidebar > .panel.navigation.sources > .content): Added.
2930         (@media (min-height: 600px) .sidebar > .panel.navigation.sources > .content > .pause-reason-container): Added.
2931         (@media (min-height: 600px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Added.
2932         (.sidebar > .panel.navigation.sources > .content > .details-section): Deleted.
2933         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,): Deleted.
2934         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content): Deleted.
2935         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Deleted.
2936         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread): Deleted.
2937         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread): Deleted.
2938         (.sidebar > .panel.navigation.sources > .content > .resources): Deleted.
2939
2940 2019-03-20  Devin Rousso  <drousso@apple.com>
2941
2942         "Reveal in Layers Tab" context menu option should not be available if the Layers Tab has not been enabled
2943         https://bugs.webkit.org/show_bug.cgi?id=196009
2944
2945         Reviewed by Joseph Pecoraro.
2946
2947         * UserInterface/Views/ContextMenuUtilities.js:
2948         (WI.appendContextMenuItemsForDOMNode):
2949
2950 2019-03-20  Devin Rousso  <drousso@apple.com>
2951
2952         Web Inspector: Console: add a setting for controlling auto-expansion of Trace messages
2953         https://bugs.webkit.org/show_bug.cgi?id=195690
2954
2955         Reviewed by Timothy Hatcher.
2956
2957         * UserInterface/Views/ConsoleMessageView.js:
2958         (WI.ConsoleMessageView.prototype._appendStackTrace):
2959
2960         * UserInterface/Base/Setting.js:
2961         * UserInterface/Views/SettingsTabContentView.js:
2962         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2963
2964         * Localizations/en.lproj/localizedStrings.js:
2965
2966 2019-03-20  Devin Rousso  <drousso@apple.com>
2967
2968         Web Inspector: DOM: selecting a node in a different frame should automatically switch the console prompt's execution context
2969         https://bugs.webkit.org/show_bug.cgi?id=195805
2970         <rdar://problem/48930866>
2971
2972         Reviewed by Timothy Hatcher.
2973
2974         Add an "Auto" execution context item that is selected by default and will update the
2975         selected execution context whenever the inspected node changes. It will also display the
2976         preferred name for whatever execution context is currently active.
2977
2978         * UserInterface/Views/QuickConsole.js:
2979         (WI.QuickConsole):
2980         (WI.QuickConsole.prototype.initializeMainExecutionContextPathComponent):
2981         (WI.QuickConsole.prototype._preferredNameForFrame): Added.
2982         (WI.QuickConsole.prototype._selectExecutionContext): Added.
2983         (WI.QuickConsole.prototype._executionContextPathComponentsToDisplay):
2984         (WI.QuickConsole.prototype._rebuildExecutionContextPathComponents):
2985         (WI.QuickConsole.prototype._framePageExecutionContextsChanged):
2986         (WI.QuickConsole.prototype._frameExecutionContextsCleared):
2987         (WI.QuickConsole.prototype._activeExecutionContextChanged):
2988         (WI.QuickConsole.prototype._createExecutionContextPathComponent):
2989         (WI.QuickConsole.prototype._insertOtherExecutionContextPathComponent):
2990         (WI.QuickConsole.prototype._removeOtherExecutionContextPathComponent):
2991         (WI.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
2992         (WI.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
2993         (WI.QuickConsole.prototype._targetRemoved):
2994         (WI.QuickConsole.prototype._pathComponentSelected):
2995         (WI.QuickConsole.prototype._handleInspectedNodeChanged): Added.
2996         (WI.QuickConsole.prototype.get selectedExecutionContext): Deleted.
2997         (WI.QuickConsole.prototype.set selectedExecutionContext): Deleted.
2998         (WI.QuickConsole.prototype._createExecutionContextPathComponentFromFrame): Deleted.
2999         * UserInterface/Views/QuickConsole.css:
3000         (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context)): Added.
3001         (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context) .execution-context): Added.
3002         (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context) .execution-context .selector-arrows): Added.
3003         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context): Deleted.
3004         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context .selector-arrows): Deleted.
3005
3006         * UserInterface/Controllers/DOMManager.js:
3007         (WI.DOMManager.prototype.get inspectedNode): Added.
3008         (WI.DOMManager.prototype.setInspectedNode):
3009         Broadcast when the inspected node changes.
3010
3011         * UserInterface/Views/NavigationBar.js:
3012         (WI.NavigationBar.prototype.layout):
3013         When `sizesToFit` is enabled, don't force any items to be hidden.
3014
3015         * Localizations/en.lproj/localizedStrings.js:
3016
3017 2019-03-20  Devin Rousso  <drousso@apple.com>
3018
3019         Web Inspector: refactor WI.TimelineDataGridNode and its subclasses to unify the API surface
3020         https://bugs.webkit.org/show_bug.cgi?id=195959
3021         <rdar://problem/49028896>
3022
3023         Reviewed by Timothy Hatcher.
3024
3025         * UserInterface/Views/TimelineDataGridNode.js:
3026         (WI.TimelineDataGridNode.prototype.get records):
3027         (WI.TimelineDataGridNode.prototype.get data):
3028         (WI.TimelineDataGridNode.prototype.refresh):
3029
3030         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
3031         (WI.HeapAllocationsTimelineDataGridNode):
3032         (WI.HeapAllocationsTimelineDataGridNode.prototype.get heapSnapshot): Added.
3033         (WI.HeapAllocationsTimelineDataGridNode.prototype.get data):
3034         (WI.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
3035         (WI.HeapAllocationsTimelineDataGridNode.prototype.createCells):
3036         (WI.HeapAllocationsTimelineDataGridNode.prototype._handleHeapSnapshotCollectedNodes):
3037         (WI.HeapAllocationsTimelineDataGridNode.prototype._handleHeapSnapshotInvalidated):
3038         (WI.HeapAllocationsTimelineDataGridNode.prototype.get record): Deleted.
3039         (WI.HeapAllocationsTimelineDataGridNode.prototype.updateTimestamp): Deleted.
3040         (WI.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotCollectedNodes): Deleted.
3041         (WI.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotInvalidated): Deleted.
3042
3043         * UserInterface/Views/LayoutTimelineDataGridNode.js:
3044         (WI.LayoutTimelineDataGridNode):
3045         (WI.LayoutTimelineDataGridNode.prototype.get data):
3046         (WI.LayoutTimelineDataGridNode.prototype.createCellContent):
3047         (WI.LayoutTimelineDataGridNode.prototype.get records): Deleted.
3048
3049         * UserInterface/Views/MediaTimelineDataGridNode.js:
3050         (WI.MediaTimelineDataGridNode):
3051         (WI.MediaTimelineDataGridNode.prototype.get records): Deleted.
3052
3053         * UserInterface/Views/ProfileNodeDataGridNode.js:
3054         (WI.ProfileNodeDataGridNode):
3055         (WI.ProfileNodeDataGridNode.prototype.get profileNode):
3056         (WI.ProfileNodeDataGridNode.prototype.get data):
3057         (WI.ProfileNodeDataGridNode.prototype.createCellContent):
3058         (WI.ProfileNodeDataGridNode.prototype._populate):
3059         (WI.ProfileNodeDataGridNode.prototype.get records): Deleted.
3060         (WI.ProfileNodeDataGridNode.prototype.get baseStartTime): Deleted.
3061         (WI.ProfileNodeDataGridNode.prototype.get rangeStartTime): Deleted.
3062         (WI.ProfileNodeDataGridNode.prototype.get rangeEndTime): Deleted.
3063         (WI.ProfileNodeDataGridNode.prototype.updateRangeTimes): Deleted.
3064         (WI.ProfileNodeDataGridNode.prototype.refresh): Deleted.
3065
3066         * UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
3067         (WI.RenderingFrameTimelineDataGridNode):
3068         (WI.RenderingFrameTimelineDataGridNode.prototype.get data):
3069         (WI.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
3070         (WI.RenderingFrameTimelineDataGridNode.prototype.get records): Deleted.
3071
3072         * UserInterface/Views/ResourceTimelineDataGridNode.js:
3073         (WI.ResourceTimelineDataGridNode):
3074         (WI.ResourceTimelineDataGridNode.prototype.get resource):
3075         (WI.ResourceTimelineDataGridNode.prototype.get data):
3076         (WI.ResourceTimelineDataGridNode.prototype.createCellContent):
3077         (WI.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
3078         (WI.ResourceTimelineDataGridNode.prototype.filterableDataForColumn):
3079         (WI.ResourceTimelineDataGridNode.prototype._createNameCellDocumentFragment):
3080         (WI.ResourceTimelineDataGridNode.prototype._cachedCellContent):
3081         (WI.ResourceTimelineDataGridNode.prototype._timelineRecordUpdated):
3082         (WI.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked):
3083         (WI.ResourceTimelineDataGridNode.prototype._updateStatus):
3084         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get startTime):
3085         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get currentTime):
3086         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get endTime):
3087         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar.else.let.graphDataSource.get _extraTimePadding):
3088         (WI.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
3089         (WI.ResourceTimelineDataGridNode.prototype.get records): Deleted.
3090
3091         * UserInterface/Views/ResourceTimingPopoverDataGridNode.js:
3092         (WI.ResourceTimingPopoverDataGridNode):
3093         (WI.ResourceTimingPopoverDataGridNode.prototype.get records): Deleted.
3094
3095         * UserInterface/Views/ScriptTimelineDataGridNode.js:
3096         (WI.ScriptTimelineDataGridNode.prototype.get data):
3097         (WI.ScriptTimelineDataGridNode.prototype.get subtitle):
3098         (WI.ScriptTimelineDataGridNode.prototype.createCellContent):
3099         (WI.ScriptTimelineDataGridNode.prototype.get records): Deleted.
3100         (WI.ScriptTimelineDataGridNode.prototype.get baseStartTime): Deleted.
3101         (WI.ScriptTimelineDataGridNode.prototype.get rangeStartTime): Deleted.
3102         (WI.ScriptTimelineDataGridNode.prototype.get rangeEndTime): Deleted.
3103         (WI.ScriptTimelineDataGridNode.prototype.updateRangeTimes): Deleted.
3104
3105         * UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
3106         (WI.SourceCodeTimelineTimelineDataGridNode.prototype.get data):
3107
3108         * UserInterface/Views/HeapAllocationsTimelineView.js:
3109         (WI.HeapAllocationsTimelineView):
3110         (WI.HeapAllocationsTimelineView.prototype.layout):
3111         (WI.HeapAllocationsTimelineView.prototype.reset):
3112         * UserInterface/Views/LayoutTimelineView.js:
3113         (WI.LayoutTimelineView.prototype._processPendingRecords):
3114         * UserInterface/Views/MediaTimelineView.js:
3115         (WI.MediaTimelineView.prototype._processPendingRecords):
3116         * UserInterface/Views/NetworkTimelineView.js:
3117         (WI.NetworkTimelineView.prototype._processPendingRecords):
3118         * UserInterface/Views/OverviewTimelineView.js:
3119         (WI.OverviewTimelineView.prototype._addResourceToDataGridIfNeeded):
3120         (WI.OverviewTimelineView.prototype._addSourceCodeTimeline):
3121         * UserInterface/Views/RenderingFrameTimelineView.js:
3122         (WI.RenderingFrameTimelineView.prototype._processPendingRecords):
3123         * UserInterface/Views/ScriptDetailsTimelineView.js:
3124         (WI.ScriptDetailsTimelineView.prototype.layout):
3125         (WI.ScriptDetailsTimelineView.prototype._processPendingRecords):
3126         Update Timeline `WI.DataGrid` views to use the new constructor format.
3127
3128         * UserInterface/Views/ResourceTimelineDataGridNode.css:
3129         (.resource-timing-popover-content .data-grid td.graph-column):
3130         Drive-by: add extra padding before/after resource timing bars shown when hovering.
3131
3132 2019-03-20  Devin Rousso  <drousso@apple.com>
3133
3134         Web Inspector: changes to CSS resources only take affect once editing stops
3135         https://bugs.webkit.org/show_bug.cgi?id=195774
3136         <rdar://problem/48905413>
3137
3138         Reviewed by Timothy Hatcher.
3139
3140         * UserInterface/Controllers/CSSManager.js:
3141         (WI.CSSManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
3142         (WI.CSSManager.prototype._resourceContentDidChange):
3143         (WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
3144         (WI.CSSManager.prototype._updateResourceContent):
3145         Use a `Throttler` instead of a 500ms debounce.
3146
3147 2019-03-20  Devin Rousso  <drousso@apple.com>
3148
3149         Web Inspector: Search: allow DOM searches to be case sensitive
3150         https://bugs.webkit.org/show_bug.cgi?id=194673
3151         <rdar://problem/48087577>
3152
3153         Reviewed by Timothy Hatcher.
3154
3155         * UserInterface/Views/SearchSidebarPanel.js:
3156         (WI.SearchSidebarPanel.prototype.performSearch):
3157
3158         * UserInterface/Views/DOMTreeContentView.js:
3159         (WI.DOMTreeContentView.prototype.performSearch.contextNodesReady):
3160
3161         * UserInterface/Controllers/DOMManager.js:
3162         (WI.DOMManager.prototype.performSearch.callback): Deleted.
3163         (WI.DOMManager.prototype.performSearch): Deleted.
3164         (WI.DOMManager.prototype.searchResult.mycallback): Deleted.
3165         (WI.DOMManager.prototype.searchResult): Deleted.
3166         (WI.DOMManager.prototype.cancelSearch): Deleted.
3167         Drive-by: remove unused code.
3168
3169 2019-03-19  Devin Rousso  <drousso@apple.com>
3170
3171         Web Inspector: Sources: provide option to group by path
3172         https://bugs.webkit.org/show_bug.cgi?id=195203
3173         <rdar://problem/27340680>
3174
3175         Reviewed by Timothy Hatcher.
3176
3177         Create top-level folders for each origin and nest all resources (in a folder chain) underneath.
3178
3179         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
3180         (WI.SourcesNavigationSidebarPanel):
3181         (WI.SourcesNavigationSidebarPanel.prototype.closed):
3182         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.searchTreeOutline): Added.
3183         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
3184         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
3185         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
3186         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
3187         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
3188         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
3189         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown.addOption): Added.
3190         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown): Added.
3191         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
3192         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
3193         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
3194         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
3195         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
3196         (.sidebar > .panel.navigation.sources > .content):
3197         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
3198         (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Added.
3199         (.sidebar > .panel.navigation.sources > .content > .resources): Added.
3200         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread): Added.
3201         (.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread > .item.thread): Added.
3202         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)): Deleted.
3203         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread): Deleted.
3204         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread): Deleted.
3205         Drive-by: fix "No Filter Results" message view to not overlap eachother.
3206         Drive-by: try to be more smart about what tree we focus when selecting a represented object.
3207
3208         * UserInterface/Views/ResourceTreeElement.js:
3209         (WI.ResourceTreeElement):
3210         (WI.ResourceTreeElement.prototype.get mainTitleText):
3211         (WI.ResourceTreeElement.prototype._updateTitles):
3212         * UserInterface/Base/URLUtilities.js:
3213         (WI.displayNameForURL):
3214         Provide a way for the display name to use a directory "/" instead of the last path component.
3215         This is needed in cases where the loaded resource is an implicit "index.*".
3216
3217         * UserInterface/Views/GeneralTreeElement.js:
3218         (WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath): Added.
3219         * UserInterface/Views/SourceCodeTreeElement.js:
3220         (WI.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath): Deleted.
3221
3222         * Localizations/en.lproj/localizedStrings.js:
3223         * UserInterface/Models/Resource.js:
3224
3225         * UserInterface/Views/DetailsSection.css:
3226         (.details-section > .header .go-to-arrow):
3227         Drive-by: vertically center go-to-arrow.
3228
3229         * UserInterface/Protocol/InspectorFrontendAPI.js:
3230         (InspectorFrontendAPI.contextMenuItemSelected):
3231
3232         * UserInterface/Base/Setting.js:
3233         * UserInterface/Views/NetworkTableContentView.js:
3234         (WI.NetworkTableContentView):
3235         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
3236         (WI.NetworkTableContentView.prototype._populateNameCell):
3237         (WI.NetworkTableContentView.prototype._generateSortComparator):
3238         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
3239         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
3240         (WI.NetworkTableContentView.prototype._handleGroupMediaRequestsByDOMNodeCheckedDidChange): Added.
3241         (WI.NetworkTableContentView.prototype._handleGroupByDOMNodeCheckedDidChange): Deleted.
3242         Rename the `groupByNode` setting to be more specific.
3243
3244 2019-03-19  Devin Rousso  <drousso@apple.com>
3245
3246         Web Inspector: CPU Usage Timeline - the right edge of each column should align with a CPU measurement
3247         https://bugs.webkit.org/show_bug.cgi?id=195789
3248         <rdar://problem/48915271>
3249
3250         Reviewed by Joseph Pecoraro.
3251
3252         Right now, each column is rendered such that the middle of the column is aligned with the
3253         time of the CPU measurement. This could potentially be misleading, as the width/position of
3254         the bar implies that there was a period of time after the actual time of the CPU measurement
3255         that should be "attributed" to that same CPU measurement.
3256
3257            1      2      3
3258                _______
3259                [  *  ]
3260                [  *  ]_______
3261                [  *  ][  *  ]
3262         _______[  *  ][  *  ]
3263         [  *  ][  *  ][  *  ]
3264         [__*__][__*__][__*__]
3265          A   B  C   D  E   F
3266
3267         In this example, one might "attribute" any work done at time B to record 1, when in reality,
3268         it should be "attributed" to record 2, since the CPU measurement had already been taken by
3269         the time B was captured, meaning that the work for B hadn't yet been done and could
3270         therefore not have affected the CPU measurement for record 1.
3271
3272         We should be rendering the columns such that the CPU measurement aligns with the trailing
3273         edge of the column, so that all of the work that could be "attributed" to a given CPU
3274         measurement comes before it.
3275
3276           1      2      3
3277             _______       ___
3278             [    *]       [
3279             [    *]_______[
3280             [    *][    *][
3281         ____[    *][    *][
3282           *][    *][    *][
3283         __*][____*][____*][__
3284          A   B  C   D  E   F
3285
3286                 NOTE: this "rendering" isn't exactly accurate, as the `*` should overlap the `]`.
3287
3288         Legend:
3289          - `[     ]` represents a column for a CPU measurement
3290          - `*` represents the time when the measurement actually takes place
3291
3292         * UserInterface/Views/CPUTimelineOverviewGraph.js:
3293         (WI.CPUTimelineOverviewGraph.prototype.layout):
3294         (WI.CPUTimelineOverviewGraph.prototype._handleChartClick):
3295         * UserInterface/Views/TimelineOverview.js:
3296         (WI.TimelineOverview.prototype._recordSelected):
3297
3298 2019-03-19  Devin Rousso  <drousso@apple.com>
3299
3300         Web Inspector: Provide $event in the console when paused on an event listener
3301         https://bugs.webkit.org/show_bug.cgi?id=188672
3302
3303         Reviewed by Timothy Hatcher.
3304
3305         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
3306         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):
3307
3308 2019-03-19  Devin Rousso  <drousso@apple.com>
3309
3310         Web Inspector: DOM: "Capture Screenshot" should only be shown if the node is attached
3311         https://bugs.webkit.org/show_bug.cgi?id=195793
3312         <rdar://problem/48916594>
3313
3314         Reviewed by Joseph Pecoraro.
3315
3316         * UserInterface/Models/DOMNode.js:
3317         (WI.DOMNode.prototype.get attached): Added.
3318
3319         * UserInterface/Views/ContextMenuUtilities.js:
3320         (WI.appendContextMenuItemsForDOMNode):
3321         * UserInterface/Views/DOMTreeElement.js:
3322         (WI.DOMTreeElement.prototype._populateTagContextMenu):
3323
3324 2019-03-18  Joseph Pecoraro  <pecoraro@apple.com>
3325
3326         Web Inspector: HAR Extension for `serverIPAddress` port number
3327         https://bugs.webkit.org/show_bug.cgi?id=195695
3328
3329         Reviewed by Matt Baker.
3330
3331         * UserInterface/Controllers/HARBuilder.js:
3332         (WI.HARBuilder.entry):
3333         (WI.HARBuilder.port):
3334         * UserInterface/Models/LocalResource.js:
3335         (WI.LocalResource.fromHAREntry):
3336
3337 2019-03-16  Nikita Vasilyev  <nvasilyev@apple.com>
3338
3339         Web Inspector: Changes: style attribute changes aren't being tracked
3340         https://bugs.webkit.org/show_bug.cgi?id=193859
3341         <rdar://problem/47568977>
3342
3343         Reviewed by Devin Rousso.
3344
3345         * UserInterface/Controllers/CSSManager.js:
3346         (WI.CSSManager):
3347         (WI.CSSManager.prototype.get modifiedStyles):
3348         (WI.CSSManager.prototype.addModifiedStyle):
3349         (WI.CSSManager.prototype._mainResourceDidChange):
3350         (WI.CSSManager.prototype.get modifiedCSSRules): Deleted.
3351         (WI.CSSManager.prototype.addModifiedCSSRule): Deleted.
3352         (WI.CSSManager.prototype.removeModifiedCSSRule): Deleted.
3353         * UserInterface/Models/CSSRule.js:
3354         (WI.CSSRule.prototype.get stringId): Deleted.
3355         (WI.CSSRule.prototype.markModified): Deleted.
3356         * UserInterface/Models/CSSStyleDeclaration.js:
3357         (WI.CSSStyleDeclaration.prototype.get stringId):
3358         (WI.CSSStyleDeclaration.prototype.markModified):
3359         Inline styles weren't tracked because they didn't have owner rules.
3360         Track style declarations instead of CSS rules.
3361
3362         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
3363         (.sidebar > .panel.changes-panel .css-rule):
3364         (.sidebar > .panel.changes-panel .css-rule + .css-rule):
3365         (.changes-panel .selector.style-attribute):
3366         (.changes-panel .selector:not(.style-attribute)):
3367         (.changes-panel .css-property-line > .property):
3368         (.changes-panel .css-property-line.unchanged): Deleted.
3369         Drive-by: use text-color-secondary for unchanged properties instead of altering opacity.
3370
3371         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
3372         (WI.ChangesDetailsSidebarPanel.prototype.layout):
3373         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
3374         For an inline style declaration, instead of showing a CSS source file location show an appropriate selector for its DOM node.
3375
3376 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
3377
3378         Web Inspector: HAR Extension for Resource Priority
3379         https://bugs.webkit.org/show_bug.cgi?id=195693
3380
3381         Reviewed by Devin Rousso.
3382
3383         * UserInterface/Controllers/HARBuilder.js:
3384         (WI.HARBuilder.entry):
3385         (WI.HARBuilder.priority):
3386         (WI.HARBuilder.networkPriorityFromHARPriority):
3387         Include priority custom extension.
3388
3389         * UserInterface/Models/LocalResource.js:
3390         (WI.LocalResource.fromHAREntry):
3391         Import priority.
3392
3393 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
3394
3395         Web Inspector: CPU Usage Timeline - Give long thread names a tooltip if they could be ellipsized
3396         https://bugs.webkit.org/show_bug.cgi?id=195314
3397
3398         Reviewed by Devin Rousso.
3399
3400         * UserInterface/Views/CPUUsageView.js:
3401         (WI.CPUUsageView):
3402
3403 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
3404
3405         Web Inspector: CPU Usage Timeline - Reduce the intensity of the orange overlay color in dark mode
3406         https://bugs.webkit.org/show_bug.cgi?id=195772
3407
3408         Reviewed by Devin Rousso.
3409
3410         * UserInterface/Views/Variables.css:
3411         (@media (prefers-color-scheme: dark)):
3412         (:root):
3413
3414 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
3415
3416         Web Inspector: Timelines - Import / Export Timeline Recordings
3417         https://bugs.webkit.org/show_bug.cgi?id=195709
3418         <rdar://problem/23188921>
3419
3420         Reviewed by Devin Rousso.
3421
3422         Timeline exporting saves TimelineRecording and TimelineOverview state.
3423         The TimelineRecording includes all kinds of model objects, such as
3424         records, markers, memory pressure events, etc. It also includes raw
3425         protocol data, such as script profiler samples. TimelineOverview
3426         includes some of the view state to restore, such as the selected
3427         time range, zoom level, and selected timeline.
3428
3429         Timeline importing constructs a new TimelineRecording by replaying
3430         the records, markers, and other events, as well as re-initializing
3431         more state. To finally display the imported recording, the content
3432         view will immediately initialize start/current/end times and the
3433         overview will restore the view state.
3434
3435         * Localizations/en.lproj/localizedStrings.js:
3436         New strings.
3437
3438         * UserInterface/Controllers/TimelineManager.js:
3439         (WI.TimelineManager.synthesizeImportError):
3440         (WI.TimelineManager.prototype.importRecording):
3441         Import API.
3442
3443         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
3444         Initialize the samples on the recording via a different path
3445         so that the data can be saved for exporting.
3446
3447         * UserInterface/Models/TimelineRecording.js:
3448         (WI.TimelineRecording):
3449         (WI.TimelineRecording.import):
3450         (WI.TimelineRecording.prototype.exportData):
3451         (WI.TimelineRecording.prototype.get capturing):
3452         (WI.TimelineRecording.prototype.get imported):
3453         (WI.TimelineRecording.prototype.unloaded):
3454         (WI.TimelineRecording.prototype.reset):
3455         (WI.TimelineRecording.prototype.addEventMarker):
3456         (WI.TimelineRecording.prototype.addRecord):
3457         (WI.TimelineRecording.prototype.addMemoryPressureEvent):
3458         (WI.TimelineRecording.prototype.initializeCallingContextTrees):
3459         (WI.TimelineRecording.prototype.canExport):
3460         Save data at the TimelineRecording level that can be used for export.
3461         We only allow exporting a TimelineRecording that has started/stopped
3462         at least once and is not currently capturing.
3463
3464         * UserInterface/Views/TimelineRecordingContentView.js:
3465         (WI.TimelineRecordingContentView):
3466         (WI.TimelineRecordingContentView.prototype.get navigationItems):
3467         (WI.TimelineRecordingContentView.prototype.get supportsSave):
3468         (WI.TimelineRecordingContentView.prototype.get saveData):
3469         (WI.TimelineRecordingContentView.prototype.shown):
3470         (WI.TimelineRecordingContentView.prototype._capturingStarted):
3471         (WI.TimelineRecordingContentView.prototype._capturingStopped):
3472         (WI.TimelineRecordingContentView.prototype._initializeImportedRecording):
3473         (WI.TimelineRecordingContentView.prototype._exportTimelineRecording):
3474         (WI.TimelineRecordingContentView.prototype._importButtonNavigationItemClicked):
3475         (WI.TimelineRecordingContentView.prototype._recordingReset):
3476         Add Import and Export buttons in the Timeline navigation bar.
3477
3478         * UserInterface/Views/TimelineOverview.js:
3479         (WI.TimelineOverview):
3480         (WI.TimelineOverview.prototype.exportData):
3481         (WI.TimelineOverview.prototype._instrumentAdded):
3482         (WI.TimelineOverview.prototype._recordingImported):
3483         When importing a recording update the TimelineOverview state
3484         soon afterwards.
3485
3486         * UserInterface/Models/CPUTimelineRecord.js:
3487         (WI.CPUTimelineRecord.fromJSON):
3488         (WI.CPUTimelineRecord.prototype.toJSON):
3489         * UserInterface/Models/GarbageCollection.js:
3490         (WI.GarbageCollection.fromJSON):
3491         (WI.GarbageCollection.prototype.toJSON):
3492         * UserInterface/Models/Geometry.js:
3493         (WI.Quad.fromJSON):
3494         (WI.Quad.prototype.toJSON):
3495         * UserInterface/Models/HeapAllocationsTimelineRecord.js:
3496         (WI.HeapAllocationsTimelineRecord.fromJSON):
3497         (WI.HeapAllocationsTimelineRecord.prototype.toJSON):
3498         * UserInterface/Models/LayoutTimelineRecord.js:
3499         (WI.LayoutTimelineRecord.fromJSON):
3500         (WI.LayoutTimelineRecord.prototype.toJSON):
3501         * UserInterface/Models/MediaTimelineRecord.js:
3502         (WI.MediaTimelineRecord.fromJSON):
3503         (WI.MediaTimelineRecord.prototype.toJSON):
3504         * UserInterface/Models/MemoryPressureEvent.js:
3505         (WI.MemoryPressureEvent.fromJSON):
3506         (WI.MemoryPressureEvent.prototype.toJSON):
3507         * UserInterface/Models/MemoryTimelineRecord.js:
3508         (WI.MemoryTimelineRecord):
3509         (WI.MemoryTimelineRecord.fromJSON):
3510         (WI.MemoryTimelineRecord.prototype.toJSON):
3511         * UserInterface/Models/RenderingFrameTimelineRecord.js:
3512         (WI.RenderingFrameTimelineRecord.fromJSON):
3513         (WI.RenderingFrameTimelineRecord.prototype.toJSON):
3514         * UserInterface/Models/ResourceTimelineRecord.js:
3515         (WI.ResourceTimelineRecord.fromJSON):
3516         (WI.ResourceTimelineRecord.prototype.toJSON):
3517         * UserInterface/Models/ScriptTimelineRecord.js:
3518         (WI.ScriptTimelineRecord.fromJSON):
3519         (WI.ScriptTimelineRecord.prototype.toJSON):
3520         * UserInterface/Models/TimelineMarker.js:
3521         (WI.TimelineMarker.fromJSON):
3522         (WI.TimelineMarker.prototype.toJSON):
3523         (WI.TimelineMarker.prototype.get type):
3524         (WI.TimelineMarker.prototype.get details):
3525         (WI.TimelineMarker.prototype.set time):
3526         (WI.TimelineMarker):
3527         * UserInterface/Models/TimelineRecord.js:
3528         (WI.TimelineRecord.fromJSON):
3529         (WI.TimelineRecord.prototype.toJSON):
3530         Import / Export toJSON / fromJSON implementations.
3531         
3532         * UserInterface/Views/CPUTimelineOverviewGraph.js:
3533         (WI.CPUTimelineOverviewGraph):
3534         (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
3535         (WI.CPUTimelineOverviewGraph.prototype._processRecord):
3536         * UserInterface/Views/LayoutTimelineOverviewGraph.js:
3537         (WI.LayoutTimelineOverviewGraph):
3538         (WI.LayoutTimelineOverviewGraph.prototype._layoutTimelineRecordAdded):
3539         (WI.LayoutTimelineOverviewGraph.prototype._processRecord):
3540         * UserInterface/Views/LayoutTimelineView.js:
3541         (WI.LayoutTimelineView):
3542         (WI.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
3543         (WI.LayoutTimelineView.prototype._processRecord):
3544         * UserInterface/Views/MediaTimelineView.js:
3545         (WI.MediaTimelineView):
3546         (WI.MediaTimelineView.prototype._handleRecordAdded):
3547         (WI.MediaTimelineView.prototype._processRecord):
3548         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
3549         (WI.MemoryTimelineOverviewGraph):
3550         (WI.MemoryTimelineOverviewGraph.prototype._memoryTimelineRecordAdded):
3551         (WI.MemoryTimelineOverviewGraph.prototype._processRecord):
3552         * UserInterface/Views/MemoryTimelineView.js:
3553         (WI.MemoryTimelineView):
3554         (WI.MemoryTimelineView.prototype._memoryTimelineRecordAdded):
3555         (WI.MemoryTimelineView.prototype._processRecord):
3556         * UserInterface/Views/NetworkTimelineOverviewGraph.js:
3557         (WI.NetworkTimelineOverviewGraph):
3558         (WI.NetworkTimelineOverviewGraph.prototype.reset):
3559         (WI.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded):
3560         (WI.NetworkTimelineOverviewGraph.prototype._processRecord):
3561         (WI.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded.compareByStartTime): Deleted.
3562         * UserInterface/Views/NetworkTimelineView.js:
3563         (WI.NetworkTimelineView):
3564         (WI.NetworkTimelineView.prototype._networkTimelineRecordAdded):
3565         (WI.NetworkTimelineView.prototype._processRecord):
3566         * UserInterface/Views/RenderingFrameTimelineView.js:
3567         (WI.RenderingFrameTimelineView):
3568         (WI.RenderingFrameTimelineView.prototype._renderingFrameTimelineRecordAdded):
3569         (WI.RenderingFrameTimelineView.prototype._processRecord):
3570         * UserInterface/Views/ScriptDetailsTimelineView.js:
3571         (WI.ScriptDetailsTimelineView):
3572         (WI.ScriptDetailsTimelineView.prototype._scriptTimelineRecordAdded):
3573         (WI.ScriptDetailsTimelineView.prototype._processRecord):
3574         Add common _processRecord path to each timeline OverviewGraph and TimelineView.
3575         By calling this in construction we populate graphs with TimelineRecords that
3576         may have already existed. This is necessary for imports, but this also fixes
3577         the case where you enable a timeline that had data and it didn't show data.
3578
3579         * UserInterface/Views/LayoutTimelineOverviewGraph.css:
3580         (.timeline-overview-graph.layout-overview > .graph-row):
3581         (.timeline-overview-graph.layout-overview > .graph-row > .timeline-record-bar):
3582         (.timeline-overview-graph.layout-overview > .graph-row > .timeline-record-bar > .segment):
3583         (.timeline-overview-graph.layout > .graph-row): Deleted.
3584         (.timeline-overview-graph.layout > .graph-row > .timeline-record-bar): Deleted.
3585         (.timeline-overview-graph.layout > .graph-row > .timeline-record-bar > .segment): Deleted.
3586         * UserInterface/Views/TimelineRecordBar.css:
3587         (.timeline-record-bar.timeline-record-type-layout.paint > .segment,):
3588         (.timeline-record-bar.timeline-record-type-layout.layout-timeline-record-paint > .segment,): Deleted.
3589         We simplified some of the sub-record type enum strings. To do this we needed to change
3590         "layout" to "layout-overview" to avoid a conflict.
3591
3592 2019-03-15  Joseph Pecoraro  <pecoraro@apple.com>
3593
3594         Web Inspector: Network - Toggle Between Live Activity and Imported HAR resource collections
3595         https://bugs.webkit.org/show_bug.cgi?id=195734
3596
3597         Reviewed by Devin Rousso.
3598
3599         * Localizations/en.lproj/localizedStrings.js:
3600         * UserInterface/Images/NetworkHAR.svg: Added.
3601         * UserInterface/Images/NetworkOverview.svg: Added.
3602         * UserInterface/Views/NetworkTableContentView.css:
3603         (.content-view.tab.network > .content-browser > .navigation-bar .hierarchical-path .icon):
3604         (.network-overview-icon > .icon):
3605         (.network-har-icon > .icon):
3606         (@media (prefers-color-scheme: dark)):
3607
3608         * UserInterface/Views/NetworkTableContentView.js:
3609         (WI.NetworkTableContentView):
3610         (WI.NetworkTableContentView.prototype.get navigationItems):
3611         (WI.NetworkTableContentView.prototype.reset):
3612         (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject):
3613         (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex):
3614         (WI.NetworkTableContentView.prototype.tableNumberOfRows):
3615         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
3616         (WI.NetworkTableContentView.prototype.tableSelectionDidChange):
3617         (WI.NetworkTableContentView.prototype.tablePopulateCell):
3618         (WI.NetworkTableContentView.prototype._addCollection):
3619         (WI.NetworkTableContentView.prototype._setActiveCollection):
3620         (WI.NetworkTableContentView.prototype._addCollectionPathComponent):
3621         (WI.NetworkTableContentView.prototype._collectionsHierarchicalPathComponentWasSelected):
3622         (WI.NetworkTableContentView.prototype._changeCollection):
3623         (WI.NetworkTableContentView.prototype.handleClearShortcut):
3624         (WI.NetworkTableContentView.prototype._updateWaterfallTimeRange):
3625         (WI.NetworkTableContentView.prototype._updateWaterfallTimelineRuler):
3626         (WI.NetworkTableContentView.prototype._canExportHAR):
3627         (WI.NetworkTableContentView.prototype._processPendingEntries):
3628         (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
3629         (WI.NetworkTableContentView.prototype._rowIndexForRepresentedObject):
3630         (WI.NetworkTableContentView.prototype._updateEntryForResource):
3631         (WI.NetworkTableContentView.prototype._updateEmptyFilterResultsMessage):
3632         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
3633         (WI.NetworkTableContentView.prototype._mainFrameDidChange):
3634         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
3635         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
3636         (WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange):
3637         (WI.NetworkTableContentView.prototype._handleResourceAdded):
3638         (WI.NetworkTableContentView.prototype._runForMainCollection):
3639         (WI.NetworkTableContentView.prototype._isShowingMainCollection):
3640         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
3641         (WI.NetworkTableContentView.prototype._handleNodeDidFireEvent):
3642         (WI.NetworkTableContentView.prototype._handleNodeLowPowerChanged):
3643         (WI.NetworkTableContentView.prototype._updateSort):
3644         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
3645         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
3646         (WI.NetworkTableContentView.prototype._HARResources):
3647         (WI.NetworkTableContentView.prototype._importHAR):
3648         Introduce the concept of collections that can be swapped in/out
3649         to re-render the Network Table with different contents.
3650
3651 2019-03-15  Devin Rousso  <drousso@apple.com>
3652
3653         Web Inspector: provide a way to capture a screenshot of a node from within the page
3654         https://bugs.webkit.org/show_bug.cgi?id=194279
3655         <rdar://problem/10731573>
3656
3657         Reviewed by Joseph Pecoraro.
3658
3659         Add `console.screenshot` functionality, which displays a screenshot of a given object (if
3660         able) within Web Inspector's Console tab. From there, it can be viewed and saved.
3661
3662         Currently, `console.screenshot` will
3663          - capture an image of a `Node` (if provided)
3664          - capture an image of the viewport if nothing is provided
3665
3666         * UserInterface/Models/ConsoleMessage.js:
3667         (WI.ConsoleMessage):
3668         * UserInterface/Views/ConsoleCommandView.js:
3669         (WI.ConsoleCommandView.prototype.render):
3670         * UserInterface/Views/ConsoleMessageView.js:
3671         (WI.ConsoleMessageView.prototype.render):
3672         (WI.ConsoleMessageView.prototype.toClipboardString):
3673         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
3674         (WI.ConsoleMessageView.prototype._appendSavedResultIndex):
3675         (WI.ConsoleMessageView.prototype._appendStackTrace):
3676         (WI.ConsoleMessageView.prototype._makeExpandable):
3677         (WI.ConsoleMessageView.prototype._handleContextMenu): Added.
3678         * UserInterface/Views/ConsoleMessageView.css:
3679         (.console-user-command.special-user-log > .console-message-body): Added.
3680         (.console-message-body): Added.
3681         (.console-message-body > span): Added.
3682         (.console-message-body > span > :matches(.console-message-enclosed, .console-message-preview, .console-message-preview-divider)): Added.
3683         (.console-message-body > .console-image): Added.
3684         (.console-message-body > .show-grid): Added.
3685         (.console-error-level .console-message-body): Added.
3686         (.console-warning-level .console-message-body): Added.
3687         (.console-log-level.console-image-container::before): Added.
3688         (.console-user-command > .console-message-body): Added.
3689         (.console-warning-level .console-message-body): Added.
3690         (.console-error-level .console-message-body): Added.
3691         (.console-user-command > .console-message-body): Added.
3692         (.console-user-command.special-user-log > .console-message-text): Deleted.
3693         (.console-message-text): Deleted.
3694         (.console-message-text > span): Deleted.
3695         (.console-message-text > span > :matches(.console-message-enclosed, .console-message-preview, .console-message-preview-divider)): Deleted.
3696         (.console-error-level .console-message-text): Deleted.
3697         (.console-warning-level .console-message-text): Deleted.
3698         (.console-user-command > .console-message-text): Deleted.
3699         (.console-warning-level .console-message-text): Deleted.
3700         (.console-error-level .console-message-text): Deleted.
3701         (.console-user-command > .console-message-text): Deleted.
3702         * UserInterface/Views/LogContentView.css:
3703         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-text .highlighted): Added.
3704         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-body .highlighted): Deleted.
3705         Renamed variables/classes to be more semantically correct when the content is an image.
3706          - `_messageTextElement` to `_messageBodyElement` (JS)
3707          - `.console-message-text` to `.console-message-body` (CSS)
3708
3709         * UserInterface/Controllers/JavaScriptLogViewController.js:
3710         (WI.JavaScriptLogViewController.prototype.renderPendingMessages):
3711
3712         * UserInterface/Views/Main.css:
3713         (:matches(img, canvas).show-grid):
3714         (@media (prefers-color-scheme: dark) :matches(img, canvas).show-grid):
3715
3716         * UserInterface/Base/FileUtilities.js:
3717         (WI.FileUtilities.screenshotString): Added.
3718
3719         * UserInterface/Models/NativeFunctionParameters.js:
3720         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
3721
3722         * UserInterface/Images/ConsoleImage.svg: Copied from UserInterface/Images/Canvas.svg.
3723         * Localizations/en.lproj/localizedStrings.js:
3724
3725 2019-03-14  Nikita Vasilyev  <nvasilyev@apple.com>
3726
3727         Web Inspector: Styles: Jump to effective property button doesn't hide after overridden property become effective
3728         https://bugs.webkit.org/show_bug.cgi?id=195770
3729         <rdar://problem/48903634>
3730
3731         Reviewed by Matt Baker.
3732
3733         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3734         (.spreadsheet-style-declaration-editor .property .select-effective-property): Added.
3735         (.spreadsheet-style-declaration-editor .property.overridden .select-effective-property): Deleted.
3736         Hide `.select-effective-property` element for properties that aren't overridden.
3737
3738 2019-03-14  Devin Rousso  <drousso@apple.com>
3739
3740         Web Inspector: REGRESSION: Canvas: the first processed action should be selected as soon as it's available if no previous selected action exists
3741         https://bugs.webkit.org/show_bug.cgi?id=195732
3742         <rdar://problem/48875214>
3743
3744         Reviewed by Matt Baker.
3745
3746         * UserInterface/Views/CanvasSidebarPanel.js:
3747         (WI.CanvasSidebarPanel.prototype._handleRecordingProcessedAction):
3748         Rather than wait until the entire recording is ready, set the selected action as soon as the
3749         first action is ready (assuming there isn't already a selected action).
3750
3751 2019-03-14  Joseph Pecoraro  <pecoraro@apple.com>
3752
3753         Web Inspector: Network - HAR Import
3754         https://bugs.webkit.org/show_bug.cgi?id=195642
3755         <rdar://problem/34820974>
3756
3757         Reviewed by Devin Rousso.
3758
3759         * Localizations/en.lproj/localizedStrings.js
3760         * UserInterface/Test.html:
3761         * UserInterface/Test.html:
3762         New strings and resources.
3763
3764         * UserInterface/Controllers/HARBuilder.js:
3765         (WI.HARBuilder.dateFromHARDate):
3766         (WI.HARBuilder.protocolFromHARProtocol):
3767         (WI.HARBuilder.responseSourceFromHARFetchType):
3768         Reverse parsers from HAR to WI.Resource types.
3769
3770         * UserInterface/Models/LocalResource.js: Added.
3771         (WI.LocalResource):
3772         (WI.LocalResource.headersArrayToHeadersObject):
3773         (WI.LocalResource.fromHAREntry):
3774         (WI.LocalResource.prototype.hasContent):
3775         (WI.LocalResource.prototype.setContent):
3776         (WI.LocalResource.prototype.requestContentFromBackend):
3777         A Resource subclass with data fully supplied in the frontend.
3778
3779         * UserInterface/Controllers/NetworkManager.js:
3780         (WI.NetworkManager):
3781         (WI.NetworkManager.synthesizeImportError):
3782         (WI.NetworkManager.prototype.localResourceForURL):
3783         (WI.NetworkManager.prototype.processHAR):
3784         Process a HAR and extract local resources.
3785
3786         * UserInterface/Views/NetworkTableContentView.js:
3787         (WI.NetworkTableContentView):
3788         (WI.NetworkTableContentView.prototype.reset):
3789         (WI.NetworkTableContentView.prototype._handleResourceAdded):
3790         (WI.NetworkTableContentView.prototype._importHAR):
3791         Add an import button. When an import succeeds reset the
3792         table and only show imported resources (ignoring page
3793         loaded resources).
3794
3795 2019-03-14  Devin Rousso  <drousso@apple.com>
3796
3797         Web Inspector: Console: getEventListeners should work for any EventTarget
3798         https://bugs.webkit.org/show_bug.cgi?id=195713
3799
3800         Reviewed by Joseph Pecoraro.
3801
3802         * UserInterface/Models/NativeFunctionParameters.js:
3803
3804 2019-03-14  Devin Rousso  <drousso@apple.com>
3805
3806         Web Inspector: Styles: `::-webkit-scrollbar*` rules aren't shown
3807         https://bugs.webkit.org/show_bug.cgi?id=195123
3808         <rdar://problem/48450148>
3809
3810         Reviewed by Joseph Pecoraro.
3811
3812         * UserInterface/Controllers/CSSManager.js:
3813         (WI.CSSManager.displayNameForPseudoId): Added.
3814
3815         * UserInterface/Models/DOMNodeStyles.js:
3816         (WI.DOMNodeStyles.static uniqueOrderedStyles): Added.
3817         (WI.DOMNodeStyles.prototype.get uniqueOrderedStyles):
3818
3819         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3820         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
3821         (WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionFilterApplied):
3822         Rather than iterate over the `WI.DOMNode`'s list of pseudo-elements (which is only ::before
3823         and ::after), we iterate over the `WI.DOMNodeStyle`'s list of pseudo-element rules. This is
3824         an object where the key is a `CSS.PseudoId` and the value is an object containing all the
3825         matched rules and ordered styles for that pseudo-type. We can preserve the current
3826         functionality by using the ::before/::after `WI.DOMNode` when we encounter one of those
3827         pseudo-ids.
3828
3829         An additional benefit of this change is that `::before`/`::after` styles will still appear
3830         in the Rules panel even if they don't have a `content` property set (e.g. when the
3831         `::before`/`::after` pseudo-element doesn't exist). This is because the styles are no longer
3832         fetched from those pseudo-element nodes directly, but rather as a matched style for the
3833         parent node. As such, editing a `content` property to become invalid/disablde in a
3834         `::before`/`::after` rule won't make the entire rule disappeaer.
3835
3836 2019-03-14  Devin Rousso  <drousso@apple.com>
3837
3838         Web Inspector: we should show artificial context menus on mousedown instead of click
3839         https://bugs.webkit.org/show_bug.cgi?id=195494
3840
3841         Reviewed by Joseph Pecoraro.
3842
3843         * UserInterface/Views/ContextMenu.js:
3844         (WI.ContextMenu):
3845         (WI.ContextMenu.prototype.show):
3846         (WI.ContextMenu.prototype.addBeforeShowCallback): Added.
3847         (WI.ContextMenu.prototype.handleEvent):
3848         Provide a way to register a callback that will be called right as the "contextmenu" event is
3849         handled, but before the context menu is actually shown. Since "mousedown" events are also