Web Inspector: Styles: Command-/ should toggle edited property
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-02-25  Nikita Vasilyev  <nvasilyev@apple.com>
2
3         Web Inspector: Styles: Command-/ should toggle edited property
4         https://bugs.webkit.org/show_bug.cgi?id=194967
5         <rdar://problem/48329852>
6
7         Reviewed by Devin Rousso.
8
9         * UserInterface/Models/CSSProperty.js:
10         (WI.CSSProperty.prototype.commentOut):
11         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
12         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertySelect):
13         * UserInterface/Views/SpreadsheetStyleProperty.js:
14         (WI.SpreadsheetStyleProperty.prototype.update):
15         (WI.SpreadsheetStyleProperty.prototype._toggle):
16         (WI.SpreadsheetStyleProperty.prototype._select):
17
18 2019-02-25  Devin Rousso  <drousso@apple.com>
19
20         Web Inspector: REGRESSION(r242018): Timelines shows no results
21         https://bugs.webkit.org/show_bug.cgi?id=195017
22
23         Reviewed by Joseph Pecoraro.
24
25         `simpleGlobStringToRegExp` can return `null` if the provided search query is an empty string.
26
27         * UserInterface/Base/SearchUtilities.js:
28         (WI.SearchUtilities.prototype.regExpForString):
29         Add assertions that the provided search query is a valid non-empty string.
30
31         * UserInterface/Views/DataGrid.js:
32         (WI.DataGrid.prototype._updateFilter):
33         If the search query is empty, don't attempt to create a `RegExp` for it.
34
35 2019-02-25  Matt Baker  <mattbaker@apple.com>
36
37         Web Inspector: REGRESSION: TreeElement or Table row selected using the keyboard should always be revealed
38         https://bugs.webkit.org/show_bug.cgi?id=194918
39         <rdar://problem/48289314>
40
41         Reviewed by Devin Rousso.
42
43         * UserInterface/Views/Table.js:
44         (WI.Table.prototype.selectionControllerSelectionDidChange):
45
46         * UserInterface/Views/TreeOutline.js:
47         (WI.TreeOutline.prototype._treeKeyDown):
48
49 2019-02-25  Devin Rousso  <drousso@apple.com>
50
51         Web Inspector: [META] Merge Resources and Debugger into a single Sources tab
52         https://bugs.webkit.org/show_bug.cgi?id=183420
53
54         Reviewed by Joseph Pecoraro.
55
56         * UserInterface/Views/SourcesNavigationSidebarPanel.js: Added.
57         (WI.SourcesNavigationSidebarPanel):
58         (WI.SourcesNavigationSidebarPanel.shouldPlaceResourcesAtTopLevel):
59         (WI.SourcesNavigationSidebarPanel.prototype.get minimumWidth):
60         (WI.SourcesNavigationSidebarPanel.prototype.closed):
61         (WI.SourcesNavigationSidebarPanel.prototype.showDefaultContentView):
62         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
63         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
64         (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
65         (WI.SourcesNavigationSidebarPanel.prototype.resetFilter):
66         (WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
67         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
68         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
69         (WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
70         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
71         (WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
72         (WI.SourcesNavigationSidebarPanel.prototype._addTarget):
73         (WI.SourcesNavigationSidebarPanel.prototype._findCallStackTargetTreeElement):
74         (WI.SourcesNavigationSidebarPanel.prototype._updateCallStackTreeOutline):
75         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
76         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
77         (WI.SourcesNavigationSidebarPanel.prototype._addScript):
78         (WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
79         (WI.SourcesNavigationSidebarPanel.prototype._addDebuggerTreeElementForSourceCode):
80         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
81         (WI.SourcesNavigationSidebarPanel.prototype._compareBreakpointTreeElements):
82         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
83         (WI.SourcesNavigationSidebarPanel.prototype._removeBreakpoint):
84         (WI.SourcesNavigationSidebarPanel.prototype._removeAllBreakpoints):
85         (WI.SourcesNavigationSidebarPanel.prototype._toggleAllBreakpoints):
86         (WI.SourcesNavigationSidebarPanel.prototype._breakpointsBeneathTreeElement):
87         (WI.SourcesNavigationSidebarPanel.prototype._addIssue):
88         (WI.SourcesNavigationSidebarPanel.prototype._removeDebuggerTreeElement):
89         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpointsForSourceCode):
90         (WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
91         (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner):
92         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
93         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonGotoArrow):
94         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
95         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceTypeScopeBarSelectionChanged):
96         (WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
97         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
98         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointClicked):
99         (WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
100         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceAdded):
101         (WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
102         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointAdded):
103         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointRemoved):
104         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerBreakpointsEnabledDidChange):
105         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptAdded):
106         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptRemoved):
107         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptsCleared):
108         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
109         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
110         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerCallFramesDidChange):
111         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerActiveCallFrameDidChange):
112         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerWaitingToPause):
113         (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
114         (WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointResolvedStateDidChange):
115         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleIssueAdded):
116         (WI.SourcesNavigationSidebarPanel.prototype._handleConsoleCleared):
117         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart):
118         (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped):
119         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
120         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetAdded):
121         (WI.SourcesNavigationSidebarPanel.prototype._handleTargetRemoved):
122         (WI.SourcesNavigationSidebarPanel.prototype._handleExtraDomainsActivated):
123         * UserInterface/Views/SourcesNavigationSidebarPanel.css: Added.
124         (.sidebar > .panel.navigation.sources > .content):
125         (.sidebar > .panel.navigation.sources > .navigation-bar):
126         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints):
127         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints.activated):
128         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume):
129         (.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume.activated):
130         (.sidebar > .panel.navigation.sources > .content > .warning-banner):
131         (.sidebar > .panel.navigation.sources > .content > .details-section):
132         (.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
133         (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content):
134         (.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)):
135         (.sidebar > .panel.navigation.sources > .content > .navigation-bar):
136         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread):
137         (.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread):
138         (@media (prefers-dark-interface) .sidebar > > .content > .panel.navigation.sources .warning-banner):
139
140         * UserInterface/Views/SourcesTabContentView.js: Added.
141         (WI.SourcesTabContentView):
142         (WI.SourcesTabContentView.tabInfo):
143         (WI.SourcesTabContentView.isTabAllowed):
144         (WI.SourcesTabContentView.prototype.get type):
145         (WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
146         (WI.SourcesTabContentView.prototype.canShowRepresentedObject):
147         (WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
148         (WI.SourcesTabContentView.prototype.showScopeChainDetailsSidebarPanel):
149         (WI.SourcesTabContentView.prototype.revealAndSelectBreakpoint):
150
151         * UserInterface/Views/CanvasSidebarPanel.js:
152         (WI.CanvasSidebarPanel):
153         * UserInterface/Views/DebuggerSidebarPanel.js:
154         (WI.DebuggerSidebarPanel):
155         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
156         * UserInterface/Views/NavigationSidebarPanel.js:
157         (WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
158         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
159         (WI.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
160         Rework `createContentTreeOutline` to allow for additional symbols.
161         Add another symbol to ensure that the `WI.TreeOutline` is not used for cookie restoration.
162
163         * UserInterface/Protocol/InspectorFrontendAPI.js:
164         (InspectorFrontendAPI.showResources):
165         * UserInterface/Views/ContextMenuUtilities.js:
166         (WI.appendContextMenuItemsForURL):
167         * UserInterface/Views/DefaultDashboardView.js:
168         (WI.DefaultDashboardView.prototype._resourcesItemWasClicked):
169         * UserInterface/Views/SourceCodeTextEditor.js:
170         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
171
172         * UserInterface/Views/TabBrowser.js:
173         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
174
175         * UserInterface/Base/Main.js:
176         (WI.contentLoaded):
177         (WI.showSourcesTab): Added.
178         (WI.isShowingSourcesTab): Added.
179         (WI.tabContentViewClassForRepresentedObject):
180         (WI._debuggerDidPause):
181
182         * UserInterface/Views/DebuggerTabContentView.js:
183         (WI.DebuggerTabContentView.isTabAllowed):
184         * UserInterface/Views/ResourcesTabContentView.js:
185         (WI.ResourcesTabContentView.isTabAllowed):
186
187         * UserInterface/Base/Setting.js:
188         * UserInterface/Views/SettingsTabContentView.js:
189         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
190
191         * UserInterface/Main.html:
192         * UserInterface/Images/Sources.svg: Added.
193         * Localizations/en.lproj/localizedStrings.js:
194
195 2019-02-24  Devin Rousso  <drousso@apple.com>
196
197         Web Inspector: Change the InspectorOverlay to use native rather than canvas
198         https://bugs.webkit.org/show_bug.cgi?id=105023
199         <rdar://problem/13443692>
200
201         Reviewed by Brian Burg.
202
203         * UserInterface/Base/Main.js:
204         (WI.initializeTarget):
205
206         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
207         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
208         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
209         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
210         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
211         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
212         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
213         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
214         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
215         * Versions/Inspector-iOS-10.0.json:
216         * Versions/Inspector-iOS-10.3.json:
217         * Versions/Inspector-iOS-11.0.json:
218         * Versions/Inspector-iOS-11.3.json:
219         * Versions/Inspector-iOS-12.0.json:
220         * Versions/Inspector-iOS-12.2.json:
221         * Versions/Inspector-iOS-8.0.json:
222         * Versions/Inspector-iOS-9.0.json:
223         * Versions/Inspector-iOS-9.3.json:
224         Remove `Debugger.setOverlayMessage` command as it hasn't been used and is no longer supported.
225
226 2019-02-24  Devin Rousso  <drousso@apple.com>
227
228         Web Inspector: provide a way to make searches case sensitive or use a regular expression
229         https://bugs.webkit.org/show_bug.cgi?id=192527
230
231         Reviewed by Joseph Pecoraro.
232
233         * UserInterface/Base/SearchUtilities.js: Added.
234         (WI.SearchUtilities.get defaultSettings):
235         (WI.SearchUtilities.createSettings):
236         (WI.SearchUtilities.regExpForString):
237         (WI.SearchUtilities.createSettingsButton):
238         (WI.SearchUtilities.createSettingsButton.toggleActive):
239         * UserInterface/Views/Main.css:
240         (.search-settings): Added.
241         (.search-settings > .glyph): Added.
242         (.search-settings:active > .glyph): Added.
243         (.search-settings.active > .glyph): Added.
244         (.search-settings:active.active > .glyph): Added.
245         Create static utility class for handling settings related to searching/filtering.
246
247         * UserInterface/Base/Setting.js:
248         * UserInterface/Views/SettingsTabContentView.js:
249         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
250         Create default search settings that apply across WebInspector, unless a more specific
251         setting has been created that overrides it (e.g. the navigation sidebar or Search tab).
252
253         * UserInterface/Views/SearchSidebarPanel.js:
254         (WI.SearchSidebarPanel):
255         (WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
256         (WI.SearchSidebarPanel.prototype.performSearch.resourceCallback):
257         (WI.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
258         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
259         (WI.SearchSidebarPanel.prototype.performSearch.searchScripts):
260         (WI.SearchSidebarPanel.prototype.performSearch.domSearchResults):
261         (WI.SearchSidebarPanel.prototype.performSearch.domCallback):
262         (WI.SearchSidebarPanel.prototype.performSearch):
263         * UserInterface/Views/SearchSidebarPanel.css:
264         (.sidebar > .panel.navigation.search > .search-bar):
265         (.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
266         Add a (*) settings "gear" after each `<input type="search">` that shows a contextmenu with
267         checkboxes for each search setting. Any settings changed for each input take precedence over
268         the default settings, but will match the corresponding default setting if it's changed.
269
270         * UserInterface/Views/SearchResultTreeElement.js:
271         (WI.SearchResultTreeElement.truncateAndHighlightTitle):
272         Use the length of the found text, rather than the length of the query.
273
274         * UserInterface/Views/DOMTreeElement.js:
275         (WI.DOMTreeElement.prototype._highlightSearchResults):
276         * UserInterface/Views/DataGrid.js:
277         (WI.DataGrid.prototype._updateFilter):
278         * UserInterface/Views/LogContentView.js:
279         (WI.LogContentView.prototype.performSearch):
280         * UserInterface/Views/NetworkTableContentView.js:
281         (WI.NetworkTableContentView.prototype._urlFilterDidChange):
282         * UserInterface/Views/ResourceHeadersContentView.js:
283         (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
284         * UserInterface/Views/ResourceSecurityContentView.js:
285         (WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
286         * UserInterface/Views/SourceCodeTextEditor.js:
287         (WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
288         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
289         * UserInterface/Views/TextEditor.js:
290         (WI.TextEditor.prototype.performSearch):
291         Use the default search settings when searching/filtering.
292
293         * UserInterface/Views/SearchBar.css:
294         (.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Added.
295         Drive-by: prevent the (x) from appearing when no text has been entered.
296
297         * Localizations/en.lproj/localizedStrings.js:
298         * UserInterface/Main.html:
299
300 2019-02-24  Devin Rousso  <drousso@apple.com>
301
302         Web Inspector: make debounce Proxy into its own class
303         https://bugs.webkit.org/show_bug.cgi?id=194721
304
305         Reviewed by Joseph Pecoraro.
306
307         The `debounce`/`throttle` functions leveraged a `Proxy` to intercept the function call and
308         replace it with a "delayed" version. The issue with this is that it set the identifier for
309         the timer on the function itself, which is shared across all instances of a given class.
310         When different instances call the same delayed function, they'd clobber eachother's attempts
311         to delay work.
312
313         * UserInterface/Base/Debouncer.js: Added.
314         (Debouncer):
315         (Debouncer.prototype.force):
316         (Debouncer.prototype.delayForTime):
317         (Debouncer.prototype.delayForFrame):
318         (Debouncer.prototype.delayForMicrotask):
319         (Debouncer.prototype.cancel):
320         (Debouncer.prototype._execute):
321         * UserInterface/Base/Throttler.js: Added.
322         (Throttler):
323         (Throttler.prototype.force):
324         (Throttler.prototype.fire):
325         (Throttler.prototype.cancel):
326         (Throttler.prototype._execute):
327         * UserInterface/Base/Utilities.js:
328
329         * UserInterface/Views/BezierEditor.js:
330         (WI.BezierEditor):
331         * UserInterface/Views/ContentBrowser.js:
332         (WI.ContentBrowser):
333         (WI.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
334         (WI.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
335         (WI.ContentBrowser.prototype._currentContentViewDidChange):
336         (WI.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Deleted.
337         * UserInterface/Views/DOMTreeUpdater.js:
338         (WI.DOMTreeUpdater):
339         (WI.DOMTreeUpdater.prototype._nodeAttributeModified):
340         (WI.DOMTreeUpdater.prototype._nodeInserted):
341         (WI.DOMTreeUpdater.prototype._nodeRemoved):
342         * UserInterface/Views/NavigationSidebarPanel.js:
343         (WI.NavigationSidebarPanel):
344         (WI.NavigationSidebarPanel.prototype.closed):
345         (WI.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
346         (WI.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
347         (WI.NavigationSidebarPanel.prototype.updateFilter):
348         (WI.NavigationSidebarPanel.prototype.shown):
349         (WI.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
350         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
351         (WI.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
352         * UserInterface/Views/RecordingContentView.js:
353         (WI.RecordingContentView):
354         (WI.RecordingContentView.prototype.updateActionIndex):
355         (WI.RecordingContentView.prototype.hidden):
356         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
357         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
358         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
359         (WI.ResourceDetailsSidebarPanel):
360         * UserInterface/Views/ShaderProgramContentView.js:
361         (WI.ShaderProgramContentView):
362         * UserInterface/Views/SpringEditor.js:
363         (WI.SpringEditor.prototype._resetPreviewAnimation):
364         * UserInterface/Views/TreeElement.js:
365         (WI.TreeElement.prototype.set hidden):
366         (WI.TreeElement.prototype.didChange):
367         (WI.TreeElement.prototype._attach):
368         (WI.TreeElement.prototype._detach):
369         (WI.TreeElement.prototype.collapse):
370         (WI.TreeElement.prototype.expand):
371         (WI.TreeElement.prototype.reveal):
372         * UserInterface/Views/TreeOutline.js:
373         (WI.TreeOutline):
374         (WI.TreeOutline.prototype.registerScrollVirtualizer):
375         (WI.TreeOutline.prototype.get updateVirtualizedElementsDebouncer): Added.
376         (WI.TreeOutline.prototype._updateVirtualizedElements): Added.
377         (WI.TreeOutline.prototype.updateVirtualizedElements.walk): Deleted.
378         (WI.TreeOutline.prototype.updateVirtualizedElements): Deleted.
379         * UserInterface/Views/WebSocketContentView.js:
380         (WI.WebSocketContentView):
381         (WI.WebSocketContentView.prototype.shown):
382         (WI.WebSocketContentView.prototype._updateFramesSoon):
383         (WI.WebSocketContentView.prototype._updateFrames):
384
385         * UserInterface/Main.html:
386         * UserInterface/Test.html:
387         * .eslintrc:
388
389 2019-02-24  Nikita Vasilyev  <nvasilyev@apple.com>
390
391         Unreviewed, fix indentation.
392
393         * UserInterface/Models/CSSStyleDeclaration.js:
394         (WI.CSSStyleDeclaration.prototype.markModified):
395
396 2019-02-23  Keith Miller  <keith_miller@apple.com>
397
398         Add new mac target numbers
399         https://bugs.webkit.org/show_bug.cgi?id=194955
400
401         Reviewed by Tim Horton.
402
403         * Configurations/Base.xcconfig:
404         * Configurations/DebugRelease.xcconfig:
405
406 2019-02-22  Devin Rousso  <drousso@apple.com>
407
408         Web Inspector: Timelines: add UI for preventing auto-stop
409         https://bugs.webkit.org/show_bug.cgi?id=194956
410
411         Reviewed by Joseph Pecoraro.
412
413         Add a checkbox to the navigation area of the Timelines tab that controls whether recordings
414         automatically stop (e.g. after "load" or a period of inactivity).
415
416         * UserInterface/Views/TimelineRecordingContentView.js:
417         (WI.TimelineRecordingContentView):
418         (WI.TimelineRecordingContentView.prototype.get navigationItems):
419         (WI.TimelineRecordingContentView.prototype._handleAutoStopCheckboxCheckedDidChange): Added.
420         (WI.TimelineRecordingContentView.prototype._handleTimelinesAutoStopSettingChanged): Added.
421
422         * UserInterface/Controllers/TimelineManager.js:
423         (WI.TimelineManager):
424         (WI.TimelineManager.prototype.capturingStopped):
425         (WI.TimelineManager.prototype._stopAutoRecordingSoon):
426         (WI.TimelineManager.prototype._resetAutoRecordingMaxTimeTimeout):
427         (WI.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
428         (WI.TimelineManager.prototype._handleTimelinesAutoStopSettingChanged):
429
430         * UserInterface/Base/Setting.js:
431         * Localizations/en.lproj/localizedStrings.js:
432
433 2019-02-22  Devin Rousso  <drousso@apple.com>
434
435         REGRESSION(r?): Web Inspector: Popovers have inset shadows
436         https://bugs.webkit.org/show_bug.cgi?id=192963
437         <rdar://problem/46888679>
438
439         Reviewed by Brian Burg.
440
441         * UserInterface/Views/Popover.js:
442         (WI.Popover.prototype._drawBackground):
443         (WI.Popover.prototype._drawBackground.isolate): Added.
444         * UserInterface/Views/Popover.css:
445         (.popover):
446
447 2019-02-22  Devin Rousso  <drousso@apple.com>
448
449         Web Inspector: Styles Redesign: clicking CSS property or selector should always select its text
450         https://bugs.webkit.org/show_bug.cgi?id=180791
451         <rdar://problem/36038366>
452
453         Reviewed by Brian Burg.
454
455         * UserInterface/Views/SpreadsheetSelectorField.js:
456         (WI.SpreadsheetSelectorField):
457         (WI.SpreadsheetSelectorField.prototype.startEditing):
458         (WI.SpreadsheetSelectorField.prototype.stopEditing):
459         (WI.SpreadsheetSelectorField.prototype._handleMouseDown): Added.
460         (WI.SpreadsheetSelectorField.prototype._handleMouseUp): Added.
461         (WI.SpreadsheetSelectorField.prototype._handleFocus): Deleted.
462
463         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
464         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
465         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
466         (.spreadsheet-css-declaration .selector.editing:focus, .spreadsheet-css-declaration .selector > .matched): Added.
467         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field):
468         (.spreadsheet-css-declaration .selector:focus, .spreadsheet-css-declaration .selector > .matched): Deleted.
469
470 2019-02-22  Nikita Vasilyev  <nvasilyev@apple.com>
471
472         Web Inspector: Dark Mode: DOM Content Loaded blue marker is too dark
473         https://bugs.webkit.org/show_bug.cgi?id=194970
474         <rdar://problem/48330126>
475
476         Reviewed by Joseph Pecoraro.
477
478         * UserInterface/Views/TimelineRuler.css:
479         (@media (prefers-color-scheme: dark)):
480         (.timeline-ruler > .markers > .marker.dom-content-event):
481         Make the marker lighter for the dark mode.
482
483 2019-02-22  Joseph Pecoraro  <pecoraro@apple.com>
484
485         Web Inspector: Remove unused Timeline record selection code path
486         https://bugs.webkit.org/show_bug.cgi?id=194931
487
488         Reviewed by Devin Rousso.
489
490         * UserInterface/Views/TimelineOverview.js:
491         (WI.TimelineOverview):
492         (WI.TimelineOverview.prototype.userSelectedRecord): Deleted.
493         * UserInterface/Views/TimelineRecordingContentView.js:
494         (WI.TimelineRecordingContentView):
495         (WI.TimelineRecordingContentView.prototype.timelineOverviewUserSelectedRecord): Deleted.
496         * UserInterface/Views/TimelineView.js:
497         (WI.TimelineView.prototype.userSelectedRecordFromOverview): Deleted.
498
499 2019-02-21  Darin Adler  <darin@apple.com>
500
501         Some refinements for Node and Document
502         https://bugs.webkit.org/show_bug.cgi?id=194764
503
504         Reviewed by Ryosuke Niwa.
505
506         * UserInterface/Models/NativeFunctionParameters.js: Removed getOverrideStyle
507         because this deprecated non-working function is no longer something web authors
508         should be thinking about or typing.
509
510 2019-02-21  Devin Rousso  <drousso@apple.com>
511
512         Web Inspector: Canvas: recordings with a single frame sometimes missing TreeElement
513         https://bugs.webkit.org/show_bug.cgi?id=194687
514
515         Reviewed by Joseph Pecoraro.
516
517         * UserInterface/Views/CanvasSidebarPanel.js:
518         (WI.CanvasSidebarPanel):
519         Wait until the entire `Recording` has been processed before setting the selected action.
520
521         * UserInterface/Views/CanvasSidebarPanel.css:
522         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
523         Drive-by: ensure that the recording `TreeOutline` container element has the full height to
524         take advantage of for virtualization.
525
526         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
527         (WI.RecordingStateDetailsSidebarPanel.prototype.set recording):
528         Drive-by: clear the `DataGrid` list when changing recordings since we removed all subviews.
529
530 2019-02-21  Devin Rousso  <drousso@apple.com>
531
532         Web Inspector: DOM Debugger: node-specific event breakpoints aren't cleared/recalculated on navigation
533         https://bugs.webkit.org/show_bug.cgi?id=194874
534         <rdar://problem/48253415>
535
536         Reviewed by Joseph Pecoraro.
537
538         * UserInterface/Controllers/DOMManager.js:
539         (WI.DOMManager.prototype._setDocument):
540         (WI.DOMManager.prototype.removeBreakpointForEventListener):
541
542 2019-02-21  Devin Rousso  <drousso@apple.com>
543
544         Web Inspector: macOS user agent option should be available in device settings menu
545         https://bugs.webkit.org/show_bug.cgi?id=194885
546         <rdar://problem/48259253>
547
548         Reviewed by Joseph Pecoraro.
549
550         * UserInterface/Base/Main.js:
551         (WI._handleDeviceSettingsToolbarButtonClicked):
552
553 2019-02-20  Joseph Pecoraro  <pecoraro@apple.com>
554
555         Web Inspector: RTL: Scripts Timeline loading indicator has incorrect margins
556         https://bugs.webkit.org/show_bug.cgi?id=194882
557
558         Reviewed by Matt Baker.
559
560         * UserInterface/Views/TimelineRecordingContentView.css:
561         (.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
562
563 2019-02-20  Andy Estes  <aestes@apple.com>
564
565         [Xcode] Add SDKVariant.xcconfig to various Xcode projects
566         https://bugs.webkit.org/show_bug.cgi?id=194869
567
568         Rubber-stamped by Jer Noble.
569
570         * WebInspectorUI.xcodeproj/project.pbxproj:
571
572 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
573
574         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
575         https://bugs.webkit.org/show_bug.cgi?id=172848
576         <rdar://problem/25709212>
577
578         Reviewed by Mark Lam.
579
580         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
581         (HeapSnapshot):
582         Support the new snapshot version. The only thing that changes are the
583         node flags, and its actually completely compatible with version 1.
584
585         (HeapSnapshot.updateCategoriesAndMetadata):
586         List the count of object type instances in each class category.
587
588         (HeapSnapshot.prototype.serializeNode):
589         Include whether or not the node is an object type.
590
591         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
592         (WebInspector.HeapSnapshotNodeProxy):
593         (WebInspector.HeapSnapshotNodeProxy.deserialize):
594         Add a new Node isObjectType property based on the new data.
595
596         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
597         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
598         * UserInterface/Views/HeapSnapshotClusterContentView.js:
599         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
600         If a class contains 50% or more object type instances then treat it as such
601         instead of defaulting to native.
602
603         * UserInterface/Views/HeapSnapshotDataGridTree.js:
604         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
605         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
606         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
607         We can be more specific than the default if the individual instance is
608         known to be an object type.
609
610 2019-02-19  Truitt Savell  <tsavell@apple.com>
611
612         Unreviewed, rolling out r241784.
613
614         Broke all OpenSource builds.
615
616         Reverted changeset:
617
618         "Web Inspector: Improve ES6 Class instances in Heap Snapshot
619         instances view"
620         https://bugs.webkit.org/show_bug.cgi?id=172848
621         https://trac.webkit.org/changeset/241784
622
623 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
624
625         Web Inspector: Improve ES6 Class instances in Heap Snapshot instances view
626         https://bugs.webkit.org/show_bug.cgi?id=172848
627         <rdar://problem/25709212>
628
629         Reviewed by Mark Lam.
630
631         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
632         (HeapSnapshot):
633         Support the new snapshot version. The only thing that changes are the
634         node flags, and its actually completely compatible with version 1.
635
636         (HeapSnapshot.updateCategoriesAndMetadata):
637         List the count of object type instances in each class category.
638
639         (HeapSnapshot.prototype.serializeNode):
640         Include whether or not the node is an object type.
641
642         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
643         (WebInspector.HeapSnapshotNodeProxy):
644         (WebInspector.HeapSnapshotNodeProxy.deserialize):
645         Add a new Node isObjectType property based on the new data.
646
647         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
648         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
649         * UserInterface/Views/HeapSnapshotClusterContentView.js:
650         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
651         If a class contains 50% or more object type instances then treat it as such
652         instead of defaulting to native.
653
654         * UserInterface/Views/HeapSnapshotDataGridTree.js:
655         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
656         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
657         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
658         We can be more specific than the default if the individual instance is
659         known to be an object type.
660
661 2019-02-19  Joseph Pecoraro  <pecoraro@apple.com>
662
663         Web Inspector: Scripts timeline on-going-recording text looks poor in dark mode
664         https://bugs.webkit.org/show_bug.cgi?id=194809
665
666         Reviewed by Matt Baker.
667
668         * UserInterface/Views/TimelineRecordingContentView.css:
669         (.content-view.timeline-recording > .content-browser .recording-progress > .status):
670
671 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
672
673         Web Inspector: Provide a way to avoid a recording auto-stop on reload
674         https://bugs.webkit.org/show_bug.cgi?id=194793
675
676         Reviewed by Matt Baker.
677
678         * Localizations/en.lproj/localizedStrings.js:
679         New tooltip.
680
681         * UserInterface/Controllers/TimelineManager.js:
682         (WI.TimelineManager.prototype.willAutoStop):
683         (WI.TimelineManager.prototype.relaxAutoStop):
684         Getter and relaxer for auto stop behavior.
685
686         * UserInterface/Views/AuditNavigationSidebarPanel.js:
687         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
688         Drive-by fix some whitespace issues.
689
690         * UserInterface/Views/TimelineTabContentView.js:
691         (WI.TimelineTabContentView):
692         (WI.TimelineTabContentView.prototype._showRecordButton):
693         (WI.TimelineTabContentView.prototype._showContinueButton):
694         (WI.TimelineTabContentView.prototype._updateNavigationBarButtons):
695         (WI.TimelineTabContentView.prototype._capturingStartedOrStopped):
696         (WI.TimelineTabContentView.prototype._globalModifierKeysDidChange):
697         (WI.TimelineTabContentView.prototype._continueButtonClicked):
698         Show a "continue" like icon instead of the usual stop button when
699         a recording would auto-stop and the alt key is down. When pressed
700         this button will relax the auto-stop and continue the recording
701         until explicitly stopped by the user.
702
703 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
704
705         Web Inspector: Fix a typo causing assertions in ConsoleManager
706         https://bugs.webkit.org/show_bug.cgi?id=194792
707
708         Reviewed by Matt Baker.
709
710         * UserInterface/Controllers/ConsoleManager.js:
711         (WI.ConsoleManager.prototype.initializeLogChannels):
712         Extra comma produced an undefined value in the list.
713
714 2019-02-18  Nikita Vasilyev  <nvasilyev@apple.com>
715
716         Web Inspector: Styles: typing ";" shouldn't focus on the next property when there's open parenthesis or comment
717         https://bugs.webkit.org/show_bug.cgi?id=194789
718
719         Reviewed by Matt Baker.
720
721         * UserInterface/Views/SpreadsheetStyleProperty.js:
722         (WI.SpreadsheetStyleProperty.prototype._handleValueBeforeInput):
723
724 2019-02-18  Joseph Pecoraro  <pecoraro@apple.com>
725
726         Web Inspector: Better categorize CPU usage per-thread / worker
727         https://bugs.webkit.org/show_bug.cgi?id=194564
728
729         Reviewed by Devin Rousso.
730
731         * UserInterface/Controllers/TimelineManager.js:
732         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
733         * UserInterface/Models/CPUTimelineRecord.js:
734         (WI.CPUTimelineRecord.prototype.get mainThreadUsage):
735         (WI.CPUTimelineRecord.prototype.get webkitThreadUsage):
736         (WI.CPUTimelineRecord.prototype.get workerThreadUsage):
737         (WI.CPUTimelineRecord.prototype.get unknownThreadUsage):
738         Build a better record from the protocol events.
739
740 2019-02-18  Devin Rousso  <drousso@apple.com>
741
742         Web Inspector: duplicate left double quotation mark (\u201C) in 'Unable to show certificate for ā€œ%sā€œ.'
743         https://bugs.webkit.org/show_bug.cgi?id=194782
744         <rdar://problem/48159683>
745
746         Reviewed by Joseph Pecoraro.
747
748         * UserInterface/Models/Resource.js:
749         (WI.Resource.prototype.async showCertificate):
750         * Localizations/en.lproj/localizedStrings.js:
751
752 2019-02-18  Eric Carlson  <eric.carlson@apple.com>
753
754         Add MSE logging configuration
755         https://bugs.webkit.org/show_bug.cgi?id=194719
756         <rdar://problem/48122151>
757
758         Reviewed by Joseph Pecoraro.
759
760         * Localizations/en.lproj/localizedStrings.js:
761         * UserInterface/Models/ConsoleMessage.js:
762         * UserInterface/Models/IssueMessage.js:
763         (WI.IssueMessage):
764         * UserInterface/Views/LogContentView.js:
765         (WI.LogContentView):
766         * UserInterface/Views/SettingsTabContentView.js:
767         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
768
769 2019-02-17  Nikita Vasilyev  <nvasilyev@apple.com>
770
771         Web Inspector: Move CSS completion logic from SpreadsheetTextField to SpreadsheetStyleProperty
772         https://bugs.webkit.org/show_bug.cgi?id=194724
773
774         Reviewed by Devin Rousso.
775
776         Move CSS value completion logic from SpreadsheetTextField, a generic text field,
777         to SpreadsheetStyleProperty.
778
779         * UserInterface/Views/SpreadsheetStyleProperty.js:
780         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
781         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
782
783         * UserInterface/Views/SpreadsheetTextField.js:
784         (WI.SpreadsheetTextField):
785         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
786         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
787         (WI.SpreadsheetTextField.prototype._updateCompletions):
788         (WI.SpreadsheetTextField.prototype._showSuggestionsView):
789         (WI.SpreadsheetTextField.prototype._getCompletionPrefix): Deleted.
790
791 2019-02-17  Matt Baker  <mattbaker@apple.com>
792
793         Web Inspector: Frontend performance is very slow reloading theverge.com - 50% of time in TreeOutline _indexOfTreeElement
794         https://bugs.webkit.org/show_bug.cgi?id=193605
795         <rdar://problem/47403986>
796
797         Reviewed by Devin Rousso.
798
799         SelectionController should track an unordered Set of represented objects
800         instead of an ordered set of indexes. This eliminates the costly and
801         error-prone updates needed to keep the selected indexes in sync as items
802         are added and removed from TreeOutline (and Table, to a far lesser extent).
803
804         The SelectionController interface is largely the same. Class and delegate
805         methods have been renamed to reflect the change from indexes to objects.
806         SelectionController tracks selected items in selection order. For the
807         operations that rely on objects being in insertion order, the controller
808         uses a comparator function provided at construction time.
809
810         * UserInterface/Base/IndexSet.js: Removed.
811         No longer used. SelectionController now uses a plain Set.
812
813         * UserInterface/Base/Utilities.js:
814         (value):
815         (get return):
816         Add utilities previously supplied by IndexSet and used by SelectionController.
817
818         * UserInterface/Controllers/SelectionController.js:
819         (WI.SelectionController):
820         (WI.SelectionController.prototype.get lastSelectedItem):
821         (WI.SelectionController.prototype.get selectedItems):
822         (WI.SelectionController.prototype.set allowsMultipleSelection):
823         (WI.SelectionController.prototype.hasSelectedItem):
824         (WI.SelectionController.prototype.selectItem):
825         (WI.SelectionController.prototype.deselectItem):
826         (WI.SelectionController.prototype.selectAll):
827         (WI.SelectionController.prototype.deselectAll):
828         (WI.SelectionController.prototype.removeSelectedItems):
829         (WI.SelectionController.prototype.reset):
830         (WI.SelectionController.prototype.didRemoveItems):
831         (WI.SelectionController.prototype.handleKeyDown):
832         (WI.SelectionController.prototype.handleItemMouseDown):
833         (WI.SelectionController.prototype._deselectAllAndSelect):
834         (WI.SelectionController.prototype._selectItemsFromArrowKey):
835         (WI.SelectionController.prototype._firstSelectableItem):
836         (WI.SelectionController.prototype._lastSelectableItem):
837         (WI.SelectionController.prototype._previousSelectableItem):
838         (WI.SelectionController.prototype._nextSelectableItem):
839         (WI.SelectionController.prototype._updateSelectedItems):
840         (WI.SelectionController.prototype._addRange):
841         (WI.SelectionController.prototype._deleteRange):
842         (WI.SelectionController.prototype.get numberOfItems): Deleted.
843         (WI.SelectionController.prototype.didInsertItem): Deleted.
844         (WI.SelectionController.prototype.handleItemMouseDown.normalizeRange): Deleted.
845         (WI.SelectionController.prototype._nextSelectableIndex): Deleted.
846         (WI.SelectionController.prototype._previousSelectableIndex): Deleted.
847
848         * UserInterface/Main.html:
849         * UserInterface/Test.html:
850         Remove IndexSet.
851
852         * UserInterface/Views/CookieStorageContentView.js:
853         (WI.CookieStorageContentView.prototype.tableIndexForRepresentedObject):
854         (WI.CookieStorageContentView.prototype.tableRepresentedObjectForIndex):
855
856         * UserInterface/Views/DOMTreeOutline.js:
857         (WI.DOMTreeOutline.prototype.objectForSelection):
858
859         * UserInterface/Views/NetworkTableContentView.js:
860         (WI.NetworkTableContentView.prototype.tableIndexForRepresentedObject):
861         (WI.NetworkTableContentView.prototype.tableRepresentedObjectForIndex):
862
863         * UserInterface/Views/Table.js:
864         (WI.Table):
865         (WI.Table.prototype.get selectedRow):
866         (WI.Table.prototype.get selectedRows):
867         (WI.Table.prototype.isRowSelected):
868         (WI.Table.prototype.selectRow):
869         (WI.Table.prototype.deselectRow):
870         (WI.Table.prototype.removeRow):
871         (WI.Table.prototype.removeSelectedRows):
872         (WI.Table.prototype.selectionControllerSelectionDidChange):
873         (WI.Table.prototype.selectionControllerFirstSelectableItem):
874         (WI.Table.prototype.selectionControllerLastSelectableItem):
875         (WI.Table.prototype.selectionControllerPreviousSelectableItem):
876         (WI.Table.prototype.selectionControllerNextSelectableItem):
877         (WI.Table.prototype._handleMouseDown):
878         (WI.Table.prototype._removeRows):
879         (WI.Table.prototype._indexForRepresentedObject):
880         (WI.Table.prototype._representedObjectForIndex):
881         (WI.Table.prototype.selectionControllerNumberOfItems): Deleted.
882         (WI.Table.prototype.selectionControllerNextSelectableIndex): Deleted.
883         (WI.Table.prototype.selectionControllerPreviousSelectableIndex): Deleted.
884         (WI.Table.prototype._toggleSelectedRowStyle): Deleted.
885
886         * UserInterface/Views/TreeOutline.js:
887         (WI.TreeOutline.compareSiblings):
888         (WI.TreeOutline):
889         (WI.TreeOutline.prototype.get selectedTreeElement):
890         (WI.TreeOutline.prototype.set selectedTreeElement):
891         (WI.TreeOutline.prototype.get selectedTreeElements):
892         (WI.TreeOutline.prototype.removeChildAtIndex):
893         (WI.TreeOutline.prototype.removeChildren):
894         (WI.TreeOutline.prototype._rememberTreeElement):
895         (WI.TreeOutline.prototype.getCachedTreeElement):
896         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
897         (WI.TreeOutline.prototype.selectionControllerFirstSelectableItem):
898         (WI.TreeOutline.prototype.selectionControllerLastSelectableItem):
899         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableItem):
900         (WI.TreeOutline.prototype.selectionControllerNextSelectableItem):
901         (WI.TreeOutline.prototype.objectForSelection):
902         (WI.TreeOutline._generateStyleRulesIfNeeded):
903         (WI.TreeOutline.prototype.selectionControllerNextSelectableIndex): Deleted.
904         (WI.TreeOutline.prototype.selectionControllerPreviousSelectableIndex): Deleted.
905         (WI.TreeOutline._generateStyleRulesIfNeeded._indexesForSubtree.numberOfElementsInSubtree): Deleted.
906
907 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
908
909         Web Inspector: Logging a native function to the console, such as `alert`, produces unhandled rejection
910         https://bugs.webkit.org/show_bug.cgi?id=194740
911
912         Reviewed by Matt Baker.
913
914         * UserInterface/Protocol/RemoteObject.js:
915         (WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
916         In case of a protocol error (common when attempting to get a location
917         for a native function) produce the NoSourceFound result.
918
919         * UserInterface/Views/ConsoleMessageView.js:
920         (WI.ConsoleMessageView.prototype._appendLocationLink):
921         Simplify with an arrow function.
922
923 2019-02-15  Joseph Pecoraro  <pecoraro@apple.com>
924
925         Web Inspector: Some timelines views work, show Legacy CPU timeline
926         https://bugs.webkit.org/show_bug.cgi?id=194738
927
928         Reviewed by Yusuke Suzuki.
929
930         * UserInterface/Views/ContentView.js:
931         (WI.ContentView.createFromRepresentedObject):
932
933 2019-02-15  Aaron Chu  <aaron_chu@apple.com>
934
935         AX: Audit tab should have built-in accessibility tests.
936         https://bugs.webkit.org/show_bug.cgi?id=194005
937         <rdar://problem/47657503>
938
939         Updated built-in accessibility audits test suite.
940
941         Reviewed by Devin Rousso.
942
943         * Localizations/en.lproj/localizedStrings.js:
944         * UserInterface/Controllers/AuditManager.js:
945         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
946         (WI.AuditManager):
947         (WI.AuditManager.prototype.addDefaultTestsIfNeeded.): Deleted.
948
949 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
950
951         Web Inspector: Dark Mode: commas in CSS selectors are too dim
952         https://bugs.webkit.org/show_bug.cgi?id=194729
953         <rdar://problem/48128592>
954
955         Reviewed by Matt Baker.
956
957         Use `--text-color-tertiary` for both light and dark modes.
958
959         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
960         (.spreadsheet-style-declaration-editor):
961         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
962         (.spreadsheet-css-declaration):
963         (.spreadsheet-css-declaration .selector > span):
964         (@media (prefers-color-scheme: dark)):
965         * UserInterface/Views/Variables.css:
966         (:root):
967
968 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
969
970         Unreviewed, fix intentation.
971
972         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
973         (.sidebar > .panel.details.css-style .rules):
974         (.sidebar > .panel.details.css-style > .content > .rules .section-header):
975
976 2019-02-15  Dean Jackson  <dino@apple.com>
977
978         Allow emulation of user gestures from Web Inspector console
979         https://bugs.webkit.org/show_bug.cgi?id=194725
980         <rdar://problem/48126604>
981
982         Reviewed by Joseph Pecoraro and Devin Rousso.
983
984         Add some UI for emulating a User Gesture when evaluating in the console. This
985         allows the developer to do things that would otherwise require actual interaction
986         with the page, such as start playback of media on iOS.
987
988         * Localizations/en.lproj/localizedStrings.js:
989         * UserInterface/Base/Setting.js: Add a new setting for this option.
990         * UserInterface/Controllers/JavaScriptLogViewController.js:
991         (WI.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
992         * UserInterface/Controllers/RuntimeManager.js: Call evaluate with this new option.
993         (WI.RuntimeManager.prototype.evaluateInInspectedWindow):
994         * UserInterface/Views/LogContentView.js: Add a new checkbox in the upper bar
995         that allows the user to toggle the setting.
996         (WI.LogContentView):
997         (WI.LogContentView.prototype.get navigationItems):
998         (WI.LogContentView.prototype._handleEmulateInUserGestureSettingChanged):
999
1000         * UserInterface/Views/NetworkTableContentView.js: Two drive-by typo fixes :)
1001         (WI.NetworkTableContentView): perserve -> preserve
1002         (WI.NetworkTableContentView.prototype.get navigationItems): checkboxs -> checkboxes
1003
1004 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1005
1006         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
1007         https://bugs.webkit.org/show_bug.cgi?id=194619
1008         <rdar://problem/47917373>
1009
1010         Reviewed by Devin Rousso.
1011
1012         Payload of inline styles may contain `range` that doesn't match
1013         the actual text of the payload - it has an extra empty line at the end.
1014         Mismatching ranges caused data corruption.
1015
1016         * UserInterface/Models/DOMNodeStyles.js:
1017         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1018
1019 2019-02-15  Nikita Vasilyev  <nvasilyev@apple.com>
1020
1021         Web Inspector: remove unused parameter in _parseStylePropertyPayload
1022         https://bugs.webkit.org/show_bug.cgi?id=194642
1023
1024         Reviewed by Devin Rousso.
1025
1026         * UserInterface/Models/DOMNodeStyles.js:
1027         (WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
1028         The `styleText` parameter was never used
1029
1030 2019-02-15  Devin Rousso  <drousso@apple.com>
1031
1032         Web Inspector: Canvas: all actions after an offscreen path modification are marked as offscreen path errors
1033         https://bugs.webkit.org/show_bug.cgi?id=194684
1034
1035         Reviewed by Joseph Pecoraro.
1036
1037         * UserInterface/Models/RecordingAction.js:
1038         (WI.RecordingAction.prototype.process):
1039
1040 2019-02-15  Devin Rousso  <drousso@apple.com>
1041
1042         Web Inspector: Canvas: taking a second recording doesn't select the Initial State by default
1043         https://bugs.webkit.org/show_bug.cgi?id=194685
1044
1045         Reviewed by Matt Baker.
1046
1047         * UserInterface/Views/CanvasSidebarPanel.js:
1048         (WI.CanvasSidebarPanel.prototype._recordingChanged):
1049
1050 2019-02-14  Commit Queue  <commit-queue@webkit.org>
1051
1052         Unreviewed, rolling out r241497.
1053         https://bugs.webkit.org/show_bug.cgi?id=194676
1054
1055         New test times out (Requested by NVI on #webkit).
1056
1057         Reverted changeset:
1058
1059         "Web Inspector: Styles: valid values in style attributes are
1060         reported as unsupported property values"
1061         https://bugs.webkit.org/show_bug.cgi?id=194619
1062         https://trac.webkit.org/changeset/241497
1063
1064 2019-02-13  Nikita Vasilyev  <nvasilyev@apple.com>
1065
1066         Web Inspector: Styles: valid values in style attributes are reported as unsupported property values
1067         https://bugs.webkit.org/show_bug.cgi?id=194619
1068         <rdar://problem/47917373>
1069
1070         Reviewed by Devin Rousso.
1071
1072         Payload of inline styles may contain `range` that doesn't match
1073         the actual text of the payload - it has an extra empty line at the end.
1074         Mismatching ranges caused data corruption.
1075
1076         * UserInterface/Models/DOMNodeStyles.js:
1077         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1078
1079 2019-02-13  Joseph Pecoraro  <pecoraro@apple.com>
1080
1081         Web Inspector: Update combined and minified copyright header for 2018-2019
1082         https://bugs.webkit.org/show_bug.cgi?id=194635
1083
1084         Reviewed by Devin Rousso.
1085
1086         * Scripts/copy-user-interface-resources.pl:
1087
1088 2019-02-13  Chris Dumez  <cdumez@apple.com>
1089
1090         Unreviewed, update localizable strings.
1091
1092         * Localizations/en.lproj/localizedStrings.js:
1093
1094 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1095
1096         Web Inspector: Experimental setting for CPU Usage Timeline improvements
1097         https://bugs.webkit.org/show_bug.cgi?id=194556
1098
1099         Reviewed by Matt Baker.
1100
1101         * UserInterface/Main.html:
1102         * UserInterface/Views/LegacyCPUTimelineView.css: Added.
1103         * UserInterface/Views/LegacyCPUTimelineView.js: Added.
1104         Copy of CPUTimelineView.js/css to be used when the setting is not set.
1105
1106         * UserInterface/Views/ContentView.js:
1107         (WI.ContentView.createFromRepresentedObject):
1108         ContentView to create based on the setting.
1109
1110         * UserInterface/Base/Setting.js:
1111         * UserInterface/Views/SettingsTabContentView.js:
1112         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1113         Experimental switch.
1114
1115 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1116
1117         Web Inspector: Timeline.prototype.recordsInTimeRange uses a property most records do not have
1118         https://bugs.webkit.org/show_bug.cgi?id=194549
1119
1120         Reviewed by Devin Rousso.
1121
1122         * UserInterface/Models/Timeline.js:
1123         (WI.Timeline.prototype.recordsInTimeRange):
1124
1125 2019-02-12  Devin Rousso  <drousso@apple.com>
1126
1127         Web Inspector: Timelines: clicking on an empty space in the overview should deselect any selected record bar
1128         https://bugs.webkit.org/show_bug.cgi?id=194365
1129         <rdar://problem/47868426>
1130
1131         Reviewed by Joseph Pecoraro.
1132
1133         * UserInterface/Views/TimelineRecordBar.js:
1134         (WI.TimelineRecordBar.prototype._handleClick):
1135         Mark the "click" event so that later listeners know it was handled by `WI.TimelineRecordBar`.
1136
1137         * UserInterface/Views/TimelineOverview.js:
1138         (WI.TimelineOverview):
1139         (WI.TimelineOverview.prototype._instrumentAdded):
1140         (WI.TimelineOverview.prototype._instrumentRemoved):
1141         (WI.TimelineOverview.prototype._handleGraphsContainerClick): Added.
1142         (WI.TimelineOverview.prototype._handleOverviewGraphRecordSelected): Added.
1143         (WI.TimelineOverview.prototype._recordSelected):
1144         Listen for "click" on the graph container and deselect all records when fired, unless the
1145         click was marked by a `WI.TimelineRecordBar`.
1146
1147         * UserInterface/Views/TimelineRecordingContentView.js:
1148         (WI.TimelineRecordingContentView.prototype._recordSelected):
1149         Ensure that all `WI.TimelineView` update their selected record whenever it changes for any
1150         other `WI.TimelineView` (or if there is no selected record).
1151
1152         * UserInterface/Views/TimelineOverviewGraph.js:
1153         (WI.TimelineOverviewGraph.prototype.didLayoutSubtree): Added.
1154         Drive-by: since `WI.TimelineRecordBar` are reused when combining, we need to re-determine
1155         which one holds the currently selected record.
1156
1157 2019-02-12  Joseph Pecoraro  <pecoraro@apple.com>
1158
1159         Web Inspector: Remove unused maxUsage in CPUTimelineView
1160         https://bugs.webkit.org/show_bug.cgi?id=194526
1161
1162         Reviewed by Devin Rousso.
1163
1164         * UserInterface/Views/CPUTimelineView.js:
1165         (WI.CPUTimelineView):
1166         (WI.CPUTimelineView.prototype.shown):
1167
1168 2019-02-11  Devin Rousso  <drousso@apple.com>
1169
1170         Web Inspector: add context menu items to copy a resource's HTTP request/response data
1171         https://bugs.webkit.org/show_bug.cgi?id=194261
1172         <rdar://problem/21693696>
1173
1174         Reviewed by Joseph Pecoraro.
1175
1176         * UserInterface/Models/Resource.js:
1177         (WI.Resource.prototype.stringifyHTTPRequest): Added.
1178         (WI.Resource.prototype.stringifyHTTPResponse): Added.
1179         Don't include the request/response data, as that can be very large, and can easily be
1180         accessed by actually selecting the resource in the Resources/Network tab.
1181
1182         * UserInterface/Views/ContextMenuUtilities.js:
1183         (WI.appendContextMenuItemsForSourceCode):
1184
1185         * Localizations/en.lproj/localizedStrings.js:
1186
1187 2019-02-08  Devin Rousso  <drousso@apple.com>
1188
1189         Web Inspector: Audit: show keyboard shortcut in export tooltip
1190         https://bugs.webkit.org/show_bug.cgi?id=194454
1191
1192         Reviewed by Matt Baker.
1193
1194         * UserInterface/Views/AuditTestContentView.js:
1195         (WI.AuditTestContentView):
1196         (WI.AuditTestContentView.prototype.get saveData):
1197         (WI.AuditTestContentView.prototype._exportResult): Added.
1198         (WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked):
1199         (WI.AuditTestContentView.prototype._exportAudit): Deleted.
1200
1201         * Localizations/en.lproj/localizedStrings.js:
1202
1203 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
1204
1205         Web Inspector: Styles: easier way to select a single line
1206         https://bugs.webkit.org/show_bug.cgi?id=193305
1207
1208         Reviewed by Devin Rousso.
1209
1210         Start property selection after mousedown when mouse cursor moves 8px,
1211         which is ~1.5 times the width of a text character in the style editor.
1212
1213         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1214         (WI.SpreadsheetCSSStyleDeclarationSection):
1215         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
1216         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowMouseMove): Added.
1217         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
1218
1219 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
1220
1221         Web Inspector: Debugger Popover should work with value in template string `${identifier}`
1222         https://bugs.webkit.org/show_bug.cgi?id=194459
1223         <rdar://problem/47932564>
1224
1225         Reviewed by Devin Rousso.
1226
1227         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
1228         (WI.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
1229         When walking backwards to get the full expression we were walking outside
1230         of the interpolation group `outside ${inside}`. Stop walking backwards once
1231         we cross the boundary.
1232
1233 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
1234
1235         Web Inspector: Import / Export Heap Snapshots
1236         https://bugs.webkit.org/show_bug.cgi?id=194448
1237         <rdar://problem/47928093>
1238
1239         Reviewed by Devin Rousso.
1240
1241         * Localizations/en.lproj/localizedStrings.js:
1242         New strings.
1243
1244         * UserInterface/Proxies/HeapSnapshotProxy.js:
1245         (WI.HeapSnapshotProxy):
1246         (WI.HeapSnapshotProxy.deserialize):
1247         (WI.HeapSnapshotProxy.prototype.get imported):
1248         (WI.HeapSnapshotProxy.prototype.get snapshotStringData):
1249         (WI.HeapSnapshotProxy.prototype.set snapshotStringData):
1250         Include an "imported" state on the HeapSnapshot and allow for
1251         stashing the snapshotStringData on the main thread side.
1252
1253         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
1254         (WI.HeapSnapshotWorkerProxy.prototype.createImportedSnapshot):
1255         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
1256         (HeapSnapshotWorker.prototype.clearSnapshots):
1257         (HeapSnapshotWorker.prototype.createSnapshot):
1258         Provide a specialized way to create an imported HeapSnapshot.
1259         Track imported snapshots separately since they won't want to
1260         be searched for live/dead objects due to active recording GCs.
1261
1262         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1263         (HeapSnapshot):
1264         (HeapSnapshot.updateCategoriesAndMetadata):
1265         (HeapSnapshot.allocationBucketCounts):
1266         (HeapSnapshot.instancesWithClassName):
1267         (HeapSnapshot.prototype.nodeWithIdentifier):
1268         (HeapSnapshot.prototype.dominatedNodes):
1269         (HeapSnapshot.prototype.retainedNodes):
1270         (HeapSnapshot.prototype.retainers):
1271         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
1272         (HeapSnapshot.prototype.serialize):
1273         (HeapSnapshot.prototype.serializeNode):
1274         (HeapSnapshot.prototype._buildPostOrderIndexes):
1275         (HeapSnapshot.prototype._buildDominatorIndexes):
1276         (HeapSnapshot.prototype._buildRetainedSizes):
1277         (HeapSnapshot.prototype._gcRootPathes.visitNode):
1278         (HeapSnapshot.prototype._gcRootPathes):
1279         Construct a HeapSnapshot knowinng whether or not it is imported.
1280         Imported snapshots may be the "GCDebugging" snapshot type which
1281         differs from "Inspector" by the number of node fields. So keep
1282         the node field count a member instead of a global constant
1283         in order to work with both snapshot types.
1284
1285         * UserInterface/Models/HeapAllocationsInstrument.js:
1286         (WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
1287         * UserInterface/Protocol/ConsoleObserver.js:
1288         (WI.ConsoleObserver.prototype.heapSnapshot):
1289         * UserInterface/Protocol/HeapObserver.js:
1290         (WI.HeapObserver.prototype.trackingStart):
1291         (WI.HeapObserver.prototype.trackingComplete):
1292         Stash the original string JSON data on the main thread side
1293         where we already have the data.
1294
1295         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
1296         (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
1297         Don't show [S] icons for imported snapshots with no timestamp.
1298
1299         * UserInterface/Views/HeapAllocationsTimelineView.js:
1300         (WI.HeapAllocationsTimelineView):
1301         (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
1302         (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
1303         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
1304         Import button that just creates a new snapshot.
1305
1306         * UserInterface/Views/HeapSnapshotContentView.js:
1307         (WI.HeapSnapshotContentView):
1308         (WI.HeapSnapshotContentView.prototype.get navigationItems):
1309         (WI.HeapSnapshotContentView.prototype.get supportsSave):
1310         (WI.HeapSnapshotContentView.prototype.get saveData):
1311         (WI.HeapSnapshotContentView.prototype._exportSnapshot):
1312         Export button that saves the original data.
1313
1314         * UserInterface/Views/TimelineTabContentView.js:
1315         (WI.TimelineTabContentView.displayNameForRecord):
1316         Specialized display string for imported snapshots.
1317
1318 2019-02-08  Joseph Pecoraro  <pecoraro@apple.com>
1319
1320         Web Inspector: Add Debug setting to show Internal Object Classes in Heap Snapshot
1321         https://bugs.webkit.org/show_bug.cgi?id=194445
1322
1323         Reviewed by Devin Rousso.
1324
1325         * UserInterface/Base/Setting.js:
1326         * UserInterface/Views/HeapSnapshotDataGridTree.js:
1327         (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
1328         * UserInterface/Views/SettingsTabContentView.js:
1329         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
1330
1331 2019-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
1332
1333         Web Inspector: Styles: close unbalanced quotes and parenthesis when editing values
1334         https://bugs.webkit.org/show_bug.cgi?id=182523
1335         <rdar://problem/37260209>
1336
1337         Reviewed by Devin Rousso.
1338
1339         Close CSS comments, append missing closed quotes and right parenthesis.
1340
1341         * UserInterface/Models/CSSCompletions.js:
1342         (WI.CSSCompletions.completeUnbalancedValue):
1343         * UserInterface/Models/CSSProperty.js:
1344         (WI.CSSProperty.prototype.set rawValue):
1345
1346 2019-02-07  Joseph Pecoraro  <pecoraro@apple.com>
1347
1348         Web Inspector: Make Timeline markers light gray instead of black in dark mode
1349         https://bugs.webkit.org/show_bug.cgi?id=194417
1350
1351         Reviewed by Devin Rousso.
1352
1353         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
1354         (.timeline-overview-graph.rendering-frame > .divider):
1355         * UserInterface/Views/TimelineRuler.css:
1356         (.timeline-ruler > .markers > .divider):
1357
1358 2019-02-06  Devin Rousso  <drousso@apple.com>
1359
1360         Web Inspector: DOM: don't send the entire function string with each event listener
1361         https://bugs.webkit.org/show_bug.cgi?id=194293
1362         <rdar://problem/47822809>
1363
1364         Reviewed by Joseph Pecoraro.
1365
1366         * UserInterface/Views/EventListenerSectionGroup.js:
1367         (WI.EventListenerSectionGroup.prototype._functionTextOrLink):
1368
1369 2019-02-06  Joseph Pecoraro  <pecoraro@apple.com>
1370
1371         Web Inspector: "Worker not found" uncaught protocol errors
1372         https://bugs.webkit.org/show_bug.cgi?id=194319
1373
1374         Reviewed by Matt Baker.
1375
1376         * UserInterface/Base/Main.js:
1377         (WI.terminatePageTarget):
1378         Remove Worker targets associated with the Page on navigation.
1379         Eventually we will have to associate Workers with their parent
1380         frame, but for now a transition can only happen at the Page
1381         level, so we can eliminate all workers on the page.
1382
1383         * UserInterface/Controllers/WorkerManager.js:
1384         (WI.WorkerManager.prototype.workerCreated):
1385         * UserInterface/Protocol/Connection.js:
1386         (InspectorBackend.WorkerConnection.sendMessageToBackend):
1387         Allow any WorkerAgent domain message to fail silently. This can
1388         happen if a Worker is created and destroyed before the frontend
1389         hears about it and sends messages to the backend for that Worker.
1390
1391 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
1392
1393         Web Inspector: Styles: PropertiesChanged shouldn't fire when old and new text are both empty
1394         https://bugs.webkit.org/show_bug.cgi?id=194318
1395
1396         Reviewed by Devin Rousso.
1397
1398         Previously, WI.CSSStyleDeclaration.Event.PropertiesChanged fired when
1399         old text and new text were empty strings.
1400
1401         * UserInterface/Models/CSSStyleDeclaration.js:
1402
1403 2019-02-05  Devin Rousso  <drousso@apple.com>
1404
1405         Web Inspector: Lots of time spent updating related resources in ResourceDetailsSidebar when loading a page with lots of resources
1406         https://bugs.webkit.org/show_bug.cgi?id=159577
1407         <rdar://problem/27251461>
1408
1409         Reviewed by Joseph Pecoraro.
1410
1411         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1412         (WI.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
1413         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
1414
1415 2019-02-05  Matt Baker  <mattbaker@apple.com>
1416
1417         Web Inspector: Elements tab: selection is broken after deleting the selected node
1418         https://bugs.webkit.org/show_bug.cgi?id=194300
1419         <rdar://problem/47829275>
1420
1421         Reviewed by Devin Rousso.
1422
1423         Deleting a TreeElement can cause an IndexSet including indexes
1424         outside the deleted range to be passed to SelectionController,
1425         corrupting the internal selection state.
1426
1427         * UserInterface/Views/TreeOutline.js:
1428         (WI.TreeOutline.prototype._indexesForSubtree.numberOfElementsInSubtree): Added.
1429         (WI.TreeOutline.prototype._indexesForSubtree):
1430         Finding the last (rightmost leaf) TreeElement in the subtree used
1431         TreeElement.prototype.traverseNextElement to do a depth first traversal.
1432         This method did not stay within the subtree rooted at `treeElement`.
1433
1434 2019-02-05  Matt Baker  <mattbaker@apple.com>
1435
1436         Web Inspector: REGRESSION (r240947): Resources tab: can't select main frame after refreshing page
1437         https://bugs.webkit.org/show_bug.cgi?id=194254
1438         <rdar://problem/47805023>
1439
1440         Reviewed by Devin Rousso.
1441
1442         * UserInterface/Views/TreeOutline.js:
1443         (WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
1444         TreeOutline should always call the TreeElement `select` and `deselect`
1445         methods while processing selection changes. Having notifications
1446         suppressed by `this._suppressNextSelectionDidChangeEvent` should only
1447         affect the dispatching of TreeOutline events.
1448
1449 2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
1450
1451         Web Inspector: Styles: remove harmless "property was unlocked" asserts
1452         https://bugs.webkit.org/show_bug.cgi?id=194262
1453
1454         Reviewed by Matt Baker.
1455
1456         * UserInterface/Views/SpreadsheetStyleProperty.js:
1457         (WI.SpreadsheetStyleProperty.prototype.remove):
1458         (WI.SpreadsheetStyleProperty.prototype.update):
1459         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
1460         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
1461
1462 2019-02-04  Devin Rousso  <drousso@apple.com>
1463
1464         Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'classes.includes')
1465         https://bugs.webkit.org/show_bug.cgi?id=194280
1466         <rdar://problem/47811159>
1467
1468         Reviewed by Matt Baker.
1469
1470         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
1471         (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
1472         Add a fallback value in case the `class` attribute isn't specified for the selected node.
1473
1474 2019-02-04  Devin Rousso  <drousso@apple.com>
1475
1476         Web Inspector: Resources: missing resource data for document on reload
1477         https://bugs.webkit.org/show_bug.cgi?id=194243
1478         <rdar://problem/47559021>
1479
1480         Reviewed by Joseph Pecoraro.
1481
1482         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1483         (WI.ResourceDetailsSidebarPanel.prototype.set resource):
1484         (WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
1485
1486         * UserInterface/Base/Object.js:
1487         (WI.Object.removeEventListener):
1488         Drive-by: there's no need to iterate over the entire table to check if `thisObject` exists,
1489         as that is handled for us by `ListMultimap`, which we later call anyways.
1490
1491 2019-02-04  Matt Baker  <mattbaker@apple.com>
1492
1493         Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page
1494         https://bugs.webkit.org/show_bug.cgi?id=194242
1495         <rdar://problem/47802027>
1496
1497         Reviewed by Joseph Pecoraro.
1498
1499         * UserInterface/Views/FolderizedTreeElement.js:
1500         (WI.FolderizedTreeElement.prototype.removeChildren):
1501         FolderTreeElements are removed by the base class call to removeChildren.
1502         Calling `removeChildren` for detached TreeElements is unnecessary.
1503
1504 2019-02-04  Matt Baker  <mattbaker@apple.com>
1505
1506         Web Inspector: REGRESSION: clicking a selected call frame doesn't re-scroll
1507         https://bugs.webkit.org/show_bug.cgi?id=194169
1508         <rdar://problem/47743864>
1509
1510         Reviewed by Devin Rousso.
1511
1512         * UserInterface/Views/TreeOutline.js:
1513         (WI.TreeOutline.prototype._handleMouseDown):
1514         Add a special case for a single-selection TreeOutline with
1515         allowsRepeatSelection enabled. Since the element is already
1516         selected, bypass the SelectionCongroller and dispatch an
1517         event with event.data.selectedByUser set to true.
1518
1519 2019-02-04  Nikita Vasilyev  <nvasilyev@apple.com>
1520
1521         Web Inspector: Styles: fix race conditions when editing
1522         https://bugs.webkit.org/show_bug.cgi?id=192739
1523         <rdar://problem/46752925>
1524
1525         Reviewed by Devin Rousso.
1526
1527         Editing CSS property in the style editor syncronously updates CSSStyleDeclaration on the front-end
1528         and asyncronously updates the backend by calling CSSAgent.setStyleText. After the new style text is applied
1529         on the backend, CSSStyleDeclaration (on the front-end) gets updated.
1530
1531         Unsure there's no race conditions by introducing `_updatesInProgressCount`:
1532
1533           - Increment it before calling CSSAgent.setStyleText.
1534           - Decrement it after CSSAgent.setStyleText is finished.
1535
1536         Prevent updates of CSSStyleDeclaration when _updatesInProgressCount isn't 0.
1537
1538         * UserInterface/Models/CSSProperty.js:
1539         (WI.CSSProperty.prototype._updateOwnerStyleText):
1540         * UserInterface/Models/CSSStyleDeclaration.js:
1541         (WI.CSSStyleDeclaration):
1542         (WI.CSSStyleDeclaration.prototype.set text): Removed.
1543         (WI.CSSStyleDeclaration.prototype.setText): Added.
1544         Change the setter to a method since it has side effects including an asynchronous backend call.
1545
1546         * UserInterface/Models/DOMNodeStyles.js:
1547         (WI.DOMNodeStyles.prototype.changeStyleText):
1548
1549         * UserInterface/Views/SpreadsheetStyleProperty.js:
1550         (WI.SpreadsheetStyleProperty.prototype.get nameTextField): Removed.
1551         (WI.SpreadsheetStyleProperty.prototype.get valueTextField): Removed.
1552         Drive-by: remove unused code.
1553
1554 2019-02-01  Devin Rousso  <drousso@apple.com>
1555
1556         Web Inspector: create icons for media event types instead of using a blue circle
1557         https://bugs.webkit.org/show_bug.cgi?id=190381
1558         <rdar://problem/45507995>
1559
1560         Reviewed by Brian Burg.
1561
1562         * UserInterface/Models/DOMNode.js:
1563         (WI.DOMNode.isPlayEvent): Added.
1564         (WI.DOMNode.isPauseEvent): Added.
1565         (WI.DOMNode.isStopEvent): Added.
1566
1567         * UserInterface/Views/DOMEventsBreakdownView.js:
1568         (WI.DOMEventsBreakdownView.prototype.layout):
1569         * UserInterface/Views/DOMEventsBreakdownView.css:
1570         (.dom-events-breakdown tr > :matches(th, td)):
1571         (.dom-events-breakdown .graph):
1572         (.dom-events-breakdown .graph > :matches(img, .area)): Added.
1573         (.dom-events-breakdown .graph > img): Added.
1574         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > img): Added.
1575         (.dom-events-breakdown .graph > :matches(.point, .area)): Deleted.
1576         (.dom-events-breakdown .graph > .point): Deleted.
1577         (.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > .point): Deleted.
1578
1579         * UserInterface/Views/NetworkTableContentView.js:
1580         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine):
1581
1582         * UserInterface/Images/EventPause.svg: Added.
1583         * UserInterface/Images/EventPlay.svg: Added.
1584         * UserInterface/Images/EventProcessing.svg: Added.
1585         * UserInterface/Images/EventStop.svg: Added.
1586
1587 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
1588
1589         Web Inspector: Make WI.ColumnChart a WI.View subclass
1590         https://bugs.webkit.org/show_bug.cgi?id=194171
1591
1592         Rubber-stamped by Devin Rousso.
1593
1594         * UserInterface/Views/CPUTimelineOverviewGraph.js:
1595         (WI.CPUTimelineOverviewGraph):
1596         * UserInterface/Views/ColumnChart.js:
1597         (WI.ColumnChart):
1598         (WI.ColumnChart.prototype.set size):
1599         (WI.ColumnChart.prototype.layout):
1600         (WI.ColumnChart.prototype.get element): Deleted.
1601         (WI.ColumnChart.prototype.needsLayout): Deleted.
1602         (WI.ColumnChart.prototype.updateLayout): Deleted.
1603
1604 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
1605
1606         Web Inspector: Make WI.StackedLineChart a WI.View subclass
1607         https://bugs.webkit.org/show_bug.cgi?id=194119
1608
1609         Rubber-stamped by Devin Rousso.
1610
1611         * UserInterface/Views/LineChart.js:
1612         (WI.LineChart.prototype.layout):
1613         (WI.LineChart):
1614         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
1615         (WI.MemoryTimelineOverviewGraph):
1616         * UserInterface/Views/StackedLineChart.js:
1617         (WI.StackedLineChart):
1618         (WI.StackedLineChart.prototype.set size):
1619         (WI.StackedLineChart.prototype.layout):
1620         (WI.StackedLineChart.prototype.get element): Deleted.
1621         (WI.StackedLineChart.prototype.get points): Deleted.
1622         (WI.StackedLineChart.prototype.needsLayout): Deleted.
1623         (WI.StackedLineChart.prototype.updateLayout): Deleted.
1624
1625 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
1626
1627         Web Inspector: Make WI.CircleChart a WI.View subclass
1628         https://bugs.webkit.org/show_bug.cgi?id=194118
1629
1630         Reviewed by Matt Baker.
1631
1632         * UserInterface/Views/CircleChart.js:
1633         (WI.CircleChart.prototype.get centerElement):
1634         (WI.CircleChart.prototype.layout):
1635         (WI.CircleChart.prototype.get element): Deleted.
1636         (WI.CircleChart.prototype.needsLayout): Deleted.
1637         (WI.CircleChart.prototype.updateLayout): Deleted.
1638         * UserInterface/Views/MemoryTimelineView.js:
1639         (WI.MemoryTimelineView):
1640
1641 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
1642
1643         Web Inspector: Timeline Detail Views do not reset properly when new time range selection contains nothing
1644         https://bugs.webkit.org/show_bug.cgi?id=194115
1645         <rdar://problem/47716693>
1646
1647         Rubber-stamped by Devin Rousso.
1648
1649         * UserInterface/Views/CPUTimelineView.js:
1650         (WI.CPUTimelineView.prototype.reset):
1651         (WI.CPUTimelineView.prototype.clear):
1652         (WI.CPUTimelineView.prototype.layout):
1653         * UserInterface/Views/MemoryTimelineView.js:
1654         (WI.MemoryTimelineView.prototype.reset):
1655         (WI.MemoryTimelineView.prototype.clear):
1656         (WI.MemoryTimelineView.prototype.layout):
1657         When there are no visible records in the selected range clear our UI.
1658         Introduce a `clear` method that clears the UI but keeps
1659         non-range-specific values (e.g. maximums).
1660
1661 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
1662
1663         Web Inspector: Timeline graphs have drawing issues with multiple discontinuities
1664         https://bugs.webkit.org/show_bug.cgi?id=194110
1665         <rdar://problem/47714356>
1666
1667         Reviewed by Devin Rousso.
1668
1669         * UserInterface/Views/CPUTimelineView.js:
1670         (WI.CPUTimelineView):
1671         (WI.CPUTimelineView.prototype.layout.xScale): Deleted.
1672         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
1673         (WI.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
1674         (WI.MemoryTimelineOverviewGraph.prototype.layout):
1675         * UserInterface/Views/MemoryTimelineView.js:
1676         (WI.MemoryTimelineView.prototype.layout.xScale):
1677         (WI.MemoryTimelineView.prototype.layout.yScale):
1678         (WI.MemoryTimelineView.prototype.layout):
1679         Handle if multiple discontinuities exist between records.
1680
1681 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
1682
1683         Web Inspector: Timeline time range selection should show duration alongside start and end
1684         https://bugs.webkit.org/show_bug.cgi?id=194109
1685         <rdar://problem/47714279>
1686
1687         Reviewed by Devin Rousso.
1688
1689         * Localizations/en.lproj/localizedStrings.js:
1690         * UserInterface/Views/TimelineRecordingContentView.js:
1691         (WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
1692         Include the duration when not obvious.
1693
1694 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
1695
1696         Web Inspector: Improve API and documentation of ColumnChart
1697         https://bugs.webkit.org/show_bug.cgi?id=193982
1698
1699         Reviewed by Devin Rousso.
1700
1701         This used to be named "BarChart". Convert remaining instances
1702         of "bar" to "column" and clean up related things.
1703
1704         * UserInterface/Views/CPUTimelineOverviewGraph.css:
1705         (body[dir=rtl] .timeline-overview-graph.cpu > .column-chart):
1706         (.timeline-overview-graph.cpu > .column-chart > svg > rect):
1707         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart): Deleted.
1708         (.timeline-overview-graph.cpu > .bar-chart > svg > rect): Deleted.
1709         * UserInterface/Views/CPUTimelineOverviewGraph.js:
1710         (WI.CPUTimelineOverviewGraph.prototype.layout):
1711         * UserInterface/Views/ColumnChart.js:
1712         (WI.ColumnChart):
1713         (WI.ColumnChart.prototype.get columns):
1714         (WI.ColumnChart.prototype.addColumn):
1715         (WI.ColumnChart.prototype.clear):
1716         (WI.ColumnChart.prototype.updateLayout):
1717         (WI.ColumnChart.prototype.get bars): Deleted.
1718         (WI.ColumnChart.prototype.addBar): Deleted.
1719         * UserInterface/Views/StackedLineChart.js:
1720         (WI.StackedLineChart.prototype.get element):
1721         (WI.StackedLineChart.prototype.get points):
1722
1723 2019-01-31  Joseph Pecoraro  <pecoraro@apple.com>
1724
1725         Web Inspector: Timeline time range selection sometimes shows 0.000, should be just 0
1726         https://bugs.webkit.org/show_bug.cgi?id=194108
1727         <rdar://problem/47714273>
1728
1729         Reviewed by Devin Rousso.
1730
1731         * UserInterface/Base/Utilities.js:
1732         Check under epsilon for the zero case.
1733
1734 2019-01-31  Matt Baker  <mattbaker@apple.com>
1735
1736         REGRESSION(r?): Web Inspector: Clicking on text doesn't move text caret when editing innerHTML/tagName/attribute
1737         https://bugs.webkit.org/show_bug.cgi?id=192652
1738         <rdar://problem/46684612>
1739
1740         Reviewed by Devin Rousso.
1741
1742         * UserInterface/Views/DOMTreeElement.js:
1743         (WI.DOMTreeElement.prototype.canSelectOnMouseDown):
1744         Call to Event.preventDefault() should be made here instead of at the
1745         TreeOutline level.
1746
1747         * UserInterface/Views/TreeElement.js:
1748         (WI.TreeElement.prototype.selectOnMouseDown): Deleted.
1749         Remove dead code.
1750
1751         * UserInterface/Views/TreeOutline.js:
1752         (WI.TreeOutline._handleMouseDown):
1753         Do not prevent default event handling when the item cannot be selected.
1754         This matches TreeOutline behavior prior to introducing SelectionController.
1755
1756 2019-01-30  Devin Rousso  <drousso@apple.com>
1757
1758         Web Inspector: Memory Timeline View should be responsive / resizable
1759         https://bugs.webkit.org/show_bug.cgi?id=153758
1760         <rdar://problem/24444320>
1761
1762         Reviewed by Joseph Pecoraro.
1763
1764         Leverage the SVG `viewBox` (which was misspelled) to scale the graphs when the width of the
1765         container changes. The `viewBox` used is equal to the total amount of time that is visible.
1766
1767         Make `WI.LineChart` (and its container classes) into subclasses of `WI.View` to leverage the
1768         existing layout system.
1769
1770         Prevent any work from being done when resizing, as this is now handled by CSS/SVG.
1771
1772         * UserInterface/Views/LineChart.js:
1773         (WI.LineChart):
1774         (WI.LineChart.prototype.set size):
1775         (WI.LineChart.prototype.addPoint):
1776         (WI.LineChart.prototype.clear):
1777         (WI.LineChart.prototype.layout):
1778         (WI.LineChart.prototype.get element): Deleted.
1779         (WI.LineChart.prototype.get points): Deleted.
1780         (WI.LineChart.prototype.needsLayout): Deleted.
1781         (WI.LineChart.prototype.updateLayout): Deleted.
1782
1783         * UserInterface/Views/CPUUsageView.js:
1784         (WI.CPUUsageView):
1785         (WI.CPUUsageView.prototype.clear):
1786         (WI.CPUUsageView.prototype.updateChart): Added.
1787         (WI.CPUUsageView.prototype.get element): Deleted.
1788         (WI.CPUUsageView.prototype.layoutWithDataPoints): Deleted.
1789         * UserInterface/Views/CPUUsageView.css:
1790         (.cpu-usage-view):
1791         (.cpu-usage-view > .details):
1792         (.cpu-usage-view > .graph, .cpu-usage-view > .graph > .line-chart, .cpu-usage-view > .graph > .line-chart > svg): Added.
1793         (.cpu-usage-view > .graph): Deleted.
1794
1795         * UserInterface/Views/CPUTimelineView.js:
1796         (WI.CPUTimelineView):
1797         (WI.CPUTimelineView.prototype.layout):
1798         (WI.CPUTimelineView.prototype.layout.layoutView):
1799         (WI.CPUTimelineView.prototype.layout.layoutView.xScale):
1800         (WI.CPUTimelineView.prototype.layout.layoutView.yScale):
1801         * UserInterface/Views/CPUTimelineView.css:
1802         (body .timeline-view.cpu): Added.
1803         (.timeline-view.cpu > .content):
1804         (.timeline-view.cpu): Deleted.
1805
1806         * UserInterface/Views/MemoryCategoryView.js:
1807         (WI.MemoryCategoryView):
1808         (WI.MemoryCategoryView.prototype.clear):
1809         (WI.MemoryCategoryView.prototype.updateChart): Added.
1810         (WI.MemoryCategoryView.prototype.get element): Deleted.
1811         (WI.MemoryCategoryView.prototype.layoutWithDataPoints): Deleted.
1812         * UserInterface/Views/MemoryCategoryView.css:
1813         (.memory-category-view):
1814         (.memory-category-view > .details):
1815         (.memory-category-view > .graph, .memory-category-view > .graph > .line-chart, .memory-category-view > .graph > .line-chart > svg): Added.
1816         (.memory-category-view > .graph): Deleted.
1817
1818         * UserInterface/Views/MemoryTimelineView.js:
1819         (WI.MemoryTimelineView.prototype.layout):
1820         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView):
1821         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.xScale):
1822         (WI.MemoryTimelineView.prototype.layout.layoutCategoryView.yScale):
1823         (WI.MemoryTimelineView.prototype._initializeCategoryViews):
1824         (WI.MemoryTimelineView.prototype._initializeCategoryViews.appendLegendRow):
1825         * UserInterface/Views/MemoryTimelineView.css:
1826         (.timeline-view.memory > .content > .overview):
1827         (.timeline-view.memory > .content > .overview > .divider):
1828         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage, .timeline-view.memory > .content > .overview .legend .size): Added.
1829         (.timeline-view.memory .legend):
1830         (.timeline-view.memory .legend .row): Added.
1831         (.timeline-view.memory .legend .row + .row): Added.
1832         (.timeline-view.memory .legend .swatch): Addd.
1833         (.timeline-view.memory .legend .swatch.javascript): Addd.
1834         (.timeline-view.memory .legend .swatch.images): Addd.
1835         (.timeline-view.memory .legend .swatch.layers): Addd.
1836         (.timeline-view.memory .legend .swatch.page): Addd.
1837         (.timeline-view.memory .legend .swatch.current): Addd.
1838         (.timeline-view.memory > .content): Deleted.
1839         (.timeline-view.memory > .content > .overview .total-usage, .timeline-view.memory > .content > .overview .max-percentage):
1840         (body[dir=ltr] .timeline-view.memory .legend): Deleted.
1841         (body[dir=rtl] .timeline-view.memory .legend): Deleted.
1842         (.timeline-view.memory .legend > .row): Deleted.
1843         (.timeline-view.memory .legend > .row > .swatch): Deleted.
1844         (body[dir=ltr] .timeline-view.memory .legend > .row > .swatch): Deleted.
1845         (body[dir=rtl] .timeline-view.memory .legend > .row > .swatch): Deleted.
1846         (.timeline-view.memory .legend > .row > p): Deleted.
1847         (body[dir=ltr] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
1848         (body[dir=rtl] .timeline-view.memory .legend > .row > :matches(.label, .size)): Deleted.
1849         (.timeline-view.memory .legend > .row > .label): Deleted.
1850         (.timeline-view.memory .legend > .row > .size): Deleted.
1851         (.timeline-view.memory .legend > .row > .swatch.javascript): Deleted.
1852         (.timeline-view.memory .legend > .row > .swatch.images): Deleted.
1853         (.timeline-view.memory .legend > .row > .swatch.layers): Deleted.
1854         (.timeline-view.memory .legend > .row > .swatch.page): Deleted.
1855         (.timeline-view.memory .legend > .row > .swatch.current): Deleted.
1856
1857 2019-01-30  Nikita Vasilyev  <nvasilyev@apple.com>
1858
1859         Web Inspector: Changes: group CSS rules by resource
1860         https://bugs.webkit.org/show_bug.cgi?id=193940
1861         <rdar://problem/47617785>
1862
1863         Reviewed by Matt Baker.
1864
1865         Create resource sections with source links in their headers.
1866
1867         Also:
1868         - Use read-only WI.SpreadsheetStyleProperty to display inline swatches for colors;
1869         - Make the red and green background span the entire width of the panel.
1870
1871         * Localizations/en.lproj/localizedStrings.js:
1872         * UserInterface/Views/ChangesDetailsSidebarPanel.css:
1873         (.sidebar > .panel.changes-panel):
1874         (.sidebar > .panel.changes-panel .css-rule):
1875         (.sidebar > .panel.selected.changes-panel.empty):
1876         (.changes-panel .resource-section):
1877         (.changes-panel .resource-section > .header):
1878         (.changes-panel .resource-section > .header > a:hover):
1879         (.sidebar > .panel.changes-panel .selector-line,):
1880         (.changes-panel .css-property-line > .property):
1881         (.changes-panel .css-property-line.unchanged):
1882         (.changes-panel .css-property-line.added):
1883         (.changes-panel .css-property-line.removed):
1884         (.changes-panel .css-property-line.removed::before):
1885         (.changes-panel .css-property-line.added::before):
1886         (@media (prefers-color-scheme: dark)):
1887
1888         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
1889         (WI.ChangesDetailsSidebarPanel.prototype.layout):
1890         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
1891         (WI.ChangesDetailsSidebarPanel.prototype._createLocationLink):
1892
1893         * UserInterface/Views/SpreadsheetStyleProperty.js:
1894         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
1895         Allow passing `null` as a delegate.
1896
1897 2019-01-30  Devin Rousso  <drousso@apple.com>
1898
1899         Web Inspector: change style of device settings override popover content
1900         https://bugs.webkit.org/show_bug.cgi?id=194049
1901
1902         Reviewed by Joseph Pecoraro.
1903
1904         * UserInterface/Base/Main.js:
1905         (WI._handleDeviceSettingsToolbarButtonClicked):
1906         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
1907         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer): Deleted.
1908         * UserInterface/Views/Main.css:
1909         (.device-settings-content):
1910         (.device-settings-content > tr > td:first-child): Added.
1911         (.device-settings-content .container):
1912         (.device-settings-content .container > * + *): Added.
1913         (.device-settings-content .column): Added.
1914         (.device-settings-content .user-agent select): Added.
1915         (.device-settings-content .user-agent input): Added.
1916         (.device-settings-content label + label): Added.
1917         (.device-settings-content label > input): Added.
1918         (.device-settings-content .columns): Deleted.
1919         (.device-settings-content .columns > .column): Deleted.
1920         (.device-settings-content .columns > .column + .column): Deleted.
1921         (.device-settings-content .user-agent-value): Deleted.
1922         (.device-settings-content .user-agent-value > select): Deleted.
1923         (.device-settings-content .user-agent-value > input): Deleted.
1924         (body[dir=ltr] .device-settings-content .user-agent-value > input): Deleted.
1925         (body[dir=rtl] .device-settings-content .user-agent-value > input): Deleted.
1926
1927 2019-01-30  Devin Rousso  <drousso@apple.com>
1928
1929         Web Inspector: Uncaught Exception: null is not an object (evaluating 'url.startsWith')
1930         https://bugs.webkit.org/show_bug.cgi?id=194029
1931
1932         Reviewed by Matt Baker.
1933
1934         * UserInterface/Views/ConsoleMessageView.js:
1935         (WI.ConsoleMessageView.prototype._appendLocationLink):
1936
1937 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
1938
1939         Web Inspector: Enabled Changes panel in Elements tab by default
1940         https://bugs.webkit.org/show_bug.cgi?id=193986
1941         <rdar://problem/47647683>
1942
1943         Reviewed by Matt Baker.
1944
1945         * UserInterface/Base/Setting.js:
1946         * UserInterface/Views/ElementsTabContentView.js:
1947         (WI.ElementsTabContentView):
1948         * UserInterface/Views/SettingsTabContentView.js:
1949         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1950
1951 2019-01-29  Nikita Vasilyev  <nvasilyev@apple.com>
1952
1953         Web Inspector: Styles: enable computed style cascades by default
1954         https://bugs.webkit.org/show_bug.cgi?id=193983
1955         <rdar://problem/47645821>
1956
1957         Reviewed by Matt Baker.
1958
1959         * Localizations/en.lproj/localizedStrings.js:
1960         * UserInterface/Base/Setting.js:
1961         * UserInterface/Views/ComputedStyleDetailsPanel.css:
1962         (.computed-style-properties):
1963         (.computed-style-properties .property .go-to-arrow):
1964         (.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)):
1965         (.details-section.computed-style-properties > .content):
1966         (@media (prefers-color-scheme: dark)):
1967         (.computed-with-traces .computed-style-properties): Deleted.
1968         (.computed-with-traces .details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
1969         (.computed-with-traces .details-section.computed-style-properties > .content): Deleted.
1970         (.computed-with-traces .computed-style-properties .property .go-to-arrow): Deleted.
1971         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1972         (WI.ComputedStyleDetailsPanel.prototype.refresh):
1973         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
1974         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
1975         (WI.ComputedStyleDetailsSidebarPanel):
1976         * UserInterface/Views/SettingsTabContentView.js:
1977         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1978
1979 2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
1980
1981         Web Inspector: Remove unnecessary promise rejection handlers now that we use the global onunhandledrejection handler
1982         https://bugs.webkit.org/show_bug.cgi?id=193921
1983
1984         Reviewed by Devin Rousso.
1985
1986         * UserInterface/Base/Utilities.js:
1987         * UserInterface/Debug/UncaughtExceptionReporter.js:
1988         * UserInterface/Views/NetworkTableContentView.js:
1989         (WI.NetworkTableContentView.prototype._exportHAR):
1990         * UserInterface/Views/TextEditor.js:
1991         (WI.TextEditor.prototype.updateFormattedState):
1992
1993 2019-01-28  Devin Rousso  <drousso@apple.com>
1994
1995         Web Inspector: provide a way to edit page WebRTC settings on a remote target
1996         https://bugs.webkit.org/show_bug.cgi?id=193863
1997         <rdar://problem/47572764>
1998
1999         Reviewed by Joseph Pecoraro.
2000
2001         * UserInterface/Base/Main.js:
2002         (WI.loaded):
2003         (WI.initializeTarget):
2004         (WI._handleDeviceSettingsToolbarButtonClicked):
2005         (WI._handleDeviceSettingsToolbarButtonClicked.createCheckbox):
2006         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns): Deleted.
2007         * UserInterface/Views/Main.css:
2008         (.device-settings-content .container): Added.
2009
2010         * Localizations/en.lproj/localizedStrings.js:
2011
2012 2019-01-28  Matt Baker  <mattbaker@apple.com>
2013
2014         Web Inspector: Elements tab should toggle visibility for all selected nodes
2015         https://bugs.webkit.org/show_bug.cgi?id=193089
2016         <rdar://problem/47009256>
2017
2018         Reviewed by Devin Rousso.
2019
2020         Update "Toggle Visibility" command in DOM tree for multiple selection.
2021         When both visible and hidden elements are selected in the DOM tree,
2022         the toggle command behaves contextually. If one or more elements are
2023         visible, they are hidden, otherwise they are shown. The context menu
2024         shows "Hide Elements" or "Show Elements", respectively.
2025
2026         When only one element is selected, or the context menu target element
2027         is not selected, the command continues to be "Toggle Visibility".
2028
2029         * Localizations/en.lproj/localizedStrings.js:
2030
2031         * UserInterface/Views/DOMTreeElement.js:
2032         (WI.DOMTreeElement.prototype.get isNodeHidden): Added.
2033         (WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass):
2034         (WI.DOMTreeElement.prototype.toggleElementVisibility):
2035         (WI.DOMTreeElement.prototype._populateTagContextMenu):
2036
2037         * UserInterface/Views/DOMTreeOutline.js:
2038         (WI.DOMTreeOutline):
2039         (WI.DOMTreeOutline.prototype.toggleSelectedElementsVisibility):  Added.
2040         Provide a public method for toggling the visibility of selected DOM nodes.
2041         Used by the "H" keyboard shortcut and DOMTreeElement context menu.
2042
2043         (WI.DOMTreeOutline.prototype._hideElements):
2044         (WI.DOMTreeOutline.prototype._hideElement): Deleted.
2045         Rename for multiple selection.
2046
2047 2019-01-28  Commit Queue  <commit-queue@webkit.org>
2048
2049         Unreviewed, rolling out r240351.
2050         https://bugs.webkit.org/show_bug.cgi?id=193918
2051
2052         Causes overlapping Timeline records, as some record types
2053         don't have an endTime (Requested by drousso on #webkit).
2054
2055         Reverted changeset:
2056
2057         "WebInspector: Confusingly nested events in the timeline for
2058         Mutation Observers"
2059         https://bugs.webkit.org/show_bug.cgi?id=192884
2060         https://trac.webkit.org/changeset/240351
2061
2062 2019-01-28  Matt Baker  <mattbaker@apple.com>
2063
2064         REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
2065         https://bugs.webkit.org/show_bug.cgi?id=193808
2066         <rdar://problem/47537734>
2067
2068         Reviewed by Devin Rousso.
2069
2070         * UserInterface/Controllers/SelectionController.js:
2071         (WI.SelectionController.prototype.didRemoveItems):
2072
2073         * UserInterface/Views/TreeOutline.js:
2074         (WI.TreeOutline.prototype._indexesForSubtree):
2075         Fix a bug where no IndexSet was returned when passed a TreeElement with
2076         no children. This caused the Timelines tree selection to be corrupted when
2077         entering and exiting edit mode, as TreeElements are inserted and removed.
2078
2079 2019-01-28  Nikita Vasilyev  <nvasilyev@apple.com>
2080
2081         Web Inspector: Add Changes panel to Elements tab
2082         https://bugs.webkit.org/show_bug.cgi?id=193803
2083
2084         Reviewed by Devin Rousso.
2085
2086         Introduce the new experimental Changes Panel. It shows a list of CSS changes
2087         made via Web Inspector, so the changes could be copied to the source files.
2088
2089         * Localizations/en.lproj/localizedStrings.js:
2090         * UserInterface/Base/Setting.js:
2091         * UserInterface/Base/Utilities.js:
2092         (Array.diffArrays): Added.
2093
2094         * UserInterface/Controllers/CSSManager.js:
2095         (WI.CSSManager):
2096         (WI.CSSManager.prototype.get modifiedCSSRules):
2097         (WI.CSSManager.prototype.addModifiedCSSRule):
2098         (WI.CSSManager.prototype.removeModifiedCSSRule):
2099         (WI.CSSManager.prototype._mainResourceDidChange):
2100
2101         * UserInterface/Main.html:
2102         * UserInterface/Models/CSSProperty.js:
2103         (WI.CSSProperty):
2104         (WI.CSSProperty.prototype.remove):
2105         (WI.CSSProperty.prototype.replaceWithText):
2106         (WI.CSSProperty.prototype.commentOut):
2107         (WI.CSSProperty.prototype.set text):
2108         (WI.CSSProperty.prototype.get modified):
2109         (WI.CSSProperty.prototype.set name):
2110         (WI.CSSProperty.prototype.set rawValue):
2111         (WI.CSSProperty.prototype.get initialState):
2112         (WI.CSSProperty.prototype._updateOwnerStyleText):
2113         (WI.CSSProperty.prototype._markModified):
2114         Mark CSSProperty modified *before* making any changes to copy its initial state.
2115
2116         * UserInterface/Models/CSSRule.js:
2117         (WI.CSSRule):
2118         (WI.CSSRule.prototype.get id):
2119         (WI.CSSRule.prototype.get initialState):
2120         (WI.CSSRule.prototype.get stringId):
2121         (WI.CSSRule.prototype.markModified):
2122
2123         * UserInterface/Models/CSSStyleDeclaration.js:
2124         (WI.CSSStyleDeclaration):
2125         (WI.CSSStyleDeclaration.prototype.get initialState):
2126         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
2127         (WI.CSSStyleDeclaration.prototype.get properties):
2128         (WI.CSSStyleDeclaration.prototype.set properties):
2129         (WI.CSSStyleDeclaration.prototype.propertyForName):
2130         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
2131         (WI.CSSStyleDeclaration.prototype.markModified):
2132
2133         * UserInterface/Views/ChangesDetailsSidebarPanel.css: Added.
2134         (.sidebar > .panel.changes-panel):
2135         (.sidebar > .panel.changes-panel:not(.empty)):
2136         (.sidebar > .panel.changes-panel.empty):
2137         (.changes-panel ins):
2138         (.changes-panel del):
2139         (.changes-panel del.css-property::before):
2140         (.changes-panel ins.css-property::before):
2141         (@media (prefers-color-scheme: dark)):
2142
2143         * UserInterface/Views/ChangesDetailsSidebarPanel.js: Added.
2144         (WI.ChangesDetailsSidebarPanel):
2145         (WI.ChangesDetailsSidebarPanel.prototype.inspect):
2146         (WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
2147         (WI.ChangesDetailsSidebarPanel.prototype.shown):
2148         (WI.ChangesDetailsSidebarPanel.prototype.detached):
2149         (WI.ChangesDetailsSidebarPanel.prototype.layout):
2150         (WI.ChangesDetailsSidebarPanel.prototype._mainResourceDidChange):
2151
2152         * UserInterface/Views/ElementsTabContentView.js:
2153         (WI.ElementsTabContentView):
2154
2155         * UserInterface/Views/SettingsTabContentView.js:
2156         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2157
2158         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2159         (.spreadsheet-style-declaration-editor .property):
2160         (.spreadsheet-style-declaration-editor .property.modified):
2161         (.spreadsheet-style-declaration-editor .property.modified:not(.selected)):
2162         (@media (prefers-color-scheme: dark)):
2163
2164         * UserInterface/Views/SpreadsheetStyleProperty.js:
2165         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
2166
2167 2019-01-26  Devin Rousso  <drousso@apple.com>
2168
2169         Web Inspector: handle CSS Color 4 color syntaxes
2170         https://bugs.webkit.org/show_bug.cgi?id=193166
2171         <rdar://problem/47062403>
2172
2173         Reviewed by Simon Fraser.
2174
2175         * UserInterface/Models/Color.js:
2176         (WI.Color.fromString):
2177         (WI.Color.fromString.splitFunctionString): Added.
2178         (WI.Color.fromString.parseFunctionAlpha): Added.
2179         (WI.Color.fromString.parseFunctionComponent): Added.
2180         (WI.Color.fromString.parseHueComponent): Added.
2181         (WI.Color.fromString.parsePercentageComponent): Added.
2182
2183 2019-01-26  Devin Rousso  <drousso@apple.com>
2184
2185         Web Inspector: provide a way to edit the user agent of a remote target
2186         https://bugs.webkit.org/show_bug.cgi?id=193862
2187         <rdar://problem/47359292>
2188
2189         Reviewed by Joseph Pecoraro.
2190
2191         * UserInterface/Base/Main.js:
2192         (WI.loaded):
2193         (WI.contentLoaded):
2194         (WI.initializeTarget):
2195         (WI._handleDeviceSettingsToolbarButtonClicked):
2196         (WI._handleDeviceSettingsToolbarButtonClicked.updateActivatedState):
2197         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenUserAgent):
2198         (WI._handleDeviceSettingsToolbarButtonClicked.applyOverriddenSetting):
2199         (WI._handleDeviceSettingsToolbarButtonClicked.createContainer):
2200         (WI._handleDeviceSettingsToolbarButtonClicked.createColumns):
2201         (WI._handleDeviceSettingsToolbarButtonClicked.calculateTargetFrame):
2202         (WI._handleDeviceSettingsToolbarButtonClicked.showUserAgentInput):
2203
2204         * UserInterface/Views/Main.css:
2205         (.device-settings-content):
2206         (.device-settings-content .user-agent-value): Added.
2207         (.device-settings-content .user-agent-value > select): Added.
2208         (.device-settings-content .user-agent-value > input): Added.
2209         (body[dir=ltr] .device-settings-content .user-agent-value > input): Added.
2210         (body[dir=rtl] .device-settings-content .user-agent-value > input): Added.
2211         (.device-settings-content label > input): Added.
2212         (body[dir=ltr] .device-settings-content label > input): Deleted.
2213         (body[dir=rtl] .device-settings-content label > input): Deleted.
2214
2215         * Localizations/en.lproj/localizedStrings.js:
2216
2217 2019-01-25  Devin Rousso  <drousso@apple.com>
2218
2219         Web Inspector: provide a way to edit page settings on a remote target
2220         https://bugs.webkit.org/show_bug.cgi?id=193813
2221         <rdar://problem/47359510>
2222
2223         Reviewed by Joseph Pecoraro.
2224
2225         Add toolbar button that shows a popover with the target's (page's) settings when clicked.
2226
2227         * UserInterface/Base/Main.js:
2228         (WI.loaded):
2229         (WI.contentLoaded):
2230         (WI.initializeTarget): Added.
2231         (WI._handleDeviceSettingsToolbarButtonClicked): Added.
2232         (WI.didDismissPopover): Added.
2233         * UserInterface/Views/Main.css:
2234         (.device-settings-content): Added.
2235         (.device-settings-content .columns): Added.
2236         (.device-settings-content .columns > .column): Added.
2237         (.device-settings-content .columns > .column + .column): Added.
2238         (body[dir=ltr] .device-settings-content label > input): Added.
2239         (body[dir=rtl] .device-settings-content label > input): Added.
2240
2241         * UserInterface/Views/Popover.js:
2242         (WI.Popover.prototype._update.area):
2243         (WI.Popover.prototype._update):
2244         (WI.Popover.prototype._drawBackground):
2245         (WI.Popover.prototype._bestMetricsForEdge):
2246         (WI.Popover.prototype._drawFrame):
2247         If the best area is negative, treat it as the worst area.
2248         Allow areas to be clamped so long as the clamped edge is not the preferred edge.
2249
2250         * UserInterface/Base/Test.js:
2251         (WI.initializeTarget): Added.
2252
2253         * UserInterface/Images/Device.svg: Added.
2254         * Localizations/en.lproj/localizedStrings.js:
2255
2256 2019-01-25  Devin Rousso  <drousso@apple.com>
2257
2258         Web Inspector: Audit: unable to import audits
2259         https://bugs.webkit.org/show_bug.cgi?id=193861
2260
2261         Reviewed by Joseph Pecoraro.
2262
2263         * UserInterface/Controllers/AuditManager.js:
2264         (WI.AuditManager.prototype.async processJSON):
2265
2266 2019-01-25  Devin Rousso  <drousso@apple.com>
2267
2268         Web Inspector: Uncaught Exception: No node with given id found
2269         https://bugs.webkit.org/show_bug.cgi?id=193833
2270
2271         Reviewed by Joseph Pecoraro.
2272
2273         * UserInterface/Views/CanvasContentView.js:
2274         (WI.CanvasContentView):
2275         (WI.CanvasContentView.prototype.initialLayout):
2276         (WI.CanvasContentView.prototype.layout):
2277         (WI.CanvasContentView.prototype._refreshPixelSize):
2278         Drive-by: show the refresh button when viewing a specific canvas.
2279
2280         * UserInterface/Views/CanvasTabContentView.js:
2281         (WI.CanvasTabContentView.prototype._removeCanvas):
2282         Reset to the overview if the canvas is removed.
2283
2284 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
2285
2286         Web Inspector: Improve Dark Mode appearance within Memory timeline
2287         https://bugs.webkit.org/show_bug.cgi?id=193804
2288
2289         Reviewed by Matt Baker.
2290
2291         * UserInterface/Views/TimelineOverview.css:
2292         (.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
2293         (.timeline-overview > .tree-outline.timelines .item.selected + .item,):
2294         (@media (prefers-color-scheme: dark)):
2295         (.timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
2296         (body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
2297         Fix some colors for Timelines edit mode.
2298
2299         * UserInterface/Views/CPUTimelineOverviewGraph.css:
2300         (.timeline-overview-graph.cpu:nth-child(even) > .legend):
2301         (@media (prefers-color-scheme: dark)):
2302         (.timeline-overview-graph.cpu > .legend):
2303         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
2304         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
2305         (.timeline-overview-graph.memory:nth-child(even) > .legend):
2306         (@media (prefers-color-scheme: dark)):
2307         (.timeline-overview-graph.memory > .legend):
2308         (.timeline-overview-graph:nth-child(even) > .legend): Deleted.
2309         Improved colors in CPU / Memory overview graph legends.
2310
2311         * UserInterface/Views/CPUUsageView.css:
2312         (.cpu-usage-view > .details):
2313         * UserInterface/Views/CircleChart.css:
2314         (.circle-chart > svg > path.background):
2315         * UserInterface/Views/MemoryCategoryView.css:
2316         (.memory-category-view > .details):
2317         (.memory-category-view > .details > .name):
2318         * UserInterface/Views/MemoryTimelineView.css:
2319         (.timeline-view.memory > .content > .overview .total-usage,):
2320         (.timeline-view.memory .legend > .row > .size):
2321         Improved colors in CPU / Memory detail views.
2322
2323         * UserInterface/Views/Variables.css:
2324         (:root):
2325         Add a default --text-secondary-color which will end up slightly
2326         lighter in dark mode where it was already implemented.
2327
2328         (@media (prefers-color-scheme: dark)):
2329         Improved max-comparison colors.
2330
2331 2019-01-25  Devin Rousso  <drousso@apple.com>
2332
2333         Web Inspector: Timelines: DOMContentLoaded and load event lines need to be more obvious
2334         https://bugs.webkit.org/show_bug.cgi?id=193186
2335         <rdar://problem/45100694>
2336
2337         Reviewed by Joseph Pecoraro.
2338
2339         Shift around z-index values to make Timelines markers appear behind record bars. Widen the
2340         marker hit region to make it easier to see the tooltip.
2341
2342         * UserInterface/Views/Variables.css:
2343         (:root):
2344
2345         * UserInterface/Views/TimelineRuler.css:
2346         (.timeline-ruler):
2347         (.timeline-ruler > .markers):
2348         (.timeline-ruler > .markers > .marker):
2349         (body[dir=ltr] .timeline-ruler > .markers > .marker):
2350         (body[dir=rtl] .timeline-ruler > .markers > .marker):
2351         (.timeline-ruler > .markers > .marker::before):
2352         (body[dir=ltr] .timeline-ruler > .markers > .marker::before):
2353         (body[dir=rtl] .timeline-ruler > .markers > .marker::before):
2354         (.timeline-ruler > .markers > .marker::after): Added.
2355         (body[dir=ltr] .timeline-ruler > .markers > .marker::after): Added.
2356         (body[dir=rtl] .timeline-ruler > .markers > .marker::after): Added.
2357         (.timeline-ruler > .markers > .marker.current-time):
2358         (.timeline-ruler > .markers > .marker.current-time::after): Added.
2359         (.timeline-ruler > .markers > .marker.load-event):
2360         (.timeline-ruler > .markers > .marker.dom-content-event):
2361         (.timeline-ruler > .markers > .marker.timestamp):
2362         (.timeline-ruler > .selection-handle):
2363         (.timeline-ruler.both-handles-clamped > .selection-handle):
2364         (.timeline-ruler > .shaded-area):
2365         (.timeline-ruler > .markers > .marker.current-time::before): Deleted.
2366
2367         * UserInterface/Views/TimelineRecordBar.css:
2368         (.timeline-record-bar):
2369         (.timeline-record-bar > .segment):
2370
2371         * UserInterface/Views/CPUTimelineOverviewGraph.css:
2372         (.timeline-overview-graph.cpu > .legend):
2373         * UserInterface/Views/MemoryTimelineOverviewGraph.css:
2374         (.timeline-overview-graph.memory > .legend):
2375
2376 2019-01-25  Devin Rousso  <drousso@apple.com>
2377
2378         Web Inspector: Audit: remove experimental setting
2379         https://bugs.webkit.org/show_bug.cgi?id=193743
2380         <rdar://problem/28234022>
2381
2382         Reviewed by Joseph Pecoraro.
2383
2384         * UserInterface/Base/Setting.js:
2385         (WI.Setting):
2386         (WI.Setting.localStorageKey): Added.
2387         (WI.Setting.migrateValue):
2388         Drive-by: add the localStorage key prefix to the key passed into `WI.Setting.migrateValue`.
2389
2390         * UserInterface/Base/Main.js:
2391         (WI.loaded):
2392
2393         * UserInterface/Views/AuditTabContentView.js:
2394         (WI.AuditTabContentView.isTabAllowed):
2395
2396         * UserInterface/Views/SettingsTabContentView.js:
2397         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2398
2399         * Localizations/en.lproj/localizedStrings.js:
2400
2401 2019-01-25  Devin Rousso  <drousso@apple.com>
2402
2403         Web Inspector: show uncaught exception view for unhandled promise rejections
2404         https://bugs.webkit.org/show_bug.cgi?id=193832
2405
2406         Reviewed by Matt Baker.
2407
2408         * UserInterface/Debug/UncaughtExceptionReporter.js:
2409         (handleUnhandledPromiseRejection): Added.
2410
2411 2019-01-25  Devin Rousso  <drousso@apple.com>
2412
2413         Web Inspector: REGRESSION (r237808): offscreen path warning doesn't work
2414         https://bugs.webkit.org/show_bug.cgi?id=193830
2415
2416         Reviewed by Matt Baker.
2417
2418         * UserInterface/Models/RecordingAction.js:
2419         (WI.RecordingAction.prototype.process):
2420
2421 2019-01-25  Joseph Pecoraro  <pecoraro@apple.com>
2422
2423         Web Inspector: Add another Protocol Version (iOS 12.2)
2424         https://bugs.webkit.org/show_bug.cgi?id=193810
2425         <rdar://problem/42981838>
2426
2427         Reviewed by Matt Baker.
2428
2429         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js: Added.
2430         * Versions/Inspector-iOS-12.2.json: Added.
2431
2432 2019-01-25  Devin Rousso  <drousso@apple.com>
2433
2434         Web Inspector: `WI.Setting.migrateValue` doesn't take into account the key prefix
2435         https://bugs.webkit.org/show_bug.cgi?id=193814
2436
2437         Reviewed by Matt Baker.
2438
2439         * UserInterface/Base/Setting.js:
2440         (WI.Setting):
2441         (WI.Setting.migrateValue):
2442         (WI.Setting._localStorageKey): Added.
2443
2444 2019-01-25  Devin Rousso  <drousso@apple.com>
2445
2446         Web Inspector: improve invalid Audit/Recording JSON error messages
2447         https://bugs.webkit.org/show_bug.cgi?id=193476
2448         <rdar://problem/47303659>
2449
2450         Reviewed by Joseph Pecoraro.
2451
2452         * UserInterface/Models/AuditTestBase.js:
2453         (WI.AuditTestBase):
2454         * UserInterface/Models/AuditTestCase.js:
2455         (WI.AuditTestCase.async fromPayload):
2456         * UserInterface/Models/AuditTestGroup.js:
2457         (WI.AuditTestGroup.async fromPayload):
2458         * UserInterface/Models/AuditTestCaseResult.js:
2459         (WI.AuditTestCaseResult.async fromPayload.checkArray):
2460         (WI.AuditTestCaseResult.async fromPayload):
2461         * UserInterface/Models/AuditTestGroupResult.js:
2462         (WI.AuditTestGroupResult.async fromPayload):
2463         * UserInterface/Controllers/AuditManager.js:
2464         (WI.AuditManager.synthesizeWarning): Added.
2465         (WI.AuditManager.synthesizeError):
2466         (WI.AuditManager.prototype.async processJSON):
2467
2468         * UserInterface/Models/Recording.js:
2469         (WI.Recording.fromPayload):
2470         (WI.Recording.synthesizeWarning): Added.
2471         (WI.Recording.synthesizeError):
2472         * UserInterface/Models/RecordingFrame.js:
2473         (WI.RecordingFrame.fromPayload):
2474         * UserInterface/Models/RecordingAction.js:
2475         (WI.RecordingAction.fromPayload):
2476         (WI.RecordingAction.prototype.async swizzle):
2477         (WI.RecordingAction.prototype.apply):
2478         * UserInterface/Controllers/CanvasManager.js:
2479         (WI.CanvasManager.prototype.processJSON):
2480
2481         * Localizations/en.lproj/localizedStrings.js:
2482
2483 2019-01-24  Devin Rousso  <drousso@apple.com>
2484
2485         Web Inspector: Audit: add supports key to test/group for compatibility
2486         https://bugs.webkit.org/show_bug.cgi?id=193686
2487         <rdar://problem/47460872>
2488
2489         Reviewed by Joseph Pecoraro.
2490
2491         * UserInterface/Models/AuditTestBase.js:
2492         (WI.AuditTestBase):
2493         (WI.AuditTestBase.prototype.get supported): Added.
2494         (WI.AuditTestBase.prototype.set supported): Added.
2495         (WI.AuditTestBase.prototype.set disabled):
2496         (WI.AuditTestBase.prototype.async start):
2497         (WI.AuditTestBase.prototype.stop):
2498         (WI.AuditTestBase.toJSON):
2499         * UserInterface/Models/AuditTestCase.js:
2500         (WI.AuditTestCase.async fromPayload):
2501         * UserInterface/Models/AuditTestGroup.js:
2502         (WI.AuditTestGroup):
2503         (WI.AuditTestGroup.async fromPayload):
2504         (WI.AuditTestGroup.prototype.get supported): Added.
2505         (WI.AuditTestGroup.prototype.set supported): Added.
2506         Add support for a "supports" key in the test JSON that prevents the test from being run if
2507         it's value is lower than the frontend/backend version.
2508
2509         * UserInterface/Views/AuditTreeElement.js:
2510         (WI.AuditTreeElement.prototype.onattach):
2511         (WI.AuditTreeElement.prototype.ondelete):
2512         (WI.AuditTreeElement.prototype.populateContextMenu):
2513         (WI.AuditTreeElement.prototype._updateStatus): Added.
2514         (WI.AuditTreeElement.prototype._showRunningSpinner):
2515         (WI.AuditTreeElement.prototype._showRunningProgress):
2516         (WI.AuditTreeElement.prototype._updateTestGroupDisabled):
2517         (WI.AuditTreeElement.prototype._handleTestCaseCompleted):
2518         (WI.AuditTreeElement.prototype._handleTestResultCleared):
2519         (WI.AuditTreeElement.prototype._handleTestGroupCompleted):
2520         (WI.AuditTreeElement.prototype._handleManagerEditingChanged):
2521         (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Deleted.
2522         (WI.AuditTreeElement.prototype._updateLevel): Deleted.
2523         * UserInterface/Views/AuditTreeElement.css:
2524         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active) > .status:hover > img): Added.
2525         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.unsupported, .editing-audits) > .status:not(:hover)): Added.
2526         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status, .tree-outline .item.audit.unsupported + .children .item.audit.unsupported  > .status > img): Added.
2527         (.tree-outline .item.audit.unsupported:not(.selected) > :matches(.icon, .titles)): Added.
2528         (.tree-outline .item.audit.unsupported > .status > img): Added.
2529         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Deleted.
2530         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Deleted.
2531         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
2532         Hide unsupported tests unless in edit mode, where they are greyed out and cannot be enabled.
2533         Drive-by: only allow tests to be deleted when in edit mode.
2534
2535         * UserInterface/Views/AuditNavigationSidebarPanel.js:
2536         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
2537
2538         * Localizations/en.lproj/localizedStrings.js:
2539
2540 2019-01-24  Joseph Pecoraro  <pecoraro@apple.com>
2541
2542         Web Inspector: CPU Usage Timeline
2543         https://bugs.webkit.org/show_bug.cgi?id=193730
2544         <rdar://problem/46797201>
2545
2546         Reviewed by Devin Rousso.
2547
2548         CPU Usage is gathered in the backend twice a second, the frequency of the
2549         ResourceUsageThread in WebCore. The frontend displays cpu usage in a few
2550         ways in the Timeline.
2551
2552         We use a column chart in the timeline overview to display the frequency and
2553         relative distance of samples. This helps show if the samples were close
2554         together or far apart, which indicates how meaningful they will be at a
2555         particular scale.
2556
2557         We use a line chart in the timeline detail view which will be easier to see
2558         the changes over a particular time range selection.
2559
2560         * Localizations/en.lproj/localizedStrings.js:
2561         New strings.
2562
2563         * UserInterface/Main.html:
2564         * UserInterface/Base/Main.js:
2565         (WI.loaded):
2566         * UserInterface/Test.html:
2567         * UserInterface/Test/Test.js:
2568         (WI.loaded):
2569         * UserInterface/Protocol/CPUProfilerObserver.js:
2570         (WI.CPUProfilerObserver.prototype.trackingStart):
2571         (WI.CPUProfilerObserver.prototype.trackingUpdate):
2572         (WI.CPUProfilerObserver.prototype.trackingComplete):
2573         (WI.CPUProfilerObserver):
2574         New files and default registration.
2575
2576         * UserInterface/Protocol/Target.js:
2577         (WI.Target.prototype.get CPUProfilerAgent):
2578         New Agent.
2579
2580         * UserInterface/Controllers/TimelineManager.js:
2581         (WI.TimelineManager.availableTimelineTypes):
2582         (WI.TimelineManager.prototype.cpuProfilerTrackingStarted):
2583         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
2584         (WI.TimelineManager.prototype.cpuProfilerTrackingCompleted):
2585         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
2586         (WI.TimelineManager.prototype.memoryTrackingStart): Renamed.
2587         (WI.TimelineManager.prototype.memoryTrackingUpdate): Renamed.
2588         (WI.TimelineManager.prototype.memoryTrackingComplete): Renamed.
2589         * UserInterface/Models/CPUInstrument.js:
2590         (WI.CPUInstrument):
2591         (WI.CPUInstrument.supported):
2592         (WI.CPUInstrument.prototype.get timelineRecordType):
2593         (WI.CPUInstrument.prototype.startInstrumentation):
2594         (WI.CPUInstrument.prototype.stopInstrumentation):
2595         * UserInterface/Models/CPUTimelineRecord.js:
2596         (WI.CPUTimelineRecord):
2597         (WI.CPUTimelineRecord.prototype.get timestamp):
2598         (WI.CPUTimelineRecord.prototype.get usage):
2599         * UserInterface/Models/Instrument.js:
2600         (WI.Instrument.createForTimelineType):
2601         * UserInterface/Models/TimelineRecord.js:
2602         * UserInterface/Models/TimelineRecording.js:
2603         (WI.TimelineRecording.prototype.addRecord):
2604         Expose a new CPU instrument and timeline.
2605
2606         * UserInterface/Views/ColumnChart.js: Added.
2607         (WI.ColumnChart):
2608         (WI.ColumnChart.prototype.get element):
2609         (WI.ColumnChart.prototype.get bars):
2610         (WI.ColumnChart.prototype.get size):
2611         (WI.ColumnChart.prototype.set size):
2612         (WI.ColumnChart.prototype.addBar):
2613         (WI.ColumnChart.prototype.clear):
2614         (WI.ColumnChart.prototype.needsLayout):
2615         (WI.ColumnChart.prototype.updateLayout):
2616         View that will draw vertical bars with independent widths.
2617         This is meant to be used similiar to WI.LineChart.
2618
2619         * UserInterface/Images/CPUInstrument.svg: Added.
2620         * UserInterface/Views/Variables.css:
2621         (:root):
2622         CPU timeline colors and icon.
2623
2624         * UserInterface/Views/CPUTimelineOverviewGraph.css:
2625         (body .sidebar > .panel.navigation.timeline > .timelines-content li.item.cpu,):
2626         (.timeline-overview-graph.cpu):
2627         (.timeline-overview-graph.cpu > .legend):
2628         (body[dir=ltr] .timeline-overview-graph.cpu > .legend):
2629         (body[dir=rtl] .timeline-overview-graph.cpu > .legend):
2630         (.timeline-overview-graph:nth-child(even) > .legend):
2631         (body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart):
2632         (.timeline-overview-graph.cpu > .bar-chart > svg > g > rect):
2633         * UserInterface/Views/CPUTimelineOverviewGraph.js: Added.
2634         (WI.CPUTimelineOverviewGraph):
2635         (WI.CPUTimelineOverviewGraph.prototype.get height):
2636         (WI.CPUTimelineOverviewGraph.prototype.reset):
2637         (WI.CPUTimelineOverviewGraph.prototype.layout.xScale):
2638         (WI.CPUTimelineOverviewGraph.prototype.layout.yScale):
2639         (WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord):
2640         (WI.CPUTimelineOverviewGraph.prototype.layout):
2641         (WI.CPUTimelineOverviewGraph.prototype._updateLegend):
2642         (WI.CPUTimelineOverviewGraph.prototype._cpuTimelineRecordAdded):
2643         * UserInterface/Views/CPUTimelineView.css:
2644         (.timeline-view.cpu):
2645         (.timeline-view.cpu > .content):
2646         (.timeline-view.cpu > .content .subtitle):
2647         (.timeline-view.cpu > .content > .details):
2648         (.timeline-view.cpu > .content > .details > .timeline-ruler):
2649         (body[dir=ltr] .timeline-view.cpu > .content > .details > .timeline-ruler):
2650         (body[dir=rtl] .timeline-view.cpu > .content > .details > .timeline-ruler):
2651         (.timeline-view.cpu > .content > .details > .subtitle):
2652         (.cpu-usage-view .line-chart > svg > path):
2653         (.timeline-view.cpu .legend > .row > .swatch.current):
2654         * UserInterface/Views/CPUTimelineView.js: Added.
2655         (WI.CPUTimelineView):
2656         (WI.CPUTimelineView.prototype.shown):
2657         (WI.CPUTimelineView.prototype.hidden):
2658         (WI.CPUTimelineView.prototype.closed):
2659         (WI.CPUTimelineView.prototype.reset):
2660         (WI.CPUTimelineView.prototype.get scrollableElements):
2661         (WI.CPUTimelineView.prototype.get showsFilterBar):
2662         (WI.CPUTimelineView.prototype.layout.layoutView):
2663         (WI.CPUTimelineView.prototype.layout.xScale):
2664         (WI.CPUTimelineView.prototype.layout.yScale):
2665         (WI.CPUTimelineView.prototype.layout):
2666         (WI.CPUTimelineView.prototype._cpuTimelineRecordAdded):
2667         * UserInterface/Views/CPUUsageView.css:
2668         (.cpu-usage-view):
2669         (.cpu-usage-view > .details):
2670         (body[dir=ltr] .cpu-usage-view > .details):
2671         (body[dir=rtl] .cpu-usage-view > .details):
2672         (.cpu-usage-view > .graph):
2673         (body[dir=rtl] .cpu-usage-view > .graph):
2674         * UserInterface/Views/CPUUsageView.js:
2675         (WI.CPUUsageView):
2676         (WI.CPUUsageView.prototype.get element):
2677         (WI.CPUUsageView.prototype.clear):
2678         (WI.CPUUsageView.prototype.layoutWithDataPoints):
2679         (WI.CPUUsageView.prototype._updateDetails):
2680         * UserInterface/Views/ContentView.js:
2681         (WI.ContentView.createFromRepresentedObject):
2682         * UserInterface/Views/TimelineIcons.css:
2683         (.cpu-icon .icon):
2684         * UserInterface/Views/TimelineOverviewGraph.js:
2685         (WI.TimelineOverviewGraph.createForTimeline):
2686         * UserInterface/Views/TimelineTabContentView.js:
2687         (WI.TimelineTabContentView.displayNameForTimelineType):
2688         (WI.TimelineTabContentView.iconClassNameForTimelineType):
2689         (WI.TimelineTabContentView.genericClassNameForTimelineType):
2690         (WI.TimelineTabContentView.iconClassNameForRecord):
2691         (WI.TimelineTabContentView.displayNameForRecord):
2692         Timeline views for CPU usage.
2693
2694         * UserInterface/Views/MemoryCategoryView.js:
2695         (WI.MemoryCategoryView):
2696         * UserInterface/Views/MemoryTimelineView.js:
2697         (WI.MemoryTimelineView.createChartContainer):
2698         (WI.MemoryTimelineView):
2699         (WI.MemoryTimelineView.prototype._clearMaxComparisonLegend):
2700         Minor updates to style and comments.
2701
2702 2019-01-23  Nikita Vasilyev  <nvasilyev@apple.com>
2703
2704         Web Inspector: Refactor WI.CSSStyleDeclaration.prototype.update
2705         https://bugs.webkit.org/show_bug.cgi?id=193737
2706
2707         Reviewed by Matt Baker.
2708
2709         Remove unused event data from the WI.CSSStyleDeclaration.Event.PropertiesChanged event.
2710
2711         * UserInterface/Models/CSSStyleDeclaration.js:
2712         (WI.CSSStyleDeclaration.prototype.update):
2713
2714 2019-01-23  Devin Rousso  <drousso@apple.com>
2715
2716         WebInspector: Confusingly nested events in the timeline for Mutation Observers
2717         https://bugs.webkit.org/show_bug.cgi?id=192884
2718         <rdar://problem/46854178>
2719
2720         Reviewed by Joseph Pecoraro.
2721
2722         If a microtask event (e.g. `ObserverCallback`) is contained within a `EvaluatedScript`
2723         event, move that microtask event to be a sibling of the `EvaluateScript`, subtracting the
2724         microtask's time taken from the `EvaluateScript`'s time. If there are no other children
2725         after this move, then remove the `EvaluateScript` altogether.
2726
2727         * UserInterface/Controllers/TimelineManager.js:
2728         (WI.TimelineManager.prototype.eventRecorded.fixMicrotaskPlacement): Added.
2729         (WI.TimelineManager.prototype.eventRecorded):
2730         (WI.TimelineManager.prototype._mergeScriptProfileRecords):
2731
2732 2019-01-23  Joseph Pecoraro  <pecoraro@apple.com>
2733
2734         Web Inspector: Network Waterfall column should redraw when adding/removing new columns
2735         https://bugs.webkit.org/show_bug.cgi?id=193696
2736         <rdar://problem/47464149>
2737
2738         Reviewed by Devin Rousso.
2739
2740         * UserInterface/Views/TableColumn.js:
2741         (WI.TableColumn.prototype.get needsReloadOnResize):
2742         * UserInterface/Views/NetworkTableContentView.js:
2743         (WI.NetworkTableContentView.prototype.initialLayout):
2744         Mark the waterfall column as sensitive to any resizes.
2745
2746         * UserInterface/Views/Table.js:
2747         (WI.Table.prototype.showColumn):
2748         (WI.Table.prototype.hideColumn):
2749         Update column widths and reload any columns that may be sensitive to resizes.
2750
2751 2019-01-22  Devin Rousso  <drousso@apple.com>
2752
2753         Web Inspector: InspectorInstrumentation::willEvaluateScript should include column number
2754         https://bugs.webkit.org/show_bug.cgi?id=116191
2755         <rdar://problem/13905910>
2756
2757         Reviewed by Joseph Pecoraro.
2758
2759         * UserInterface/Controllers/TimelineManager.js:
2760         (WI.TimelineManager.prototype._processRecord):
2761
2762 2019-01-22  Devin Rousso  <drousso@apple.com>
2763
2764         Web Inspector: expose Audit and Recording versions to the frontend
2765         https://bugs.webkit.org/show_bug.cgi?id=193262
2766         <rdar://problem/47130684>
2767
2768         Reviewed by Joseph Pecoraro.
2769
2770         * UserInterface/Protocol/InspectorBackend.js:
2771         (InspectorBackendClass.prototype.registerVersion): Added.
2772
2773         * UserInterface/Models/AuditTestCase.js:
2774         * UserInterface/Models/Recording.js:
2775         (WI.Recording.fromPayload):
2776         Add Interface version values.
2777
2778 2019-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
2779
2780         Web Inspector: Styles: refactor properties/allProperties/visibleProperties/allVisibleProperties
2781         https://bugs.webkit.org/show_bug.cgi?id=193615
2782
2783         Reviewed by Devin Rousso.
2784
2785         Remove unused visibleProperties.
2786
2787         Rename:
2788         - properties to enabledProperties;
2789         - allProperties to properties;
2790         - allVisibleProperties to visibleProperties.
2791
2792         * UserInterface/Models/CSSProperty.js:
2793         (WI.CSSProperty.prototype._prependSemicolonIfNeeded):
2794         (WI.CSSProperty):
2795         * UserInterface/Models/CSSStyleDeclaration.js:
2796         (WI.CSSStyleDeclaration):
2797         (WI.CSSStyleDeclaration.prototype.get enabledProperties):
2798         (WI.CSSStyleDeclaration.prototype.get properties):
2799         (WI.CSSStyleDeclaration.prototype.propertyForName):
2800         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
2801         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
2802         (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
2803         * UserInterface/Models/DOMNodeStyles.js:
2804         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
2805         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
2806         (WI.DOMNodeStyles.prototype._associateRelatedProperties):
2807         (WI.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
2808         (WI.DOMNodeStyles):
2809         * UserInterface/Views/BoxModelDetailsSectionRow.js:
2810         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
2811         * UserInterface/Views/ComputedStyleDetailsPanel.js:
2812         (WI.ComputedStyleDetailsPanel.prototype._computePropertyTraces):
2813         * UserInterface/Views/ComputedStyleSection.js:
2814         (WI.ComputedStyleSection.prototype.get propertiesToRender):
2815         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2816         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
2817         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2818         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
2819         * UserInterface/Views/SpreadsheetStyleProperty.js:
2820         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
2821
2822 2019-01-22  Joseph Pecoraro  <pecoraro@apple.com>
2823
2824         Web Inspector: Network Table appears broken after filter - rows look collapsed
2825         https://bugs.webkit.org/show_bug.cgi?id=192730
2826         <rdar://problem/46853158>
2827
2828         Reviewed by Devin Rousso.
2829
2830         * UserInterface/Views/Table.js:
2831         (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
2832         Affect the filler row like the other applyColumnWidths calls since this
2833         now may be the initial call to size visible columns.
2834
2835 2019-01-22  Devin Rousso  <drousso@apple.com>
2836
2837         Web Inspector: Audit: use plural strings for Passed, Failed, and Unsupported
2838         https://bugs.webkit.org/show_bug.cgi?id=193675
2839         <rdar://problem/46628680>
2840
2841         Reviewed by Joseph Pecoraro.
2842
2843         * UserInterface/Views/AuditTestGroupContentView.js:
2844         (WI.AuditTestGroupContentView.prototype.layout):
2845
2846         * Localizations/en.lproj/localizedStrings.js:
2847
2848 2019-01-18  Jer Noble  <jer.noble@apple.com>
2849
2850         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
2851         https://bugs.webkit.org/show_bug.cgi?id=189553
2852
2853         Reviewed by Tim Horton.
2854
2855         * Configurations/Base.xcconfig:
2856         * Configurations/SDKVariant.xcconfig: Added.
2857
2858 2019-01-18  Devin Rousso  <drousso@apple.com>
2859
2860         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'resource.finished')
2861         https://bugs.webkit.org/show_bug.cgi?id=193589
2862
2863         Reviewed by Joseph Pecoraro.
2864
2865         * UserInterface/Views/NetworkTableContentView.js:
2866         (WI.NetworkTableContentView.prototype.get supportsSave):
2867         (WI.NetworkTableContentView.prototype._HARResources):
2868
2869 2019-01-17  Truitt Savell  <tsavell@apple.com>
2870
2871         Unreviewed, rolling out r240124.
2872
2873         This commit broke an internal build.
2874
2875         Reverted changeset:
2876
2877         "SDK_VARIANT build destinations should be separate from non-
2878         SDK_VARIANT builds"
2879         https://bugs.webkit.org/show_bug.cgi?id=189553
2880         https://trac.webkit.org/changeset/240124
2881
2882 2019-01-17  Jer Noble  <jer.noble@apple.com>
2883
2884         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
2885         https://bugs.webkit.org/show_bug.cgi?id=189553
2886
2887         Reviewed by Tim Horton.
2888
2889         * Configurations/Base.xcconfig:
2890         * Configurations/SDKVariant.xcconfig: Added.
2891
2892 2019-01-16  Matt Baker  <mattbaker@apple.com>
2893
2894         Web Inspector: Fix TreeOutline TypeError:ā€‹ this._indexesForSubtree is not a function
2895         https://bugs.webkit.org/show_bug.cgi?id=193501
2896         <rdar://problem/47323967>
2897
2898         Reviewed by Joseph Pecoraro.
2899
2900         * UserInterface/Views/TreeOutline.js:
2901         (WI.TreeOutline.prototype.removeChildAtIndex):
2902
2903 2019-01-15  Devin Rousso  <drousso@apple.com>
2904
2905         Web Inspector: Audit: create new IDL type for exposing special functionality in test context
2906         https://bugs.webkit.org/show_bug.cgi?id=193149
2907         <rdar://problem/46801218>
2908
2909         Reviewed by Joseph Pecoraro.
2910
2911         Add `AuditAgent` getters and plumbing.
2912
2913         * UserInterface/Protocol/Target.js:
2914         (WI.Target.prototype.get AuditAgent): Added.
2915
2916         * UserInterface/Models/AuditTestCase.js:
2917         (WI.AuditTestCase.prototype.async run):
2918
2919         * UserInterface/Controllers/AuditManager.js:
2920         (WI.AuditManager.prototype.async start):
2921
2922         * .eslintrc:
2923
2924 2019-01-14  Devin Rousso  <drousso@apple.com>
2925
2926         Web Inspector: Event breakpoints: typing uppercase "DOM" doesn't show completions for events that start with "DOM"
2927         https://bugs.webkit.org/show_bug.cgi?id=193384
2928
2929         Reviewed by Joseph Pecoraro.
2930
2931         * UserInterface/Views/EventBreakpointPopover.js:
2932         (WI.EventBreakpointPopover.prototype.show):
2933
2934 2019-01-14  Devin Rousso  <drousso@apple.com>
2935
2936         Web Inspector: Event breakpoints: text field and completion popover fonts should match
2937         https://bugs.webkit.org/show_bug.cgi?id=193249
2938
2939         Reviewed by Matt Baker.
2940
2941         * UserInterface/Views/EventBreakpointPopover.css:
2942         (.popover .event-breakpoint-content > .event-type > input): Added.
2943         (.popover .event-breakpoint-content > .event-type > input::placeholder): Added.
2944         * UserInterface/Views/EventBreakpointPopover.js:
2945         (WI.EventBreakpointPopover.prototype.show):
2946         (WI.EventBreakpointPopover.prototype._showSuggestionsView):
2947         Subtract the <input> border and padding from the bounds position so the <input> text lines
2948         up with the `WI.CompletionSuggestionsView` text.
2949
2950         * UserInterface/Views/CompletionSuggestionsView.js:
2951         (WI.CompletionSuggestionsView):
2952         Drive-by: force `dir=ltr` to match the `text-align: left;` CSS styling.
2953
2954 2019-01-14  Nikita Vasilyev  <nvasilyev@apple.com>
2955
2956         Web Inspector: Styles: pressing Down key on empty value field shouldn't discard completion popover
2957         https://bugs.webkit.org/show_bug.cgi?id=193098
2958         <rdar://problem/47016036>
2959
2960         Reviewed by Devin Rousso.
2961
2962         Hide CompletionSuggestionsView when SpreadsheetTextField moves, e.g. by scrolling or resizing the sidebar.
2963         Update CompletionSuggestionsView position after pressing Up or Down key, because SpreadsheetTextField may
2964         move from wrapping text.
2965
2966         * UserInterface/Views/CompletionSuggestionsView.js:
2967         (WI.CompletionSuggestionsView.prototype.hide):
2968         (WI.CompletionSuggestionsView.prototype.show):
2969         (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves): Removed.
2970         (WI.CompletionSuggestionsView.prototype.hideWhenElementMoves): Added.
2971         (WI.CompletionSuggestionsView.prototype._stopMoveTimer): Added.
2972         (WI.CompletionSuggestionsView):
2973
2974         * UserInterface/Views/SpreadsheetTextField.js:
2975         (WI.SpreadsheetTextField.prototype.set suggestionHint):
2976         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
2977         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
2978         (WI.SpreadsheetTextField.prototype._updateCompletions):
2979         (WI.SpreadsheetTextField.prototype._showSuggestionsView): Added.
2980
2981         (WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
2982         Drive-by: abstract out repeating code into a private method.
2983
2984 2019-01-14  Devin Rousso  <drousso@apple.com>
2985
2986         Web Inspector: Settings: group titles should vertically align with the first editor
2987         https://bugs.webkit.org/show_bug.cgi?id=193391
2988
2989         Reviewed by Dean Jackson.
2990
2991         * UserInterface/Views/SettingsTabContentView.css:
2992         (.content-view.settings > .settings-view > .container):
2993         (.content-view.settings > .settings-view > .container > .editor-group > .editor): Added.
2994         (.content-view.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Added.
2995         (.content-view.settings > .settings-view > .container > .editor-group > .editor select):
2996         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="number"]):
2997
2998 2019-01-11  Matt Baker  <mattbaker@apple.com>
2999
3000         Web Inspector: REGRESSION: deleting an audit puts selection in a selected but invisible state
3001         https://bugs.webkit.org/show_bug.cgi?id=192917
3002         <rdar://problem/46875285>
3003
3004         Reviewed by Devin Rousso.
3005
3006         SelectionController should not be notified of removed children until the
3007         child items have been removed from the TreeOutline. Doing so at this stage
3008         is unsafe, since this method checks `this.selectedTreeElement`, which could
3009         return the adjusted index from the SelectionController before anything has
3010         actually been removed from the TreeOutline.
3011
3012         The number of calls to SelectionController.prototype.didRemoveItems is also
3013         reduced somewhat, since we're no longer calling it for every TreeElement.
3014
3015         * UserInterface/Views/TreeOutline.js:
3016         (WI.TreeOutline.prototype.removeChildAtIndex):
3017         (WI.TreeOutline.prototype.removeChildren):
3018         (WI.TreeOutline.prototype._forgetTreeElement):
3019         (WI.TreeOutline.prototype._indexesForSubtree): Added.        
3020
3021 2019-01-10  Devin Rousso  <drousso@apple.com>
3022
3023         Web Inspector: Audit: allow audits to be enabled/disabled
3024         https://bugs.webkit.org/show_bug.cgi?id=192210
3025         <rdar://problem/46423583>
3026
3027         Reviewed by Joseph Pecoraro.
3028
3029         * UserInterface/Controllers/AuditManager.js:
3030         (WI.AuditManager.prototype.get editing): Added.
3031         (WI.AuditManager.prototype.set editing): Added.
3032         (WI.AuditManager.prototype.stop):
3033         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
3034         Since default audits aren't stored, keep a list of disabled default tests in a `WI.Setting`.
3035
3036         * UserInterface/Models/AuditTestBase.js:
3037         (WI.AuditTestBase):
3038         (WI.AuditTestBase.prototype.get disabled): Added.
3039         (WI.AuditTestBase.prototype.set disabled): Added.
3040         (WI.AuditTestBase.prototype.async start):
3041         (WI.AuditTestBase.prototype.stop):
3042         (WI.AuditTestBase.toJSON):
3043
3044         * UserInterface/Models/AuditTestCase.js:
3045         (WI.AuditTestCase):
3046         (WI.AuditTestCase.async fromPayload):
3047         (WI.AuditTestCase.prototype.toJSON):
3048
3049         * UserInterface/Models/AuditTestGroup.js:
3050         (WI.AuditTestGroup):
3051         (WI.AuditTestGroup.async fromPayload):
3052         (WI.AuditTestGroup.prototype.get disabled): Added.
3053         (WI.AuditTestGroup.prototype.set disabled): Added.
3054         (WI.AuditTestGroup.prototype.toJSON):
3055         (WI.AuditTestGroup.prototype.async run):
3056         (WI.AuditTestGroup.prototype._handleTestDisabledChanged): Added.
3057         (WI.AuditTestGroup.prototype._handleTestProgress):
3058         Propagate `disabled` changes to all sub-tests, unless the change was caused by one of the
3059         sub-tests, in which case we are now in an intermediate state.
3060
3061         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3062         (WI.AuditNavigationSidebarPanel):
3063         (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
3064         (WI.AuditNavigationSidebarPanel.prototype.initialLayout):
3065         (WI.AuditNavigationSidebarPanel.prototype.hasCustomFilters): Added.
3066         (WI.AuditNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters): Added.
3067         (WI.AuditNavigationSidebarPanel.prototype._addTest):
3068         (WI.AuditNavigationSidebarPanel.prototype._addResult):
3069         (WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState):
3070         (WI.AuditNavigationSidebarPanel.prototype._updateEditButtonNavigationItemState): Added.
3071         (WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerEditingChanged): Added.
3072         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
3073         (WI.AuditNavigationSidebarPanel.prototype._handleAuditTestScheduled):
3074         (WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
3075         (WI.AuditNavigationSidebarPanel.prototype._handleEditButtonNavigationItemClicked): Added.
3076         * UserInterface/Views/AuditNavigationSidebarPanel.css:
3077         (.sidebar > .panel.navigation.audit > .content):
3078         (.sidebar > .panel.navigation.audit > .content > .tree-outline): Added.
3079         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled):active): Added.
3080         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated): Added.
3081         (.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated:active): Added.
3082         (.sidebar > .panel.navigation.audit > .content .edit-audits.disabled): Added.
3083         (.finish-editing-audits-placeholder.message-text-view .navigation-item-help .navigation-bar): Added.
3084         Leverage custom filters to ensure that disabled audits arent shown when not editing and that
3085         result tree elements aren't shown while editing.
3086
3087         * UserInterface/Views/AuditTestGroupContentView.js:
3088         (WI.AuditTestGroupContentView.prototype.shown):
3089
3090         * UserInterface/Views/AuditTreeElement.js:
3091         (WI.AuditTreeElement.prototype.onattach):
3092         (WI.AuditTreeElement.prototype.canSelectOnMouseDown): Added.
3093         (WI.AuditTreeElement.prototype._updateTestGroupDisabled): Added.
3094         (WI.AuditTreeElement.prototype._handleTestDisabledChanged): Added.
3095         (WI.AuditTreeElement.prototype._handleManagerEditingChanged): Added.
3096         * UserInterface/Views/AuditTreeElement.css:
3097         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:not(:hover)): Added.
3098         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
3099         (.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:not(:hover)): Deleted.
3100         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
3101         Prevent selection and running when editing.
3102
3103         * UserInterface/Views/TreeOutline.css:
3104         (.tree-outline .children.expanded:not([hidden])): Added.
3105         (.tree-outline .children.expanded): Deleted.
3106
3107         * UserInterface/Base/ObjectStore.js:
3108         (WI.ObjectStore._open):
3109         Batch operations together to help avoid multiple simultaneous `indexedDB.open` calls. This
3110         should also help preserve the order of operations, as once the database is open, operations
3111         are executed in the order they were enqueued.
3112
3113         (WI.ObjectStore.prototype.async.addObject):
3114         Pass a unique `Symbol` to the `toJSON` call on the given object so that the object can save
3115         additional values that wouldn't normally be saved. This doesn't conflict with normal usage
3116         of `toJSON` (e.g. `JSON.stringify`) because that case also passes in a value:
3117          - `undefined`, if it was called directly on the object
3118          - the key for this object in the containing object
3119          - the index of this object in the containing array
3120         In any case, the value can never equal the unique `Symbol`, so it's guaranteed that the code
3121         will only run for `WI.ObjectStore` operations.
3122
3123         (WI.ObjectStore.prototype.async.clear): Added.
3124
3125         * Localizations/en.lproj/localizedStrings.js:
3126
3127 2019-01-09  Devin Rousso  <drousso@apple.com>
3128
3129         Web Inspector: Protocol Logging: log messages as objects if inspector^2 is open
3130         https://bugs.webkit.org/show_bug.cgi?id=193284
3131
3132         Reviewed by Joseph Pecoraro.
3133
3134         If inspector^2 is closed, stringify all messages.
3135         If inspector^2 is open, log each message JSON object without modifying it.
3136
3137         * UserInterface/Protocol/LoggingProtocolTracer.js:
3138         (WI.LoggingProtocolTracer.prototype._processEntry):
3139
3140 2019-01-09  Nikita Vasilyev  <nvasilyev@apple.com>
3141
3142         Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection
3143         https://bugs.webkit.org/show_bug.cgi?id=193218
3144         <rdar://problem/47098303>
3145
3146         Reviewed by Devin Rousso.
3147
3148         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3149         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
3150         A style property may get removed on blur event, so propertyElement may get removed from the DOM right when mousedown event happens.
3151
3152         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowClick):
3153         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
3154         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
3155
3156 2019-01-08  Nikita Vasilyev  <nvasilyev@apple.com>
3157
3158         Web Inspector: Styles: Undo reverts all changes at once
3159         https://bugs.webkit.org/show_bug.cgi?id=177676
3160         <rdar://problem/34745031>
3161
3162         Reviewed by Devin Rousso.
3163
3164         Command-Z used to revert all changes at once because Web Inspector never
3165         set any history checkpoints in the style editor.
3166
3167         * UserInterface/Views/SpreadsheetStyleProperty.js:
3168         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
3169         * UserInterface/Views/SpreadsheetTextField.js:
3170         (WI.SpreadsheetTextField.prototype._handleBlur):
3171
3172 2019-01-08  Nikita Vasilyev  <nvasilyev@apple.com>
3173
3174         Web Inspector: Use prefers-color-scheme instead of prefers-dark-interface
3175         https://bugs.webkit.org/show_bug.cgi?id=193265
3176
3177         Reviewed by Timothy Hatcher.
3178
3179         * UserInterface/Views/AuditTestContentView.css:
3180         (@media (prefers-color-scheme: dark)):
3181         * UserInterface/Views/AuditTestGroupContentView.css:
3182         (@media (prefers-color-scheme: dark)):
3183         * UserInterface/Views/BezierEditor.css:
3184         (@media (prefers-color-scheme: dark)):
3185         * UserInterface/Views/BoxModelDetailsSectionRow.css:
3186         (@media (prefers-color-scheme: dark)):
3187         * UserInterface/Views/BreakpointActionView.css:
3188         (@media (prefers-color-scheme: dark)):
3189         * UserInterface/Views/BreakpointPopoverController.css:
3190         (@media (prefers-color-scheme: dark)):
3191         * UserInterface/Views/ButtonNavigationItem.css:
3192         (@media (prefers-color-scheme: dark)):
3193         * UserInterface/Views/ButtonToolbarItem.css:
3194         (@media (prefers-color-scheme: dark)):
3195         * UserInterface/Views/CallFrameView.css:
3196         (@media (prefers-color-scheme: dark)):
3197         * UserInterface/Views/CanvasContentView.css:
3198         (@media (prefers-color-scheme: dark)):
3199         * UserInterface/Views/CanvasOverviewContentView.css:
3200         (@media (prefers-color-scheme: dark)):
3201         * UserInterface/Views/CanvasSidebarPanel.css:
3202         (@media (prefers-color-scheme: dark)):
3203         * UserInterface/Views/CanvasTabContentView.css:
3204         (@media (prefers-color-scheme: dark)):
3205         * UserInterface/Views/CodeMirrorOverrides.css:
3206         (@media (prefers-color-scheme: dark)):
3207         * UserInterface/Views/CompletionSuggestionsView.css:
3208         (@media (prefers-color-scheme: dark)):
3209         * UserInterface/Views/ComputedStyleDetailsPanel.css:
3210         (@media (prefers-color-scheme: dark)):
3211         * UserInterface/Views/ComputedStyleSection.css:
3212         (@media (prefers-color-scheme: dark)):
3213         * UserInterface/Views/ConsoleMessageView.css:
3214         (@media (prefers-color-scheme: dark)):
3215         * UserInterface/Views/ConsolePrompt.css:
3216         (@media (prefers-color-scheme: dark)):
3217         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
3218         (@media (prefers-color-scheme: dark)):
3219         * UserInterface/Views/DOMTreeOutline.css:
3220         (@media (prefers-color-scheme: dark)):
3221         * UserInterface/Views/DataGrid.css:
3222         (@media (prefers-color-scheme: dark)):
3223         * UserInterface/Views/DebuggerDashboardView.css:
3224         (@media (prefers-color-scheme: dark)):
3225         * UserInterface/Views/DebuggerSidebarPanel.css:
3226         (@media (prefers-color-scheme: dark)):
3227         * UserInterface/Views/DefaultDashboardView.css:
3228         (@media (prefers-color-scheme: dark)):
3229         * UserInterface/Views/DetailsSection.css:
3230         (@media (prefers-color-scheme: dark)):
3231         * UserInterface/Views/DividerNavigationItem.css:
3232         (@media (prefers-color-scheme: dark)):
3233         * UserInterface/Views/Editing.css:
3234         (@media (prefers-color-scheme: dark)):
3235         * UserInterface/Views/FindBanner.css:
3236         (@media (prefers-color-scheme: dark)):
3237         * UserInterface/Views/FontResourceContentView.css:
3238         (@media (prefers-color-scheme: dark)):
3239         * UserInterface/Views/FormattedValue.css:
3240         (@media (prefers-color-scheme: dark)):
3241         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
3242         (@media (prefers-color-scheme: dark)):
3243         * UserInterface/Views/HoverMenu.css:
3244         (@media (prefers-color-scheme: dark)):
3245         * UserInterface/Views/ImageResourceContentView.css:
3246         (@media (prefers-color-scheme: dark)):
3247         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
3248         (@media (prefers-color-scheme: dark)):
3249         * UserInterface/Views/LogContentView.css:
3250         (@media (prefers-color-scheme: dark)):
3251
3252         * UserInterface/Views/Main.css:
3253         (:root):
3254
3255         (@media (prefers-color-scheme: dark)):
3256         * UserInterface/Views/NetworkDetailView.css:
3257         (@media (prefers-color-scheme: dark)):
3258         * UserInterface/Views/NetworkTableContentView.css:
3259         (@media (prefers-color-scheme: dark)):
3260         * UserInterface/Views/NewTabContentView.css:
3261         (@media (prefers-color-scheme: dark)):
3262         * UserInterface/Views/ObjectPreviewView.css:
3263         (@media (prefers-color-scheme: dark)):
3264         * UserInterface/Views/ObjectTreePropertyTreeElement.css:
3265         (@media (prefers-color-scheme: dark)):
3266         * UserInterface/Views/OpenResourceDialog.css:
3267         (@media (prefers-color-scheme: dark)):
3268         * UserInterface/Views/ProgressView.css:
3269         (@media (prefers-color-scheme: dark)):
3270         * UserInterface/Views/QuickConsole.css:
3271         (@media (prefers-color-scheme: dark)):
3272         * UserInterface/Views/RecordingActionTreeElement.css:
3273         (@media (prefers-color-scheme: dark)):
3274         * UserInterface/Views/RecordingContentView.css:
3275         (@media (prefers-color-scheme: dark)):
3276         * UserInterface/Views/RecordingStateDetailsSidebarPanel.css:
3277         (@media (prefers-color-scheme: dark)):
3278         * UserInterface/Views/ResourceSecurityContentView.css:
3279         (@media (prefers-color-scheme: dark)):
3280         * UserInterface/Views/ResourceSizesContentView.css:
3281         (@media (prefers-color-scheme: dark)):
3282         * UserInterface/Views/ResourceTimingBreakdownView.css:
3283         (@media (prefers-color-scheme: dark)):
3284         * UserInterface/Views/ScopeBar.css:
3285         (@media (prefers-color-scheme: dark)):
3286         * UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
3287         (@media (prefers-color-scheme: dark)):
3288         * UserInterface/Views/SearchBar.css:
3289         (@media (prefers-color-scheme: dark)):
3290         * UserInterface/Views/SearchSidebarPanel.css:
3291         (@media (prefers-color-scheme: dark)):
3292         * UserInterface/Views/SettingsTabContentView.css:
3293         (@media (prefers-color-scheme: dark)):
3294         * UserInterface/Views/ShaderProgramContentView.css:
3295         (@media (prefers-color-scheme: dark)):
3296         * UserInterface/Views/ShaderProgramTreeElement.css:
3297         (@media (prefers-color-scheme: dark)):
3298         * UserInterface/Views/SourceCodeTextEditor.css:
3299         (@media (prefers-color-scheme: dark)):
3300         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3301         (@media (prefers-color-scheme: dark)):
3302         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
3303         (@media (prefers-color-scheme: dark)):
3304         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
3305         (@media (prefers-color-scheme: dark)):
3306         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
3307         (@media (prefers-color-scheme: dark)):
3308         * UserInterface/Views/TabBar.css:
3309         (@media (prefers-color-scheme: dark)):
3310         * UserInterface/Views/Table.css:
3311         (@media (prefers-color-scheme: dark)):
3312         * UserInterface/Views/TextEditor.css:
3313         (@media (prefers-color-scheme: dark)):
3314         * UserInterface/Views/TimelineDataGrid.css:
3315         (@media (prefers-color-scheme: dark)):
3316         * UserInterface/Views/TimelineIcons.css:
3317         (@media (prefers-color-scheme: dark)):
3318         * UserInterface/Views/TimelineOverview.css:
3319         (@media (prefers-color-scheme: dark)):
3320         * UserInterface/Views/Toolbar.css:
3321         (@media (prefers-color-scheme: dark)):
3322         * UserInterface/Views/TreeOutline.css:
3323         (@media (prefers-color-scheme: dark)):
3324         * UserInterface/Views/URLBreakpointPopover.css:
3325         (@media (prefers-color-scheme: dark)):
3326         * UserInterface/Views/Variables.css:
3327         (@media (prefers-color-scheme: dark)):
3328         * UserInterface/Views/WebSocketContentView.css:
3329         (@media (prefers-color-scheme: dark)):
3330
3331 2019-01-07  Devin Rousso  <drousso@apple.com>
3332
3333         Web Inspector: Audit: run arrow shouldn't be visible when running tests
3334         https://bugs.webkit.org/show_bug.cgi?id=192209
3335         <rdar://problem/46423615>
3336
3337         Reviewed by Brian Burg.
3338
3339         * UserInterface/Views/AuditTreeElement.js:
3340         (WI.AuditTreeElement.prototype.onattach):
3341         (WI.AuditTreeElement.prototype.ondetach):
3342         (WI.AuditTreeElement.prototype._updateLevel):
3343         (WI.AuditTreeElement.prototype._handleAuditManagerTestScheduled): Added.
3344         (WI.AuditTreeElement.prototype._handleAuditManagerTestCompleted): Added.
3345         * UserInterface/Views/AuditTreeElement.css: Added.
3346         (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Added.
3347         (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
3348         (.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img): Deleted.
3349         (.tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
3350
3351 2019-01-07  Devin Rousso  <drousso@apple.com>
3352
3353         Web Inspector: extend XHR breakpoints to work with fetch
3354         https://bugs.webkit.org/show_bug.cgi?id=185843
3355         <rdar://problem/40431027>
3356
3357         Reviewed by Matt Baker.
3358
3359         * UserInterface/Controllers/DOMDebuggerManager.js:
3360         (WI.DOMDebuggerManager):
3361         (WI.DOMDebuggerManager.supportsURLBreakpoints): Added.
3362         (WI.DOMDebuggerManager.prototype.get urlBreakpoints): Added.
3363         (WI.DOMDebuggerManager.prototype.urlBreakpointForURL): Added.
3364         (WI.DOMDebuggerManager.prototype.addURLBreakpoint): Added.
3365         (WI.DOMDebuggerManager.prototype.removeURLBreakpoint): Added.
3366         (WI.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
3367         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint): Added.
3368         (WI.DOMDebuggerManager.prototype._resolveURLBreakpoint): Added.
3369         (WI.DOMDebuggerManager.prototype._saveURLBreakpoints): Added.
3370         (WI.DOMDebuggerManager.prototype._urlBreakpointDisabledStateDidChange): Added.
3371         (WI.DOMDebuggerManager.prototype.get xhrBreakpoints): Deleted.
3372         (WI.DOMDebuggerManager.prototype.xhrBreakpointForURL): Deleted.
3373         (WI.DOMDebuggerManager.prototype.addXHRBreakpoint): Deleted.
3374         (WI.DOMDebuggerManager.prototype.removeXHRBreakpoint): Deleted.
3375         (WI.DOMDebuggerManager.prototype._updateXHRBreakpoint.breakpointUpdated): Deleted.
3376         (WI.DOMDebuggerManager.prototype._updateXHRBreakpoint): Deleted.
3377         (WI.DOMDebuggerManager.prototype._resolveXHRBreakpoint): Deleted.
3378         (WI.DOMDebuggerManager.prototype._saveXHRBreakpoints): Deleted.
3379         (WI.DOMDebuggerManager.prototype._xhrBreakpointDisabledStateDidChange): Deleted.
3380
3381         * UserInterface/Controllers/DebuggerManager.js:
3382         (WI.DebuggerManager.prototype._pauseReasonFromPayload):
3383
3384         * UserInterface/Views/DebuggerSidebarPanel.js:
3385         (WI.DebuggerSidebarPanel):
3386         (WI.DebuggerSidebarPanel.prototype.willDismissPopover):
3387         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
3388         (WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
3389         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
3390         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
3391         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked):
3392
3393         * UserInterface/Views/NavigationSidebarPanel.js:
3394         (WI.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
3395
3396         * UserInterface/Models/URLBreakpoint.js: Renamed from Source/WebInspectorUI/UserInterface/Models/XHRBreakpoint.js.
3397         * UserInterface/Views/URLBreakpointPopover.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.css.
3398         * UserInterface/Views/URLBreakpointPopover.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.js.
3399         * UserInterface/Views/URLBreakpointTreeElement.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.css.
3400         * UserInterface/Views/URLBreakpointTreeElement.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.js.
3401
3402         * UserInterface/Base/Setting.js:
3403         (WI.Setting.migrateValue): Added.
3404
3405         * UserInterface/Main.html:
3406         * UserInterface/Test.html:
3407
3408         * Localizations/en.lproj/localizedStrings.js:
3409
3410 2019-01-07  Devin Rousso  <drousso@apple.com>
3411
3412         Web Inspector: Network: show secure connection details per-request
3413         https://bugs.webkit.org/show_bug.cgi?id=191539
3414         <rdar://problem/45979891>
3415
3416         Reviewed by Joseph Pecoraro.
3417
3418         * UserInterface/Models/Resource.js:
3419         (WI.Resource):
3420         (WI.Resource.prototype.get security): Added.
3421         (WI.Resource.prototype.updateForResponse):
3422         (WI.Resource.prototype.updateWithMetrics):
3423         (WI.Resource.prototype.get responseSecurity): Deleted.
3424
3425         * UserInterface/Views/ResourceSecurityContentView.js:
3426         (WI.ResourceSecurityContentView):
3427         (WI.ResourceSecurityContentView.prototype.initialLayout):
3428         (WI.ResourceSecurityContentView.prototype.layout):
3429         (WI.ResourceSecurityContentView.prototype._refreshConnectionSection): Added.
3430         (WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
3431         (WI.ResourceSecurityContentView.prototype._handleResourceMetricsDidChange): Added.
3432         * UserInterface/Views/ResourceSecurityContentView.css:
3433         (body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
3434         (@media (prefers-dark-interface) body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
3435         (body[dir] .resource-security > section.certificate > .details): Deleted.
3436         (@media (prefers-dark-interface) body[dir] .resource-security > section.certificate > .details): Deleted.
3437
3438         * Localizations/en.lproj/localizedStrings.js:
3439
3440 2019-01-07  Nikita Vasilyev  <nvasilyev@apple.com>
3441
3442         Web Inspector: "white" isn't recognized as a color keyword
3443         https://bugs.webkit.org/show_bug.cgi?id=193173
3444         <rdar://problem/47068595>
3445
3446         Reviewed by Joseph Pecoraro.
3447
3448         Attempt to parse "atom" token types as colors.
3449
3450         Display color picker only for color-aware properties. For instance,
3451         display it for "color: white" but not for "-apple-pay-button-style: white".
3452
3453         * UserInterface/Models/CSSKeywordCompletions.js:
3454         (addKeywordsForName):
3455         (WI.CSSKeywordCompletions.forProperty):
3456         (WI.CSSKeywordCompletions.isColorAwareProperty):
3457         * UserInterface/Views/SpreadsheetStyleProperty.js:
3458         (WI.SpreadsheetStyleProperty.prototype._renderValue):
3459         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
3460
3461 2019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
3462
3463         Web Inspector: subclasses of WI.ClusterContentView don't save/restore content views after the initial view
3464         https://bugs.webkit.org/show_bug.cgi?id=192451
3465         <rdar://problem/46800958>
3466
3467         Reviewed by Devin Rousso.
3468
3469         * UserInterface/Models/BackForwardEntry.js:
3470         (WI.BackForwardEntry.prototype.prepareToHide):
3471         * UserInterface/Views/ClusterContentView.js:
3472         (WI.ClusterContentView.prototype.get shouldSaveStateOnHide):
3473         * UserInterface/Views/ContentView.js:
3474         (WI.ContentView.prototype.get shouldSaveStateOnHide):
3475         Allow ClusterContentViews to save its state whenever its hidden,
3476         this means it can be properly restored to the last state it had
3477         instead of the initial state it was shown with.
3478
3479 2019-01-04  Devin Rousso  <drousso@apple.com>
3480
3481         Web Inspector: Audit: disable breakpoints when running Audit
3482         https://bugs.webkit.org/show_bug.cgi?id=193158
3483         <rdar://problem/47057083>
3484
3485         Reviewed by Joseph Pecoraro.
3486
3487         * UserInterface/Controllers/DebuggerManager.js:
3488         (WI.DebuggerManager):
3489         (WI.DebuggerManager.prototype._startDisablingBreakpointsTemporarily):
3490         (WI.DebuggerManager.prototype._stopDisablingBreakpointsTemporarily):
3491         (WI.DebuggerManager.prototype._handleAuditManagerTestScheduled): Added.
3492         (WI.DebuggerManager.prototype._handleAuditManagerTestCompleted): Added.
3493
3494         * UserInterface/Views/DebuggerSidebarPanel.js:
3495         (WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart):
3496         (WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped):
3497         (WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestScheduled): Added.
3498         (WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestCompleted): Added.
3499         (WI.DebuggerSidebarPanel.prototype._updateBreakpointsDisabledBanner):
3500         * UserInterface/Views/DebuggerSidebarPanel.css:
3501         (.sidebar > .panel.navigation.debugger .warning-banner + .warning-banner): Added.
3502
3503         * UserInterface/Base/Main.js:
3504         (WI.loaded):
3505         * UserInterface/Test/Test.js:
3506         (WI.loaded):
3507         Move `WI.auditManager` higher in the managers list so that it can be used in
3508         `WI.DebuggerManager`'s constructor.
3509
3510         * Localizations/en.lproj/localizedStrings.js:
3511
3512 2019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
3513
3514         Web Inspector: Add a Setting Toggle for Source Maps
3515         https://bugs.webkit.org/show_bug.cgi?id=193148
3516
3517         Reviewed by Devin Rousso.
3518
3519         * UserInterface/Controllers/NetworkManager.js:
3520         (WI.NetworkManager.prototype.downloadSourceMap):
3521         Don't download source maps if the setting is disabled.
3522
3523         * UserInterface/Base/Setting.js:
3524         * UserInterface/Views/SettingsTabContentView.js:
3525         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
3526         Settings toggle for source maps. Enabled by default.
3527
3528         * Localizations/en.lproj/localizedStrings.js:
3529
3530 2019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
3531
3532         Web Inspector: Include `globalThis` in default JavaScript completions
3533         https://bugs.webkit.org/show_bug.cgi?id=193147
3534
3535         Reviewed by Devin Rousso.
3536
3537         * UserInterface/Controllers/CodeMirrorCompletionController.js:
3538         Add `globalThis` which is a new global value.
3539
3540 2019-01-03  Devin Rousso  <drousso@apple.com>
3541
3542         Web Inspector: conic-gradient color picker doesn't accurately show color when saturation value is not 100%
3543         https://bugs.webkit.org/show_bug.cgi?id=192729
3544         <rdar://problem/46746815>
3545
3546         Reviewed by Joseph Pecoraro.
3547
3548         Rework `WI.ColorWheel` to use similar canvas drawing logic as `WI.LegacyColorWheel` so that
3549         it's able to adjust the saturation value as the pixels gets closer to the center.
3550
3551         * UserInterface/Models/Color.js:
3552         (WI.Color.rgb2hsl): Added.
3553         (WI.Color.hsl2rgb): Added.
3554         (WI.Color.cmyk2rgb):
3555         (WI.Color.prototype.isKeyword):
3556         (WI.Color.prototype._toRGBString):
3557         (WI.Color.prototype._toRGBAString):
3558         (WI.Color.prototype._toHSLString):
3559         (WI.Color.prototype._toHSLAString):
3560         (WI.Color.prototype._rgbaToHSLA):
3561         (WI.Color.prototype._hslaToRGBA):
3562         (WI.Color.rgb2hsv): Deleted.
3563         (WI.Color.hsv2rgb): Deleted.
3564         (WI.Color.prototype._rgbToHSL): Deleted.
3565         (WI.Color.prototype._hslToRGB): Deleted.
3566         Adjust the conversion functions of `WI.Color` to be more accurate.
3567
3568         * UserInterface/Views/ColorWheel.js:
3569         (WI.ColorWheel):
3570         (WI.ColorWheel.prototype.set dimension):
3571         (WI.ColorWheel.prototype.set brightness):
3572         (WI.ColorWheel.prototype.get tintedColor):
3573         (WI.ColorWheel.prototype.set tintedColor):
3574         (WI.ColorWheel.prototype._updateColorForMouseEvent):
3575         (WI.ColorWheel.prototype._updateCanvas): Added.
3576         (WI.ColorWheel.prototype._updateGradient): Deleted.
3577         * UserInterface/Views/ColorWheel.css:
3578         (.color-wheel > canvas): Added.
3579         (.color-wheel > .gradient): Deleted.
3580
3581         * UserInterface/Views/ColorPicker.js:
3582         (WI.ColorPicker):
3583         (WI.ColorPicker.prototype.set color):
3584         (WI.ColorPicker.prototype.sliderValueDidChange):
3585         (WI.ColorPicker.prototype._updateSliders):
3586         (WI.ColorPicker.prototype._showColorComponentInputs):
3587         (WI.ColorPicker.supportsConicGradient): Deleted.
3588
3589         * UserInterface/Main.html:
3590
3591         * UserInterface/Views/LegacyColorWheel.js: Removed.
3592
3593 2019-01-02  Nikita Vasilyev  <nvasilyev@apple.com>
3594
3595         Web Inspector: Styles: selection lost when inspector is blurred
3596         https://bugs.webkit.org/show_bug.cgi?id=192124
3597         <rdar://problem/46800965>
3598
3599         Reviewed by Devin Rousso.
3600
3601         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3602         (body:matches(.window-docked-inactive, .window-inactive) .spreadsheet-style-declaration-editor .property.selected):
3603         Selection should be gray when Web Inspector window isn't focused.
3604
3605         * UserInterface/Views/SpreadsheetStyleProperty.js:
3606
3607 2019-01-02  Nikita Vasilyev  <nvasilyev@apple.com>
3608
3609         Web Inspector: Styles: it shouldn't be possible to delete read-only properties
3610         https://bugs.webkit.org/show_bug.cgi?id=193099
3611         <rdar://problem/47016335>
3612
3613         Reviewed by Devin Rousso.
3614
3615         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3616         (WI.SpreadsheetCSSStyleDeclarationEditor):
3617         Drive-by: Forward Delete should work the same way as Delete (Backspace).
3618
3619 2019-01-02  Devin Rousso  <webkit@devinrousso.com>
3620
3621         Web Inspector: Implement `queryObjects` Command Line API
3622         https://bugs.webkit.org/show_bug.cgi?id=176766
3623         <rdar://problem/34890689>
3624
3625         Reviewed by Joseph Pecoraro.
3626
3627         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
3628         (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
3629         Add `queryObjects` to the list of command line functions.
3630
3631 2018-12-21  Devin Rousso  <drousso@apple.com>
3632
3633         Web Inspector: Styles Redesign: remove unused CSS style icons
3634         https://bugs.webkit.org/show_bug.cgi?id=192999
3635         <rdar://problem/46912094>
3636
3637         Reviewed by Matt Baker.
3638
3639         * UserInterface/Main.html:
3640         * UserInterface/Views/StyleRuleIcons.css: Removed.
3641         * UserInterface/Images/StyleRule.svg: Removed.
3642         * UserInterface/Images/StyleRuleInheritedElement.svg: Removed.
3643         * UserInterface/Images/StyleRulePseudoElement.svg: Removed.
3644
3645         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
3646         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
3647
3648 2018-12-21  Nikita Vasilyev  <nvasilyev@apple.com>
3649
3650         Web Inspector: Styles: editing focus lost when inspector is blurred
3651         https://bugs.webkit.org/show_bug.cgi?id=192123
3652         <rdar://problem/46800966>
3653
3654         Reviewed by Devin Rousso.
3655
3656         * UserInterface/Views/SpreadsheetSelectorField.js:
3657         (WI.SpreadsheetSelectorField.prototype._handleBlur):
3658         * UserInterface/Views/SpreadsheetTextField.js:
3659         (WI.SpreadsheetTextField.prototype._handleBlur):
3660
3661 2018-12-21  Devin Rousso  <drousso@apple.com>
3662
3663         Web Inspector: Settings: experimental setting editors are misaligned in other locales
3664         https://bugs.webkit.org/show_bug.cgi?id=192971
3665         <rdar://problem/46718451>
3666
3667         Reviewed by Joseph Pecoraro.
3668
3669         * UserInterface/Views/SettingsTabContentView.css:
3670         (.content-view.settings > .settings-view > .container):
3671         (.content-view.settings > .settings-view > .container > .title):
3672
3673 2018-12-21  Devin Rousso  <drousso@apple.com>
3674
3675         Web Inspector: update scroll position when revealing a virtualized WI.DataGridNode
3676         https://bugs.webkit.org/show_bug.cgi?id=192992
3677         <rdar://problem/46886427>
3678
3679         Reviewed by Joseph Pecoraro.
3680
3681         When `reveal`ing a `WI.DataGridNode`, if it is not currently in the DOM tree (e.g. it's been
3682         virtualized by it's owner `WI.DataGrid`), we need to scroll to it's position so that it gets
3683         added to the DOM tree before it can be revealed/selected.
3684
3685         * UserInterface/Views/DataGrid.js:
3686         (WI.DataGrid.prototype.layout):
3687         (WI.DataGrid.prototype.updateVisibleRows):
3688         (WI.DataGrid.prototype._updateVisibleRows): Deleted.
3689
3690         * UserInterface/Views/DataGridNode.js:
3691         (WI.DataGridNode.prototype.reveal):
3692
3693 2018-12-20  Nikita Vasilyev  <nvasilyev@apple.com>
3694
3695         Web Inspector: Dark Mode: Type profiler popovers have black text on dark background
3696         https://bugs.webkit.org/show_bug.cgi?id=192916
3697         <rdar://problem/46863518>
3698
3699         Reviewed by Devin Rousso.
3700
3701         * UserInterface/Views/SourceCodeTextEditor.css:
3702         (.popover .debugger-popover-content > .body):
3703         * UserInterface/Views/TypeTreeElement.css:
3704         (.item.type-tree-element.prototype):
3705         (.item.type-tree-element.prototype:hover,):
3706         * UserInterface/Views/TypeTreeView.css:
3707         (.type-tree):
3708         * UserInterface/Views/Variables.css:
3709         (:root):
3710
3711 2018-12-20  Nikita Vasilyev  <nvasilyev@apple.com>
3712
3713         Web Inspector: Styles: Pressing Esc when editing name/value should select entire property
3714         https://bugs.webkit.org/show_bug.cgi?id=192919
3715
3716         Reviewed by Devin Rousso.
3717
3718         - Esc still hides the completion popover.
3719         - Esc still discards changes.
3720         - When there's no completion popover, Esc selects outer scope.
3721           I.e., it goes from editing name/value to selecting the entire property.
3722         - Pressing Esc for newly added properties discards those properties.
3723
3724         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3725         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
3726         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyDidPressEsc):
3727         * UserInterface/Views/SpreadsheetStyleProperty.js:
3728         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidPressEsc):
3729         * UserInterface/Views/SpreadsheetTextField.js:
3730         (WI.SpreadsheetTextField.prototype._discardChange):
3731         (WI.SpreadsheetTextField.prototype._handleKeyDown):
3732
3733 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
3734
3735         Web Inspector: Charles Proxy errors opening har files exported from Safari (invalid startedDateTime)
3736         https://bugs.webkit.org/show_bug.cgi?id=192959
3737         <rdar://problem/46863411>
3738
3739         Reviewed by Brian Burg.
3740
3741         * UserInterface/Views/NetworkTableContentView.js:
3742         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
3743         (WI.NetworkTableContentView.prototype._updateExportButton):
3744         (WI.NetworkTableContentView.prototype._canExportHAR):
3745         Disallow HAR export if we don't have load data, such as the requestSentDate for
3746         the main resource or sub-resources.
3747
3748         (WI.NetworkTableContentView.prototype._HARResources):
3749         Only export resources that have load data.
3750
3751 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
3752
3753         Web Inspector: Autoformat doesn't work on icloud.com (javascript-packed.js)
3754         https://bugs.webkit.org/show_bug.cgi?id=192946
3755         <rdar://problem/42546126>
3756
3757         Rubber-stamped by Devin Rousso.
3758
3759         * UserInterface/Base/Utilities.js:
3760         (whitespaceRatio):
3761         (isTextLikelyMinified):
3762         Check the first 2500 and the last 2500 characters whitespace ratio.
3763         If either is below 20% then treat as minified.
3764
3765 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
3766
3767         ITMLKit Inspector: Elements tab does not show DOM Tree
3768         https://bugs.webkit.org/show_bug.cgi?id=192910
3769         <rdar://problem/46680585>
3770
3771         Reviewed by Brian Burg.
3772
3773         * UserInterface/Protocol/Connection.js:
3774         (InspectorBackend.Connection.prototype._dispatchEvent):
3775         Better logging for errors.
3776
3777         * UserInterface/Base/Main.js:
3778         * UserInterface/Controllers/AppController.js:
3779         (WI.AppController.prototype.activateExtraDomains):
3780         Let Targets get a chance to activate extra domains.
3781         Perform a little more work in these cases.
3782
3783         * UserInterface/Protocol/Target.js:
3784         (WI.Target):
3785         (WI.Target.prototype.activateExtraDomain):
3786         Expose agents for domains that are active.
3787         Expose agents for extra domains when they are activated.
3788
3789 2018-12-20  Joseph Pecoraro  <pecoraro@apple.com>
3790
3791         ITMLKit Inspector: Computed Style Box Model section throws exceptions
3792         https://bugs.webkit.org/show_bug.cgi?id=192911
3793         <rdar://problem/46861112>
3794
3795         Reviewed by Matt Baker.
3796
3797         * UserInterface/Views/BoxModelDetailsSectionRow.js:
3798         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
3799         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
3800         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
3801         ITMLKit doesn't always provide a display/position/width/height etc properties.
3802         Protect against this, and just show an empty message in the box model section
3803         if those properties do not exist.
3804
3805 2018-12-20  Devin Rousso  <drousso@apple.com>
3806
3807         Web Inspector: UIString should take an optional key and description to aid localization
3808         https://bugs.webkit.org/show_bug.cgi?id=153962
3809         <rdar://problem/24542505>
3810
3811         Reviewed by Brian Burg.
3812
3813         * UserInterface/Base/LoadLocalizedStrings.js:
3814         (WI.UIString):
3815
3816         * UserInterface/Test/Test.js:
3817         (WI.UIString):
3818
3819         * UserInterface/Views/AuditTestGroupContentView.js:
3820         (WI.AuditTestGroupContentView.prototype.initialLayout):
3821
3822 2018-12-20  Devin Rousso  <drousso@apple.com>
3823
3824         Web Inspector: Audits: don't cache default audits
3825         https://bugs.webkit.org/show_bug.cgi?id=192918
3826         <rdar://problem/46626543>
3827
3828         Reviewed by Brian Burg.
3829
3830         Instead of adding the default audits to the "audits" `WI.ObjectStore`, which preserves them
3831         across WebInspector sessions, load them every time WebInspector is opened (unless there are
3832         existing audits) so that the localized strings are able to respond to locale changes.
3833
3834         * UserInterface/Controllers/AuditManager.js:
3835         (WI.AuditManager.prototype.removeTest):
3836         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
3837
3838 2018-12-20  Devin Rousso  <drousso@apple.com>
3839
3840         Web Inspector: Dark Mode: unreadable background color for tables containing object previews
3841         https://bugs.webkit.org/show_bug.cgi?id=192887
3842         <rdar://problem/46855270>
3843
3844         Reviewed by Brian Burg.
3845
3846         * UserInterface/Views/LogContentView.css:
3847         (.console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.
3848         (@media (prefers-dark-interface) .console-item .data-grid tr.selected): Added.
3849         (@media (prefers-dark-interface) .console-messages:focus .console-item.selected .data-grid tr.selected): Added.
3850         (@media (prefers-dark-interface) .console-messages:focus .console-item .data-grid tr.selected td:not(:last-child)): Added.
3851
3852         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
3853         (.content-view.indexed-database-object-store > .data-grid tr.selected):
3854         (.content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
3855         (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid tr.selected): Added.
3856         (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected): Added.
3857         (@media (prefers-dark-interface) .content-view.indexed-database-object-store > .data-grid:focus tr.selected td:not(:last-child)): Added.
3858
3859 2018-12-19  Devin Rousso  <drousso@apple.com>
3860
3861         Web Inspector: Audit: fix descriptions for default tests
3862         https://bugs.webkit.org/show_bug.cgi?id=192764
3863         <rdar://problem/46729437>
3864
3865         Reviewed by Matt Baker.
3866
3867         * UserInterface/Controllers/AuditManager.js:
3868         (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
3869
3870         * Localizations/en.lproj/localizedStrings.js:
3871
3872 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
3873
3874         Web Inspector: "E" icon on debugger dashboard is too close to current function name
3875         https://bugs.webkit.org/show_bug.cgi?id=192915
3876
3877         Reviewed by Matt Baker.
3878
3879         * UserInterface/Views/DebuggerDashboardView.css:
3880         (.dashboard.debugger > .location):
3881         (body[dir=ltr] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
3882         (body[dir=rtl] .dashboard.debugger > .location :matches(.function-icon, .event-listener-icon)):
3883         (.dashboard.debugger > .location .function-icon): Deleted.
3884         (body[dir=ltr] .dashboard.debugger > .location .function-icon): Deleted.
3885         (body[dir=rtl] .dashboard.debugger > .location .function-icon): Deleted.
3886
3887 2018-12-19  Nikita Vasilyev  <nvasilyev@apple.com>
3888
3889         Web Inspector: Dark Mode: ThreadTreeElement status icon is hard to see when hovered
3890         https://bugs.webkit.org/show_bug.cgi?id=192097
3891         <rdar://problem/46318421>
3892
3893         Reviewed by Matt Baker.
3894
3895         * UserInterface/Views/ThreadTreeElement.css:
3896         (.tree-outline > .item.thread .status-button.resume):
3897         (.tree-outline > .item.thread .status-button.resume:active):
3898
3899 2018-12-19  Devin Rousso  <drousso@apple.com>
3900
3901         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'effectiveDOMNode.enabledPseudoClasses')
3902         https://bugs.webkit.org/show_bug.cgi?id=192783
3903
3904         Reviewed by Joseph Pecoraro.
3905
3906         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
3907         (WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
3908         (WI.GeneralStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):
3909
3910 2018-12-19  Devin Rousso  <drousso@apple.com>
3911
3912         Web Inspector: REGRESSION (r237195): Timelines: selecting a rendering frame row moves the time selection
3913         https://bugs.webkit.org/show_bug.cgi?id=192773
3914         <rdar://problem/46782446>
3915
3916         Reviewed by Joseph Pecoraro.
3917
3918         * UserInterface/Views/TimelineOverview.js:
3919         (WI.TimelineOverview.prototype._recordSelected):
3920         The Frames timeline uses `frameIndex` instead of `startTime`/`endTime`, so when trying to
3921         ensure that the selected record is within the filtered range, use `frameIndex` instead.
3922 &nbs