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