2020-03-27 Devin Rousso Web Inspector: should also escape the method when Copy as cURL https://bugs.webkit.org/show_bug.cgi?id=209665 Reviewed by Joseph Pecoraro. * UserInterface/Models/Resource.js: (WI.Resource.prototype.generateCURLCommand): (WI.Resource.prototype.generateCURLCommand.escapeStringPosix): The method could be maliciously crafted, so we should also escape it (if needed). 2020-02-11 Nikita Vasilyev Web Inspector RTL: Elements closing tag is reversed https://bugs.webkit.org/show_bug.cgi?id=207214 Reviewed by Timothy Hatcher. Wrap text nodes in `unicode-bidi: isolate-override`. From MDN: isolate-override: This keyword applies the isolation behavior of the isolate keyword to the surrounding content and the override behavior of the bidi-override keyword to the inner content. * UserInterface/Views/DOMTreeOutline.css: (.tree-outline.dom li > span > .html-text-node): 2020-02-07 Jon Lee Web Inspector: Revert slim toolbar https://bugs.webkit.org/show_bug.cgi?id=207422 Reviewed by Timothy Hatcher. The slim toolbar needs a little more work before landing. This patch reverts r255547, r255557, r255890, r255892, r255893, r255901, r255980. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: * UserInterface/Base/Setting.js: * UserInterface/Controllers/ConsoleManager.js: * UserInterface/Debug/Bootstrap.js: * UserInterface/Images/NewTab.svg: Added. * UserInterface/Images/NewTabPlus.svg: Added. * UserInterface/Images/Origin.svg: * UserInterface/Images/SearchResults.svg: Added. * UserInterface/Images/SourcesPaused.svg: Removed. * UserInterface/Main.html: * UserInterface/Models/DebuggerDashboard.js: Copied from Source/WebInspectorUI/UserInterface/Views/FlexibleSpaceNavigationItem.css. * UserInterface/Models/DefaultDashboard.js: Added. * UserInterface/Views/ActivateButtonToolbarItem.js: Copied from Source/WebInspectorUI/UserInterface/Views/FlexibleSpaceNavigationItem.css. * UserInterface/Views/AuditTabContentView.js: * UserInterface/Views/ButtonNavigationItem.css: * UserInterface/Views/ButtonNavigationItem.js: * UserInterface/Views/ButtonToolbarItem.css: Copied from Source/WebInspectorUI/UserInterface/Views/DividerNavigationItem.css. * UserInterface/Views/ButtonToolbarItem.js: Copied from Source/WebInspectorUI/UserInterface/Views/FlexibleSpaceNavigationItem.css. * UserInterface/Views/ConsoleTabContentView.js: * UserInterface/Views/ContentBrowserTabContentView.js: * UserInterface/Views/ControlToolbarItem.css: Copied from Source/WebInspectorUI/UserInterface/Views/DividerNavigationItem.css. * UserInterface/Views/ControlToolbarItem.js: Copied from Source/WebInspectorUI/UserInterface/Views/DividerNavigationItem.css. * UserInterface/Views/DOMTreeContentView.css: * UserInterface/Views/DashboardContainerView.css: Added. * UserInterface/Views/DashboardContainerView.js: Added. * UserInterface/Views/DashboardView.js: Copied from Source/WebInspectorUI/UserInterface/Views/PinnedTabBarItem.js. * UserInterface/Views/DebuggerDashboardView.css: Added. * UserInterface/Views/DebuggerDashboardView.js: Added. * UserInterface/Views/DefaultDashboardView.css: Added. * UserInterface/Views/DefaultDashboardView.js: Added. * UserInterface/Views/DividerNavigationItem.css: * UserInterface/Views/ElementsTabContentView.js: * UserInterface/Views/FlexibleSpaceNavigationItem.css: * UserInterface/Views/GeneralTabBarItem.js: * UserInterface/Views/GraphicsTabContentView.js: * UserInterface/Views/GroupNavigationItem.js: * UserInterface/Views/LayersTabContentView.js: * UserInterface/Views/LegacyTabBar.js: Copied from Source/WebInspectorUI/UserInterface/Views/TabBar.js. * UserInterface/Views/Main.css: * UserInterface/Views/NavigationBar.js: * UserInterface/Views/NetworkDetailView.css: * UserInterface/Views/NetworkTabContentView.js: * UserInterface/Views/NetworkTableContentView.css: * UserInterface/Views/NetworkTableContentView.js: * UserInterface/Views/NewTabContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineOverviewGraph.css. * UserInterface/Views/NewTabContentView.js: Added. * UserInterface/Views/PinnedTabBarItem.js: * UserInterface/Views/QuickConsole.js: * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css: * UserInterface/Views/SearchTabContentView.js: * UserInterface/Views/SettingsTabContentView.js: * UserInterface/Views/Sidebar.js: * UserInterface/Views/SizesToFitNavigationBar.js: Copied from Source/WebInspectorUI/UserInterface/Views/FlexibleSpaceNavigationItem.css. * UserInterface/Views/SourcesTabContentView.js: * UserInterface/Views/StorageTabContentView.js: * UserInterface/Views/TabBar.css: * UserInterface/Views/TabBar.js: * UserInterface/Views/TabBarItem.js: * UserInterface/Views/TabBrowser.js: * UserInterface/Views/TabContentView.js: * UserInterface/Views/TimelineOverview.css: * UserInterface/Views/TimelineRecordFrame.css: * UserInterface/Views/TimelineRuler.css: * UserInterface/Views/TimelineTabContentView.js: * UserInterface/Views/Toolbar.css: Added. * UserInterface/Views/Toolbar.js: Added. * UserInterface/Views/Variables.css: 2020-02-06 Fujii Hironori [Web Inspector][WinCairo] Selecting an error message in Console causes "TypeError:​ selection.focusNode.closest is not a function." https://bugs.webkit.org/show_bug.cgi?id=207248 Reviewed by Devin Rousso. r242174 replaced Node.enclosingNodeOrSelfWithClass with Element.closest. However, selection.focusNode isn't necessarily an Element, but can be a Text node. * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype._mousemove): Use selection.focusNode.parentElement.closest if selection.focusNode is not a instance of Element. 2020-02-06 Devin Rousso Web Inspector: REGRESSION(r249831): Sources: endless spinner when trying to view a resource https://bugs.webkit.org/show_bug.cgi?id=207346 Reviewed by Timothy Hatcher. * UserInterface/Workers/Formatter/HTMLParser.js: (HTMLParser.prototype._parseAttr): Attributes are allowed to contain "/". https://html.spec.whatwg.org/multipage/parsing.html#before-attribute-value-state 2020-02-06 Devin Rousso Web Inspector: REGRESSION(?): Search: selecting a DOM node search result switches to the Elements Tab https://bugs.webkit.org/show_bug.cgi?id=207322 Reviewed by Timothy Hatcher. * UserInterface/Views/TabBrowser.js: (WI.TabBrowser.prototype._tabBarItemSelected): The Search Tab is marked such that it isn't saved to `WI._openTabsSetting`, as otherwise more than one Search Tab could be added to the tab bar (one from the setting and one from the default pinned tab). It is also marked as being pinned, however, meaning that we know it will always be in the tab bar, even if we also know it won't be in `WI._openTabsSetting`. As such, we should update it's position in the `_recentTabContentViews` list so that we can use it when showing represented objects (if able) via `bestTabContentViewForRepresentedObject`. 2020-02-05 Devin Rousso Web Inspector: the height of the undocked title area shouldn't change when zoomed https://bugs.webkit.org/show_bug.cgi?id=207228 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WI.contentLoaded): (WI.contentLoaded.updateZoomFactorCSSVariable): Added. Save the zoom factor as a number in a CSS variable on the ``. * UserInterface/Views/Variables.css: (body.mac-platform:not(.docked)): Added. (body:not(.docked)): Deleted. Divide the default `22px` by the current zoom factor so that it cancels out when rendered. Make it so that the undocked title area is only shown on macOS 2020-02-05 Nikita Vasilyev Web Inspector: Some cookie table column headers should not be localizable https://bugs.webkit.org/show_bug.cgi?id=206920 Reviewed by Timothy Hatcher. Keep headers that match cookie directives always in English. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/CookieStorageContentView.js: (WI.CookieStorageContentView.prototype.initialLayout): 2020-02-05 Devin Rousso Web Inspector: slightly increase the horizontal padding around scope bar items https://bugs.webkit.org/show_bug.cgi?id=207321 Reviewed by Timothy Hatcher. * UserInterface/Views/ScopeBar.css: (.scope-bar): (body[dir=ltr] .scope-bar > li.multiple > select): (body[dir=rtl] .scope-bar > li.multiple > select): * UserInterface/Views/RadioButtonNavigationItem.css: (.navigation-bar .item.radio.button.text-only): 2020-02-05 Devin Rousso Web Inspector: Tab Bar: move window management items to the left and don't show reload/download unless remotely inspecting https://bugs.webkit.org/show_bug.cgi?id=207318 Reviewed by Timothy Hatcher. Move the window management buttons to the left side to match the system look/feel. Hide the reload/download buttons when inspecting locally, as there are other ways of reloading the inspected page or downloading a Web Archive. * UserInterface/Base/Main.js: (WI.contentLoaded): (WI._updateDockNavigationItems): (WI._updateReloadTabBarButton): (WI._updateDownloadTabBarButton): (WI._updateInspectModeTabBarButton): (WI._updateTabBarDividers): Added. (WI._updateConsoleTabBarButtons): * UserInterface/Debug/Bootstrap.js: (updateDebugUI): (WI.runBootstrapOperations): 2020-02-05 Devin Rousso Web Inspector: Network: the resource detail view cuts off the bottom statistics bar https://bugs.webkit.org/show_bug.cgi?id=207320 Reviewed by Timothy Hatcher. * UserInterface/Views/Variables.css: (:root): Add a `--network-statistics-height` variable. * UserInterface/Views/NetworkDetailView.css: (.network-detail): * UserInterface/Views/NetworkTableContentView.css: (.network-table > .statistics): Use the `--network-statistics-height` variable to make sure the statistics row and the details view for the selected network entry don't overlap. Drive-by: center the content of the statistics row to better match the system look/feel. 2020-02-05 Devin Rousso Web Inspector: increase the height of the tab bar to match other navigation bars https://bugs.webkit.org/show_bug.cgi?id=207317 Reviewed by Timothy Hatcher. * UserInterface/Views/Variables.css: (:root): Define `--tab-bar-height` in terms of `--navigation-bar-height` so they share the same value. * UserInterface/Views/TabBar.css: (.tab-bar > .tabs > .item): (.tab-bar > .tabs > .item.pinned): (.tab-bar > .tabs > .item.pinned.tab-picker): Deleted. Increase the width to match the `--tab-bar-height` so that pinned tab bar items are square. 2020-02-05 Nikita Vasilyev Web Inspector: Dragging handles in the easing popover selects sidebar text https://bugs.webkit.org/show_bug.cgi?id=207316 Reviewed by Timothy Hatcher. * UserInterface/Views/BezierEditor.js: (WI.BezierEditor.prototype._handleMousedown): 2020-02-05 Devin Rousso Web Inspector: Sources: add a special breakpoint for controlling whether `debugger` statements pause https://bugs.webkit.org/show_bug.cgi?id=206818 Reviewed by Timothy Hatcher. * UserInterface/Controllers/DebuggerManager.js: (WI.DebuggerManager): (WI.DebuggerManager.prototype.async initializeTarget): (WI.DebuggerManager.prototype.get debuggerStatementsBreakpoint): Added. (WI.DebuggerManager.prototype.isBreakpointRemovable): (WI.DebuggerManager.prototype._breakpointDisabledStateDidChange): * UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel): (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement): (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint): * UserInterface/Views/BreakpointTreeElement.css: (.breakpoint-debugger-statement-icon .icon): Added. * UserInterface/Images/DebuggerStatement.svg: Added. * Localizations/en.lproj/localizedStrings.js: 2020-02-05 Nikita Vasilyev Web Inspector: Bezier editor popover should be strictly LTR https://bugs.webkit.org/show_bug.cgi?id=206968 Reviewed by Timothy Hatcher. - Don't mirror the coordinate system. - Don't reverste the order of the cubic bezier values, e.g. `cubic-bezier(0, 0.5, 1, 0.5)`. * UserInterface/Views/BezierEditor.css: (90%): (to): (body[dir=ltr] .bezier-editor): Deleted. (body[dir=rtl] .bezier-editor): Deleted. (body[dir=rtl] .bezier-editor > .bezier-container): Deleted. * UserInterface/Views/BezierEditor.js: 2020-02-03 Carlos Garcia Campos Unreviewed. Fix the inspector files combination after r255547 * UserInterface/Main.html: Remove Views/SizesToFitNavigationBar.js that was removed in r255547 2020-02-01 Devin Rousso Web Inspector: move the items in the toolbar into the tab bar to save vertical space https://bugs.webkit.org/show_bug.cgi?id=204627 Reviewed by Timothy Hatcher. Merge the toolbar are and tab bar to waste less vertical space. The inspect, download, reload, and device settings buttons are pinned before the tabs. If there are any console warnings/errors, an icon for each type of message is shown between the left buttons and the tabs, and each button's opacity is animated whenever a new message is added. Whenever the debugger pauses, change the tab bar icon of the Sources Tab to an image that includes paused iconography (||) to help convey the debugger's state no matter which tab is currently selected, just like the debugger dashboard. The docking configuration, debug, and close buttons are pinned after the tabs. The dashboard network information has been moved to the Network Tab (described below). When undocked, the tab bar and all the content below it are pushed down by 22px to make room for the system close/minimize/maximize buttons and the window title. * UserInterface/Base/Main.js: (WI.loaded): (WI._handleSettingsKeyboardShortcut): (WI._tryToRestorePendingTabs): (WI.isNewTabWithTypeAllowed): (WI._openDefaultTab): Deleted. (WI.showNewTabTab): Deleted. * UserInterface/Views/Main.css: (#undocked-title-area): Added. (body.docked #undocked-title-area): Added. (body.window-inactive #undocked-title-area): Added. (#main): (@keyframes tab-bar-console-item-pulse): Added. (.tab-bar > .navigation-bar :matches(.console-warnings, .console-errors):not(.disabled).pulsing): Added. (@media (prefers-color-scheme: dark) #undocked-title-area): Added. (@media (prefers-color-scheme: dark) body.window-inactive #undocked-title-area): Added. (body.docked.bottom): Deleted. (body.docked.bottom #toolbar): Deleted. (body.docked.bottom #toolbar .item:not(.flexible-space)): Deleted. * UserInterface/Views/TabBar.js: (WI.TabBar): (WI.TabBar.prototype.addNavigationItemBefore): Added. (WI.TabBar.prototype.addNavigationItemAfter): Added. (WI.TabBar.prototype.insertTabBarItem): (WI.TabBar.prototype.insertTabBarItem.animateTabs): (WI.TabBar.prototype.insertTabBarItem.removeStyles): (WI.TabBar.prototype.removeTabBarItem): (WI.TabBar.prototype.removeTabBarItem.animateTabs): (WI.TabBar.prototype.removeTabBarItem.removeStyles): (WI.TabBar.prototype.set selectedTabBarItem): (WI.TabBar.prototype.get tabCount): Added. (WI.TabBar.prototype.layout): (WI.TabBar.prototype.didLayoutSubtree): Added. (WI.TabBar.prototype._recordTabBarItemSizesAndPositions): (WI.TabBar.prototype._finishExpandingTabsAfterClose): (WI.TabBar.prototype._finishExpandingTabsAfterClose.animateTabs): (WI.TabBar.prototype._finishExpandingTabsAfterClose.removeStyles): (WI.TabBar.prototype._handleClick): (WI.TabBar.prototype._handleMouseMoved): (WI.TabBar.prototype._handleMouseUp): (WI.TabBar.prototype._handleMouseLeave): (WI.TabBar.prototype._handleContextMenu): (WI.TabBar.prototype.get saveableTabCount): Deleted. (WI.TabBar.layout.forceItemHidden): Deleted. * UserInterface/Views/TabBar.css: (.tab-bar): (body:matches(.window-inactive, .window-docked-inactive) .tab-bar): Added. (.tab-bar > .border): Added. (.tab-bar > .border.top): Added. (.tab-bar > .border.bottom): Added. (body.docked.bottom .tab-bar > .border.top): Added. (body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .border): Added. (@media (-webkit-max-device-pixel-ratio: 1) body.docked:matches(.right, .left):not(.window-docked-inactive) .tab-bar > .border.top): Added. (@media (-webkit-min-device-pixel-ratio: 2) body.docked:matches(.right, .left):not(.window-docked-inactive) .tab-bar > .border.top): Added. (.tab-bar > .tabs > .item): (.tab-bar > .tabs > .item:not(.disabled).selected): (.tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): (body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item): (.tab-bar > .navigation-bar): Added. (.tab-bar > .navigation-bar > .item.group > .item): Added. (.tab-bar > .navigation-bar > .item.group > .item:nth-child(1 of :not(.hidden))): Added. (.tab-bar > .navigation-bar > .item.group > .item:nth-last-child(1 of :not(.hidden))): Added. (.tab-bar > .navigation-bar .item.divider): Added. (body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .navigation-bar > .item.divider): Added. (.tab-bar > .tabs): Added. (body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item): Added. (.tab-bar > .tabs.dragging-tab > .item.selected, .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), .tab-bar > .tabs.animating.closing-tab > .item.selected): Added. (body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.dragging-tab > .item.selected, body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.animating.closing-tab > .item.selected): Added. (@media (prefers-color-scheme: dark) body.docked.bottom .tab-bar > .border.top): Added. (@media (prefers-color-scheme: dark) .tab-bar > .tabs > .item:not(.disabled).selected): (body:not(.window-inactive) .tab-bar.single-tab > .item.default-tab:hover > .close): Deleted. (.tab-bar.single-tab > .item.default-tab > .close): Deleted. (body[dir=ltr].window-inactive .tab-bar > .item): Deleted. (body[dir=rtl].window-inactive .tab-bar > .item): Deleted. NOTE: elided renaming CSS changes. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView): (WI.NetworkTableContentView.prototype.reset): (WI.NetworkTableContentView.prototype.tablePopulateCell): (WI.NetworkTableContentView.prototype._changeCollection): (WI.NetworkTableContentView.prototype.initialLayout): (WI.NetworkTableContentView.prototype.processHAR): (WI.NetworkTableContentView.prototype._processPendingEntries): (WI.NetworkTableContentView.prototype._updateEntryForResource): (WI.NetworkTableContentView.prototype._mainResourceDidChange): (WI.NetworkTableContentView.prototype._handleResourceSizeDidChange): Added. (WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange): (WI.NetworkTableContentView.prototype._handleResourceAdded): (WI.NetworkTableContentView.prototype._handleFrameWasAdded): (WI.NetworkTableContentView.prototype._entryForResource): (WI.NetworkTableContentView.prototype._updateStatistics): Added. (WI.NetworkTableContentView.prototype._updateStatistic): Added. (WI.NetworkTableContentView.prototype._startUpdatingLoadTimeStatistic): Added. (WI.NetworkTableContentView.prototype._stopUpdatingLoadTimeStatistic): Added. (WI.NetworkTableContentView.prototype._updateLoadTimeStatistic): Added. * UserInterface/Views/NetworkTableContentView.css: (.network-table > .statistics): Added. (.network-table > .statistics > .statistic): Added. (.network-table > .statistics > .statistic[hidden]): Added. (.network-table > .statistics > .statistic > .icon): Added. (.network-table > .statistics > .statistic > .text): Added. (@media (prefers-color-scheme: dark) .network-table > .statistics > .statistic.domain-count > .icon): Added. Add a fixed row below the network table that contains statistics information based on the current shown collection (e.g. live data vs HAR): - number of domains - number of resources - total resource size - total transfer size - number of redirects - time to load Slightly dim entries for previous sessions if Preserve Log is checked, since the statistics data is calculated from the current session. NOTE: elided renaming CSS changes. * UserInterface/Views/TabBrowser.js: (WI.TabBrowser.prototype.addTabForContentView): (WI.TabBrowser.prototype.closeTabForContentView): (WI.TabBrowser.prototype._tabBarItemSelected): (WI.TabBrowser.prototype._tabBarItemRemoved): * UserInterface/Views/TabContentView.js: (WI.TabContentView.shouldPinTab): Added. * UserInterface/Views/AuditTabContentView.js: (WI.AuditTabContentView): (WI.AuditTabContentView.tabInfo): * UserInterface/Views/CanvasTabContentView.js: (WI.CanvasTabContentView): (WI.CanvasTabContentView.tabInfo): * UserInterface/Views/ConsoleTabContentView.js: (WI.ConsoleTabContentView): (WI.ConsoleTabContentView.tabInfo): * UserInterface/Views/ContentBrowserTabContentView.js: (WI.ContentBrowserTabContentView): * UserInterface/Views/ElementsTabContentView.js: (WI.ElementsTabContentView): (WI.ElementsTabContentView.tabInfo): * UserInterface/Views/LayersTabContentView.js: (WI.LayersTabContentView): (WI.LayersTabContentView.tabInfo): * UserInterface/Views/NetworkTabContentView.js: (WI.NetworkTabContentView): (WI.NetworkTabContentView.tabInfo): * UserInterface/Views/SearchTabContentView.js: (WI.SearchTabContentView): (WI.SearchTabContentView.tabInfo): (WI.SearchTabContentView.shouldPinTab): Added. (WI.SearchTabContentView.shouldSaveTab): Added. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView): (WI.SettingsTabContentView.tabInfo): (WI.SettingsTabContentView.shouldPinTab): Added. (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): * UserInterface/Views/SourcesTabContentView.js: (WI.SourcesTabContentView): (WI.SourcesTabContentView.tabInfo): (WI.SourcesTabContentView.prototype._handleDebuggerPaused): Added. (WI.SourcesTabContentView.prototype._handleDebuggerResumed): Added. * UserInterface/Views/StorageTabContentView.js: (WI.StorageTabContentView): (WI.StorageTabContentView.tabInfo): * UserInterface/Views/TimelineTabContentView.js: (WI.TimelineTabContentView): (WI.TimelineTabContentView.tabInfo): * UserInterface/Views/TabBarItem.js: (WI.TabBarItem): (WI.TabBarItem.prototype.get element): (WI.TabBarItem.prototype.get representedObject): (WI.TabBarItem.prototype.set disabled): (WI.TabBarItem.prototype.get hidden): Added. (WI.TabBarItem.prototype.set hidden): Added. (WI.TabBarItem.prototype.set representedObject): Deleted. (WI.TabBarItem.prototype.get isDefaultTab): Deleted. (WI.TabBarItem.prototype.set isDefaultTab): Deleted. * UserInterface/Views/GeneralTabBarItem.js: (WI.GeneralTabBarItem.fromTabContentView): Added. (WI.GeneralTabBarItem.fromTabInfo): Deleted. * UserInterface/Views/PinnedTabBarItem.js: (WI.PinnedTabBarItem): (WI.PinnedTabBarItem.fromTabContentView): Added. (WI.PinnedTabBarItem.titleDidChange): (WI.PinnedTabBarItem.fromTabInfo): Deleted. (WI.PinnedTabBarItem.prototype.titleDidChange): Deleted. (WI.PinnedTabBarItem.prototype._handleContextMenuEvent): Deleted. Simplify how tab bar items are created. * UserInterface/Views/NavigationBar.js: (WI.NavigationBar.prototype.get sizesToFit): (WI.NavigationBar.prototype.addNavigationItem): (WI.NavigationBar.prototype.insertNavigationItem): * UserInterface/Views/SizesToFitNavigationBar.js: Removed. * UserInterface/Views/Sidebar.js: (WI.Sidebar): Support marking `sizesToFit` during construction, instead of having to make a subclass. * UserInterface/Views/ButtonNavigationItem.js: (WI.ButtonNavigationItem): (WI.ButtonNavigationItem.prototype.get imageType): Added. (WI.ButtonNavigationItem.prototype.set imageType): Added. (WI.ButtonNavigationItem.prototype._update): * UserInterface/Views/ButtonNavigationItem.css: (.tab-bar > .navigation-bar .item.button.image-and-text > span): Added. (.navigation-bar .item.button > img): Added. (.navigation-bar .item.button.disabled > img): Added. (body:matches(.window-inactive, .window-docked-inactive) .navigation-bar .item.button > img): Added. (body:matches(.window-inactive, .window-docked-inactive) .navigation-bar .item.button.disabled > img): Added. (@media (prefers-color-scheme: dark) .navigation-bar .item.button.disabled > img): Added. Allow `WI.ButtonNavigationItem` to use an `` instead of an `` for it's image. This is to work around a compositing bug . * UserInterface/Views/GroupNavigationItem.js: (WI.GroupNavigationItem.prototype.get hidden): Added. (WI.GroupNavigationItem.prototype.set hidden): Added. (WI.GroupNavigationItem.prototype.get additionalClassNames): Added. Add a special case where this item is considered `hidden` if all sub-items are also `hidden`. * UserInterface/Views/Variables.css: (:root): (body:matches(.window-inactive, .window-docked-inactive)): Added. (body:matches(.window-inactive, .window-docked-inactive) *): Added. (body:not(.docked)): Added. (@media (prefers-color-scheme: dark) :root): (@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive)): Added. (@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive) *): Added. (body.window-inactive): Deleted. (body.window-inactive *): Deleted. (@media (prefers-color-scheme: dark) body.window-inactive): Deleted. (@media (prefers-color-scheme: dark) body.window-inactive *): Deleted. Replace `--toolbar-height` with `--undocked-title-area-height`, which is set when docked. * UserInterface/Views/DividerNavigationItem.css: (.navigation-bar .item.divider): (@media (prefers-color-scheme: dark)): Simplify the CSS in order to better support being used in the tab bar. * UserInterface/Views/FlexibleSpaceNavigationItem.css: (.navigation-bar .item.flexible-space): (.navigation-bar .item.flexible-space.align-start > .item): (.navigation-bar .item.flexible-space.align-end > .item): (:matches(.navigation-bar, .toolbar) .item.flexible-space): Deleted. (:matches(.navigation-bar, .toolbar) .item.flexible-space.align-start > .item): Deleted. (:matches(.navigation-bar, .toolbar) .item.flexible-space.align-end > .item): Deleted. Remove toolbar styles. * UserInterface/Controllers/ConsoleManager.js: (WI.ConsoleManager): (WI.ConsoleManager.prototype.get warningCount): Added. (WI.ConsoleManager.prototype.get errorCount): Added. (WI.ConsoleManager.prototype.messageWasAdded): (WI.ConsoleManager.prototype.messagesCleared): (WI.ConsoleManager.prototype.messageRepeatCountUpdated): (WI.ConsoleManager.prototype._incrementMessageLevelCount): Added. (WI.ConsoleManager.prototype._delayedMessagesCleared): Keep track of the count of warnings and errors so that they can be used to determine when to show Console button navigation items in the tab bar. * UserInterface/Views/DOMTreeContentView.css: (body:not(.window-inactive, .window-docked-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint): Added. (body:not(.window-inactive, .window-docked-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Added. (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint): Deleted. (body:not(.window-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Deleted. * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css: (body:matches(.window-inactive, .window-docked-inactive) .timeline-overview-graph.rendering-frame > .frame-marker): Added. (body.window-inactive .timeline-overview-graph.rendering-frame > .frame-marker): Deleted. * UserInterface/Views/TimelineOverview.css: (.timeline-overview > .tree-outline.timelines .item.selected + .item, body:matches(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines .item.selected + .item): Added. (@media (prefers-color-scheme: dark) .timeline-overview > .tree-outline.timelines .item.selected + .item, body:matches(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines .item.selected + .item): Added. (.timeline-overview > .tree-outline.timelines .item.selected + .item, body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted. (@media (prefers-color-scheme: dark) .timeline-overview > .tree-outline.timelines .item.selected + .item, body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted. * UserInterface/Views/TimelineRecordFrame.css: (body:matches(.window-inactive, .window-docked-inactive) .timeline-record-frame.selected): Added. (body.window-inactive .timeline-record-frame.selected): Deleted. * UserInterface/Views/TimelineRuler.css: (body:matches(.window-inactive, .window-docked-inactive) .timeline-ruler > .header > .divider): Added. (body.window-inactive .timeline-ruler > .header > .divider): Deleted. Add selectors for `.window-docked-inactive` everywhere that `.window-inactive` exists. * UserInterface/Base/Setting.js: Remove new tab bar experimental setting. * UserInterface/Debug/Bootstrap.js: (WI.runBootstrapOperations): (WI.runBootstrapOperations.applyDumpMessagesState): (WI.runBootstrapOperations.updateDebugUI): * UserInterface/Images/Origin.svg: Add `id="root"` so this can be used with `WI.ImageUtilities.useSVGSymbol`. * UserInterface/Main.html: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Views/ActivateButtonToolbarItem.js: Removed. * UserInterface/Views/ButtonToolbarItem.js: Removed. * UserInterface/Views/ButtonToolbarItem.css: Removed. * UserInterface/Views/ControlToolbarItem.js: Removed. * UserInterface/Views/ControlToolbarItem.css: Removed. * UserInterface/Views/Toolbar.js: Removed. * UserInterface/Views/Toolbar.css: Removed. Remove toolbar related code now that it has been merged into the tab bar. * UserInterface/Models/DebuggerDashboard.js: Removed. * UserInterface/Models/DefaultDashboard.js: Removed. * UserInterface/Views/DashboardContainerView.js: Removed. * UserInterface/Views/DashboardContainerView.css: Removed. * UserInterface/Views/DashboardView.js: Removed. * UserInterface/Views/DebuggerDashboardView.js: Removed. * UserInterface/Views/DebuggerDashboardView.css: Removed. * UserInterface/Views/DefaultDashboardView.js: Removed. * UserInterface/Views/DefaultDashboardView.css: Removed. Remove dashboard related code now that it has been merged into the tab bar. * UserInterface/Views/LegacyTabBar.js: Removed. * UserInterface/Views/NewTabContentView.js: Removed. * UserInterface/Views/NewTabContentView.css: Removed. * UserInterface/Images/NewTab.svg: Removed. * UserInterface/Images/NewTabPlus.svg: Removed. * UserInterface/Images/SearchResults.svg: Removed. Remove the lebacy tab bar in favor of the new tab bar. 2020-01-29 Devin Rousso Web Inspector: add instrumentation for showing existing Web Animations https://bugs.webkit.org/show_bug.cgi?id=205434 Reviewed by Brian Burg. * UserInterface/Controllers/AnimationManager.js: Added. (WI.AnimationManager): (WI.AnimationManager.prototype.get domains): (WI.AnimationManager.prototype.activateExtraDomain): (WI.AnimationManager.prototype.initializeTarget): (WI.AnimationManager.prototype.get animationCollection): (WI.AnimationManager.prototype.get supported): (WI.AnimationManager.prototype.enable): (WI.AnimationManager.prototype.disable): (WI.AnimationManager.prototype.animationCreated): (WI.AnimationManager.prototype.effectChanged): (WI.AnimationManager.prototype.targetChanged): (WI.AnimationManager.prototype.animationDestroyed): (WI.AnimationManager.prototype._handleMainResourceDidChange): * UserInterface/Protocol/AnimationObserver.js: (WI.AnimationObserver.prototype.animationCreated): Added. (WI.AnimationObserver.prototype.effectChanged): Added. (WI.AnimationObserver.prototype.targetChanged): Added. (WI.AnimationObserver.prototype.animationDestroyed): Added. * UserInterface/Models/AnimationCollection.js: Added. (WI.AnimationCollection): (WI.AnimationCollection.prototype.get animationType): (WI.AnimationCollection.prototype.get displayName): (WI.AnimationCollection.prototype.objectIsRequiredType): (WI.AnimationCollection.prototype.animationCollectionForType): (WI.AnimationCollection.prototype.itemAdded): (WI.AnimationCollection.prototype.itemRemoved): (WI.AnimationCollection.prototype.itemsCleared): Similar to `WI.ResourceCollection`, create a subclass of `WI.Collection` that maintains it's own sub-`WI.AnimationCollection`s for each type of `WI.Animation.Type`. * UserInterface/Models/Animation.js: Added. (WI.Animation): (WI.Animation.fromPayload): (WI.Animation.displayNameForAnimationType): (WI.Animation.displayNameForPlaybackDirection): (WI.Animation.displayNameForFillMode): (WI.Animation.resetUniqueDisplayNameNumbers): (WI.Animation.prototype.get animationId): (WI.Animation.prototype.get backtrace): (WI.Animation.prototype.get animationType): (WI.Animation.prototype.get startDelay): (WI.Animation.prototype.get endDelay): (WI.Animation.prototype.get iterationCount): (WI.Animation.prototype.get iterationStart): (WI.Animation.prototype.get iterationDuration): (WI.Animation.prototype.get timingFunction): (WI.Animation.prototype.get playbackDirection): (WI.Animation.prototype.get fillMode): (WI.Animation.prototype.get keyframes): (WI.Animation.prototype.get displayName): (WI.Animation.prototype.requestEffectTarget): (WI.Animation.prototype.effectChanged): (WI.Animation.prototype.targetChanged): (WI.Animation.prototype._updateEffect): * UserInterface/Protocol/RemoteObject.js: (WI.RemoteObject.resolveAnimation): Added. * UserInterface/Views/GraphicsTabContentView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js. (WI.GraphicsTabContentView): (WI.GraphicsTabContentView.tabInfo): (WI.GraphicsTabContentView.isTabAllowed): (WI.GraphicsTabContentView.prototype.get type): (WI.GraphicsTabContentView.prototype.showRepresentedObject): Added. (WI.GraphicsTabContentView.prototype.canShowRepresentedObject): (WI.GraphicsTabContentView.prototype.closed): (WI.GraphicsTabContentView.prototype.attached): (WI.GraphicsTabContentView.prototype.detached): (WI.GraphicsTabContentView.prototype.initialLayout): Added. (WI.GraphicsTabContentView.prototype._handleOverviewTreeOutlineSelectionDidChange): Added. * UserInterface/Views/GraphicsTabContentView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.css. Rename the Canvas Tab to Graphics Tab and display four sections: - Canvases - Web Animations - CSS Animations - CSS Transitions * UserInterface/Views/CanvasSidebarPanel.js: (WI.CanvasSidebarPanel.prototype.canShowRepresentedObject): Only appear if a `WI.Canvas` or `WI.Recording` is selected. * UserInterface/Views/GraphicsOverviewContentView.js: Added. (WI.GraphicsOverviewContentView): (WI.GraphicsOverviewContentView.prototype.get supplementalRepresentedObjects): (WI.GraphicsOverviewContentView.prototype.get navigationItems): (WI.GraphicsOverviewContentView.prototype.attached): (WI.GraphicsOverviewContentView.prototype.detached): (WI.GraphicsOverviewContentView.prototype.initialLayout): (WI.GraphicsOverviewContentView.prototype.dropZoneShouldAppearForDragEvent): (WI.GraphicsOverviewContentView.prototype.dropZoneHandleDrop): (WI.GraphicsOverviewContentView.prototype._handleRefreshButtonClicked): (WI.GraphicsOverviewContentView.prototype._handleShowGridButtonClicked): (WI.GraphicsOverviewContentView.prototype._handleShowImageGridSettingChanged): (WI.GraphicsOverviewContentView.prototype._handleImportButtonNavigationItemClicked): (WI.GraphicsOverviewContentView.prototype._handleOverviewViewSelectedItemChanged): (WI.GraphicsOverviewContentView.prototype._handleOverviewViewSupplementalRepresentedObjectsDidChange): (WI.GraphicsOverviewContentView.prototype._handleClick): * UserInterface/Views/GraphicsOverviewContentView.css: Added. (.content-view.graphics-overview): (.content-view.graphics-overview > section): (.content-view.graphics-overview > section:not(:first-child)): (.content-view.graphics-overview > section > .header): (.content-view.graphics-overview > section:not(:first-of-type) > .header): (.content-view.graphics-overview > section > .header > h1): (.content-view.graphics-overview > section > .header > .navigation-bar): (.content-view.graphics-overview > .content-view.canvas-overview): (@media (prefers-color-scheme: light) .content-view.graphics-overview): (@media (prefers-color-scheme: light) .content-view.graphics-overview > section > .header): Add sticky headers for each of the sections described above. * UserInterface/Views/AnimationCollectionContentView.js: Added. (WI.AnimationCollectionContentView): (WI.AnimationCollectionContentView.prototype.handleRefreshButtonClicked): (WI.AnimationCollectionContentView.prototype.contentViewAdded): (WI.AnimationCollectionContentView.prototype.contentViewRemoved): (WI.AnimationCollectionContentView.prototype.detached): (WI.AnimationCollectionContentView.prototype._handleContentViewMouseEnter): (WI.AnimationCollectionContentView.prototype._handleContentViewMouseLeave): * UserInterface/Views/AnimationCollectionContentView.css: Added. (.content-view.animation-collection): * UserInterface/Views/AnimationContentView.js: Added. (WI.AnimationContentView): (WI.AnimationContentView.get previewHeight): (WI.AnimationContentView.prototype.handleRefreshButtonClicked): (WI.AnimationContentView.prototype.initialLayout): (WI.AnimationContentView.prototype.layout): (WI.AnimationContentView.prototype.sizeDidChange): (WI.AnimationContentView.prototype.attached): (WI.AnimationContentView.prototype.detached): (WI.AnimationContentView.prototype._refreshSubtitle): (WI.AnimationContentView.prototype._refreshPreview.addTitle): (WI.AnimationContentView.prototype._refreshPreview): (WI.AnimationContentView.prototype._handleEffectChanged): (WI.AnimationContentView.prototype._handleTargetChanged): (WI.AnimationContentView.prototype._populateAnimationTargetButtonContextMenu): * UserInterface/Views/AnimationContentView.css: Added. (.content-view.animation): (.content-view.animation.selected): (.content-view.animation > header): (.content-view.animation > header > .titles): (.content-view.animation > header > .titles > .title): (.content-view.animation > header > .titles > .subtitle): (.content-view.animation > header > .titles > .subtitle:not(:empty)::before): (.content-view.animation > header > .navigation-bar): (.content-view.animation:hover > header > .navigation-bar): (.content-view.animation > .preview): (.content-view.animation > .preview > svg): (body[dir=rtl] .content-view.animation > .preview > svg): (.content-view.animation > .preview > svg rect): (.content-view.animation > .preview > svg > .delay line): (.content-view.animation > .preview > svg > .active path): (.content-view.animation > .preview > svg > .active circle): (.content-view.animation > .preview > svg > .active line): (.content-view.animation > .preview > span): (@media (prefers-color-scheme: dark) .content-view.animation > header > .titles > .title): (@media (prefers-color-scheme: dark) .content-view.animation > header > .titles > .subtitle): (@media (prefers-color-scheme: dark) .content-view.animation > .preview): Visualize the start/end delay and keyframes of the given animation as a series of bezier curves separated by markers. * UserInterface/Views/AnimationDetailsSidebarPanel.js: Added. (WI.AnimationDetailsSidebarPanel): (WI.AnimationDetailsSidebarPanel.prototype.inspect): (WI.AnimationDetailsSidebarPanel.prototype.get animation): (WI.AnimationDetailsSidebarPanel.prototype.set animation): (WI.AnimationDetailsSidebarPanel.prototype.initialLayout): (WI.AnimationDetailsSidebarPanel.prototype.layout): (WI.AnimationDetailsSidebarPanel.prototype._refreshIdentitySection): (WI.AnimationDetailsSidebarPanel.prototype._refreshEffectSection): (WI.AnimationDetailsSidebarPanel.prototype._refreshBacktraceSection): (WI.AnimationDetailsSidebarPanel.prototype._handleAnimationEffectChanged): (WI.AnimationDetailsSidebarPanel.prototype._handleAnimationTargetChanged): (WI.AnimationDetailsSidebarPanel.prototype._handleDetailsSectionCollapsedStateChanged): * UserInterface/Views/AnimationDetailsSidebarPanel.css: Added. (.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .header > .subtitle): (.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section): (.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section .row.styles): (.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section .row.styles .CodeMirror): (.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section): Show collected information about the selected animation, its effect, and its target. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager): (WI.CanvasManager.prototype.get canvasCollection): Added. (WI.CanvasManager.prototype.disable): (WI.CanvasManager.prototype.canvasAdded): (WI.CanvasManager.prototype.canvasRemoved): (WI.CanvasManager.prototype._saveRecordings): Added. (WI.CanvasManager.prototype._mainResourceDidChange): (WI.CanvasManager.prototype.get canvases): Deleted. (WI.CanvasManager.prototype._removeCanvas): Deleted. Rather than have the `WI.CanvasTabContentView` mainain the `WI.CanvasCollection` and have to listen for events from the `WI.CanvasManager`, just have the `WI.CanvasManager` hold on to it instead and provide a getter for it. * UserInterface/Views/CanvasOverviewContentView.js: (WI.CanvasOverviewContentView): (WI.CanvasOverviewContentView.prototype.get navigationItems): (WI.CanvasOverviewContentView.prototype.handleRefreshButtonClicked): (WI.CanvasOverviewContentView.prototype.contentViewAdded): (WI.CanvasOverviewContentView.prototype.contentViewRemoved): (WI.CanvasOverviewContentView.prototype.attached): (WI.CanvasOverviewContentView.prototype.detached): (WI.CanvasOverviewContentView.prototype._addSavedRecording): (WI.CanvasOverviewContentView.prototype.hidden): Deleted. (WI.CanvasOverviewContentView.prototype.get _itemMargin): Deleted. (WI.CanvasOverviewContentView.prototype._refreshPreviews): Deleted. (WI.CanvasOverviewContentView.prototype._updateNavigationItems): Deleted. (WI.CanvasOverviewContentView.prototype._showGridButtonClicked): Deleted. (WI.CanvasOverviewContentView.prototype._updateShowImageGrid): Deleted. * UserInterface/Views/CanvasOverviewContentView.css: (.content-view.canvas-overview): (.content-view.canvas-overview > .content-view.canvas): (@media (prefers-color-scheme: dark) .content-view.canvas-overview): Deleted. * UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView): (WI.CanvasContentView.prototype.handleRefreshButtonClicked): Added. (WI.CanvasContentView.prototype.dropZoneShouldAppearForDragEvent): Added. (WI.CanvasContentView.prototype.dropZoneHandleDrop): Added. (WI.CanvasContentView.prototype.initialLayout): (WI.CanvasContentView.prototype.attached): (WI.CanvasContentView.prototype._populateCanvasElementButtonContextMenu): (WI.CanvasContentView.prototype.shown): Deleted. Move the "Log Canvas Context" to be the first item in the canvas element button context menu. Drive-by: add a `WI.DropZoneView` for when recording JSON files are dragged on top. * UserInterface/Views/CanvasContentView.css: Drive-by: drop `:not(.tab)` from all selectors since the Canvas Tab doesn't exist anymore. * UserInterface/Views/CollectionContentView.js: (WI.CollectionContentView): (WI.CollectionContentView.prototype.get selectedItem): Added. (WI.CollectionContentView.prototype.set selectedItem): Added. (WI.CollectionContentView.prototype.addContentViewForItem): (WI.CollectionContentView.prototype.removeContentViewForItem): (WI.CollectionContentView.prototype.showContentPlaceholder): (WI.CollectionContentView.prototype.initialLayout): (WI.CollectionContentView.prototype._selectItem): (WI.CollectionContentView.prototype._handleClick): Added. (WI.CollectionContentView.prototype.setSelectedItem): Deleted. * UserInterface/Views/CollectionContentView.css: (.content-view.collection > .placeholder:not(.message-text-view)): Added. (.content-view.collection .resource.image img): Deleted. (.content-view.collection .resource.image img:hover): Deleted. When selection is enabled, clicking outside of any of the content views should dismiss the current selection. Clients should also be able to get the currently selected item. * UserInterface/Views/DetailsSectionSimpleRow.js: (WI.DetailsSectionSimpleRow.prototype.set value): Ensure that `0` is considered as a valid value. * UserInterface/Base/Main.js: (WI.loaded): (WI.contentLoaded): (WI.tabContentViewClassForRepresentedObject): * UserInterface/Views/ContentView.js: (WI.ContentView.createFromRepresentedObject): (WI.ContentView.isViewable): Allow `WI.Animation` to be viewable. * UserInterface/Views/Main.css: (.navigation-item-help): Added. (.navigation-item-help > .navigation-bar): Added. (.navigation-item-help > .navigation-bar > .item): Added. (.message-text-view .navigation-item-help): Deleted. (.message-text-view .navigation-item-help .navigation-bar): Deleted. (.message-text-view .navigation-item-help .navigation-bar > .item): Deleted. Allow `WI.createNavigationItemHelp` to be used independently of `WI.createMessageTextView`. * UserInterface/Controllers/DOMManager.js: (WI.DOMManager.prototype.nodeForId): * UserInterface/Controllers/TimelineManager.js: (WI.TimelineManager.prototype.animationTrackingUpdated): * UserInterface/Models/AuditTestCaseResult.js: (WI.AuditTestCaseResult.async fromPayload): Add a fallback so callers don't need to. * UserInterface/Views/ResourceCollectionContentView.js: (WI.ResourceCollectionContentView): * UserInterface/Views/ResourceCollectionContentView.css: (.content-view.resource-collection > .resource.image img): Added. (.content-view.resource-collection > .resource.image img:hover): Added. Drive-by: move these styles to the right file and make them more specific. * UserInterface/Models/Canvas.js: (WI.Canvas.displayNameForContextType): * UserInterface/Models/Recording.js: (WI.Recording.displayNameForRecordingType): Added. Drive-by: fix localized strings. * UserInterface/Views/RecordingContentView.css: Drive-by: drop `:not(.tab)` from all selectors since the Recording Tab doesn't exist anymore. * UserInterface/Main.html: * UserInterface/Images/Graphics.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/Canvas.svg. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Test.html: * UserInterface/Test/Test.js: (WI.loaded): * UserInterface/Test/TestHarness.js: (TestHarness.prototype.expectEmpty): Added. (TestHarness.prototype.expectNotEmpty): Added. (TestHarness.prototype._expectationMessageFormat): (TestHarness.prototype._expectedValueFormat): Add utility function for checking whether the given value is empty: - Array `length === 0` - String `length === 0` - Set `size === 0` - Map `size === 0` - Object `isEmptyObject` Any other type will automatically fail, as non-objects can't be "empty" (e.g. `42`). 2020-01-27 Devin Rousso Web Inspector: don't use `:matches(:before, :after)` after r255059 https://bugs.webkit.org/show_bug.cgi?id=206848 Reviewed by Antti Koivisto. * UserInterface/Views/SpringEditor.css: (.spring-editor > .spring-timing::before, .spring-editor > .spring-timing::after): Added. (.spring-editor > .spring-timing:matches(::before, ::after)): Deleted. 2020-01-27 Devin Rousso Web Inspector: unable to evaluate in the isolated world of content scripts injected by safari app extensions https://bugs.webkit.org/show_bug.cgi?id=206110 Reviewed by Timothy Hatcher, Joseph Pecoraro, and Brian Burg. In addition to evaluating in subframe execution contexts, add the ability for Web Inspector to evaluate in non-normal isolated worlds. * UserInterface/Models/ExecutionContext.js: (WI.ExecutionContext): (WI.ExecutionContext.typeFromPayload): Added. (WI.ExecutionContext.prototype.get type): Added. (WI.ExecutionContext.prototype.get isPageContext): Deleted. * UserInterface/Models/ExecutionContextList.js: (WI.ExecutionContextList.prototype.add): * UserInterface/Models/Frame.js: (WI.Frame.prototype.addExecutionContext): * UserInterface/Controllers/NetworkManager.js: (WI.NetworkManager.prototype.executionContextCreated): The `Normal` execution context (of which there should only be one) is considered the "page" execution context. * UserInterface/Protocol/DirectBackendTarget.js: (WI.DirectBackendTarget): * UserInterface/Protocol/PageTarget.js: (WI.PageTarget): * UserInterface/Protocol/WorkerTarget.js: (WI.WorkerTarget): Default to a `Normal` execution context. * UserInterface/Views/QuickConsole.js: (WI.QuickConsole): (WI.QuickConsole.prototype._displayNameForExecutionContext): Added. (WI.QuickConsole.prototype._resolveDesiredActiveExecutionContext): Added. (WI.QuickConsole.prototype._setActiveExecutionContext): Added. (WI.QuickConsole.prototype._updateActiveExecutionContextDisplay): Added. (WI.QuickConsole.prototype._populateActiveExecutionContextNavigationItemContextMenu): Added. (WI.QuickConsole.prototype._handleConsoleSavedResultAliasSettingChanged): Added. (WI.QuickConsole.prototype._handleEngineeringShowInternalExecutionContextsSettingChanged): Added. (WI.QuickConsole.prototype._handleFramePageExecutionContextChanged): Added. (WI.QuickConsole.prototype._handleFrameExecutionContextsCleared): Added. (WI.QuickConsole.prototype._handleDebuggerActiveCallFrameDidChange): Added. (WI.QuickConsole.prototype._handleActiveExecutionContextChanged): Added. (WI.QuickConsole.prototype._handleTransitionPageTarget): Added. (WI.QuickConsole.prototype._handleTargetRemoved): Added. (WI.QuickConsole.prototype._handleInspectedNodeChanged): Added. (WI.QuickConsole.prototype._updateStyles): (WI.QuickConsole.prototype.get navigationBar): Deleted. (WI.QuickConsole.prototype._pageTargetTransitioned): Deleted. (WI.QuickConsole.prototype._initializeMainExecutionContextPathComponent): Deleted. (WI.QuickConsole.prototype.layout): Deleted. (WI.QuickConsole.prototype._preferredNameForFrame): Deleted. (WI.QuickConsole.prototype._selectExecutionContext): Deleted. (WI.QuickConsole.prototype._updateAutomaticExecutionContextPathComponentTooltip): Deleted. (WI.QuickConsole.prototype._executionContextPathComponentsToDisplay): Deleted. (WI.QuickConsole.prototype._rebuildExecutionContextPathComponents): Deleted. (WI.QuickConsole.prototype._framePageExecutionContextsChanged): Deleted. (WI.QuickConsole.prototype._frameExecutionContextsCleared): Deleted. (WI.QuickConsole.prototype._activeExecutionContextChanged): Deleted. (WI.QuickConsole.prototype._createExecutionContextPathComponent): Deleted. (WI.QuickConsole.prototype._compareExecutionContextPathComponents): Deleted. (WI.QuickConsole.prototype._insertOtherExecutionContextPathComponent): Deleted. (WI.QuickConsole.prototype._removeOtherExecutionContextPathComponent): Deleted. (WI.QuickConsole.prototype._insertExecutionContextPathComponentForFrame): Deleted. (WI.QuickConsole.prototype._removeExecutionContextPathComponentForFrame): Deleted. (WI.QuickConsole.prototype._targetAdded): Deleted. (WI.QuickConsole.prototype._targetRemoved): Deleted. (WI.QuickConsole.prototype._pathComponentSelected): Deleted. (WI.QuickConsole.prototype._pathComponentClicked): Deleted. (WI.QuickConsole.prototype._debuggerActiveCallFrameDidChange): Deleted. * UserInterface/Views/QuickConsole.css: (.quick-console > .console-prompt): (.quick-console > .navigation-bar): (.quick-console > .navigation-bar .active-execution-context): Added. (.quick-console > .navigation-bar .active-execution-context > .selector-arrows): Added. (.quick-console > .navigation-bar .active-execution-context:not(.automatic)): Added. (.quick-console > .navigation-bar .active-execution-context:not(.automatic) > .selector-arrows): Added. (.quick-console .execution-context): Deleted. (.quick-console > .navigation-bar > .hierarchical-path .execution-context): Deleted. (.quick-console > .navigation-bar > .hierarchical-path .execution-context .separator): Deleted. (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context)): Deleted. (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context) .execution-context): Deleted. (.quick-console > .navigation-bar > .hierarchical-path:not(.automatic-execution-context) .execution-context .selector-arrows): Deleted. Replace the `WI.HierarchicalPathNavigationItem` with a plain `WI.NavigationItem` that shows a `WI.ContextMenu` with all valid execution contexts organized as follows: Auto - ---------- Main Frame Normal Execution Context All User Exection Contexts for the Main Frame All Internal Exection Contexts for the Main Frame (with the engineering setting) Frames Frame Normal Execution Context All User Exection Contexts for the Frame All Internal Exection Contexts for the Frame (with the engineering setting) ... Workers Worker Execution Context ... Everything is checkmark selectable other than the separator, "Frames", and "Workers". * UserInterface/Controllers/RuntimeManager.js: (WI.RuntimeManager): (WI.RuntimeManager.prototype._frameExecutionContextsCleared): Deleted. Let the UI (`WI.QuickConsole`) decide when to automatically update the active execution context when a frame is removed that owned the active execution context. * UserInterface/Controllers/TargetManager.js: (WI.TargetManager.prototype.get workerTargets): Added. (WI.TargetManager.prototype._terminatePageTarget): Convenience function for getting the list of worker targets. * UserInterface/Views/GroupNavigationItem.js: (WI.GroupNavigationItem.prototype.update): (WI.GroupNavigationItem.prototype.didAttach): Update the items whenever the group updates. * UserInterface/Main.html: * UserInterface/Views/SizesToFitNavigationBar.js: Renamed from Source/WebInspectorUI/UserInterface/Views/QuickConsoleNavigationBar.js. (WI.SizesToFitNavigationBar): (WI.SizesToFitNavigationBar.prototype.get sizesToFit): Rename to allow for other use cases. * UserInterface/Views/ContextMenu.js: (WI.ContextSubMenuItem.prototype.appendHeader): Added. Convenience method for creating a disabled item. * UserInterface/Base/Setting.js: * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createEngineeringSettingsView): Create an engineering setting that controls whether `Internal` execution contexts are shown. * UserInterface/Test/InspectorProtocol.js: (InspectorProtocol.addEventListener): (InspectorProtocol.removeEventListener): Added. * Localizations/en.lproj/localizedStrings.js: 2020-01-21 Keith Rollin Fix tvOS values in SUPPORTED_PLATFORMS https://bugs.webkit.org/show_bug.cgi?id=206435 Reviewed by Alexey Proskuryakov. A number of targets in WebKit have 'tvos' and 'tvsimulator' in SUPPORTED_PLATFORMS. The correct values are 'appletvos' and 'appletvsimulator'. These should be updated to the correct ones as the wrong values prevent the tvOS run destination from being usable in the UI to build for tvOS. * Configurations/Base.xcconfig: 2020-01-17 Nikita Vasilyev Web Inspector: Unchecking Enable Preview Features on Engineering and Preview builds does not affect WI.arePreviewFeaturesEnabled() https://bugs.webkit.org/show_bug.cgi?id=204026 Reviewed by Brian Burg. Make `WI.arePreviewFeaturesEnabled()` return false when Enable Preview Features is unchecked. * UserInterface/Base/Setting.js: (WI.canShowPreviewFeatures): (WI.arePreviewFeaturesEnabled): (WI.isTechnologyPreviewBuild): Deleted. (WI.canShowPreviewFeatures): Added. * UserInterface/Views/SettingsTabContentView.js: 2020-01-16 Devin Rousso Web Inspector: add links to reference pages https://bugs.webkit.org/show_bug.cgi?id=206309 Reviewed by Timothy Hatcher. * UserInterface/Base/Main.js: (WI._handleDeviceSettingsToolbarButtonClicked): (WI.createReferencePageLink): Added. * UserInterface/Views/Main.css: (.reference-page-link): Added. (.reference-page-link:active): Added. (@media (-webkit-device-pixel-ratio: 1) .reference-page-link): Added. (@media (prefers-color-scheme: dark) .reference-page-link): Added. (@media (prefers-color-scheme: dark) .reference-page-link:active): Added. (.device-settings-content): (.device-settings-content > table): Added. (.device-settings-content > table > tr > td:first-child): Added. (.device-settings-content > .reference-page-link-container): Added. (body[dir=ltr] .device-settings-content > .reference-page-link-container): Added. (body[dir=rtl] .device-settings-content > .reference-page-link-container): Added. (.device-settings-content > tr > td:first-child): Deleted. * UserInterface/Controllers/NetworkManager.js: (WI.NetworkManager.prototype.async createBootstrapScript): * UserInterface/Controllers/BreakpointPopoverController.js: (WI.BreakpointPopoverController.prototype._createPopoverContent): (WI.BreakpointPopoverController.prototype._popoverActionsCreateAddActionButton): * UserInterface/Views/BreakpointPopoverController.css: (.popover .edit-breakpoint-popover-content > table > tr > td.options): Added. (.popover .edit-breakpoint-popover-content > table > tr > td.options > .reference-page-link-container): Added. (body[dir=ltr] .popover .edit-breakpoint-popover-content > table > tr > td.options > .reference-page-link-container): Added. (body[dir=rtl] .popover .edit-breakpoint-popover-content > table > tr > td.options > .reference-page-link-container): Added. (body[dir=ltr] .popover .edit-breakpoint-popover-content .reference-page-link-container): Added. (body[dir=rtl] .popover .edit-breakpoint-popover-content .reference-page-link-container): Added. * UserInterface/Views/EventBreakpointPopover.js: (WI.EventBreakpointPopover.prototype.show): * UserInterface/Views/EventBreakpointPopover.css: (.popover .event-breakpoint-content .reference-page-link-container): Added. * UserInterface/Views/URLBreakpointPopover.js: (WI.URLBreakpointPopover.prototype.show): * UserInterface/Views/URLBreakpointPopover.css: (.popover .url-breakpoint-content .reference-page-link-container): Added. * UserInterface/Views/LocalResourceOverridePopover.js: (WI.LocalResourceOverridePopover.prototype.show): * UserInterface/Views/LocalResourceOverridePopover.css: (.popover .local-resource-override-popover-content .reference-page-link-container): Added. (body[dir=ltr] .popover .local-resource-override-popover-content .reference-page-link-container): Added. (body[dir=rtl] .popover .local-resource-override-popover-content .reference-page-link-container): Added. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype.initialLayout): (WI.SettingsTabContentView.prototype._createGeneralSettingsView): (WI.SettingsTabContentView.prototype._createElementsSettingsView): (WI.SettingsTabContentView.prototype._createSourcesSettingsView): (WI.SettingsTabContentView.prototype._createConsoleSettingsView): (WI.SettingsTabContentView.prototype._createExperimentalSettingsView): (WI.SettingsTabContentView.prototype._createReferenceLink): Added. * UserInterface/Views/SettingsTabContentView.css: (.content-view.tab.settings): Added. (.content-view.tab.settings .navigation-bar): Added. (.content-view.tab.settings .navigation-bar.invisible): Added. (.content-view.tab.settings .navigation-bar .item.radio.button.text-only): Added. (.content-view.tab.settings .navigation-bar .item.radio.button.text-only:before): Added. (.content-view.tab.settings .navigation-bar .item.radio.button.text-only.selected): Added. (.content-view.tab.settings > .settings-view): Added. (.content-view.tab.settings > .settings-view > .separator): Added. (.content-view.tab.settings > .settings-view > .container): Added. (.content-view.tab.settings > .settings-view > .container.hidden): Added. (.content-view.tab.settings > .settings-view > .container-centered): Added. (.content-view.tab.settings > .settings-view > .container button): Added. (.content-view.tab.settings > .settings-view > .container > .title): Added. (.content-view.tab.settings > .settings-view > .container > .editor-group): Added. (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor): Added. (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Added. (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input): Added. (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Added. (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor select): Added. (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="number"]): Added. (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Added. (.content-view.tab.settings > .settings-view > .container.reference): Added. (.content-view.tab.settings > .settings-view > .container.reference > .reference-page-link): Added. (.content-view.tab.settings > .settings-view > .container.reference > .reference-page-link > .go-to-arrow): Added. (.content-view.settings .navigation-bar): Deleted. (.content-view.settings .navigation-bar.invisible): Deleted. (.content-view.settings .navigation-bar .item.radio.button.text-only): Deleted. (.content-view.settings .navigation-bar .item.radio.button.text-only:before): Deleted. (.content-view.settings .navigation-bar .item.radio.button.text-only.selected): Deleted. (.content-view.settings > .settings-view): Deleted. (.content-view.settings > .settings-view > .separator): Deleted. (.content-view.settings > .settings-view > .container): Deleted. (.content-view.settings > .settings-view > .container.hidden): Deleted. (.content-view.settings > .settings-view > .container-centered): Deleted. (.content-view.settings > .settings-view > .container button): Deleted. (.content-view.settings > .settings-view > .container > .title): Deleted. (.content-view.settings > .settings-view > .container > .editor-group): Deleted. (.content-view.settings > .settings-view > .container > .editor-group > .editor): Deleted. (.content-view.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Deleted. (.content-view.settings > .settings-view > .container > .editor-group > .editor input): Deleted. (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted. (.content-view.settings > .settings-view > .container > .editor-group > .editor select): Deleted. (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="number"]): Deleted. (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Deleted. (@media (prefers-color-scheme: dark) .content-view.settings .navigation-bar): Deleted. (@media (prefers-color-scheme: dark) .content-view.settings .navigation-bar .item.radio.button.text-only.selected): Deleted. * UserInterface/Views/BlackboxSettingsView.js: (WI.BlackboxSettingsView.prototype.initialLayout): * UserInterface/Views/BlackboxSettingsView.css: (.settings-view.blackbox > table > tbody td.url): Added. (.settings-view.blackbox > table > tbody td.url > .CodeMirror): * Localizations/en.lproj/localizedStrings.js: 2020-01-16 Devin Rousso Web Inspector: show the device settings menu when Web Inspector's debug mode is enabled https://bugs.webkit.org/show_bug.cgi?id=206311 Reviewed by Brian Burg. This only has an effect when Web Inspector is opened and the debug mode is enabled. If so, the device settings toolbar icon will appear regardless of whether the inspected target is a remote device or not. Disabling debug mode will not immediately remove the device settings toolbar icon, but it will not reappear when Web Inspector is next opened (to allow for taking screenshots and other such things). * UserInterface/Base/Main.js: (WI.contentLoaded): 2020-01-16 Nikita Vasilyev REGRESSION(r251487): Web Inspector: selected color in color picker has wrong lightness https://bugs.webkit.org/show_bug.cgi?id=206202 Reviewed by Devin Rousso. Currently, tintedColor setter has two code paths: - rgb2hsv convertion if the color is defined using color(...) syntax. - HSL to HSV convertion for any other color. The latter was defined in the view, was untested, and incorrect. This patch uses WI.Color.rgb2hsv convertion for all colors. This method is already covered by tests. * UserInterface/Views/ColorSquare.js: (WI.ColorSquare.prototype.set tintedColor): 2020-01-16 David Kilzer Enable -Wconditional-uninitialized in WebInspectorUI, WebKitLegacy, WebKit projects Reviewed by Tim Horton. * Configurations/Base.xcconfig: (WARNING_CFLAGS): Add -Wconditional-uninitialized switch. 2020-01-15 Devin Rousso Web Inspector: collapsing a virtualized folder in a `WI.TreeOutline` doesn't updated the DOM https://bugs.webkit.org/show_bug.cgi?id=206302 Reviewed by Timothy Hatcher. * UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype._updateVirtualizedElements): When collapsing a currently visible `WI.TreeElement`, it will still be in the cached set of visible and attached `WI.TreeElement`s, meaning that `_updateVirtualizedElements` will early return since it thinks that the same `WI.TreeElement` are being shown. Add another check to ensure that it only thinks that if the same number of `WI.TreeElement` are visible. 2020-01-13 Devin Rousso Web Inspector: "Enable Local Override" and "Delete Local Override" are displayed twice in the contextual menu https://bugs.webkit.org/show_bug.cgi?id=206184 Reviewed by Brian Burg. * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): * UserInterface/Views/LocalResourceOverrideTreeElement.js: (WI.LocalResourceOverrideTreeElement.prototype.populateContextMenu): Add an expando flag that can be set by `WI.LocalResourceOverrideTreeElement` to ensure that the local override context menu items aren't added again by `WI.ResourceTreeElement`. 2020-01-09 Nikita Vasilyev Web Inspector: suggest "color()" when defining color in CSS value https://bugs.webkit.org/show_bug.cgi?id=205976 Reviewed by Devin Rousso. * UserInterface/Models/CSSKeywordCompletions.js: 2020-01-08 Devin Rousso Web Inspector: Sources: not all injected scripts and style sheets are from extensions https://bugs.webkit.org/show_bug.cgi?id=205955 Reviewed by Brian Burg. * UserInterface/Base/Utilities.js: (isWebKitExtensionScheme): Added. * UserInterface/Models/CSSStyleSheet.js: (WI.CSSStyleSheet.prototype.get injected): * .eslintrc: Move the logic for detecting an extension injected resource to its own function. * UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject): (WI.SourcesNavigationSidebarPanel.prototype._addStyleSheet): (WI.SourcesNavigationSidebarPanel.prototype._addScript): Only show the Anonymous Style Sheets folder once the user tries to show a style sheet that would be in it. * UserInterface/Views/OpenResourceDialog.js: (WI.OpenResourceDialog.prototype.didPresentDialog): (WI.OpenResourceDialog.prototype._addScriptsForTarget): (WI.OpenResourceDialog.prototype._handleStyleSheetAdded): (WI.OpenResourceDialog.prototype._handleStyleSheetRemoved): Ignore anonymous scripts, and allow injected style sheets to be added after presenting. 2020-01-08 Nikita Vasilyev Web Inspector: Show RGBA input fields for p3 color picker https://bugs.webkit.org/show_bug.cgi?id=203928 Reviewed by Brian Burg. Display numeric input fields for colors defined via `color(...)` CSS syntax. * UserInterface/Controllers/CodeMirrorColorEditingController.js: (WI.CodeMirrorColorEditingController.prototype.popoverWillPresent): Remove unnecessary WI.ColorPicker.Event.FormatChanged event. * UserInterface/Views/ColorPicker.css: (.color-picker > .color-inputs > div + div): * UserInterface/Views/ColorPicker.js: (WI.ColorPicker): Don't append inputs of all possible color formats to DOM on instantiation. (WI.ColorPicker.prototype.set color): (WI.ColorPicker.prototype.set enableColorComponentInputs): (WI.ColorPicker.prototype._updateColor): (WI.ColorPicker.prototype._updateColorGamut): (WI.ColorPicker.prototype._createColorInputsIfNeeded): (WI.ColorPicker.prototype._showColorComponentInputs): (WI.ColorPicker.prototype._handleColorInputsContainerInput): * UserInterface/Views/InlineSwatch.js: Remove unnecessary WI.ColorPicker.Event.FormatChanged event. 2020-01-08 Devin Rousso REGRESSION: (r254186) [ Mac ] inspector/css/add-rule.html is failing https://bugs.webkit.org/show_bug.cgi?id=205938 Reviewed by Brian Burg. * UserInterface/Models/CSSStyleSheet.js: (WI.CSSStyleSheet.prototype.get injected): `scheme` can be `null`, so check that it exists before calling `String.prototype` functions. 2020-01-07 Devin Rousso Web Inspector: unable to edit or view the source of style sheets injected by safari app extensions https://bugs.webkit.org/show_bug.cgi?id=205900 Reviewed by Timothy Hatcher. Remove the restrictions around `CSS.StyleSheetOrigin.User` style sheets, thereby allowing Web Inspector to get the source information that is necessary to show the "resource" in the Sources Tab. * UserInterface/Models/CSSStyleSheet.js: (WI.CSSStyleSheet.prototype.get displayName): (WI.CSSStyleSheet.prototype.get injected): Added. (WI.CSSStyleSheet.prototype.get anonymous): Added. * UserInterface/Models/DOMNodeStyles.js: (WI.DOMNodeStyles.prototype._parseRulePayload): * UserInterface/Models/CSSRule.js: (WI.CSSRule): (WI.CSSRule.prototype.get editable): (WI.CSSRule.prototype._selectorResolved): Attempt to create a source code location for any style sheet with a source range, not just for the Inspector Style Sheet. * UserInterface/Views/CSSStyleSheetTreeElement.js: (WI.CSSStyleSheetTreeElement): Instead of hardcoding "Inspector Style Sheet", use the associated `WI.CSSStyleSheet`'s info. * UserInterface/Views/FrameTreeElement.js: (WI.FrameTreeElement): (WI.FrameTreeElement.prototype.onattach): (WI.FrameTreeElement.prototype.ondetach): (WI.FrameTreeElement.prototype._styleSheetAdded): (WI.FrameTreeElement.prototype._styleSheetRemoved): Added. Ensure that only non-injected non-anonymous style sheets are shown under frames. * UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel): (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements): (WI.SourcesNavigationSidebarPanel.prototype._addResource): (WI.SourcesNavigationSidebarPanel.prototype._addStyleSheet): Added. (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged): (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded): Added. (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetRemoved): Added. Add "Extension Style Sheets", "Extra Style Sheets", and "Anonymous Style Sheets" folders, just like for scripts, with a similar logic as to when style sheets are added to each. * UserInterface/Views/OpenResourceDialog.js: (WI.OpenResourceDialog): (WI.OpenResourceDialog.prototype.representedObjectIsValid): Added. (WI.OpenResourceDialog.prototype._populateResourceTreeOutline): (WI.OpenResourceDialog.prototype._populateResourceTreeOutline.createTreeElement): (WI.OpenResourceDialog.prototype.didDismissDialog): (WI.OpenResourceDialog.prototype.didPresentDialog): (WI.OpenResourceDialog.prototype._removeResource): Added. (WI.OpenResourceDialog.prototype._resourceWasRemoved): Added. (WI.OpenResourceDialog.prototype._scriptAdded): (WI.OpenResourceDialog.prototype._scriptRemoved): Added. (WI.OpenResourceDialog.prototype._handleStyleSheetAdded): Added. (WI.OpenResourceDialog.prototype._handleStyleSheetRemoved): Added. Add any non-injected non-anonymous style sheets when populating the list of resources. Drive-by: remove listings for any resources that are removed from the inspected page. * UserInterface/Views/ResourceTreeElement.js: (WI.ResourceTreeElement.compareResourceTreeElements): (WI.ResourceTreeElement.compareResourceTreeElements.resolvedType): Added. Support comparisons against non-resource tree elements. * Localizations/en.lproj/localizedStrings.js: 2020-01-07 Devin Rousso REGRESSION: [ Mac Debug ] inspector/page/setBootstrapScript-main-frame.html is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=205807 Reviewed by Dean Jackson. * UserInterface/Controllers/NetworkManager.js: (WI.NetworkManager.prototype.async createBootstrapScript): (WI.NetworkManager.prototype._handleBootstrapScriptContentDidChange): Ensure that `Page.setBootstrapScript` is called when restoring the bootstrap script from the IndexedDB storage. Otherwise, in situations like when Web Inspector is first opened, we will show the Inspector Bootstrap Script in the UI, but not actually set it on the inspected page. 2020-01-06 Yury Semikhatsky REGRESSION: [ Mac wk2 ] http/tests/inspector/target/provisional-load-cancels-previous-load.html is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=205473 The failure was due to attempts to add output to the test page which could be not fully loaded after navigation. To make it deterministic it is now possible to keep provisional navigation paused and to defer output until the test page is ready. Reviewed by Brian Burg. * UserInterface/Protocol/Target.js: (WI.Target.prototype.initialize): (WI.Target.prototype._resumeIfPaused): extracted resume logic in a method that can be overridden in the tests. * UserInterface/Test/FrontendTestHarness.js: (FrontendTestHarness.prototype.deferOutputUntilTestPageIsReloaded): allow to pause output when navigation is started via protocol commands rather than the test harness. 2020-01-06 Nikita Vasilyev Web Inspector: Color picker: make it keyboard accessible https://bugs.webkit.org/show_bug.cgi?id=205572 Reviewed by Brian Burg. For the color square, make up, down, left, and right keys move the crosshair. For the hue and opacity sliders: - Pressing up and down keys should adjust the value by 1%. - When holding Shift, up and down keys adjust the value by 10%. * UserInterface/Views/ColorPicker.js: (WI.ColorPicker.prototype.focus): * UserInterface/Views/ColorSquare.css: (.color-square): Match the border of the hue and opacity sliders. * UserInterface/Views/ColorSquare.js: (WI.ColorSquare): Make the color square focusable. (WI.ColorSquare.prototype._handleMousedown): (WI.ColorSquare.prototype._handleKeyDown): * UserInterface/Views/InlineSwatch.js: * UserInterface/Views/Slider.css: (.slider:focus): * UserInterface/Views/Slider.js: (WI.Slider): (WI.Slider.prototype._handleMousedown): Drive-by: right clicking the slider shouldn't move the thumb. (WI.Slider.prototype._handleKeyDown): 2020-01-06 Nikita Vasilyev REGRESSION(r218839): Web Inspector: Color picker: pressing Esc should hide color picker https://bugs.webkit.org/show_bug.cgi?id=205570 Reviewed by Brian Burg. * UserInterface/Views/QuickConsole.js: (WI.QuickConsole.prototype.set keyboardShortcutDisabled): (WI.QuickConsole.prototype._toggleOrFocus): Restore keyboardShortcutDisabled setter, which was removed in r218839 without any explanation. 2020-01-06 Devin Rousso Web Inspector: Canvas: unable to see recording actions for WebGL canvases that have lots of shader programs https://bugs.webkit.org/show_bug.cgi?id=205659 Reviewed by Brian Burg. Limit the height of the canvas and shader program tree a recording is selected. * UserInterface/Views/CanvasSidebarPanel.js: (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar): * UserInterface/Views/CanvasSidebarPanel.css: (.sidebar > .panel.navigation.canvas.showing-recording > .content > .tree-outline.canvas): Added. 2019-12-21 Brian Burg Web Inspector: add InspectedTargetTypes diagnostic event and related hooks https://bugs.webkit.org/show_bug.cgi?id=205174 Reviewed by Devin Rousso. This change adds a new diagnostic recorder that reports information about inspected targets and their type / version information. * UserInterface/Base/DebuggableType.js: (WI.DebuggableType.fromString): Move the static parsing factory method to DebuggableType class. * UserInterface/Main.html: Add new files. * UserInterface/Base/Main.js: (WI.contentLoaded): Add new diagnostic recorder. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass.prototype.activateDomain): Adapt to InspectorFrontendHost changes. * UserInterface/Test/TestAppController.js: (WI.TestAppController): * UserInterface/Controllers/AppController.js: (WI.AppController): Adapt to InspectorFrontendHost changes. 2019-12-20 Nikita Vasilyev Web Inspector: Gradient editor: opacity slider is too close to the right edge of the popover https://bugs.webkit.org/show_bug.cgi?id=203643 Reviewed by Devin Rousso. Replace absolute positioning in the color picker with static layout. * UserInterface/Views/ColorPicker.css: (.color-picker .wrapper): (.color-picker :matches(.color-square, .slider)): (.color-picker .slider): (.color-picker .hue): (@media (color-gamut: p3) .color-picker.gamut-p3 > .hue): (.color-picker > .color-inputs): (.color-picker > .color-inputs > div): (.color-picker > .color-inputs > div:not([hidden]) + div): The 1st visible div should have no left margin even if it's preceded by a hidden div. * UserInterface/Views/ColorPicker.js: (WI.ColorPicker): (WI.ColorPicker.prototype._updateOpacitySlider): * UserInterface/Views/GradientEditor.css: (.gradient-editor.editing-color): (.gradient-editor > .color-picker .slider): * UserInterface/Views/GradientEditor.js: (WI.GradientEditor): * UserInterface/Views/Slider.css: (.slider): (.slider > img): (body[dir=ltr] .slider > img): (body[dir=rtl] .slider > img): * UserInterface/Views/Slider.js: (WI.Slider): (WI.Slider.prototype.set value): (WI.Slider.prototype.set knobY): (WI.Slider.prototype.get maxY): (WI.Slider.prototype.recalculateKnobY): (WI.Slider.prototype._handleMousedown): (WI.Slider.prototype._handleMousemove): * UserInterface/Views/Variables.css: (:root): Convert WI.Slider to be vertical by default. WI.Slider used to define a hozirontal slider. It is only used by the color picker, where it's vertical. The slider was rotated with CSS transformation. This made it problematic to use in the static layout. 2019-12-20 Brian Burg Web Inspector: convert some InspectorFrontendHost methods to getters https://bugs.webkit.org/show_bug.cgi?id=205475 Reviewed by Devin Rousso. No reason for these to be method calls, so expose as getters / attributes instead. * UserInterface/Base/LoadLocalizedStrings.js: * UserInterface/Base/Main.js: * UserInterface/Base/ObjectStore.js: (WI.ObjectStore.get _databaseName): * UserInterface/Base/Platform.js: * UserInterface/Base/Setting.js: (WI.Setting._localStorageKey): * UserInterface/Debug/Bootstrap.js: (WI.runBootstrapOperations): * UserInterface/Protocol/LoadInspectorBackendCommands.js: 2019-12-19 Nikita Vasilyev Web Inspector: Enable p3 color picker by default https://bugs.webkit.org/show_bug.cgi?id=203931 Reviewed by Devin Rousso. * UserInterface/Base/Setting.js: * UserInterface/Views/InlineSwatch.js: 2019-12-19 Devin Rousso Web Inspector: Console: the clear console button is hidden at smaller widths https://bugs.webkit.org/show_bug.cgi?id=205438 Reviewed by Brian Burg. Ever since r242604, we no longer "need" to show the text filter bar or message type scope bar since new messages will show a warning banner that there's an active filter. Instead, we should prefer showing the navigation items that control functionality that cannot be reached anywhere else (visually), such as clearing the console or evaluating as a user gesture. * UserInterface/Views/LogContentView.js: (WI.LogContentView): Make the text find banner and type scope bar both low priority, the preserve log and evaluate as user gesture toggles normal priority, and the clear log high priority. 2019-12-19 Devin Rousso Web Inspector: Audit: exiting edit mode with the same selection as before entering edit mode doesn't reselect https://bugs.webkit.org/show_bug.cgi?id=205435 Reviewed by Brian Burg. * UserInterface/Views/AuditNavigationSidebarPanel.js: (WI.AuditNavigationSidebarPanel.prototype.initialLayout): Set `allowsRepeatSelection` so that selecting the previously selected tree element after leaving edit mode will actually work. 2019-12-19 Devin Rousso Web Inspector: Elements: Styles: bezier keywords don't show a swatch https://bugs.webkit.org/show_bug.cgi?id=205436 Reviewed by Brian Burg. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens): Check if the current token is a direct match with one of the timing function keywords. 2019-12-19 Devin Rousso Web Inspector: Audit: importing a result with DOM nodes that don't match the inspected page appear as empty lines https://bugs.webkit.org/show_bug.cgi?id=205437 Reviewed by Brian Burg. * UserInterface/Views/AuditTestCaseContentView.js: (WI.AuditTestCaseContentView.prototype.layout): Call `refresh` on the `CodeMirror` instance after a timeout to give it a chance to be added to the DOM tree. 2019-12-18 Devin Rousso Web Inspector: Elements: restrict showing paint flashing and compositing borders to the Web Inspector session https://bugs.webkit.org/show_bug.cgi?id=205201 Reviewed by Timothy Hatcher. We often get bugs from users who turn on paint flashing or compositing borders, close Web Inspector, reopen Web Inspector, and are then surprised when the page flashes red or these borders exist all over the page. Given that the dark mode and print styles toggles are limited to the Web Inspector session, we should make these have the same behavior. * UserInterface/Base/Main.js: (WI.initializeTarget): * UserInterface/Base/Setting.js: * UserInterface/Controllers/LayerTreeManager.js: (WI.LayerTreeManager): Added. (WI.LayerTreeManager.prototype.initializeTarget): (WI.LayerTreeManager.supportsShowingPaintRects): Added. (WI.LayerTreeManager.supportsVisibleCompositingBorders): Added. (WI.LayerTreeManager.prototype.get showPaintRects): Added. (WI.LayerTreeManager.prototype.set showPaintRects): Added. (WI.LayerTreeManager.prototype.get compositingBordersVisible): Added. (WI.LayerTreeManager.prototype.set compositingBordersVisible): Added. (WI.LayerTreeManager.prototype.updateCompositingBordersVisibleFromPageIfNeeded): Added. Use `WI.LayerTreeManager` to control the state of paint flashing and compositing borders, as they're both related to the concept of layers. * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView): (WI.DOMTreeContentView.prototype.shown): (WI.DOMTreeContentView.prototype.closed): (WI.DOMTreeContentView.prototype.attached): Added. (WI.DOMTreeContentView.prototype.detached): Added. (WI.DOMTreeContentView.prototype._handleCompositingBordersVisibleChanged): Added. (WI.DOMTreeContentView.prototype._handleCompositingBordersButtonClicked): Added. (WI.DOMTreeContentView.prototype._handleShowPaintRectsChanged): Added. (WI.DOMTreeContentView.prototype._handlePaingFlashingButtonClicked): Added. (WI.DOMTreeContentView.prototype._toggleCompositingBorders): Deleted. (WI.DOMTreeContentView.prototype._togglePaintFlashing): Deleted. (WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings): Deleted. (WI.DOMTreeContentView.prototype._showPaintRectsSettingChanged): Deleted. * UserInterface/Views/Layers3DContentView.js: (WI.Layers3DContentView): (WI.Layers3DContentView.prototype.shown): (WI.Layers3DContentView.prototype.hidden): (WI.Layers3DContentView.prototype.attached): Added. (WI.Layers3DContentView.prototype.detached): Added. (WI.Layers3DContentView.prototype._handleCompositingBordersVisibleChanged): Added. (WI.Layers3DContentView.prototype._handleCompositingBordersButtonClicked): Added. (WI.Layers3DContentView.prototype._handleShowPaintRectsChanged): Added. (WI.Layers3DContentView.prototype._handlePaingFlashingButtonClicked): Added. (WI.Layers3DContentView.prototype.closed): Deleted. (WI.Layers3DContentView.prototype._showPaintRectsSettingChanged): Deleted. (WI.Layers3DContentView.prototype._togglePaintFlashing): Deleted. (WI.Layers3DContentView.prototype._updateCompositingBordersButtonState): Deleted. (WI.Layers3DContentView.prototype._toggleCompositingBorders): Deleted. 2019-12-18 Yury Semikhatsky Web Inspector: Runtime.enable reports duplicates (non existent) contexts https://bugs.webkit.org/show_bug.cgi?id=204859 Reviewed by Devin Rousso. Assert that all contexts added to the list are unique. * UserInterface/Models/ExecutionContextList.js: (WI.ExecutionContextList.prototype.add): 2019-12-18 Devin Rousso Web Inspector: Elements: remove the "Show/Hide Shadow DOM" navigation item https://bugs.webkit.org/show_bug.cgi?id=205199 Reviewed by Timothy Hatcher. There's really no good reason to hide shadow DOM, especially for non-user-agent shadow trees. The user has full control over whether to expand/collapse shadow trees (and their hosts), so having a setting that entirely removes the shadow trees from view throughout Web Inspector seems overkill. * UserInterface/Base/Setting.js: * UserInterface/Models/DOMNode.js: (WI.DOMNode): (WI.DOMNode.prototype.get nextSibling): (WI.DOMNode.prototype.get previousSibling): (WI.DOMNode.prototype.get children): (WI.DOMNode.prototype.get childNodeCount): * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView): (WI.DOMTreeContentView.prototype.get navigationItems): (WI.DOMTreeContentView.prototype.closed): (WI.DOMTreeContentView.prototype._showShadowDOMSettingChanged): Deleted. (WI.DOMTreeContentView.prototype._toggleShowsShadowDOMSetting): Deleted. * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline.prototype.close): (WI.DOMTreeOutline.prototype._revealAndSelectNode): (WI.DOMTreeOutline.prototype._showShadowDOMSettingChanged): Deleted. * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WI.LayerTreeDetailsSidebarPanel.prototype.initialLayout): (WI.LayerTreeDetailsSidebarPanel.prototype._updateDisplayWithLayers): (WI.LayerTreeDetailsSidebarPanel.prototype._showShadowDOMSettingChanged): Deleted. * UserInterface/Images/ShadowDOM.svg: Removed. * Localizations/en.lproj/localizedStrings.js: 2019-12-11 Brian Burg Web Inspector: add TabNavigation diagnostic event and related hooks https://bugs.webkit.org/show_bug.cgi?id=205138 Reviewed by Devin Rousso. This patch adds a new recorder for the TabNavigation diagnostic event. The bulk of this patch is to find all callsites that can possibly change the active tab and annotate them with the type of interaction (tab click, link click, keyboard shortcut, inspect, and others). This patch was developed through trial and error by logging the diagnostic events and debugging any scenarios where a tab navigation is not correctly annotated with the initiating interaction. * UserInterface/Main.html: Add new file. * UserInterface/Base/Main.js: (WI.contentLoaded): Register new recorder. (WI._handleSettingsKeyboardShortcut): Annotate as keyboard shortcut. - Add options argument to most WI.show*Tab functions, and forward to the underlying TabBrowser or TabBar calls. This allows initiatorHint to be used in these cases. - Add other annotations to linkifyElement * UserInterface/Views/TabBrowser.js: (WI.TabBrowser.prototype.showTabForContentView): (WI.TabBrowser.prototype._tabBarItemSelected): - Try to infer an initiator for the tab navigation from TabBrowser API arguments or from TabBar's event. - Add an enum with TabNavigationInitiator values. * UserInterface/Base/DOMUtilities.js: Clickable element links should be reported as link clicks. Add an annotation so that it isn't reported as "Inspect" (due to going through DOMManager.inspectElement). * UserInterface/Controllers/CallFrameTreeController.js: (WI.CallFrameTreeController): (WI.CallFrameTreeController.prototype._showSourceCodeLocation): This is mainly used by Canvas tab. Annotate call frame links as link clicks. * UserInterface/Controllers/DOMManager.js: (WI.DOMManager.prototype.inspectElement): Accept an options argument. This is used to forward the initiatorHint to the listener of this event, WI._domNodeWasInspected, so it can forward the initiatorHint further on. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.setTimelineProfilingEnabled): (InspectorFrontendAPI.showConsole): (InspectorFrontendAPI.showResources): (InspectorFrontendAPI.showTimelines): (InspectorFrontendAPI.showMainResourceForFrame): Annotate these as FrontendAPI calls. Mainly used by Develop menu items in Safari. * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): (WI.appendContextMenuItemsForURL): Annotate as context menu. * UserInterface/Views/DOMNodeTreeElement.js: (WI.DOMNodeTreeElement): (WI.DOMNodeTreeElement.prototype.populateContextMenu): Annotate as context menu. * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype._buildTagDOM): * UserInterface/Views/DefaultDashboardView.js: (WI.DefaultDashboardView.prototype._resourcesItemWasClicked): (WI.DefaultDashboardView.prototype._networkItemWasClicked): (WI.DefaultDashboardView.prototype._timelineItemWasClicked): (WI.DefaultDashboardView.prototype._consoleItemWasClicked): Annotate as dashboard. * UserInterface/Views/LegacyTabBar.js: (WI.LegacyTabBar.prototype.set selectedTabBarItem): Include the inferred initiator in the event that is dispatched. (WI.LegacyTabBar.prototype.selectTabBarItemWithInitiator): Added. This is a convenience method that temporarily sets the initiator before invoking the setter (which reads the initator). (WI.LegacyTabBar.prototype._handleMouseDown): (WI.LegacyTabBar.prototype._handleClick): (WI.LegacyTabBar.prototype._handleNewTabClick): Treat these as "tab clicks". * UserInterface/Views/TabBar.js: (WI.TabBar.prototype.set selectedTabBarItem): (WI.TabBar.prototype.selectTabBarItemWithInitiator): (WI.TabBar.prototype._handleMouseDown): (WI.TabBar.prototype._handleClick): Changes from LegacyTabBar have been copied to this version, as it's a drop-in replacement. * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype._showConsoleTab): Treat the console chevron as a "button click". * UserInterface/Views/NewTabContentView.js: (WI.NewTabContentView.prototype._createNewTabWithType): Treat each tab button as a "button click". * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement.prototype.populateContextMenu): Annotate as context menu. * UserInterface/Views/ResourceTimelineDataGridNode.js: (WI.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked): Annotate as link click. * UserInterface/Views/SearchResultTreeElement.js: (WI.SearchResultTreeElement): (WI.SearchResultTreeElement.prototype.populateContextMenu): Annotate as context menu. * UserInterface/Views/SourceCodeTextEditor.js: (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu): Annotate as context menu. (WI.SourceCodeTextEditor.prototype._showPopoverForObject.): (WI.SourceCodeTextEditor.prototype._showPopoverForObject): Annotate elements in popover as link click. * UserInterface/Views/SourceCodeTreeElement.js: (WI.SourceCodeTreeElement): (WI.SourceCodeTreeElement.prototype._handleToggleBlackboxedImageElementClicked): Annotate as context menu. * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu): Annotate as context menu. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype._setupJumpToSymbol): Annotate as link click. 2019-12-15 Emilio Cobos Álvarez Remove -webkit-marquee. https://bugs.webkit.org/show_bug.cgi?id=117769 Reviewed by Simon Fraser. * UserInterface/Models/CSSKeywordCompletions.js: 2019-12-12 Yury Semikhatsky Web Inspector: Error: Can't make a ContentView for an unknown representedObject of type: CallFrame https://bugs.webkit.org/show_bug.cgi?id=204823 Reviewed by Devin Rousso. If no type is stored in the cookie matching by type should fail. * UserInterface/Views/NavigationSidebarPanel.js: (WI.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie.treeElementMatchesCookie): (WI.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie): 2019-12-12 Devin Rousso Web Inspector: REGRESSION(r251227): Uncaught Exception: undefined is not an object (evaluating 'target.DOMAgent.setInspectModeEnabled') https://bugs.webkit.org/show_bug.cgi?id=205148 Reviewed by Joseph Pecoraro. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.setTimelineProfilingEnabled): (InspectorFrontendAPI.setElementSelectionEnabled): If there are no targets available yet (`WI.targetsAvailable()`), then wait for targets to be available (`WI.whenTargetsAvailable()`) before performing the intended logic, as the `InspectorFrontendAPI` only waits for the backend connection to be established before dispatching, meaning that there may not be a page target yet. Other `InspectorFrontendAPI` functions don't need to be changed because they don't cause commands to be invoked. * UserInterface/Controllers/DOMManager.js: (WI.DOMManager.prototype.set inspectModeEnabled): Drive-by: don't assume that inspect mode is disabled if an error is thrown. * UserInterface/Base/Main.js: Drive-by: remove duplicate function `WI._toggleInspectMode` as it already exists. 2019-12-11 Devin Rousso Web Inspector: REGRESSION: Console: unable to switch execution contexts https://bugs.webkit.org/show_bug.cgi?id=205102 Reviewed by Brian Burg. * UserInterface/Views/QuickConsole.js: (WI.QuickConsole): Wait to initialize the main execution context path component until we actually have a main execution context. (WI.QuickConsole.prototype._pageTargetTransitioned): Remove unnecessary duplicate early return. (WI.QuickConsole.prototype._initializeMainExecutionContextPathComponent): Restore the link to the next path component if the main execution context path component is recreated when there already exist other execution contexts. (WI.QuickConsole.prototype._selectExecutionContext): Remove unnecessary assertion. (WI.QuickConsole.prototype._removeExecutionContextPathComponentForFrame): When the execution context of the main frame changes, recreate the main execution context path component so it has the right `representedObject`. * UserInterface/Views/HierarchicalPathNavigationItem.js: (WI.HierarchicalPathNavigationItem.prototype.update): Only hide the tooltip if we're not `sizeToFit` as otherwise we never unhide it due to an early return (`sizeToFit` just makes everything visible). 2019-12-11 Devin Rousso Web Inspector: Elements: Styles: hovering over an invalid value while holding ⌘ doesn't change the color of the text https://bugs.webkit.org/show_bug.cgi?id=205039 Reviewed by Brian Burg. Only apply a `color` or `-webkit-text-decoration-color` when either the ⌘ key is not pressed or if the mouse is not actively hovering over the node when the ⌘ is pressed. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .name:not(.editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .name:not(:hover, .editing)): Added. (.spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .value): Added. (body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .value:not(.editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .value:not(:hover, .editing)): Added. (.spreadsheet-style-declaration-editor .property.disabled): (.spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) > .content > *:not(.name, .value-container), .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) > .content > .value-container > *:not(.value), body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) > .content > :matches(.name, value-container):not(.editing), body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) > .content > .value-container > value:not(.editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) > .content > :matches(.name, value-container):not(:hover, .editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) > .content > .value-container > .value:not(:hover, .editing)): Added. (.spreadsheet-style-declaration-editor > .property.invalid-name:not(.disabled) > .content > *:not(.name, .value-container), .spreadsheet-style-declaration-editor > .property.invalid-name:not(.disabled) > .content > .value-container > *:not(.value), body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property.invalid-name:not(.disabled) > .content > :matches(.name, .value-container):not(.editing), body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property.invalid-name:not(.disabled) > .content > .value-container > .value:not(.editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property.invalid-name:not(.disabled) > .content > :matches(.name, .value-container):not(:hover, .editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property.invalid-name:not(.disabled) > .content > .value-container > .value:not(:hover, .editing)): Added. (body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property.invalid-value:not(.disabled) > .content > .value:not(.editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property.invalid-value:not(.disabled) > .content > .value:not(:hover, .editing)): Added. (body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .value:not(.editing) .token-link, body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .value:not(:hover, .editing) .token-link): Added. (body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .value:not(.editing) .token-string, body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .value:not(:hover, .editing) .token-string): Added. (body.meta-key-pressed .spreadsheet-css-declaration:not(.locked) > .spreadsheet-style-declaration-editor > .property > .content :matches(.name, .value):not(.editing):hover): Added. (body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .value:not(.editing) .token-comment, body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled) > .content > .value:not(:hover, .editing) .token-comment): Added. (.spreadsheet-style-declaration-editor .property:not(.disabled) .name): Deleted. (.spreadsheet-style-declaration-editor .property:not(.disabled) .value): Deleted. (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) .content > *): Deleted. (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled) .content > *): Deleted. (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .content .value): Deleted. (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-link): Deleted. (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-string): Deleted. (.meta-key-pressed .spreadsheet-css-declaration:not(.locked) :matches(.name, .value):not(.editing):hover): Deleted. (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-comment): Deleted. 2019-12-11 Devin Rousso Web Inspector: REGRESSION(r253173): Console: evaluating a command should automatically scroll to it's result https://bugs.webkit.org/show_bug.cgi?id=205105 Reviewed by Brian Burg. * UserInterface/Views/LogContentView.js: (WI.LogContentView): (WI.LogContentView.prototype.get scrollableElements): (WI.LogContentView.prototype._updateMessagesSelection): (WI.LogContentView.prototype._highlightSearchMatchAtIndex): (WI.LogContentView.prototype.layout): Deleted. (WI.LogContentView.prototype._ensureMessageIsVisible): Deleted. (WI.LogContentView.prototype._positionForMessage): Deleted. Now that this uses `display: flex;`, the actual scrollable element is the `messagesElement`, so use that instead when manually setting the `scrollTop`. Use `scrollIntoViewIfNeeded` when revealing search results instead of any custom scroll offset calculations. * UserInterface/Views/LogContentView.css: (.content-view.log > .hidden-messages-banner): Drive-by: ensure that the hidden messages banner doesn't shrink. 2019-12-11 Devin Rousso Web Inspector: simplify the text of the script blackboxing context menu item https://bugs.webkit.org/show_bug.cgi?id=205099 Reviewed by Brian Burg. "Blackbox script to ignore it when debugging" is a bit too long for a context menu item. We should use something simpler, like "Blackbox Script". * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): * Localizations/en.lproj/localizedStrings.js: 2019-12-11 Devin Rousso Web Inspector: replace all "Remove" context menu items with "Delete" to be consistent https://bugs.webkit.org/show_bug.cgi?id=205098 Reviewed by Brian Burg. * UserInterface/Views/BlackboxSettingsView.js: (WI.BlackboxSettingsView.prototype._addRow): * UserInterface/Views/BootstrapScriptTreeElement.js: (WI.BootstrapScriptTreeElement.prototype.populateContextMenu): * UserInterface/Views/BreakpointActionView.js: (WI.BreakpointActionView): * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): Drive-by: if a local override exists for the given source code, add an item for enabling/disabling and deleting it. * UserInterface/Views/LocalResourceOverrideTreeElement.js: (WI.LocalResourceOverrideTreeElement.prototype.populateContextMenu): * UserInterface/Views/ProbeSetDetailsSection.js: (WI.ProbeSetDetailsSection): * UserInterface/Views/ResourceContentView.js: (WI.ResourceContentView): * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WI.ScopeChainDetailsSidebarPanel.prototype._objectTreeElementAddContextMenuItems): * Localizations/en.lproj/localizedStrings.js: 2019-12-11 Devin Rousso Web Inspector: Uncaught Exception: Missing frame for given frameId (on techcrunch.com) https://bugs.webkit.org/show_bug.cgi?id=205130 Reviewed by Timothy Hatcher. * UserInterface/Controllers/ApplicationCacheManager.js: (WI.ApplicationCacheManager.prototype._manifestForFrameLoaded): A frame can go away between `ApplicationCache.getManifestForFrame` being called and the response being received, so don't re-throw the error if the frontend no longer has a matching `WI.Frame` for the given `frameId`. 2019-12-10 Devin Rousso Web Inspector: REGRESSION(r251038): Elements: Computed: implicit shorthands are not shown when "Prefer Shorthands" is enabled https://bugs.webkit.org/show_bug.cgi?id=205035 Reviewed by Brian Burg. The computed style treats most shorthand properties as "implicit", meaning that if "Prefer Shorthands" is enabled, we won't show the shorthand properties unless "Show All" is also enabled. The frontend can fix this by checking to see if there are any non-implicit longhand values for each shorthand value, and therefore decide not to hide the "implicit" shorthand. * UserInterface/Views/ComputedStyleSection.js: (WI.ComputedStyleSection.prototype.get propertiesToRender): (WI.ComputedStyleSection.prototype.get propertiesToRender.hasNonImplicitLonghand): Added. Drive-by: filter the list of properties to render before sorting them for performance. 2019-12-10 Devin Rousso REGRESSION(r252523): Web Inspector: Styles: semicolon is wrongly positioned in multiline values https://bugs.webkit.org/show_bug.cgi?id=205034 Reviewed by Brian Burg. Wrap the value node in another `` so that the semicolon can be included as part of the `display: inline-block;` when there are multiple lines in the value. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype.update): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .property:not(.disabled).has-newline .value-container): Added. (.spreadsheet-style-declaration-editor .property:not(.disabled).has-newline .value): Deleted. 2019-12-10 Devin Rousso Web Inspector: Elements: Styles: there is a double border between the last rule and the class list area or filter area https://bugs.webkit.org/show_bug.cgi?id=205040 Reviewed by Brian Burg. * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style.style-rules > .content ~ :matches(.options-container, .class-list-container)): Added. (.sidebar > .panel.details.css-style > .content ~ .options-container): Use a CSS transform to move the class list area and filter area up when the Styles panel is selected in the details sidebar of the Elements Tab. 2019-12-10 Devin Rousso Web Inspector: REGRESSION(r253167): Elements: class list toggle doesn't stay sticky to the bottom of the sidebar https://bugs.webkit.org/show_bug.cgi?id=205033 Reviewed by Brian Burg. * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content): Ensure that the main content of the sidebar panel takes up as much space as possible. 2019-12-10 Devin Rousso Web Inspector: Uncaught Exception: this._objectTree.resetPropertyPath is not a function. (In 'this._objectTree.resetPropertyPath()', 'this._objectTree.resetPropertyPath' is undefined) https://bugs.webkit.org/show_bug.cgi?id=205026 Reviewed by Brian Burg. * UserInterface/Views/ConsoleMessageView.js: (WI.ConsoleMessageView.prototype.clearSessionState): The `_objectTree` can also be an `WI.ErrorObjectView`, which doesn't have a property path. 2019-12-06 Devin Rousso Web Inspector: Uncaught Exception: Missing node for given nodeId https://bugs.webkit.org/show_bug.cgi?id=204519 Reviewed by Timothy Hatcher. When a DOM node is removed from the main DOM tree, the `InspectorDOMAgent` invalidates the `DOM.NodeId` that was previously assigned to that DOM node, meaning that any future commands sent by the frontend with that `DOM.NodeId` will fail. Add logic to mark `WI.DOMNode` as being `destroyed` when this happens so the frontend can decide to not invoke any commands with that `DOM.NodeId`. Many functions have also switched to expecting a `WI.DOMNode` instead of a `DOM.NodeId` or have been moved to `WI.DOMNode.prototype` in order to also be able to use `destroyed`. This issue will eventually be mitigated by . * UserInterface/Models/DOMNode.js: (WI.DOMNode): (WI.DOMNode.prototype.get destroyed): Added. (WI.DOMNode.prototype.get attached): (WI.DOMNode.prototype.markDestroyed): Added. (WI.DOMNode.prototype.setNodeName): (WI.DOMNode.prototype.setNodeValue): (WI.DOMNode.prototype.setAttribute): (WI.DOMNode.prototype.setAttributeValue): (WI.DOMNode.prototype.querySelector): Added. (WI.DOMNode.prototype.querySelectorAll): Added. (WI.DOMNode.prototype.highlight): Added. (WI.DOMNode.prototype.getOuterHTML): (WI.DOMNode.prototype.setOuterHTML): (WI.DOMNode.prototype.removeNode): (WI.DOMNode.prototype.getEventListeners): * UserInterface/Base/DOMUtilities.js: (WI.bindInteractionsForNodeToElement): * UserInterface/Controllers/DOMManager.js: (WI.DOMManager.buildHighlightConfig): (WI.DOMManager.wrapClientCallback): (WI.DOMManager.prototype._loadNodeAttributes): (WI.DOMManager.prototype._setDocument): (WI.DOMManager.prototype._unbind): (WI.DOMManager.prototype.highlightDOMNodeList): (WI.DOMManager.prototype.highlightSelector): (WI.DOMManager.prototype.hideDOMNodeHighlight): (WI.DOMManager.prototype.highlightDOMNodeForTwoSeconds): (WI.DOMManager.prototype.set inspectModeEnabled): (WI.DOMManager.prototype.setInspectedNode): (WI.DOMManager.prototype.setEventListenerDisabled): (WI.DOMManager.prototype._wrapClientCallback): Deleted. (WI.DOMManager.prototype.querySelector): Deleted. (WI.DOMManager.prototype.querySelectorAll): Deleted. (WI.DOMManager.prototype.highlightDOMNode): Deleted. (WI.DOMManager.prototype._buildHighlightConfig): Deleted. * UserInterface/Models/AuditTestCaseResult.js: (WI.AuditTestCaseResult.async fromPayload): * UserInterface/Models/MediaTimelineRecord.js: (WI.MediaTimelineRecord.async fromJSON): * UserInterface/Protocol/RemoteObject.js: (WI.RemoteObject.resolveNode): * UserInterface/Views/BoxModelDetailsSectionRow.js: (WI.BoxModelDetailsSectionRow.prototype._highlightDOMNode): * UserInterface/Views/CanvasOverviewContentView.js: (WI.CanvasOverviewContentView.prototype._contentViewMouseEnter): * UserInterface/Views/CanvasTreeElement.js: (WI.CanvasTreeElement.prototype._handleMouseOver): * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForDOMNode): * UserInterface/Views/DOMNodeDetailsSidebarPanel.js: (WI.DOMNodeDetailsSidebarPanel.prototype.layout): * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView.prototype._domTreeSelectionDidChange): * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype.get editable): (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu): * UserInterface/Views/DOMTreeElementPathComponent.js: (WI.DOMTreeElementPathComponent.prototype.mouseOver): * UserInterface/Views/DOMTreeOutline.js: (WI.DOMTreeOutline.prototype.get editable): (WI.DOMTreeOutline.prototype.populateContextMenu): (WI.DOMTreeOutline.prototype._onmousemove): (WI.DOMTreeOutline.prototype._ondragstart): (WI.DOMTreeOutline.prototype._ondragover): (WI.DOMTreeOutline.prototype._ondragleave): (WI.DOMTreeOutline.prototype._ondragend): (WI.DOMTreeOutline.prototype._hideElements): * UserInterface/Views/FormattedValue.js: (WI.FormattedValue.createElementForNodePreview): * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js: (WI.GeneralStyleDetailsSidebarPanel.prototype.layout): * UserInterface/Views/LayerDetailsSidebarPanel.js: (WI.LayerDetailsSidebarPanel.prototype._dataGridMouseMove): * UserInterface/Views/LayerTreeDetailsSidebarPanel.js: (WI.LayerTreeDetailsSidebarPanel.prototype.layout): (WI.LayerTreeDetailsSidebarPanel.prototype._highlightSelectedNode): * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype._highlightNodesWithSelector): 2019-12-06 Devin Rousso Web Inspector: saving a file with the url "/" suggest the name "Untitled" https://bugs.webkit.org/show_bug.cgi?id=204910 Reviewed by Timothy Hatcher. * UserInterface/Base/FileUtilities.js: (WI.FileUtilities.save): Allow callers to specify a `suggestedName` that is used if possible. * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): (WI.appendContextMenuItemsForDOMNode): * UserInterface/Views/TextResourceContentView.js: (WI.TextResourceContentView.prototype.get saveData): * UserInterface/Views/ResourceContentView.js: (WI.ResourceContentView.prototype.get saveData): If the path of the selected source code is just "/", set the `suggestedName` to "index" and use an extension derived from the MIME type (if able). * UserInterface/Controllers/AuditManager.js: (WI.AuditManager.prototype.export): * UserInterface/Views/ConsoleMessageView.js: (WI.ConsoleMessageView.prototype._handleContextMenu): * UserInterface/Views/HeapSnapshotContentView.js: (WI.HeapSnapshotContentView.prototype._exportSnapshot): * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype.get saveData): (WI.LogContentView.prototype._handleContextMenuEvent): * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype._exportHAR): * UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView.prototype._exportRecording): (WI.RecordingContentView.prototype._exportReduction): * UserInterface/Views/ScriptContentView.js: (WI.ScriptContentView.prototype.get saveData): * UserInterface/Views/ShaderProgramContentView.js: (WI.ShaderProgramContentView.prototype.get saveData): * UserInterface/Views/TextContentView.js: (WI.TextContentView.prototype.get saveData): * UserInterface/Views/TimelineRecordingContentView.js: (WI.TimelineRecordingContentView.prototype._exportTimelineRecording): * UserInterface/Debug/ProtocolTrace.js: (WI.ProtocolTrace.prototype.get saveData): Prefer `suggestedName` vs `WI.FileUtilities.inspectorURLForFilename`, which is now always called inside `WI.FileUtilities.save` anyways. 2019-12-06 Devin Rousso Web Inspector: REGRESSION(r252652): Local Overrides: creating a local override for a resource loaded before Web Inspector was opened shows NaN for the Status Code https://bugs.webkit.org/show_bug.cgi?id=204965 Reviewed by Joseph Pecoraro. * UserInterface/Views/LocalResourceOverridePopover.js: (WI.LocalResourceOverridePopover.prototype.show): Make sure to update the object that holds the resource's original data in addition to the object that holds the current edited values. Drive-by: update the popover once all of the `CodeMirror`s have updated to hide scrollbars. 2019-11-25 Brian Burg Web Inspector: TabActivity diagnostic event should sample the active tab uniformly https://bugs.webkit.org/show_bug.cgi?id=204531 Reviewed by Devin Rousso. Rewrite this class to use a uniform sampling approach. Every n seconds, a timer fires and samples what the current tab is. If the last user interaction happened up to n seconds ago, report a TabActivity diagnostic event. Keeping with the previous implementation, samples are taken every n=60 seconds. To account for bias in the initial sample when Web Inspector is open, wait m seconds for the first sample. This accounts for the time between opening Web Inspector and choosing the desired tab. In my testing, m=10 is enough time to load Web Inspector and switch immediately to a different tab. In that case, the initial tab would not be sampled as the active tab even if the last user interaction (clicking tab bar) happened while the initial tab was displayed. If the recorder's setup() method is called some time after Web Inspector is opened, then the initial delay will shrink to ensure at least 10s has elapsed since the frontend finished loading. * UserInterface/Base/Main.js: (WI.contentLoaded): Keep a timestamp of when the frontend finished loading. * UserInterface/Controllers/TabActivityDiagnosticEventRecorder.js: (WI.TabActivityDiagnosticEventRecorder): (WI.TabActivityDiagnosticEventRecorder.prototype.setup): (WI.TabActivityDiagnosticEventRecorder.prototype.teardown): (WI.TabActivityDiagnosticEventRecorder.prototype._startInitialDelayBeforeSamplingTimer): (WI.TabActivityDiagnosticEventRecorder.prototype._stopInitialDelayBeforeSamplingTimer): (WI.TabActivityDiagnosticEventRecorder.prototype._startEventSamplingTimer): (WI.TabActivityDiagnosticEventRecorder.prototype._stopEventSamplingTimer): (WI.TabActivityDiagnosticEventRecorder.prototype._sampleCurrentTabActivity): (WI.TabActivityDiagnosticEventRecorder.prototype._didObserveUserInteraction): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowFocus): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowBlur): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowKeyDown): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowMouseDown): (WI.TabActivityDiagnosticEventRecorder.prototype._didInteractWithTabContent): Deleted. (WI.TabActivityDiagnosticEventRecorder.prototype._clearTabActivityTimeout): Deleted. (WI.TabActivityDiagnosticEventRecorder.prototype._beginTabActivityTimeout): Deleted. (WI.TabActivityDiagnosticEventRecorder.prototype._stopTrackingTabActivity): Deleted. (WI.TabActivityDiagnosticEventRecorder.prototype._handleTabBrowserSelectedTabContentViewDidChange): Deleted. 2019-12-05 Devin Rousso Web Inspector: REGRESSION(r242604): Console: unread indicator overlaps selection background of previous scope bar item https://bugs.webkit.org/show_bug.cgi?id=204630 Reviewed by Timothy Hatcher. When a new message is added that is immediately filtered, such as from an existing filter or previously selected scope bar items, rather than show a blinking circle next to the level of the new message in the scope bar (which doesn't cover the case where there's a filter and was often hard to notice), add a dismissable warning banner explaning that the message had been filtered with a button to clear all filters. * UserInterface/Views/LogContentView.js: (WI.LogContentView): (WI.LogContentView.prototype.didAppendConsoleMessageView): (WI.LogContentView.prototype._previousMessageRepeatCountUpdated): (WI.LogContentView.prototype._logCleared): (WI.LogContentView.prototype._messageSourceBarSelectionDidChange): (WI.LogContentView.prototype._scopeBarSelectionDidChange): (WI.LogContentView.prototype._filterMessageElements): (WI.LogContentView.prototype._showHiddenMessagesBannerIfNeeded): Added. (WI.LogContentView.prototype._markScopeBarItemUnread): Deleted. (WI.LogContentView.prototype._markScopeBarItemForMessageLevelUnread): Deleted. * UserInterface/Views/LogContentView.css: (.content-view.log): (.content-view.log > .hidden-messages-banner): Added. (.content-view.log > .hidden-messages-banner > button): Added. (.content-view.log > .hidden-messages-banner > .dismiss): Added. (body[dir=ltr] .content-view.log > .hidden-messages-banner > .dismiss): Added. (body[dir=rtl] .content-view.log > .hidden-messages-banner > .dismiss): Added. (.console-messages): (.log-scope-bar > li:not(.unread) > .indicator): Deleted. (.log-scope-bar > li.unread > .indicator): Deleted. (.log-scope-bar > li.unread:hover > .indicator): Deleted. (.log-scope-bar > li.unread.evaluations > .indicator): Deleted. (.log-scope-bar > li.unread.errors > .indicator): Deleted. (.log-scope-bar > li.unread.warnings > .indicator): Deleted. (.log-scope-bar > li.unread.logs > .indicator): Deleted. (@keyframes unread-background-pulse): Deleted. * UserInterface/Views/FindBanner.js: (WI.FindBanner): (WI.FindBanner.prototype.clearAndBlur): Added. (WI.FindBanner.prototype._clearAndBlur): Deleted. Expose a public way to clear the find banner. * Localizations/en.lproj/localizedStrings.js: 2019-12-05 Devin Rousso Web Inspector: add WI.EngineeringSetting and WI.DebugSetting to avoid callsite checking https://bugs.webkit.org/show_bug.cgi?id=204785 Reviewed by Timothy Hatcher. * UserInterface/Base/Setting.js: (WI.Setting.prototype.get defaultValue): Added. (WI.EngineeringSetting.prototype.get value): Added. (WI.EngineeringSetting.prototype.set value): Added. (WI.DebugSetting.prototype.get value): Added. (WI.DebugSetting.prototype.set value): Added. (WI.Setting.prototype.get valueRespectingDebugUIAvailability): Deleted. Only get/set the `_value` if the `WI.isEngineeringBuild`/`WI.isDebugUIEnabled()`. * UserInterface/Base/Main.js: (WI.resolvedLayoutDirection): * UserInterface/Protocol/RemoteObject.js: (WI.RemoteObject.prototype.findFunctionSourceCodeLocation): * UserInterface/Models/CSSProperty.js: (WI.CSSProperty.prototype._updateOwnerStyleText): * UserInterface/Models/CSSStyleDeclaration.js: (WI.CSSStyleDeclaration.prototype.update): * UserInterface/Proxies/HeapSnapshotEdgeProxy.js: (WI.HeapSnapshotEdgeProxy.prototype.isPrivateSymbol): * UserInterface/Controllers/DOMManager.js: (WI.DOMManager.prototype.supportsEditingUserAgentShadowTrees): * UserInterface/Controllers/DebuggerManager.js: (WI.DebuggerManager.prototype.get knownNonResourceScripts): (WI.DebuggerManager.prototype.debuggerDidPause): (WI.DebuggerManager.prototype.scriptDidParse): * UserInterface/Controllers/DiagnosticController.js: (WI.DiagnosticController): (WI.DiagnosticController.prototype._debugAutoLogDiagnosticEventsSettingDidChange): (WI.DiagnosticController.prototype._updateRecorderStates): * UserInterface/Views/ConsoleMessageView.js: (WI.ConsoleMessageView.prototype._appendLocationLink): * UserInterface/Views/HeapSnapshotDataGridTree.js: (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel): * UserInterface/Views/OpenResourceDialog.js: (WI.OpenResourceDialog.prototype._addScriptsForTarget): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor): * UserInterface/Views/StackTraceView.js: (WI.StackTraceView): * UserInterface/Views/View.js: (WI.View.prototype._layoutSubtree): * UserInterface/Debug/UncaughtExceptionReporter.js: (handleUncaughtExceptionRecord): 2019-12-05 Devin Rousso Web Inspector: Console: copying an evaluation result shouldn't include the saved variable index https://bugs.webkit.org/show_bug.cgi?id=204906 Reviewed by Timothy Hatcher. * UserInterface/Views/ConsoleMessageView.js: (WI.ConsoleMessageView.prototype.toClipboardString): 2019-12-05 Devin Rousso Web Inspector: Elements: the Classes toggle is drawn on top of other content with no other way of scrolling to it https://bugs.webkit.org/show_bug.cgi?id=204690 Reviewed by Timothy Hatcher. Use a vertical flexbox for the contents of sidebar panels instead of absolute positioning so that the variable height Classes "drawer" can have it's own scroll area and doesn't take up any space from the rest of the panel's contents. * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js: (WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout): * UserInterface/Views/GeneralStyleDetailsSidebarPanel.css: (.sidebar > .panel.details.css-style > .content): (.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)): (.sidebar > .panel.details.css-style > .content ~ .options-container): (.sidebar > .panel.details.css-style > .content ~ .class-list-container): (.sidebar > .panel.details.css-style > .content.has-filter-bar): Deleted. * UserInterface/Views/Sidebar.css: (.sidebar > .panel): (.sidebar > .panel.selected): Deleted. 2019-12-05 Devin Rousso Web Inspector: Search: there should be some default content when there is no search string https://bugs.webkit.org/show_bug.cgi?id=204631 Reviewed by Timothy Hatcher. It's very odd to switch to the Search Tab and find it completely empty, especially if you've never used it before. Add basic "No Search String" and "No Search Results" text with a clickable help navigation item that reveals and focuses the sidebar search input. * UserInterface/Views/SearchSidebarPanel.js: (WI.SearchSidebarPanel.prototype.showDefaultContentView): Added. (WI.SearchSidebarPanel.prototype.performSearch): (WI.SearchSidebarPanel.prototype._handleDefaultContentViewSearchNavigationItemClicked): Added. * Localizations/en.lproj/localizedStrings.js: 2019-12-05 Devin Rousso Web Inspector: move the "Add Breakpoint" context menu to be next to the blackboxing context menu item https://bugs.webkit.org/show_bug.cgi?id=204833 Reviewed by Timothy Hatcher. Both items are related to JavaScript debugging, so they should be closer together. * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): 2019-12-05 Devin Rousso Web Inspector: Support search on IndexedDB stores and indexes https://bugs.webkit.org/show_bug.cgi?id=129208 Reviewed by Timothy Hatcher. Add filter bars to the navigation bars for `IndexedDB`, `LocalStorage`, and `SessionStorage`. * UserInterface/Views/StorageTabContentView.js: (WI.StorageTabContentView.prototype.get canHandleFindEvent): Added. (WI.StorageTabContentView.prototype.handleFindEvent): Added. * UserInterface/Views/DOMStorageContentView.js: (WI.DOMStorageContentView): (WI.DOMStorageContentView.prototype.get navigationItems): Added. (WI.DOMStorageContentView.prototype.get canFocusFilterBar): Added. (WI.DOMStorageContentView.prototype.focusFilterBar): Added. (WI.DOMStorageContentView.prototype._handleFilterBarFilterDidChange): Added. * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js: (WI.IndexedDatabaseObjectStoreContentView): (WI.IndexedDatabaseObjectStoreContentView.prototype.get navigationItems): (WI.IndexedDatabaseObjectStoreContentView.prototype.get canFocusFilterBar): Added. (WI.IndexedDatabaseObjectStoreContentView.prototype.focusFilterBar): Added. (WI.IndexedDatabaseObjectStoreContentView.prototype.dataGridMatchNodeAgainstCustomFilters): Added. (WI.IndexedDatabaseObjectStoreContentView.prototype._handleFilterBarFilterDidChange): Added. Check against the `textContent` of each cell for a given `WI.DataGridNode` to see if it matches the filter text as all of the pieces of data are `WI.RemoteObject`s. * UserInterface/Views/FilterBar.css: (.filter-bar): * UserInterface/Views/NetworkTableContentView.css: (.content-view.network .navigation-bar .filter-bar): Deleted. Remove the `background-color` to let it match the background content. 2019-12-05 Devin Rousso Web Inspector: Network: pressing ⌘F when no network item is selected should focus the filter bar https://bugs.webkit.org/show_bug.cgi?id=204862 Reviewed by Timothy Hatcher. * UserInterface/Views/NetworkTabContentView.js: (WI.NetworkTabContentView.prototype.get canHandleFindEvent): Added. (WI.NetworkTabContentView.prototype.handleFindEvent): Added. * UserInterface/Views/NetworkTableContentView.js: (WI.NetworkTableContentView.prototype.get canFocusFilterBar): Added. (WI.NetworkTableContentView.prototype.focusFilterBar): Added. 2019-12-05 Devin Rousso Web Inspector: Quick Console: pressing ⌘F shows a second find banner https://bugs.webkit.org/show_bug.cgi?id=204861 Reviewed by Timothy Hatcher. * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype.get supportsCustomFindBanner): 2019-12-05 Simon Fraser Fix inspector/css test assertions after r253158 https://bugs.webkit.org/show_bug.cgi?id=204924 Reviewed by Devin Rousso. * UserInterface/Controllers/CSSManager.js: (WI.CSSManager.displayNameForPseudoId): 2019-12-04 Yury Semikhatsky Web Inspector: allow inspector to pause provisional page load and restore its state https://bugs.webkit.org/show_bug.cgi?id=204170 Reviewed by Devin Rousso. All new targets are now automatically paused on start. For such provisional targets target manager will run regular initilization code (enable agents etc.) and then resume loading of the target. Responses and events from the target are defferred until the target is committed and becomes current main target. When the target manager receives event that the provisional target has been committed all accumulated protocol messages are replayed and going forward all new missages will be dispatched as usual. * UserInterface/Controllers/TargetManager.js: (WI.TargetManager): (WI.TargetManager.prototype.targetCreated): (WI.TargetManager.prototype.didCommitProvisionalTarget): (WI.TargetManager.prototype.targetDestroyed): (WI.TargetManager.prototype.dispatchMessageFromTarget): (WI.TargetManager.prototype._createTarget): (WI.TargetManager.prototype._checkAndHandlePageTargetTransition): (WI.TargetManager.prototype._checkAndHandlePageTargetTermination): * UserInterface/Protocol/Connection.js: (InspectorBackend.Connection): (InspectorBackend.Connection.prototype.addProvisionalMessage): (InspectorBackend.Connection.prototype.dispatchProvisionalMessages): * UserInterface/Protocol/MultiplexingBackendTarget.js: (WI.MultiplexingBackendTarget.prototype.initialize): * UserInterface/Protocol/PageTarget.js: (WI.PageTarget): * UserInterface/Protocol/Target.js: (WI.Target.prototype.initialize): (WI.Target.prototype.get isProvisional): (WI.Target.prototype.get isPaused): (WI.Target.prototype.didCommitProvisionalTarget): * UserInterface/Protocol/WorkerTarget.js: 2019-12-03 Devin Rousso Web Inspector: prefer non-blackboxed scripts when showing a source code location link https://bugs.webkit.org/show_bug.cgi?id=204811 Reviewed by Timothy Hatcher. * UserInterface/Models/StackTrace.js: (WI.StackTrace.prototype.get firstNonNativeNonAnonymousNotBlackboxedCallFrame): Added. (WI.StackTrace.prototype.get firstNonNativeCallFrame): Deleted. (WI.StackTrace.prototype.get firstNonNativeNonAnonymousCallFrame): Deleted. Include logic to skip call frames that are blackboxed, unless there are no non-blackboxed call frames, in which case fall back to the first non-native non-anonymous call frame. Drive-by: remove unused function. * UserInterface/Views/ConsoleMessageView.js: (WI.ConsoleMessageView.prototype.render): (WI.ConsoleMessageView.prototype.clearSessionState): Added. (WI.ConsoleMessageView.prototype._appendLocationLink): (WI.ConsoleMessageView.prototype._handleDebuggerBlackboxChanged): Added. (WI.ConsoleMessageView.prototype.clearSavedVariableState): Deleted. * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype._sessionStarted): (WI.LogContentView.prototype._logCleared): Listen for changes to the debugger blackbox to re-render the location link. * UserInterface/Views/StackTraceView.js: (WI.StackTraceView): * UserInterface/Views/CallFrameView.js: (WI.CallFrameView): * UserInterface/Views/CallFrameView.css: (.call-frame.blackboxed > .title, .call-frame.blackboxed:not(:hover, :focus) > .subtitle): Added. Add a constructor option to control whether blackboxed frames are indicated visually. 2019-12-03 Devin Rousso Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'navigationItem.parentNavigationBar') https://bugs.webkit.org/show_bug.cgi?id=204830 Reviewed by Timothy Hatcher. * UserInterface/Controllers/CSSManager.js: (WI.CSSManager.prototype._mainResourceDidChange): When the main resource changes, make sure to clear the `_forcedAppearance` member variable. This way, when the main `WI.DOMTreeContentView` reloads, it isn't left in an unknown state. * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView): (WI.DOMTreeContentView.prototype._defaultAppearanceDidChange): (WI.DOMTreeContentView.prototype._toggleAppearance): Always create the Force Appearance navigation item, rather than destroying and recreating it each time the page navigates. Instead, just update the tooltip (which was all that really changed) whenever the default appearance changes. Depending on the timing of events during a page navigation, `_forceAppearanceButtonNavigationItem` could be `null`. * UserInterface/Views/ActivateButtonNavigationItem.js: (WI.ActivateButtonNavigationItem.prototype.set defaultToolTip): Added. (WI.ActivateButtonNavigationItem.prototype.set activatedToolTip): Added. Allow the various tooltips to be updated after creation. 2019-12-03 Devin Rousso Web Inspector: Timelines: stopping time marker is permanently removed when the current recording is cleared https://bugs.webkit.org/show_bug.cgi?id=204827 Reviewed by Timothy Hatcher. * UserInterface/Views/TimelineOverview.js: (WI.TimelineOverview.prototype._recordingReset): Re-add the marker (and ensure that it's hidden) when the active recording is reset. 2019-12-02 Nikita Vasilyev Web Inspector: Provide UI to convert between sRGB and p3 color spaces https://bugs.webkit.org/show_bug.cgi?id=203534 Reviewed by Devin Rousso. Add context menus: - "Convert to sRGB" and "Clamp to sRGB" for p3 colors, such as `color(display-p3 0 1 0)`. - "Convert to Display-P3" for sRGB colors, such as `rgb(0, 255, 0)`. Shift-clicking the color swatch of sRGB colors now goes through the color function syntax as well. Shift-clicking the color swatch of Display-P3 colors converts the color to sRGB when it can be lossless. When the convertion cannot be lossless, Web Inspector beeps. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Utilities.js: * UserInterface/Models/Color.js: (WI.Color): Introduce `_normalizedRGB` property, which stores rgb values from 0 to 1. Previously, `_rgba` stored values from 0 to 1 for color function format, and from 0 to 255 otherwise. That required format checks before every `rgb` value access and resulted in silent errors when the values were in the wrong format. Store alpha as a separate property to simplify format conversion. Previously, alpha was duplicated between `_rgba` and `_hsla`. (WI.Color.displayP3toSRGB): (WI.Color.srgbToDisplayP3): Added. (WI.Color.prototype.nextFormat): (WI.Color.prototype.get rgb): (WI.Color.prototype.get hsl): (WI.Color.prototype.get normalizedRGB): (WI.Color.prototype.get rgba): (WI.Color.prototype.get hsla): (WI.Color.prototype.get normalizedRGBA): (WI.Color.prototype.get gamut): (WI.Color.prototype.set gamut): (WI.Color.prototype.copy): (WI.Color.prototype.isKeyword): (WI.Color.prototype.isOutsideSRGB): Added. (WI.Color.prototype.canBeSerializedAsShortHEX): (WI.Color.prototype._toKeywordString): (WI.Color.prototype._toShortHEXString): (WI.Color.prototype._toHEXString): (WI.Color.prototype._toShortHEXAlphaString): (WI.Color.prototype._toHEXAlphaString): (WI.Color.prototype._toRGBString): (WI.Color.prototype._toRGBAString): (WI.Color.prototype._toFunctionString): Limit the values to 4 decimals. (WI.Color.prototype._toHSLString): (WI.Color.prototype._toHSLAString): (WI.Color.prototype._hslToRGB): * UserInterface/Views/ColorPicker.js: (WI.ColorPicker.prototype._updateColor): (WI.ColorPicker.prototype._updateOpacitySlider): * UserInterface/Views/ColorSquare.css: (.color-square > .svg-root): (.color-square > .svg-root > .srgb-edge): (.color-square > .srgb-label): (.color-square > .srgb-label:hover): (.color-square > .srgb-label:hover + .svg-root > .srgb-edge): (@media (-webkit-device-pixel-ratio: 1)): (.color-square > .srgb-edge): * UserInterface/Views/ColorSquare.js: (WI.ColorSquare.prototype.set tintedColor): (WI.ColorSquare.prototype._drawSRGBOutline): (WI.ColorSquare): * UserInterface/Views/InlineSwatch.js: (WI.InlineSwatch): (WI.InlineSwatch.prototype._updateSwatch): (WI.InlineSwatch.prototype._allowShiftClickColor): Added. (WI.InlineSwatch.prototype._handleContextMenuEvent): 2019-12-02 Devin Rousso Web Inspector: Console: the saved result value is still shown after page reload https://bugs.webkit.org/show_bug.cgi?id=204532 Reviewed by Brian Burg. Add additional plumbing to remove any `.console-saved-variable` elements whenever a new session is created, as well as reset the base of the property path to `this`. * UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype._sessionStarted): (WI.LogContentView.prototype._logCleared): * UserInterface/Views/ConsoleMessageView.js: (WI.ConsoleMessageView.prototype.clearSavedVariableState): Added. (WI.ConsoleMessageView.prototype.removeEventListeners): Deleted. * UserInterface/Views/ObjectTreeView.js: (WI.ObjectTreeView.prototype.resetPropertyPath): Added. 2019-11-22 Devin Rousso Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'target.PageAgent.getCompositingBordersVisible') https://bugs.webkit.org/show_bug.cgi?id=204473 Reviewed by Brian Burg. Change the definition of `WI.targetsAvailable` and `WI.whenTargetsAvailable` to instead resolve based on when a page target is created, not the backend target, as the latter can be a multiplexing target which only has a `Target` domain. * UserInterface/Controllers/TargetManager.js: (WI.TargetManager.prototype._initializeBackendTarget): (WI.TargetManager.prototype._initializePageTarget): * UserInterface/Base/Main.js: (WI.loaded): (WI.contentLoaded): (WI.targetsAvailable): (WI.whenTargetsAvailable): * UserInterface/Test/Test.js: (WI.loaded): (WI.contentLoaded): (WI.targetsAvailable): (WI.whenTargetsAvailable): * UserInterface/Views/SearchSidebarPanel.js: (WI.SearchSidebarPanel.prototype.performSearch): Only wait for targets if inspecting a web debuggable, as non-web debuggables don't have a different page target vs the backend target (which is guaranteed to exist anyways). 2019-11-22 Devin Rousso Web Inspector: REGRESSION(r251227): dashboard no longer shows page weight https://bugs.webkit.org/show_bug.cgi?id=204528 Reviewed by Brian Burg. `WI.contentLoaded` adds the debuggable type as a class to the ``. In r251227, the "web" debuggable type was split into "page" and "web-page". Update the few selectors that used the debuggable type to show/hide parts of the UI. * UserInterface/Views/DashboardContainerView.css: (body:matches(.page, .web-page) .toolbar .dashboard-container): Added. (body:not(.page, .web-page) .toolbar .dashboard-container): Added. (body.web .toolbar .dashboard-container): Deleted. (body:not(.web) .toolbar .dashboard-container): Deleted. * UserInterface/Views/DefaultDashboardView.css: (body:matches(.page, .web-page) .toolbar.collapsed .dashboard.default > :matches(.resourcesSize, .time, .logs)): Added. (body:not(.page, .web-page) .toolbar .dashboard.default > :matches(.resourcesCount, .resourcesSize, .time)): Added. (body.web .toolbar.collapsed .dashboard.default > :matches(.resourcesSize, .time, .logs)): Deleted. (body:not(.web) .toolbar .dashboard.default > :matches(.resourcesCount, .resourcesSize, .time)): Deleted. 2019-11-20 Brian Burg Web Inspector: add support for new kinds of diagnostic events https://bugs.webkit.org/show_bug.cgi?id=204430 Reviewed by Devin Rousso. This patch restructures the existing DiagnosticController to support multiple self-contained event recorders. The first such recorder is for the TabActivity diagnostic event. More will be added later. Add two engineering settings: one which auto-logs diagnostic events to Inspector^2 console, and another which forces DiagnosticController to be active or inactive regardless of whether a diagnostic logging delegate is actually installed. This is for manual testing. This patch does not introduce any functionality changes to diagnostic event collection. The TabActivityDiagnosticeventRecorder still needs some changes for it to sample correctly. New Test: inspector/unit-tests/diagnostic-controller.html * UserInterface/Base/Main.js: (WI.contentLoaded): * UserInterface/Controllers/DiagnosticController.js: (WI.DiagnosticController): (WI.DiagnosticController.prototype.set diagnosticLoggingAvailable): (WI.DiagnosticController.prototype.addRecorder): (WI.DiagnosticController.prototype.logDiagnosticEvent): (WI.DiagnosticController.prototype._debugEnableDiagnosticLoggingSettingDidChange): (WI.DiagnosticController.prototype._debugAutoLogDiagnosticEventsSettingDidChange): (WI.DiagnosticController.prototype._updateRecorderStates): (WI.DiagnosticController.supportsDiagnosticLogging): Deleted. (WI.DiagnosticController.prototype.logDiagnosticMessage): Deleted. (WI.DiagnosticController.prototype._didInteractWithTabContent): Deleted. (WI.DiagnosticController.prototype._clearTabActivityTimeout): Deleted. (WI.DiagnosticController.prototype._beginTabActivityTimeout): Deleted. (WI.DiagnosticController.prototype._stopTrackingTabActivity): Deleted. (WI.DiagnosticController.prototype._handleWindowFocus): Deleted. (WI.DiagnosticController.prototype._handleWindowBlur): Deleted. (WI.DiagnosticController.prototype._handleWindowKeyDown): Deleted. (WI.DiagnosticController.prototype._handleWindowMouseDown): Deleted. (WI.DiagnosticController.prototype._handleTabBrowserSelectedTabContentViewDidChange): Deleted. Restructure DiagnosticController to be dumber. It holds on to a list of recorders and turns them on and off. All event logging goes through one funnel method, which does not use InspectorFrontendHost at all when running a Web Inspector layout test. * UserInterface/Controllers/DiagnosticEventRecorder.js: Added. (WI.DiagnosticEventRecorder): (WI.DiagnosticEventRecorder.prototype.get name): (WI.DiagnosticEventRecorder.prototype.get active): (WI.DiagnosticEventRecorder.prototype.set active): (WI.DiagnosticEventRecorder.prototype.setup): (WI.DiagnosticEventRecorder.prototype.teardown): Add base class for all individual diagnostic event recorders. * UserInterface/Controllers/TabActivityDiagnosticEventRecorder.js: Copied from Source/WebInspectorUI/UserInterface/Controllers/DiagnosticController.js. (WI.TabActivityDiagnosticEventRecorder): (WI.TabActivityDiagnosticEventRecorder.prototype.setup): (WI.TabActivityDiagnosticEventRecorder.prototype.teardown): (WI.TabActivityDiagnosticEventRecorder.prototype.handleEvent): (WI.TabActivityDiagnosticEventRecorder.prototype._didInteractWithTabContent): (WI.TabActivityDiagnosticEventRecorder.prototype._clearTabActivityTimeout): (WI.TabActivityDiagnosticEventRecorder.prototype._beginTabActivityTimeout): (WI.TabActivityDiagnosticEventRecorder.prototype._stopTrackingTabActivity): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowFocus): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowBlur): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowKeyDown): (WI.TabActivityDiagnosticEventRecorder.prototype._handleWindowMouseDown): (WI.TabActivityDiagnosticEventRecorder.prototype._handleTabBrowserSelectedTabContentViewDidChange): Move all user activity tracking to here. Restructure so that the recorder can be turned on and off (this adds/removes its listeners and timers). * UserInterface/Main.html: Add new files. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.setDiagnosticLoggingAvailable): Adjust the name, as WI.diagnosticController is no longer underscore-prefixed. * UserInterface/Base/Setting.js: Add new settings. Add getter 'valueRespectingDebugUIAvailability' which only returns default values for Debug/Engineering settings if DebugUI is not enabled. * UserInterface/Views/SettingsTabContentView.js: (WI.SettingsTabContentView.prototype._createDebugSettingsView): Add new settings to Settings Tab UI. 2019-11-21 Nikita Vasilyev Web Inspector: Outline sRGB-safe areas on P3 color picker https://bugs.webkit.org/show_bug.cgi?id=203533 Reviewed by Brian Burg. Visualize the edge of sRGB gamut as a white line. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Models/Color.js: (WI.Color.displayP3toSRGB.multiplyMatrixByVector): (WI.Color.displayP3toSRGB): (WI.Color._toLinearLight): (WI.Color._gammaCorrect): Use equations from CSS Color Module Level 4. * UserInterface/Views/ColorSquare.css: (.color-square): (.color-square > .crosshair): Place the crosshair above the sRGB edge line. (.color-square .svg-root): (.color-square .srgb-edge): (.color-square .srgb-label): (.color-square .srgb-label:hover): (.color-square .srgb-label:hover + .svg-root > .srgb-edge): (@media (-webkit-device-pixel-ratio: 1)): Make the optical weight of the line on non-retina screens the same as on retina screens. * UserInterface/Views/ColorSquare.js: (WI.ColorSquare): (WI.ColorSquare.prototype.set tintedColor): (WI.ColorSquare.prototype._updateBaseColor): (WI.ColorSquare.prototype._drawSRGBOutline): 2019-11-21 Devin Rousso Web Inspector: call frames from blackboxed scripts should be visually distinct https://bugs.webkit.org/show_bug.cgi?id=204424 Reviewed by Timothy Hatcher. Seeing "Deferred pause from blackboxed script" in the Pause Reason does indicate that something in the Call Stack was blackboxed, but it doesn't clarify what was blackboxed. Given that the debugger effectively ignores blackboxed scripts, we should distinguish call frames that were ignored so that it's clear how the current pause location was reached. * UserInterface/Views/CallFrameTreeElement.js: (WI.CallFrameTreeElement): (WI.CallFrameTreeElement.prototype.onattach): * UserInterface/Views/CallFrameTreeElement.css: (.tree-outline .item.call-frame.blackboxed:not(.selected)): Added. Make blackboxed call frames 50% opaque when not selected. Add additional explanatory text to the end of the tooltip when hovering blackboxed call frame tree elements. * UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): * UserInterface/Views/SourceCodeTreeElement.js: (WI.SourceCodeTreeElement.prototype._updateToggleBlackboxImageElementState): Update tooltip/contextmenu text to include "blacboxing" so functionality is clearer. * UserInterface/Models/SourceCodeLocation.js: (WI.SourceCodeLocation.prototype.populateLiveDisplayLocationTooltip): Allow a suffix to be added to the end of the live location. * Localizations/en.lproj/localizedStrings.js: 2019-11-20 Yury Semikhatsky Web Inspector: REGRESSION(r250618): main resource view is empty when pausing on inline 'debugger' statement https://bugs.webkit.org/show_bug.cgi?id=204086 Reviewed by Devin Rousso. SourceCodeRevision.currentRevision doesn't create new revisions under the hood anymore. This allows to avoid undesirable side effects when e.g. text editor tries to read current content of the SourceCode which results in a new revision (with empty content). New method editableRevision is introduced for applying changes to the resource while keeping original content revision intact. * UserInterface/Controllers/CSSManager.js: (WI.CSSManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound): (WI.CSSManager.prototype._resourceContentDidChange.applyStyleSheetChanges): (WI.CSSManager.prototype._resourceContentDidChange): (WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent): * UserInterface/Models/SourceCode.js: (WI.SourceCode.prototype.get currentRevision): (WI.SourceCode.prototype.get editableRevision): (WI.SourceCode.prototype.get content): (WI.SourceCode.prototype.revisionContentDidChange): * UserInterface/Views/FontResourceContentView.js: (WI.FontResourceContentView.prototype.dropZoneHandleDrop): * UserInterface/Views/ImageResourceContentView.js: (WI.ImageResourceContentView.prototype.dropZoneHandleDrop): * UserInterface/Views/ResourceContentView.js: (WI.ResourceContentView.prototype._contentAvailable): (WI.ResourceContentView.prototype._handleImportLocalResourceOverride): * UserInterface/Views/ScriptContentView.js: (WI.ScriptContentView.prototype._handleTextEditorContentDidChange): * UserInterface/Views/TextResourceContentView.js: (WI.TextResourceContentView.prototype._textEditorContentDidChange): 2019-11-19 Devin Rousso Web Inspector: Local Overrides: the placeholder for the MIME type, status code, and status text is the same as the placeholder URL https://bugs.webkit.org/show_bug.cgi?id=204330 Reviewed by Joseph Pecoraro. * UserInterface/Views/LocalResourceOverridePopover.js: (WI.LocalResourceOverridePopover.prototype.get serializedData): (WI.LocalResourceOverridePopover.prototype.show): (WI.LocalResourceOverridePopover.prototype._createEditor): * UserInterface/Views/LocalResourceOverridePopover.css: (.popover .local-resource-override-popover-content .data-grid tr.header-content-type > :matches(.name-column, .value-column)): Added. Replace the hardcoded `placeholder` with an optional `options` object that can include a `placeholder` value, allowing each caller to customize what is shown. Disallow selecting the "Content-Type" header since it's automatically populated, even if there is no set value for the MIME type or URL (e.g. inferred from placeholders). Drive-by: if a `CodeMirror` has no value, attempt to use it's placeholder instead. Drive-by: replace generic `dataGrid` with more specific `this._headersDataGrid`, which is more clear given how many `WI.DataGrid` are created by this class. * UserInterface/Views/DataGridNode.js: (WI.DataGridNode.prototype.get selectable): (WI.PlaceholderDataGridNode): * UserInterface/Views/DataGrid.js: (WI.DataGrid.createSortableDataGrid): * UserInterface/Views/DOMStorageContentView.js: (WI.DOMStorageContentView.prototype.itemAdded): (WI.DOMStorageContentView.prototype._populate): * UserInterface/Views/EditableDataGridNode.js: (WI.EditableDataGridNode): Deleted. * UserInterface/Views/HeapSnapshotClassDataGridNode.js: (WI.HeapSnapshotClassDataGridNode): * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js: (WI.HeapSnapshotInstanceDataGridNode): * UserInterface/Views/HeapSnapshotInstanceFetchMoreDataGridNode.js: (WI.HeapSnapshotInstanceFetchMoreDataGridNode): * UserInterface/Views/ProfileDataGridNode.js: (WI.ProfileDataGridNode): * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): (WI.RecordingStateDetailsSidebarPanel): * UserInterface/Views/ResourceDetailsSidebarPanel.js: (WI.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.addDataGridNode): * UserInterface/Views/TimelineDataGridNode.js: (WI.TimelineDataGridNode): Rework constructor of `WI.DataGridNode` to accept an `options`-style object as its second parameter, instead of separate parameters for each configurable property. Now that this is able to be done via a single parameter, add support for marking a `WI.DataGridNode` as not being selectable. 2019-11-19 Brian Burg [Cocoa] Add _WKInspector SPI to set diagnostic logging delegate for a local Web Inspector https://bugs.webkit.org/show_bug.cgi?id=204323 Reviewed by Devin Rousso. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.setDiagnosticLoggingAvailable): Add a stub FrontendAPI method to be filled in later. 2019-11-18 Devin Rousso Web Inspector: Elements: copying multiple DOM nodes should copy more than just the last selected node https://bugs.webkit.org/show_bug.cgi?id=204266 Reviewed by Brian Burg. * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView.prototype.async handleCopyEvent): Added. (WI.DOMTreeContentView.prototype.handleCopyEvent): Deleted. Call `DOM.getOuterHTML` for each selected DOM node and join the results with newlines. * UserInterface/Models/DOMNode.js: (WI.DOMNode.prototype.getOuterHTML): (WI.DOMNode.prototype.copyNode): Deleted. (WI.DOMNode.prototype.copyNode.copy): Deleted. * UserInterface/Views/DOMTreeElement.js: (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu): (WI.DOMTreeElement.prototype._copyHTML): Deleted. Simplify API surface. 2019-11-18 Devin Rousso Web Inspector: Local Resource Overrides: allow substitution based on a url pattern https://bugs.webkit.org/show_bug.cgi?id=202375 Reviewed by Brian Burg. Often, websites will load content with a timestamp-based URL query parameter for cache-busting or logging purposes. If a developer is trying to override these resources (or is trying to have an existing override also match these resources), they'd need to edit the local override's URL to match in addition to editing the resource that loads it (e.g. change the