blob: e36c466fb5265292f6cc4a7421feeb7cd3ab94bf [file] [log] [blame]
2020-11-21 Brian Burg <bburg@apple.com>
Web Inspector: implement Multimap.prototype.take()
https://bugs.webkit.org/show_bug.cgi?id=219231
Reviewed by Devin Rousso.
* UserInterface/Base/Multimap.js:
(Multimap.prototype.take):
* UserInterface/Base/Utilities.js:
(value):
2020-11-20 Devin Rousso <drousso@apple.com>
Web Inspector: drop `shown`/`hidden` in favor of `attached`/`detached`
https://bugs.webkit.org/show_bug.cgi?id=218678
Reviewed by Brian Burg.
* UserInterface/Views/View.js:
(WI.View.prototype.removeSubview):
Ensure that `detached` is called before the node is removed from the DOM so that any state
currently held in the DOM can be recorded (e.g. scroll position).
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype.attached):
(WI.ContentBrowserTabContentView.prototype.showNavigationSidebarPanel):
(WI.ContentBrowserTabContentView.prototype.showDetailsSidebarPanels):
(WI.ContentBrowserTabContentView.prototype._navigationSidebarCollapsedStateDidChange):
(WI.ContentBrowserTabContentView.prototype._detailsSidebarCollapsedStateDidChange):
(WI.ContentBrowserTabContentView.prototype._detailsSidebarPanelSelected):
(WI.ContentBrowserTabContentView.prototype.shown): Deleted.
(WI.ContentBrowserTabContentView.prototype.hidden): Deleted.
* UserInterface/Views/SingleSidebar.js:
(WI.SingleSidebar.prototype.willSetSelectedSidebarPanel):
(WI.SingleSidebar.prototype.didSetSelectedSidebarPanel):
(WI.SingleSidebar.prototype.didSetCollapsed):
Ensure that any state modifications happen before adding/removing the selected sidebar panel
to/from the DOM so that it (and the previously selected sidebar panel) doesn't re-`layout`
multiple times.
* UserInterface/Views/ConsoleDrawer.js:
(WI.ConsoleDrawer.prototype.set collapsed):
(WI.ConsoleDrawer.prototype.attached): Added.
(WI.ConsoleDrawer.prototype.shown): Deleted.
Add special logic in `collapsed` since this is never removed from the DOM.
* UserInterface/Views/ConsoleTabContentView.js:
(WI.ConsoleTabContentView):
(WI.ConsoleTabContentView.prototype.attached): Added.
(WI.ConsoleTabContentView.prototype.detached): Added.
(WI.ConsoleTabContentView.prototype.shown): Deleted.
Remember whether the split console was expanded before the Console Tab is shown and restore
that state after the Console Tab is hidden.
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview.prototype.get height):
(WI.TimelineOverview.prototype.attached):
(WI.TimelineOverview.prototype.detached):
(WI.TimelineOverview.prototype.recordWasFiltered):
(WI.TimelineOverview.prototype.selectRecord):
(WI.TimelineOverview.prototype.updateLayoutIfNeeded):
(WI.TimelineOverview.prototype.layout):
(WI.TimelineOverview.prototype._instrumentAdded):
(WI.TimelineOverview.prototype._timelineRulerMouseClicked):
(WI.TimelineOverview.prototype._viewModeDidChange):
(WI.TimelineOverview.prototype.get visible): Deleted.
(WI.TimelineOverview.prototype.shown): Deleted.
(WI.TimelineOverview.prototype.hidden): Deleted.
* UserInterface/Views/TimelineOverviewGraph.js:
(WI.TimelineOverviewGraph):
(WI.TimelineOverviewGraph.prototype.get hidden):
(WI.TimelineOverviewGraph.prototype.set hidden):
(WI.TimelineOverviewGraph.prototype.needsLayout):
(WI.TimelineOverviewGraph.prototype.get visible): Deleted.
(WI.TimelineOverviewGraph.prototype.shown): Deleted.
(WI.TimelineOverviewGraph.prototype.hidden): Deleted.
* UserInterface/Views/CPUTimelineOverviewGraph.js:
(WI.CPUTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
(WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/LayoutTimelineOverviewGraph.js:
(WI.LayoutTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/MediaTimelineOverviewGraph.js:
(WI.MediaTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WI.MemoryTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
(WI.NetworkTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WI.RenderingFrameTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WI.ScriptTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/TimelineView.js:
(WI.TimelineView.prototype.needsLayout): Deleted.
Add a special `hidden` instead of the previously inherited `visible` so that the existing
logic for editing timeline instruments stays (mostly) the same.
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WI.ApplicationCacheFrameContentView):
(WI.ApplicationCacheFrameContentView.prototype.attached):
(WI.ApplicationCacheFrameContentView.prototype.detached):
(WI.ApplicationCacheFrameContentView.prototype.layout):
(WI.ApplicationCacheFrameContentView.prototype.updateStatus):
(WI.ApplicationCacheFrameContentView.prototype.shown): Deleted.
(WI.ApplicationCacheFrameContentView.prototype.closed): Deleted.
(WI.ApplicationCacheFrameContentView.prototype._maybeUpdate): Deleted.
(WI.ApplicationCacheFrameContentView.prototype._markDirty): Deleted.
(WI.ApplicationCacheFrameContentView.prototype._updateStatus): Deleted.
(WI.ApplicationCacheFrameContentView.prototype._update): Deleted.
No need to maintain a separate "dirty" flag based on visibility since `attached`/`detached`
are called whenever the view is added/removed to/from the DOM.
* UserInterface/Debug/DebugContentView.js:
(WI.DebugContentView.prototype.attached): Added.
(WI.DebugContentView.prototype.detached): Added.
(WI.DebugContentView.prototype.shown): Deleted.
(WI.DebugContentView.prototype.hidden): Deleted.
* UserInterface/Views/AnimationDetailsSidebarPanel.js:
(WI.AnimationDetailsSidebarPanel.prototype.attached): Added.
(WI.AnimationDetailsSidebarPanel.prototype.shown): Deleted.
* UserInterface/Views/AuditTabContentView.js:
(WI.AuditTabContentView.prototype.attached): Added.
(WI.AuditTabContentView.prototype.detached): Added.
(WI.AuditTabContentView.prototype.shown): Deleted.
(WI.AuditTabContentView.prototype.hidden): Deleted.
* UserInterface/Views/AuditTestContentView.js:
(WI.AuditTestContentView.prototype.attached): Added.
(WI.AuditTestContentView.prototype.detached): Added.
(WI.AuditTestContentView.prototype.shown): Deleted.
(WI.AuditTestContentView.prototype.hidden): Deleted.
* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype.attached): Added.
(WI.CPUTimelineView.prototype.shown): Deleted.
* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype.attached): Added.
(WI.CanvasSidebarPanel.prototype.detached): Added.
(WI.CanvasSidebarPanel.prototype.shown): Deleted.
(WI.CanvasSidebarPanel.prototype.hidden): Deleted.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype.attached):
(WI.DOMTreeContentView.prototype.detached):
(WI.DOMTreeContentView.prototype.shown): Deleted.
(WI.DOMTreeContentView.prototype.hidden): Deleted.
* UserInterface/Views/ElementsTabContentView.js:
(WI.ElementsTabContentView.prototype.attached):
(WI.ElementsTabContentView.prototype.shown): Deleted.
* UserInterface/Views/FontResourceContentView.js:
(WI.FontResourceContentView.prototype.attached):
(WI.FontResourceContentView.prototype.detached):
(WI.FontResourceContentView.prototype.shown): Deleted.
(WI.FontResourceContentView.prototype.hidden): Deleted.
* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WI.HeapSnapshotClusterContentView.prototype.attached): Added.
(WI.HeapSnapshotClusterContentView.prototype.shown): Deleted.
* UserInterface/Views/HeapSnapshotContentView.js:
(WI.HeapSnapshotContentView.prototype.attached): Added.
(WI.HeapSnapshotContentView.prototype.detached): Added.
(WI.HeapSnapshotContentView.prototype.shown): Deleted.
(WI.HeapSnapshotContentView.prototype.hidden): Deleted.
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView.prototype.attached): Added.
(WI.ImageResourceContentView.prototype.detached): Added.
(WI.ImageResourceContentView.prototype.shown): Deleted.
(WI.ImageResourceContentView.prototype.hidden): Deleted.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WI.LayerTreeDetailsSidebarPanel.prototype.attached):
(WI.LayerTreeDetailsSidebarPanel.prototype.detached): Added.
(WI.LayerTreeDetailsSidebarPanel.prototype.shown): Deleted.
(WI.LayerTreeDetailsSidebarPanel.prototype.hidden): Deleted.
* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView.prototype.attached): Added.
(WI.Layers3DContentView.prototype.detached): Added.
(WI.Layers3DContentView.prototype.shown): Deleted.
(WI.Layers3DContentView.prototype.hidden): Deleted.
* UserInterface/Views/LayersTabContentView.js:
(WI.LayersTabContentView.prototype.attached): Added.
(WI.LayersTabContentView.prototype.shown): Deleted.
* UserInterface/Views/LayoutTimelineView.js:
(WI.LayoutTimelineView.prototype.attached): Added.
(WI.LayoutTimelineView.prototype.detached): Added.
(WI.LayoutTimelineView.prototype.shown): Deleted.
(WI.LayoutTimelineView.prototype.hidden): Deleted.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.attached): Added.
(WI.LogContentView.prototype.showCustomFindBanner):
(WI.LogContentView.prototype.get supportsSave):
(WI.LogContentView.prototype.shown): Deleted.
* UserInterface/Views/MemoryTimelineView.js:
(WI.MemoryTimelineView.prototype.attached): Added.
(WI.MemoryTimelineView.prototype.shown): Deleted.
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.attached): Added.
(WI.NavigationSidebarPanel.prototype.shown): Deleted.
* UserInterface/Views/NetworkDetailView.js:
(WI.NetworkDetailView.prototype.attached): Added.
(WI.NetworkDetailView.prototype.shown): Deleted.
(WI.NetworkDetailView.prototype.hidden): Deleted.
* UserInterface/Views/NetworkResourceDetailView.js:
(WI.NetworkResourceDetailView.prototype.attached): Added.
(WI.NetworkResourceDetailView.prototype.shown): Deleted.
* UserInterface/Views/OverviewTimelineView.js:
(WI.OverviewTimelineView.prototype.attached): Added.
(WI.OverviewTimelineView.prototype.shown): Deleted.
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView.prototype.attached): Added.
(WI.RecordingContentView.prototype.detached): Added.
(WI.RecordingContentView.prototype.shown): Deleted.
(WI.RecordingContentView.prototype.hidden): Deleted.
* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype.attached): Added.
(WI.ResourceClusterContentView.prototype.shown): Deleted.
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype.detached): Added.
(WI.ResourceHeadersContentView.prototype.hidden): Deleted.
* UserInterface/Views/SearchTabContentView.js:
(WI.SearchTabContentView.prototype.attached): Added.
(WI.SearchTabContentView.prototype.shown): Deleted.
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView.prototype.attached): Added.
(WI.ShaderProgramContentView.prototype.shown): Deleted.
(WI.ShaderProgramContentView.prototype.hidden): Deleted.
* UserInterface/Views/SidebarPanel.js:
(WI.SidebarPanel.prototype.attached): Added.
(WI.SidebarPanel.prototype.detached): Added.
(WI.SidebarPanel.prototype.shown): Deleted.
(WI.SidebarPanel.prototype.hidden): Deleted.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.attached): Added.
(WI.SourceCodeTextEditor.prototype.detached): Added.
(WI.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
(WI.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
(WI.SourceCodeTextEditor.prototype.shown): Deleted.
(WI.SourceCodeTextEditor.prototype.hidden): Deleted.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden): Deleted.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.detached):
(WI.SpreadsheetStyleProperty.prototype.hidden): Deleted.
* UserInterface/Views/StyleDetailsPanel.js:
(WI.StyleDetailsPanel):
(WI.StyleDetailsPanel.prototype.attached):
(WI.StyleDetailsPanel.prototype.markAsNeedsRefresh):
(WI.StyleDetailsPanel.prototype.nodeStylesRefreshed):
(WI.StyleDetailsPanel.prototype._nodeStylesNeedsRefreshed):
(WI.StyleDetailsPanel.prototype.shown): Deleted.
(WI.StyleDetailsPanel.prototype.hidden): Deleted.
* UserInterface/Views/TabContentView.js:
(WI.TabContentView.prototype.attached): Added.
(WI.TabContentView.prototype.restoreStateFromCookie):
(WI.TabContentView.prototype.shown): Deleted.
* UserInterface/Views/Table.js:
(WI.Table.prototype.attached): Added.
(WI.Table.prototype.restoreScrollPosition): Deleted.
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype.attached): Added.
(WI.TextEditor.prototype.layout):
(WI.TextEditor.prototype._revealPendingPositionIfPossible):
(WI.TextEditor.prototype.get visible): Deleted.
(WI.TextEditor.prototype.shown): Deleted.
(WI.TextEditor.prototype.hidden): Deleted.
* UserInterface/Views/TimelineDataGrid.js:
(WI.TimelineDataGrid.prototype.detached): Added.
(WI.TimelineDataGrid.prototype.shown): Deleted.
(WI.TimelineDataGrid.prototype.hidden): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype.attached): Added.
(WI.TimelineRecordingContentView.prototype.detached): Added.
(WI.TimelineRecordingContentView.prototype.initialLayout): Added.
(WI.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WI.TimelineRecordingContentView.prototype._update):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewRecordSelected):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerShow):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewScannerHide):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewNeedsEntireSelectedRange):
(WI.TimelineRecordingContentView.prototype.shown): Deleted.
(WI.TimelineRecordingContentView.prototype.hidden): Deleted.
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.prototype.attached): Added.
(WI.TimelineTabContentView.prototype.detached): Added.
(WI.TimelineTabContentView.prototype._inspectorVisibilityChanged):
(WI.TimelineTabContentView.prototype.shown): Deleted.
(WI.TimelineTabContentView.prototype.hidden): Deleted.
* UserInterface/Views/WebSocketContentView.js:
(WI.WebSocketContentView.prototype.attached): Added.
(WI.WebSocketContentView.prototype.detached): Added.
(WI.WebSocketContentView.prototype.shown): Deleted.
(WI.WebSocketContentView.prototype.hidden): Deleted.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WI.JavaScriptLogViewController.prototype._appendConsoleMessageView):
Move logic inside `shown`/`hidden` to `attached`/`detached`.
Use `isAttached` instead of `visible`.
* UserInterface/Models/BackForwardEntry.js:
(WI.BackForwardEntry.prototype.prepareToShow):
(WI.BackForwardEntry.prototype.prepareToHide):
* UserInterface/Views/AuditTestGroupContentView.js:
(WI.AuditTestGroupContentView.prototype.attached): Added.
(WI.AuditTestGroupContentView.prototype.detached): Added.
(WI.AuditTestGroupContentView.prototype._addTest):
(WI.AuditTestGroupContentView.prototype._handleTestGroupTestRemoved):
(WI.AuditTestGroupContentView.prototype.shown): Deleted.
(WI.AuditTestGroupContentView.prototype.hidden): Deleted.
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
(WI.ChangesDetailsSidebarPanel.prototype.shown): Deleted.
* UserInterface/Views/ClusterContentView.js:
(WI.ClusterContentView.prototype.shown): Deleted.
(WI.ClusterContentView.prototype.hidden): Deleted.
* UserInterface/Views/CollectionContentView.js:
(WI.CollectionContentView.prototype.addContentViewForItem):
(WI.CollectionContentView.prototype.removeContentViewForItem):
(WI.CollectionContentView.prototype.shown): Deleted.
(WI.CollectionContentView.prototype.hidden): Deleted.
* UserInterface/Views/ComputedStyleSection.js:
(WI.ComputedStyleSection.prototype.hidden): Deleted.
* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser.prototype.attached): Added.
(WI.ContentBrowser.prototype.shown): Deleted.
(WI.ContentBrowser.prototype.hidden): Deleted.
* UserInterface/Views/ContentView.js:
(WI.ContentView.prototype.get visible): Deleted.
(WI.ContentView.prototype.set visible): Deleted.
(WI.ContentView.prototype.shown): Deleted.
(WI.ContentView.prototype.hidden): Deleted.
* UserInterface/Views/ContentViewContainer.js:
(WI.ContentViewContainer.prototype.showContentView):
(WI.ContentViewContainer.prototype.showBackForwardEntryForIndex):
(WI.ContentViewContainer.prototype.replaceContentView):
(WI.ContentViewContainer.prototype.closeContentView):
(WI.ContentViewContainer.prototype.attached): Added.
(WI.ContentViewContainer.prototype.detached): Added.
(WI.ContentViewContainer.prototype._disassociateFromContentView):
(WI.ContentViewContainer.prototype._showEntry):
(WI.ContentViewContainer.prototype.shown): Deleted.
(WI.ContentViewContainer.prototype.hidden): Deleted.
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.get minimumWidth):
(WI.GeneralStyleDetailsSidebarPanel.prototype.attached): Added.
(WI.GeneralStyleDetailsSidebarPanel.prototype._showPanel):
(WI.GeneralStyleDetailsSidebarPanel.prototype.hidden): Deleted.
(WI.GeneralStyleDetailsSidebarPanel.prototype.shown): Deleted.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
(WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
(WI.HeapAllocationsTimelineView.prototype.shown): Deleted.
(WI.HeapAllocationsTimelineView.prototype.hidden): Deleted.
* UserInterface/Views/MediaTimelineView.js:
(WI.MediaTimelineView.prototype.shown): Deleted.
(WI.MediaTimelineView.prototype.hidden): Deleted.
* UserInterface/Views/NetworkTabContentView.js:
(WI.NetworkTabContentView.prototype.shown): Deleted.
(WI.NetworkTabContentView.prototype.hidden): Deleted.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype.detached): Added.
(WI.NetworkTableContentView.prototype._hideDetailView):
(WI.NetworkTableContentView.prototype._showDetailView):
(WI.NetworkTableContentView.prototype.shown): Deleted.
(WI.NetworkTableContentView.prototype.hidden): Deleted.
* UserInterface/Views/NetworkTimelineView.js:
(WI.NetworkTimelineView.prototype.shown): Deleted.
(WI.NetworkTimelineView.prototype.hidden): Deleted.
* UserInterface/Views/RenderingFrameTimelineView.js:
(WI.RenderingFrameTimelineView.prototype.shown): Deleted.
(WI.RenderingFrameTimelineView.prototype.hidden): Deleted.
* UserInterface/Views/ScriptContentView.js:
(WI.ScriptContentView.prototype.shown): Deleted.
(WI.ScriptContentView.prototype.hidden): Deleted.
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WI.ScriptDetailsTimelineView.prototype.shown): Deleted.
(WI.ScriptDetailsTimelineView.prototype.hidden): Deleted.
* UserInterface/Views/Sidebar.js:
(WI.Sidebar.prototype.set collapsed):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden): Deleted.
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden): Deleted.
* UserInterface/Views/TextContentView.js:
(WI.TextContentView.prototype.shown): Deleted.
(WI.TextContentView.prototype.hidden): Deleted.
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype.shown): Deleted.
(WI.TextResourceContentView.prototype.hidden): Deleted.
Remove `shown`/`hidden` calls since that state is propagated to subviews by `WI.View` logic.
2020-11-12 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'target.DOMAgent.hideHighlight')
https://bugs.webkit.org/show_bug.cgi?id=218836
Reviewed by Brian Burg.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.hideDOMNodeHighlight):
Some views eagerly call this when `detached`, possibly even before the `WI.mainTarget` has
been established (i.e. it's still a `WI.MultiplexingBackendTarget`). Rather than add a
specific check for the `WI.mainTarget`, just iterate over `WI.targets` and check each target
since that's eventually what's going to need to be done anyways.
2020-11-12 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(?): Graphics: cannot click on recording icon more than once
https://bugs.webkit.org/show_bug.cgi?id=218834
Reviewed by Brian Burg.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.addMouseDownContextMenuHandlers):
Only ignore future `"mousedown"` events if the `WI.ContextMenu` actually has items.
2020-11-12 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(?): Sources: WebSocket status not shown when organized By Path
https://bugs.webkit.org/show_bug.cgi?id=218679
Reviewed by Brian Burg.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addResource):
Make sure to use `WI.WebSocketResourceTreeElement` for `WI.WebSocketResource`.
2020-11-11 John Wilander <wilander@apple.com>
PCM: Change from ad-click-attribution to private-click-measurement (in all forms, including .well-known URL)
https://bugs.webkit.org/show_bug.cgi?id=218730
<rdar://problem/71094296>
Reviewed by Alex Christensen.
Change to the official name of the proposed standard Private Click Measurement
https://github.com/privacycg/private-click-measurement.
This includes a change of the reporting URL from
"/.well-known/ad-click-attribution/" to
"/.well-known/private-click-measurement/".
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
* UserInterface/Models/ConsoleMessage.js:
* UserInterface/Models/IssueMessage.js:
(WI.IssueMessage):
* UserInterface/Protocol/Legacy/14.0/InspectorBackendCommands.js:
2020-11-11 Brian Burg <bburg@apple.com>
[Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing
https://bugs.webkit.org/show_bug.cgi?id=217783
<rdar://problem/69968787>
Reviewed by Devin Rousso.
* UserInterface/Main.html: Add new files.
* UserInterface/Controllers/AppControllerBase.js:
(WI.AppControllerBase):
(WI.AppControllerBase.prototype.get extensionController):
Hang the extension controller off of the global singleton, as there can only be one.
* UserInterface/Controllers/WebInspectorExtensionController.js:
(WI.WebInspectorExtensionController):
(WI.WebInspectorExtensionController.prototype.registerExtension):
(WI.WebInspectorExtensionController.prototype.unregisterExtension):
Added. For now, just keep the UUIDs in a map and log the result.
* UserInterface/Models/WebInspectorExtension.js:
(WI.WebInspectorExtension):
(WI.WebInspectorExtension.prototype.get extensionID):
(WI.WebInspectorExtension.prototype.get displayName):
Added. This is a data object for now.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.loadCompleted):
(InspectorFrontendAPI.registerExtension):
(InspectorFrontendAPI.unregisterExtension):
Added. Forward invocations to the extension controller.
2020-11-10 Commit Queue <commit-queue@webkit.org>
Unreviewed, reverting r269660.
https://bugs.webkit.org/show_bug.cgi?id=218786
Crashing in EWS iOS simulator bots
Reverted changeset:
"PCM: Change from ad-click-attribution to private-click-
measurement (in all forms, including .well-known URL)"
https://bugs.webkit.org/show_bug.cgi?id=218730
https://trac.webkit.org/changeset/269660
2020-11-10 John Wilander <wilander@apple.com>
PCM: Change from ad-click-attribution to private-click-measurement (in all forms, including .well-known URL)
https://bugs.webkit.org/show_bug.cgi?id=218730
<rdar://problem/71094296>
Reviewed by Devin Rousso.
Change to the official name of the proposed standard Private Click Measurement
https://github.com/privacycg/private-click-measurement.
This includes a change of the reporting URL from
"/.well-known/ad-click-attribution/" to
"/.well-known/private-click-measurement/".
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
* UserInterface/Models/ConsoleMessage.js:
* UserInterface/Models/IssueMessage.js:
(WI.IssueMessage):
* UserInterface/Protocol/Legacy/14.0/InspectorBackendCommands.js:
2020-11-06 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: default breakpoint action should be evaluate
https://bugs.webkit.org/show_bug.cgi?id=218674
Reviewed by Joseph Pecoraro.
* UserInterface/Views/BreakpointPopover.js:
(WI.BreakpointPopover.prototype._handleAddActionButtonClick):
2020-11-06 Truitt Savell <tsavell@apple.com>
Unreviewed, reverting r269486.
Caused 50+ timeouts on Mac Debug WK2
Reverted changeset:
"[Cocoa] Inspector Extensions: Add _WKInspectorExtension and
related plumbing"
https://bugs.webkit.org/show_bug.cgi?id=217783
https://trac.webkit.org/changeset/269486
2020-11-05 Brian Burg <bburg@apple.com>
[Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing
https://bugs.webkit.org/show_bug.cgi?id=217783
<rdar://problem/69968787>
Reviewed by Devin Rousso.
* UserInterface/Main.html: Add new files.
* UserInterface/Controllers/AppControllerBase.js:
(WI.AppControllerBase):
(WI.AppControllerBase.prototype.get extensionController):
Hang the extension controller off of the global singleton, as there can only be one.
* UserInterface/Controllers/WebInspectorExtensionController.js:
(WI.WebInspectorExtensionController):
(WI.WebInspectorExtensionController.prototype.registerExtension):
(WI.WebInspectorExtensionController.prototype.unregisterExtension):
Added. For now, just keep the UUIDs in a map and log the result.
* UserInterface/Models/WebInspectorExtension.js:
(WI.WebInspectorExtension):
(WI.WebInspectorExtension.prototype.get extensionID):
(WI.WebInspectorExtension.prototype.get displayName):
Added. This is a data object for now.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.loadCompleted):
(InspectorFrontendAPI.registerExtension):
(InspectorFrontendAPI.unregisterExtension):
Added. Forward invocations to the extension controller.
2020-11-05 Patrick Angle <pangle@apple.com>
Web Inspector: REGRESSION(?): Sources: override banner is squished for large images
https://bugs.webkit.org/show_bug.cgi?id=218196
Reviewed by Devin Rousso.
Progressions made in https://trac.webkit.org/changeset/266695/webkit caused the image container to occupy the
maximum amount of space possible, which caused the override banner to be squished and a scrollbar to appear.
This is resolved by making sure the minimum dimensions of the image containers are 0, so that the container can
be `flex-shrink`ed.
* UserInterface/Views/ImageResourceContentView.css:
(.content-view.resource.image > .img-container):
2020-11-04 David Kilzer <ddkilzer@apple.com>
WebKit should remove unused debug variant support
<https://webkit.org/b/218315>
<rdar://problem/70785369>
Reviewed by Darin Adler.
Remove support for building the debug variant since it is
currently unused. We now set default values for the
DEAD_CODE_STRIPPING, DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL and
STRIP_INSTALLED_PRODUCT variables.
Also move these values out of the Xcode project into
Base.xcconfig files using the [config=Debug] specifier so that
these overrides are next to the definitions.
Additional changes in behavior are noted below.
* Configurations/Base.xcconfig:
- Set up DEAD_CODE_STRIPPING, DEBUG_DEFINES,
GCC_OPTIMIZATION_LEVEL and STRIP_INSTALLED_PRODUCT the same
as other WebKit projects. Previously dead code was always
stripped in Debug builds. Previously symbols were never
stripped in Release or Production builds. Previously Debug
builds were built with -Os instead of -O0.
* WebInspectorUI.xcodeproj/project.pbxproj:
- Move DEBUG_DEFINES to Base.xcconfig.
2020-11-04 Devin Rousso <drousso@apple.com>
Web Inspector: use weak collections for holding event listeners
https://bugs.webkit.org/show_bug.cgi?id=196956
Reviewed by Brian Burg.
Replace the `ListMultimap`/`LinkedList` with a `Multimap` for holding listener data:
```
Map<String eventType, Set<{Function listener, WeakRef thisObject}>> _listeners;
```
This preserves addition order while also not strongly holding any `thisObject` so they can
be GCed (and remove the `listener` along with it).
* UserInterface/Base/Object.js:
(WI.Object.addEventListener):
(WI.Object.singleFireEventListener):
(WI.Object.awaitEvent):
(WI.Object.removeEventListener):
(WI.Object.prototype.singleFireEventListener):
(WI.Object.prototype.removeEventListener):
(WI.Object.prototype.dispatchEventToListeners.dispatch):
(WI.Object.hasEventListeners):
(WI.Object.activelyListeningObjectsWithPrototype): Added.
(WI.Object.prototype.activelyListeningObjectsWithPrototype): Added.
* UserInterface/Base/SearchUtilities.js:
(WI.SearchUtilities.createSettings):
(WI.SearchUtilities.createSettingsButton):
* UserInterface/Base/Main.js:
(WI.loaded):
(WI.contentLoaded):
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.requestContent):
* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager):
* UserInterface/Views/AuditTestCaseContentView.js:
(WI.AuditTestCaseContentView.prototype.showRunningPlaceholder):
* UserInterface/Views/AuditTestContentView.js:
(WI.AuditTestContentView.prototype.showNoResultPlaceholder):
* UserInterface/Views/AuditTestGroupContentView.js:
(WI.AuditTestGroupContentView.prototype.showRunningPlaceholder):
* UserInterface/Views/CodeMirrorEditor.js:
(WI.CodeMirrorEditor.create):
* UserInterface/Debug/Bootstrap.js:
(WI.runBootstrapOperations):
* UserInterface/Views/ConsoleDrawer.js:
(WI.ConsoleDrawer):
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype.clearSessionState):
(WI.ConsoleMessageView.prototype._appendSavedResultIndex):
(WI.ConsoleMessageView.prototype._rootPropertyPathForObject):
* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser):
(WI.ContentBrowser.prototype.async handleFindNextShortcut):
(WI.ContentBrowser.prototype.async handleFindPreviousShortcut):
* UserInterface/Views/HeapSnapshotContentView.js:
(WI.HeapSnapshotContentView):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView):
* UserInterface/Views/MediaTimelineOverviewGraph.js:
(WI.MediaTimelineOverviewGraph.prototype._processRecord):
* UserInterface/Views/NetworkDetailView.js:
(WI.NetworkDetailView.prototype.initialLayout):
* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.prototype.addShowMoreIfNeeded):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel):
(WI.SearchSidebarPanel.prototype.closed):
(WI.SearchSidebarPanel.prototype.performSearch):
* UserInterface/Views/SettingEditor.js:
(WI.SettingEditor.createForSetting):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
(WI.SettingsTabContentView.prototype._createConsoleSettingsView):
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange):
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
(WI.SettingsTabContentView.prototype._createDebugSettingsView):
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.closed):
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
* UserInterface/Views/ThreadTreeElement.js:
(WI.ThreadTreeElement.prototype._updateStatus):
* UserInterface/Views/TimelineTreeElement.js:
(WI.TimelineTreeElement.prototype._showCloseButton):
Update callers of `WI.Object.prototype.addEventListener` to always pass a `thisObject`. This
is especially important for inlined `listener`, as there needs to be a strong reference to
some "longer lived" `thisObject` (which is held by a `WeakRef`) in order for the `listener`
to not be GCed.
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles):
(WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
(WI.DOMNodeStyles.prototype._parseRulePayload):
(WI.DOMNodeStyles.prototype._handleCSSStyleSheetContentDidChange): Added.
(WI.DOMNodeStyles.prototype._styleSheetContentDidChange): Deleted.
* UserInterface/Views/TimelineRecordingProgressView.js:
(WI.TimelineRecordingProgressView):
(WI.TimelineRecordingProgressView.prototype.set visible):
(WI.TimelineRecordingProgressView.prototype._updateState):
Use a global event listener instead of adding event listeners to specific objects as it's
already likely that all the objects would be listened to anyways.
* UserInterface/Models/DOMTree.js:
(WI.DOMTree.prototype.disconnect):
* UserInterface/Controllers/ApplicationCacheManager.js:
(WI.ApplicationCacheManager.prototype.disable):
* UserInterface/Controllers/CallFrameTreeController.js:
(WI.CallFrameTreeController.prototype.disconnect):
* UserInterface/Controllers/DOMStorageManager.js:
(WI.DOMStorageManager.prototype.disable):
* UserInterface/Controllers/DatabaseManager.js:
(WI.DatabaseManager.prototype.disable):
* UserInterface/Controllers/IndexedDBManager.js:
(WI.IndexedDBManager.prototype.disable):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.capturingStopped):
* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WI.ApplicationCacheDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WI.ApplicationCacheFrameContentView.prototype.closed):
* UserInterface/Views/AuditNavigationSidebarPanel.js:
(WI.AuditNavigationSidebarPanel.prototype.closed):
* UserInterface/Views/AuditTreeElement.js:
(WI.AuditTreeElement.prototype.ondetach):
* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype.closed):
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.detached):
* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype.detached):
* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype.set canvas):
(WI.CanvasSidebarPanel.prototype.set recording):
(WI.CanvasSidebarPanel.prototype.hidden):
* UserInterface/Views/ClusterContentView.js:
(WI.ClusterContentView.prototype.closed):
* UserInterface/Views/CollectionContentView.js:
(WI.CollectionContentView.prototype.removeContentViewForItem):
(WI.CollectionContentView.prototype.detached):
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype.hidden):
(WI.ContentBrowserTabContentView.prototype.closed):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype.closed):
* UserInterface/Views/DOMTreeUpdater.js:
(WI.DOMTreeUpdater.prototype.close):
* UserInterface/Views/ElementsTabContentView.js:
(WI.ElementsTabContentView.prototype.closed):
* UserInterface/Views/FrameDOMTreeContentView.js:
(WI.FrameDOMTreeContentView.prototype.closed):
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.removeEventListeners):
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WI.HeapAllocationsTimelineView):
(WI.HeapAllocationsTimelineView.prototype.closed):
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView.prototype.closed): Deleted.
* UserInterface/Views/InlineSwatch.js:
(WI.InlineSwatch.prototype.didDismissPopover):
* UserInterface/Views/LayoutTimelineView.js:
(WI.LayoutTimelineView.prototype.closed):
* UserInterface/Views/LocalResourceOverrideWarningView.js:
(WI.LocalResourceOverrideWarningView.prototype.detached):
* UserInterface/Views/MemoryTimelineView.js:
(WI.MemoryTimelineView.prototype.closed):
* UserInterface/Views/MultipleScopeBarItem.js:
(WI.MultipleScopeBarItem.prototype.set scopeBarItems):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.closed):
* UserInterface/Views/NetworkTimelineView.js:
(WI.NetworkTimelineView.prototype.closed):
* UserInterface/Views/OverviewTimelineView.js:
(WI.OverviewTimelineView.prototype.closed):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WI.ProbeDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype.closed):
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView.prototype._handleRecordingProcessedAction):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WI.RenderingFrameTimelineView.prototype.closed):
* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView.prototype.detached):
(WI.ResourceCollectionContentView.prototype.contentViewRemoved):
* UserInterface/Views/ResourceContentView.js:
(WI.ResourceContentView.prototype.closed):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype.set resource):
(WI.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
(WI.ResourceDetailsSidebarPanel.prototype._handleResourceInitiatedResourcesDidChange): Added.
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype.closed):
* UserInterface/Views/ResourceSecurityContentView.js:
(WI.ResourceSecurityContentView.prototype.closed):
* UserInterface/Views/ResourceSizesContentView.js:
(WI.ResourceSizesContentView.prototype.closed):
* UserInterface/Views/ResourceTimingContentView.js:
(WI.ResourceTimingContentView.prototype.closed):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WI.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
(WI.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
(WI.ScopeChainDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/ScriptContentView.js:
(WI.ScriptContentView.prototype.closed):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WI.ScriptDetailsTimelineView.prototype.closed):
* UserInterface/Views/ScriptProfileTimelineView.js:
(WI.ScriptProfileTimelineView.prototype.closed):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.close):
(WI.SourceCodeTextEditor.prototype._showPopover):
(WI.SourceCodeTextEditor.prototype._showPopoverForObject):
(WI.SourceCodeTextEditor.prototype._dismissPopover):
(WI.SourceCodeTextEditor.prototype._trackPopoverEvents): Deleted.
* UserInterface/Views/StorageSidebarPanel.js:
(WI.StorageSidebarPanel.prototype.closed):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype.closed):
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview.prototype.closed):
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView):
(WI.TimelineRecordingContentView.prototype.closed):
(WI.TimelineRecordingContentView.prototype._recordingUnloaded):
* UserInterface/Views/TimelineRuler.js:
(WI.TimelineRuler.prototype.clearMarkers):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.prototype.closed):
* UserInterface/Views/TreeOutlineGroup.js:
(WI.TreeOutlineGroup.prototype.itemRemoved):
Replace the `removeEventListener(null, null, this)` pattern by instead having callers remove
each event listener explicitly. This is a safer design as it can avoid situations where
parent classes inadvertently remove event listeners added by subclasses. For objects with
lots of event listeners this is also more efficient as it doesn't require as much iteration.
* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement):
(WI.RecordingActionTreeElement.prototype._handleValidityChanged):
Use `singleFireEventListener` where possible.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.pause):
(WI.DebuggerManager.prototype.resume):
(WI.DebuggerManager.prototype.stepNext):
(WI.DebuggerManager.prototype.stepOver):
(WI.DebuggerManager.prototype.stepInto):
(WI.DebuggerManager.prototype.stepOut):
* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.onattach):
(WI.BreakpointTreeElement.prototype.ondetach):
(WI.BreakpointTreeElement.prototype.get listenerSet): Deleted.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.insertColumn):
(WI.DataGrid.prototype.removeColumn):
* UserInterface/Views/JavaScriptBreakpointTreeElement.js:
(WI.JavaScriptBreakpointTreeElement):
(WI.JavaScriptBreakpointTreeElement.prototype.onattach):
(WI.JavaScriptBreakpointTreeElement.prototype.ondetach):
* UserInterface/Views/ProbeSetDataGrid.js:
(WI.ProbeSetDataGrid):
(WI.ProbeSetDataGrid.prototype.closed):
(WI.ProbeSetDataGrid.prototype._setupData):
(WI.ProbeSetDataGrid.prototype._teardownData):
* UserInterface/Views/ProbeSetDetailsSection.js:
(WI.ProbeSetDetailsSection):
(WI.ProbeSetDetailsSection.prototype.closed):
Remove the legacy `WI.EventListener` and `WI.EventListenerSet` as they basically do the same
thing as `WI.Object` with extra steps.
* UserInterface/Models/WebSocketResource.js:
* UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
* UserInterface/Controllers/TargetManager.js:
* UserInterface/Views/DataGridNode.js:
(WI.DataGridNode.prototype.collapse):
(WI.DataGridNode.prototype.expand):
(WI.DataGridNode.prototype.reveal):
(WI.DataGridNode.prototype.traverseNextNode):
(WI.DataGridNode.prototype.traversePreviousNode):
* UserInterface/Views/HeapSnapshotClassDataGridNode.js:
(WI.HeapSnapshotClassDataGridNode):
(WI.HeapSnapshotClassDataGridNode.prototype._populate):
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WI.HeapSnapshotInstanceDataGridNode):
* UserInterface/Views/ProfileDataGridNode.js:
(WI.ProfileDataGridNode):
(WI.ProfileDataGridNode.prototype._populate):
* UserInterface/Views/ProfileNodeDataGridNode.js:
(WI.ProfileNodeDataGridNode):
(WI.ProfileNodeDataGridNode.prototype._populate):
* UserInterface/Views/TreeOutline.js:
* UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
(HeapSnapshotWorker.prototype.createSnapshot):
Ensure that all event names are strings defined on the class `Event` object.
* UserInterface/Views/Sidebar.js:
(WI.Sidebar.prototype.set selectedSidebarPanel):
Drive-by: fix an issue where `hidden` is called twice, once from the selected sidebar panel
being changed and then again when that sidebar panel is removed.
* .eslintrc:
* UserInterface/Base/EventListener.js: Removed.
* UserInterface/Base/EventListenerSet.js: Removed.
* UserInterface/Base/LinkedList.js: Removed.
* UserInterface/Base/ListMultimap.js: Removed.
* UserInterface/Main.html:
* UserInterface/Test.html:
* UserInterface/TestStub.html:
* Tools/SourceMaps/index.html:
2020-11-03 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: should have the option to Edit Breakpoint... or at least Reveal Breakpoint in Sources Tab
https://bugs.webkit.org/show_bug.cgi?id=218366
Reviewed by Brian Burg.
* UserInterface/Views/BreakpointPopover.js:
(WI.BreakpointPopover.appendContextMenuItems):
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.get statusImageElement): Added.
(WI.DOMTreeElement.prototype._statusImageContextmenu):
* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype.populateContextMenu):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForDOMNodeBreakpoints):
Show an "Edit Breakpoint..." action (via `WI.BreakpointPopover.appendContextMenuItems`) when
there is only one `WI.DOMBreakpoint` (if there are multiple then it would be confusing),
otherwise using "Breakpoints" (plural) for the other actions.
* UserInterface/Base/Main.js:
(WI.showSourcesTab):
* UserInterface/Views/EventListenerSectionGroup.js:
(WI.EventListenerSectionGroup):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.prototype.revealAndSelectRepresentedObject): Added.
(WI.SourcesTabContentView.prototype.revealAndSelectBreakpoint): Deleted.
Rename `breakpointToSelect` to `representedObjectToSelect` for more flexibility in the case
that there are multiple `WI.DOMBreakpoint` for the given `WI.DOMNode`, in which case we want
to select the `WI.DOMNode` instead.
* Localizations/en.lproj/localizedStrings.js:
2020-10-30 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Extra closing parenthesis added after var in styles panel
https://bugs.webkit.org/show_bug.cgi?id=218295
<rdar://problem/70771314>
Reviewed by Devin Rousso.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
Remove `contents.push(token)` which was adding `)`. The closing parenthesis that was already
included in rawTokens above.
Drive-by: rawTokens.slice() should never include `i` as the 2nd argument. `i` is an index of an item
in the `tokens` - a different array.
2020-10-29 Federico Bucchi <fbucchi@apple.com>
Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'value.truncate')
https://bugs.webkit.org/show_bug.cgi?id=218061
<rdar://problem/70551334>
Reviewed by Devin Rousso.
* UserInterface/Views/DOMStorageContentView.js:
(WI.DOMStorageContentView.prototype.itemUpdated):
2020-10-29 Federico Bucchi <fbucchi@apple.com>
Web Inspector: update styles to use CSS properties with neutral directionality
https://bugs.webkit.org/show_bug.cgi?id=217447
<rdar://problem/70064975>
Reviewed by Devin Rousso.
* UserInterface/Debug/UncaughtExceptionReporter.css:
(.uncaught-exception-sheet):
(.uncaught-exception-sheet h1 > img):
(.uncaught-exception-sheet h2 > img):
(.uncaught-exception-sheet dd):
(.uncaught-exception-sheet ul):
* UserInterface/Views/AuditNavigationSidebarPanel.css:
(.content-view.tab.audit .content-view .reference-page-link-container):
(body[dir=ltr] .content-view.tab.audit .content-view .reference-page-link-container): Deleted.
(body[dir=rtl] .content-view.tab.audit .content-view .reference-page-link-container): Deleted.
* UserInterface/Views/AuditTestCaseContentView.css:
(.content-view.audit-test-case > header):
(.content-view.audit-test-case > header h1 > img):
(.content-view.audit-test-case > header > .metadata > .source):
(.content-view.audit-test-case > header > .metadata > .duration):
* UserInterface/Views/AuditTestContentView.css:
(.content-view.audit-test > header):
* UserInterface/Views/AuditTestGroupContentView.css:
(.content-view.audit-test-group > header):
(.content-view.audit-test-group > header > nav > .scope-bar > li:last-child):
(.content-view.audit-test-group > header > nav > .scope-bar > li > img):
(.content-view.audit-test-group > header > .percentage-pass):
* UserInterface/Views/BezierEditor.css:
(.bezier-editor > .bezier-preview-timing):
* UserInterface/Views/BlackboxSettingsView.css:
(.settings-view.blackbox > table > tbody td.remove-blackbox > .remove-blackbox-button):
* UserInterface/Views/BoxModelDetailsSectionRow.css:
(.details-section .row.box-model .box.border > .label):
* UserInterface/Views/BoxShadowEditor.css:
(.box-shadow-editor > table > tr > td):
(.box-shadow-editor > table > tr.offset-x > td > svg):
* UserInterface/Views/BreakpointActionView.css:
(:matches(.breakpoint-action-append-button, .breakpoint-action-remove-button)):
(.breakpoint-action-block-body > .description):
* UserInterface/Views/BreakpointPopover.css:
(.popover .edit-breakpoint-popover-content input:is(#edit-breakpoint-popover-ignore-count, #edit-breakpoint-popover-auto-continue)):
(.popover .edit-breakpoint-popover-content > .reference-page-link-container):
(body[dir=ltr] .popover .edit-breakpoint-popover-content > .reference-page-link-container): Deleted.
(body[dir=rtl] .popover .edit-breakpoint-popover-content > .reference-page-link-container): Deleted.
* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button.image-and-text > span):
* UserInterface/Views/CPUTimelineOverviewGraph.css:
(.timeline-overview-graph.cpu > .legend):
(body[dir=ltr] .timeline-overview-graph.cpu > .legend): Deleted.
(body[dir=rtl] .timeline-overview-graph.cpu > .legend): Deleted.
* UserInterface/Views/CPUTimelineView.css:
(.timeline-view.cpu > .content .subtitle > .info):
(.timeline-view.cpu > .content > .details > .timeline-ruler):
(.timeline-view.cpu > .content > .overview > .divider):
(.timeline-view.cpu > .content > .overview .legend):
(.timeline-view.cpu > .content > .overview .legend .swatch):
(.timeline-view.cpu > .content > .overview > .chart > .container.stats > table .filter.active + .filter.active):
(body[dir=ltr] .timeline-view.cpu > .content > .details > .timeline-ruler): Deleted.
(body[dir=rtl] .timeline-view.cpu > .content > .details > .timeline-ruler): Deleted.
(body[dir=ltr] .timeline-view.cpu > .content > .overview > .divider): Deleted.
(body[dir=rtl] .timeline-view.cpu > .content > .overview > .divider): Deleted.
* UserInterface/Views/CPUUsageCombinedView.css:
(.cpu-usage-combined-view > .details):
(.cpu-usage-combined-view > .details > .legend-container > .row > .swatch):
(body[dir=ltr] .cpu-usage-combined-view > .details): Deleted.
(body[dir=rtl] .cpu-usage-combined-view > .details): Deleted.
* UserInterface/Views/CPUUsageView.css:
(.cpu-usage-view > .details):
(body[dir=ltr] .cpu-usage-view > .details): Deleted.
(body[dir=rtl] .cpu-usage-view > .details): Deleted.
* UserInterface/Views/CallFrameTreeElement.css:
(.tree-outline .item.call-frame .status):
(body[dir=rtl] .tree-outline .item.call-frame .status):
(.tree-outline:not(.single-thread) > .children > .item.call-frame.async-boundary):
(.tree-outline .item.call-frame.async-boundary .icon):
(.tree-outline .item.call-frame.async-boundary::after):
(.tree-outline .item.call-frame.async-boundary::before):
(body[dir=ltr] .tree-outline .item.call-frame .status): Deleted.
* UserInterface/Views/CallFrameView.css:
(.call-frame .icon):
* UserInterface/Views/CanvasDetailsSidebarPanel.css:
(.sidebar > .panel.details.canvas .details-section.canvas-extensions .content > ul):
* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview > .content-view.canvas > footer > .view-related-items > img + img):
(.content-view.canvas-overview > .content-view.canvas > footer .memory-cost):
* UserInterface/Views/CheckboxNavigationItem.css:
(.navigation-bar .item.checkbox label):
* UserInterface/Views/ColorPicker.css:
(.color-picker .slider):
(.color-picker > .color-inputs > div + div):
* UserInterface/Views/ComputedStyleSection.css:
(.computed-style-section .computed-property-item .disclosure-button):
* UserInterface/Views/ConsoleMessageView.css:
(.console-message.expandable .console-top-level-message::before):
* UserInterface/Views/CookiePopover.css:
(.popover .cookie-popover-content > table > tr > td):
* UserInterface/Views/CreateAuditPopover.css:
(.popover .create-audit-content > .editor-wrapper > .reference-page-link):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
(.sidebar > .panel.dom-node-details .details-section.dom-node-associated-data > .content .row):
* UserInterface/Views/DOMTreeContentView.css:
(.content-view.dom-tree .tree-outline.dom):
(.content-view.dom-tree.show-gutter .tree-outline.dom):
(.content-view.dom-tree .tree-outline.dom li .status-image):
(body[dir=rtl] .content-view.dom-tree .tree-outline.dom li .status-image):
(body[dir=ltr] .content-view.dom-tree .tree-outline.dom li .status-image): Deleted.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom ol):
(.tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
* UserInterface/Views/DataGrid.css:
(.data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child::after):
(.data-grid td .icon):
(.data-grid td .go-to-arrow):
(body[dir=ltr] .data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child::after): Deleted.
(body[dir=rtl] .data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child::after): Deleted.
* UserInterface/Views/DetailsSection.css:
(.details-section > .header):
(.details-section > .header > label > input[type="checkbox"]):
(.details-section > .header .go-to-arrow):
(.details-section > .content > .group > .row.simple > .label):
(.details-section > .content > .group > .row.simple > .value):
(.details-section > .content > .group > .row.simple > .value .go-to-arrow):
* UserInterface/Views/ErrorObjectView.css:
(.error-object > .formatted-error::before):
(.error-object .content):
* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]):
(:matches(.filter-bar, .search-bar) > input[type="search"]::-webkit-search-results-button):
(:matches(.filter-bar, .search-bar) > .navigation-bar + input[type="search"]):
(:matches(.filter-bar, .search-bar) > input[type="search"]:focus):
(:matches(.filter-bar, .search-bar) > input[type="search"] + :empty):
(:matches(.filter-bar, .search-bar) > input[type="search"] + .navigation-bar > .item.scope-bar:last-child):
* UserInterface/Views/FindBanner.css:
(.find-banner > :first-child):
(.find-banner > :last-child):
(.find-banner > input[type="search"]):
(.find-banner > button.segmented):
(.find-banner > button.segmented.previous-result):
(.find-banner > button.segmented.next-result):
(body[dir=ltr] .find-banner > button.segmented.next-result):
(body[dir=rtl] .find-banner > button.segmented.next-result):
(.find-banner > button.segmented.next-result > .glyph):
(.find-banner.console-find-banner > input[type="search"]::-webkit-textfield-decoration-container):
(body[dir=ltr] .find-banner > button.segmented.previous-result): Deleted.
(body[dir=rtl] .find-banner > button.segmented.previous-result): Deleted.
* UserInterface/Views/FlexibleSpaceNavigationItem.css:
(.navigation-bar .item.flexible-space.align-start > .item):
(.navigation-bar .item.flexible-space.align-end > .item):
* UserInterface/Views/FontResourceContentView.css:
(.content-view.resource.font .preview > .line > .metric):
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule):
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle):
(.panel.exclusive-presentation.details.css-style > .content > .rules):
* UserInterface/Views/GraphicsOverviewContentView.css:
(.content-view.graphics-overview > section > .header):
* UserInterface/Views/HierarchicalPathComponent.css:
(.hierarchical-path-component > :matches(.icon, .selector-arrows)):
(.hierarchical-path-component > select):
(.hierarchical-path-component > .separator):
(.hierarchical-path-component.text-only):
(body[dir=ltr] .hierarchical-path-component > select): Deleted.
(body[dir=rtl] .hierarchical-path-component > select): Deleted.
(body[dir=ltr] .hierarchical-path-component.text-only > select): Deleted.
(body[dir=rtl] .hierarchical-path-component.text-only > select): Deleted.
* UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
(.layer-tree-popover ul):
* UserInterface/Views/Layers3DContentView.css:
(.content-view.layers-3d .layer-info ul):
* UserInterface/Views/LocalResourceOverridePopover.css:
(.popover .local-resource-override-popover-content label.is-case-sensitive):
(.popover .local-resource-override-popover-content .editor.status-text):
* UserInterface/Views/LogContentView.css:
(.content-view.log > .hidden-messages-banner > button):
(.content-view.log > .hidden-messages-banner > .dismiss):
(.console-group-title::before):
(body[dir=rtl] .console-group-title::before):
(body[dir=ltr] .content-view.log > .hidden-messages-banner > .dismiss): Deleted.
(body[dir=rtl] .content-view.log > .hidden-messages-banner > .dismiss): Deleted.
(body[dir=ltr] .console-group-title::before): Deleted.
* UserInterface/Views/Main.css:
(.go-to-link:not(.dont-float)):
(@media (-webkit-device-pixel-ratio: 1) .reference-page-link):
(.device-settings-content .container > * + *):
(.device-settings-content label > input):
(.device-settings-content > .reference-page-link-container):
(body[dir=ltr] .device-settings-content > .reference-page-link-container): Deleted.
(body[dir=rtl] .device-settings-content > .reference-page-link-container): Deleted.
* UserInterface/Views/MemoryCategoryView.css:
(.memory-category-view > .details):
(body[dir=ltr] .memory-category-view > .details): Deleted.
(body[dir=rtl] .memory-category-view > .details): Deleted.
* UserInterface/Views/MemoryTimelineOverviewGraph.css:
(.timeline-overview-graph.memory > .legend):
(.timeline-overview-graph.memory .memory-pressure-event):
(body[dir=ltr] .timeline-overview-graph.memory > .legend): Deleted.
(body[dir=rtl] .timeline-overview-graph.memory > .legend): Deleted.
(body[dir=ltr] .timeline-overview-graph.memory .memory-pressure-event): Deleted.
(body[dir=rtl] .timeline-overview-graph.memory .memory-pressure-event): Deleted.
* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory > .content > .details > .timeline-ruler):
(.timeline-view.memory > .content > .overview > .divider):
(.timeline-view.memory .legend):
(.timeline-view.memory .legend .swatch):
(body[dir=ltr] .timeline-view.memory > .content > .details > .timeline-ruler): Deleted.
(body[dir=rtl] .timeline-view.memory > .content > .details > .timeline-ruler): Deleted.
(body[dir=ltr] .timeline-view.memory > .content > .overview > .divider): Deleted.
(body[dir=rtl] .timeline-view.memory > .content > .overview > .divider): Deleted.
* UserInterface/Views/NetworkTableContentView.css:
(.content-view.tab.network > .content-browser > .navigation-bar .hierarchical-path .icon):
(.content-view.network .network-table > .table .icon):
(.network-table > .table.grouped .data-container .cell:not(.parent).name):
(.network-table > .table.grouped .data-container .cell.child.name):
(.network-table > .table .cell.domain > .lock):
(.network-table > .table .cell.name > .status):
(.network-table > .table :not(.header) .cell.waterfall):
(.network-table > .statistics > .statistic > .text):
(body[dir=ltr] .network-table > .table :not(.header) .cell.waterfall): Deleted.
(body[dir=rtl] .network-table > .table :not(.header) .cell.waterfall): Deleted.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-value .object-tree .tree-outline.object):
(.object-tree-array-index .index-value .formatted-node .tree-outline.dom):
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.item.object-tree-property.prototype-property + ol):
* UserInterface/Views/ObjectTreeView.css:
(.tree-outline.object ol):
(.tree-outline.object li > button[disabled] + .indeterminate-progress-spinner):
* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog > .field):
(.open-resource-dialog > .field::before):
(.open-resource-dialog > .field > input):
(.open-resource-dialog > .field > img):
(.open-resource-dialog > .tree-outline .item):
(body[dir=ltr] .open-resource-dialog > .field::before): Deleted.
(body[dir=rtl] .open-resource-dialog > .field::before): Deleted.
(body[dir=ltr] .open-resource-dialog > .field > img): Deleted.
(body[dir=rtl] .open-resource-dialog > .field > img): Deleted.
* UserInterface/Views/QuickConsole.css:
(.quick-console > .navigation-bar .active-execution-context):
(.quick-console > .navigation-bar .active-execution-context > .selector-arrows):
(.quick-console > .navigation-bar .active-execution-context:not(.automatic)):
* UserInterface/Views/RecordingActionTreeElement.css:
(.item.recording-action:not(.initial-state)::before):
(.tree-outline:not(.hide-disclosure-buttons) .item.recording-action:not(.initial-state, .parent) > .icon):
* UserInterface/Views/RecordingStateDetailsSidebarPanel.css:
(.sidebar > .panel.details.recording-state > .content .details-section > .header .source):
* UserInterface/Views/ResourceDetailsSection.css:
(.resource-details > section > .details):
(.resource-details > section > .details > p):
(.resource-details > section > .details > .pair):
(.resource-details > section > .details > .pair > .key):
(body[dir=ltr] .resource-details > section > .details): Deleted.
(body[dir=rtl] .resource-details > section > .details): Deleted.
* UserInterface/Views/ResourceSecurityContentView.css:
(.resource-security .details > .show-certificate > .key > .error):
* UserInterface/Views/ResourceSizesContentView.css:
(.resource-sizes > .content > section.network .warning):
* UserInterface/Views/ResourceTimingBreakdownView.css:
(.resource-timing-breakdown > table > tr > td.time):
* UserInterface/Views/ScopeBar.css:
(.scope-bar > li.multiple > select):
(.scope-bar > li.multiple > .arrows):
(body[dir=ltr] .scope-bar > li.multiple > select): Deleted.
(body[dir=rtl] .scope-bar > li.multiple > select): Deleted.
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search > .search-bar > .search-settings):
* UserInterface/Views/SettingsTabContentView.css:
(.content-view.tab.settings > .settings-view > .container button):
(.content-view.tab.settings > .settings-view > .container > .title):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]):
(.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="number"]):
(.content-view.tab.settings > .settings-view > .container.reference > a):
* UserInterface/Views/ShaderProgramContentView.css:
(.content-view.shader-program > .shader.compute,):
(body[dir=ltr] .content-view.shader-program > .shader.vertex:not(.shares-vertex-fragment-shader),):
(body[dir=ltr] .content-view.shader-program > .shader.fragment,):
* UserInterface/Views/SingleSidebar.css:
(.single-sidebar.trailing > .resizer):
(.single-sidebar.leading > .resizer):
(body[dir=ltr] .single-sidebar.trailing > .resizer,): Deleted.
(body[dir=ltr] .single-sidebar.leading > .resizer,): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property .select-variable-property):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration .selector > .icon):
(.spreadsheet-css-declaration .selector > .icon + *):
(.spreadsheet-css-declaration .selector.style-attribute > span):
* UserInterface/Views/SpringEditor.css:
(.spring-editor > .spring-timing):
(.spring-editor > .spring-timing::before):
(.spring-editor > .spring-timing::after):
(body[dir=ltr] .spring-editor > .spring-timing::before,): Deleted.
(body[dir=ltr] .spring-editor > .spring-timing::after,): Deleted.
* UserInterface/Views/TabBar.css:
(.tab-bar > .navigation-bar > .item.group > .item:nth-child(1 of :not(.hidden))):
(.tab-bar > .navigation-bar > .item.group > .item:nth-last-child(1 of :not(.hidden))):
(body:not(.docked) .tab-bar > .tabs > .item:nth-child(n + 3 of :not(.hidden)),):
(body:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden))):
(body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover,):
(body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover):
(.tab-bar > .tabs > .item > .name):
(body[dir=ltr]:not(.docked) .tab-bar > .tabs > .item:nth-child(n + 3 of :not(.hidden)),): Deleted.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden)),): Deleted.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover,): Deleted.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover,): Deleted.
* UserInterface/Views/Table.css:
(.table > .header > :matches(.sort-ascending, .sort-descending)):
(.table > .header > :matches(.sort-ascending, .sort-descending)::after):
(.table > .header .cell:not(:first-child)::before):
(body[dir=ltr] .table > .header > :matches(.sort-ascending, .sort-descending)::after): Deleted.
(body[dir=rtl] .table > .header > :matches(.sort-ascending, .sort-descending)::after): Deleted.
(body[dir=ltr] .table > .header .cell:not(:first-child)::before): Deleted.
(body[dir=rtl] .table > .header .cell:not(:first-child)::before): Deleted.
* UserInterface/Views/ThreadTreeElement.css:
(.tree-outline > .item.thread + ol > .item.truncated-call-frames):
(.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > :matches(.navigation-bar.timelines, .tree-outline.timelines)):
(.timeline-overview:not(.frames) > :matches(.scroll-container, .timeline-ruler, .graphs-container)):
(.timeline-overview > .scroll-container > .scroll-width-sizer):
(body[dir=ltr] .timeline-overview > :matches(.navigation-bar.timelines, .tree-outline.timelines)): Deleted.
(body[dir=rtl] .timeline-overview > :matches(.navigation-bar.timelines, .tree-outline.timelines)): Deleted.
(body[dir=ltr] .timeline-overview:not(.frames) > :matches(.scroll-container, .timeline-ruler, .graphs-container)): Deleted.
(body[dir=rtl] .timeline-overview:not(.frames) > :matches(.scroll-container, .timeline-ruler, .graphs-container)): Deleted.
(body[dir=ltr] .timeline-overview > .scroll-container > .scroll-width-sizer): Deleted.
(body[dir=rtl] .timeline-overview > .scroll-container > .scroll-width-sizer): Deleted.
* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar > img):
(.timeline-record-bar > .segment):
(body[dir=ltr] .timeline-record-bar > .segment:last-of-type):
(body[dir=ltr] .timeline-record-bar > .segment): Deleted.
(body[dir=rtl] .timeline-record-bar > .segment): Deleted.
* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .header > .divider > .label):
(.timeline-ruler > .markers > .marker):
(.timeline-ruler > .markers > .marker::before):
(.timeline-ruler > .markers > .marker::after):
(.timeline-ruler > .shaded-area.left):
(.timeline-ruler > .shaded-area.right):
(body[dir=ltr] .timeline-ruler > .header > .divider > .label): Deleted.
(body[dir=rtl] .timeline-ruler > .header > .divider > .label): Deleted.
(body[dir=ltr] .timeline-ruler > .markers > .marker): Deleted.
(body[dir=rtl] .timeline-ruler > .markers > .marker): Deleted.
(body[dir=ltr] .timeline-ruler > .markers > .marker::before): Deleted.
(body[dir=rtl] .timeline-ruler > .markers > .marker::before): Deleted.
(body[dir=ltr] .timeline-ruler > .markers > .marker::after): Deleted.
(body[dir=rtl] .timeline-ruler > .markers > .marker::after): Deleted.
(body[dir=ltr] .timeline-ruler > .shaded-area.left,): Deleted.
(body[dir=ltr] .timeline-ruler > .shaded-area.right,): Deleted.
* UserInterface/Views/TreeOutline.css:
(.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon):
(.tree-outline .item .icon):
(.tree-outline .item .status):
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline._generateStyleRulesIfNeeded):
* UserInterface/Views/TypeTreeElement.css:
(.item.type-tree-element.prototype):
(.item.type-tree-element.prototype + ol):
* UserInterface/Views/TypeTreeView.css:
(.tree-outline.type):
(.tree-outline.type ol):
(.tree-outline.type li .empty-message):
* UserInterface/Views/WebSocketContentView.css:
(.web-socket.content-view > .data-grid .data-column > div):
(.web-socket.content-view .icon):
(body[dir=ltr] .web-socket.content-view .icon): Deleted.
(body[dir=rtl] .web-socket.content-view .icon): Deleted.
2020-10-28 Federico Bucchi <fbucchi@apple.com>
Web Inspector: Network: background color of rows from previous session is wrong
https://bugs.webkit.org/show_bug.cgi?id=218058
<rdar://problem/70550459>
Reviewed by Devin Rousso.
* UserInterface/Views/NetworkTableContentView.css:
(.network-table > .table li:not(.filler, .selected) .cell:not(.name, .current-session),):
(.network-table > .table li:not(.filler, .selected) .cell:not(.current-session)): Deleted.
2020-10-27 Devin Rousso <drousso@apple.com>
Web Inspector: truncate data URLs in the Resources sidebar and Headers panel
https://bugs.webkit.org/show_bug.cgi?id=218262
Reviewed by Darin Adler.
* UserInterface/Base/Main.js:
(WI.createResourceLink):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype._refreshURL):
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._refreshSummarySection):
2020-10-27 Devin Rousso <drousso@apple.com>
Web Inspector: Search: don't steal focus from the search field when shown
https://bugs.webkit.org/show_bug.cgi?id=218260
Reviewed by Brian Burg.
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.focusSearchField):
(WI.SearchSidebarPanel.prototype.performSearch.createTreeElementForMatchObject):
2020-10-27 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r266669): Uncaught Exception: TypeError: node.nodeType is not a function. (In 'node.nodeType()', 'node.nodeType' is undefined)
https://bugs.webkit.org/show_bug.cgi?id=218254
Reviewed by Joseph Pecoraro.
r266669 changed `WI.DOMBreakpoint` to use `WI.DOMNode` instead of `DOM.NodeId`, meaning that
`WI.DOMTreeContentView.prototype._updateBreakpointStatus` now expects a `WI.DOMNode`.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype._domTreeElementAdded):
2020-10-26 Devin Rousso <drousso@apple.com>
Web Inspector: console command line API should be exposed to breakpoint conditions/actions
https://bugs.webkit.org/show_bug.cgi?id=218141
<rdar://problem/70636727>
Reviewed by Brian Burg.
* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WI.CodeMirrorCompletionController):
(WI.CodeMirrorCompletionController.prototype.get mode): Added.
(WI.CodeMirrorCompletionController.prototype.get delegate): Deleted.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.shouldExposeEvent): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.shouldExposeException): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):
Introduce a `Mode` enum that can be fetched by completion providers to adjust functionality.
* UserInterface/Views/BreakpointPopover.js:
(WI.BreakpointPopover.appendContextMenuItems):
(WI.BreakpointPopover.prototype.show):
(WI.BreakpointPopover.prototype.breakpointActionViewCodeMirrorCompletionControllerMode): Added.
(WI.BreakpointPopover.prototype.get codeMirrorCompletionControllerMode): Added.
* UserInterface/Views/EventBreakpointPopover.js:
(WI.EventBreakpointPopover.prototype.get codeMirrorCompletionControllerMode): Added.
* UserInterface/Views/BreakpointActionView.js:
(WI.BreakpointActionView.prototype._updateBody):
Use a `Mode` that always exposes `$event`/`$exception` depending on the breakpoint type.
* UserInterface/Views/ConsolePrompt.js:
(WI.ConsolePrompt):
Use a `Mode` that only exposes `$event`/`$exception` when paused for an event/exeption.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WI.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
Use a `Mode` that always exposes `$event`/`$exception` since watch expressions track values
over time, and may therefore not always have an `$event`/`$exception` set.
* UserInterface/Views/TextEditor.js:
(WI.TextEditor):
Use the default `Mode` that never exposes `$event`/`$exception`.
2020-10-26 Patrick Angle <pangle@apple.com>
Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._boxModelDiagramRow.minimumWidth')
https://bugs.webkit.org/show_bug.cgi?id=218135
Reviewed by Brian Burg.
minimumWidth may be retrieved before the ComputedStylesDetailsPanel has done its initial layout, which means the
_boxModelDiagramRow will not have been initialized. In this case, we want to return 0 causing the absolute
minimum width of a sidebar to be used for calculations instead.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.get minimumWidth):
2020-10-26 Patrick Angle <pangle@apple.com>
Web Inspector: Change minimum width of #tab-browser to a more reasonable value
https://bugs.webkit.org/show_bug.cgi?id=217998
Reviewed by Brian Burg.
Adjusted the minimum width of the #tab-browser to be 200px, which is a more reasonable minimum usable width.
Additionally, adjusted the threshold for which multiple sidebars are shown by 50px so that the size of the
#tab-browser does not have to become its minimum width before hiding the additional sidebars.
* UserInterface/Base/Main.js:
* UserInterface/Views/Main.css:
(#tab-browser):
* UserInterface/Views/MultiSidebar.js:
(WI.MultiSidebar.prototype._updateMinimumWidthForMultipleSidebars):
2020-10-23 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Typo in experimentalEnableStyelsJumpToVariableDeclaration
https://bugs.webkit.org/show_bug.cgi?id=218119
Reviewed by Devin Rousso.
Replace "Styels" with "Styles".
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
2020-10-22 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r266074): Sources: icon for non-JavaScript breakpoints doesn't change when breakpoints are globally disabled
https://bugs.webkit.org/show_bug.cgi?id=218064
Reviewed by Joseph Pecoraro.
* UserInterface/Models/Breakpoint.js:
(WI.Breakpoint.prototype.get resolved): Added.
* UserInterface/Models/JavaScriptBreakpoint.js:
(WI.JavaScriptBreakpoint.prototype.get resolved):
Add `get resolved` to the base class based on `WI.debuggerManager.breakpointsEnabled`. Use
it in the subclass as part of the result.
* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.updateStatus):
(WI.BreakpointTreeElement.prototype._dataUpdated):
* UserInterface/Views/BreakpointTreeElement.css:
(.item.breakpoint .status > .status-image:not(.resolved)): Added.
* UserInterface/Views/JavaScriptBreakpointTreeElement.css:
(.item.breakpoint.javascript .status > .status-image): Deleted.
(.item.breakpoint.javascript .status > .status-image.resolved): Deleted.
* UserInterface/Views/JavaScriptBreakpointTreeElement.js:
(WI.JavaScriptBreakpointTreeElement.prototype.updateStatus): Deleted.
Eliminate unnecessary protected function now that all breakpoints have a `get resolved`.
Drive-by: inline CSS class name constants.
2020-10-20 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r266074): Uncaught Exception: undefined is not an object (evaluating 'this._allListenersBreakpoint.disabled')
https://bugs.webkit.org/show_bug.cgi?id=217992
Reviewed by Joseph Pecoraro.
r266074 changed it such that `_allListenersBreakpoint` doesn't always exist, so check that
it exists before getting a property from it.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype.listenerBreakpointForEventName):
2020-10-20 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r268691): Web Inspector: WI.Sidebar.Event.CollapsedStateChanged is undefined
https://bugs.webkit.org/show_bug.cgi?id=217939
Reviewed by Brian Burg.
r268691 added an event listener for CollapsedStateChanged, which is undefined.
* UserInterface/Base/Main.js:
2020-10-20 Philippe Normand <pnormand@igalia.com>
Web Inspector: Add setScreenSizeOverride API to the Page agent
https://bugs.webkit.org/show_bug.cgi?id=213242
Reviewed by Devin Rousso.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WI.loaded): Add a new drop-down menu allowing to override the device screen size.
2020-10-19 Patrick Angle <pangle@apple.com>
Web Inspector: Support three-column pane arrangement in Elements Tab
https://bugs.webkit.org/show_bug.cgi?id=217396
Reviewed by Devin Rousso.
The new multiple-sidebar layout for the Elements tab (and any other tab for which it is enabled in the future)
is achieved with a new WI.MultiSidebar, which is itself a WI.Sidebar and contains multiple new WI.SingleSidebar.
SingleSidebar replaces usage of the former Sidebar in favor of Sidebar being a common base shared between the
SingleSidebar and MultiSidebar.
A MultiSidebar supports showing multiple sidebars, and makes that decision based on the user having enabled
showing multiple sidebars and the `WI.SidebarPanel.prototype.allowExclusivePresentation` property on specific
SidebarPanels. The MultiSidebar manages these sidebars and their presentation, with some added properties to
manage the visibility of multiple sidebars. A MultiSidebar can display any number of sidebar panels
simultaneously. A MultiSidebar will always have a `primarySidebar` (although it may be collapsed), which is
where most panels will be presented. Additional panels that are marked as allowing exclusive presentation are
laid out in natural language order when the `MultiSidebar`'s side is `Leading` and reverse order when it is
`Trailing`. This allows the sidebar to remain conceptually anchored, so the `primarySidebar` in the set does not
change locations when adding or removing other sidebars from the set.
The presentation of more than the `primarySidebar` is dependant on the following conditions:
1. The tab (e.g. Elements Tab) must allow the three-panel layout.
2. At least one panel in the MultiSidebar must allow exclusive presentation (e.g. Styles when enabled in
Experimental Settings).
3. There must be at least one other panel to keep in the primary sidebar.
4. There must be enough available space horizontally to satisfy the minimum width of both the `primarySidebar`
and any sidebar panels that will be shown by themselves.
This feature is behind an Experimental Feature setting, and is disabled by default.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js: Use new SingleSidebar and MultiSidebars, include each detail sidebar in maximum
width calculations, and listen for both width and collapse events.
* UserInterface/Base/Setting.js: Added setting for allowing Styles panel to be exclusive.
* UserInterface/Main.html:
* UserInterface/Views/ComputedStyleDetailsPanel.css: Hide shared elements between Styles and Computed when both
are visible.
(.multi-sidebar.showing-multiple > .sidebar > .panel.details.style-computed > .content > .pseudo-classes,):
* UserInterface/Views/ElementsTabContentView.js:
(WI.ElementsTabContentView.prototype.get allowMultipleDetailSidebars):
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.css: Show pseudo-class rules as if they were a navigation
bar only when shown exclusively. Otherwise, still allow them to wrap like normal.
(.panel.exclusive-presentation.details.css-style > .content > .pseudo-classes):
(.panel.exclusive-presentation.details.css-style > .content > .pseudo-classes > .group):
(.panel.exclusive-presentation.details.css-style > .content > .rules):
(.sidebar > .panel.details.css-style.style-rules > .content ~ :matches(.options-container, .class-list-container)): Removed.
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js: If showing exclusively, prevent wrapping pseudo-class
rules by reporting their combined minimum width.
(WI.GeneralStyleDetailsSidebarPanel.prototype.get minimumWidth):
* UserInterface/Views/Main.css:
(#tab-browser): Match existing assumption for minimum tab-browser width.
(#details-sidebar): Match assumption for minimum sidebar width.
* UserInterface/Views/MultiSidebar.css: Added.
(.multi-sidebar):
(.multi-sidebar.trailing):
(.multi-sidebar.collapsed):
* UserInterface/Views/MultiSidebar.js: A Sidebar subclass that manages multiple SingleSidebars, and dynamically
presents them as space is available.
(WI.MultiSidebar):
(WI.MultiSidebar.prototype.get sidebars):
(WI.MultiSidebar.prototype.get primarySidebar):
(WI.MultiSidebar.prototype.get allowMultipleSidebars):
(WI.MultiSidebar.prototype.set allowMultipleSidebars):
(WI.MultiSidebar.prototype.get multipleSidebarsVisible):
(WI.MultiSidebar.prototype.set multipleSidebarsVisible):
(WI.MultiSidebar.prototype.addSidebar):
(WI.MultiSidebar.prototype.removeSidebar):
(WI.MultiSidebar.prototype.get selectedSidebarPanel):
(WI.MultiSidebar.prototype.set selectedSidebarPanel):
(WI.MultiSidebar.prototype.get collapsable):
(WI.MultiSidebar.prototype.set collapsable):
(WI.MultiSidebar.prototype.get minimumWidth):
(WI.MultiSidebar.prototype.get width):
(WI.MultiSidebar.prototype.didInsertSidebarPanel):
(WI.MultiSidebar.prototype.didRemoveSidebarPanel):
(WI.MultiSidebar.prototype.didSetCollapsed):
(WI.MultiSidebar.prototype.get _canShowMultipleSidebars):
(WI.MultiSidebar.prototype._updateMinimumWidthForMultipleSidebars):
(WI.MultiSidebar.prototype.get _hasWidthForMultipleSidebars):
(WI.MultiSidebar.prototype.get _hasSidebarPanelSupportingExclusive):
(WI.MultiSidebar.prototype._updateMultipleSidebarLayout):
(WI.MultiSidebar.prototype._canSidebarPanelBeExclusive):
(WI.MultiSidebar.prototype._makeSidebarPanelExclusive):
(WI.MultiSidebar.prototype._makeSidebarPanelNotExclusive):
(WI.MultiSidebar.prototype._nonExclusiveIndexOfSidebarPanel):
(WI.MultiSidebar.prototype._findSidebarForSidebarPanel):
(WI.MultiSidebar.prototype._addSidebarEventListeners):
(WI.MultiSidebar.prototype._removeSidebarEventListeners):
(WI.MultiSidebar.prototype._handleSidebarPanelSelected):
(WI.MultiSidebar.prototype._handleSidebarCollapsedStateDidChange):
(WI.MultiSidebar.prototype._handleSidebarWidthDidChange):
(WI.MultiSidebar.prototype._handleWindowResize):
* UserInterface/Views/RulesStyleDetailsSidebarPanel.js: If enabled in settings, allow Styles panel to be its own
sidebar.
(WI.RulesStyleDetailsSidebarPanel.prototype.get allowExclusivePresentation):
(WI.RulesStyleDetailsSidebarPanel):
* UserInterface/Views/SettingsTabContentView.js: Add setting for showing the Styles panel as its own sidebar.
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* UserInterface/Views/Sidebar.css: Moved navigation and resizing to SingleSidebar.css.
(.sidebar):
(.sidebar.collapsed):
(.sidebar > .navigation-bar): Deleted.
(.sidebar.has-navigation-bar > .panel): Deleted.
(body[dir=ltr] .sidebar.right > .resizer,): Deleted.
(body[dir=ltr] .sidebar.left > .resizer,): Deleted.
(body[dir=ltr] .sidebar.left,): Deleted.
(body[dir=ltr] .sidebar.right,): Deleted.
* UserInterface/Views/Sidebar.js: Common base class for both SingleSidebar and MultiSidebar. Moved existing
navigation and resizing behavior to SingleSidebar.
(WI.Sidebar):
(WI.Sidebar.get sidebarPanels):
(WI.Sidebar.prototype.get side):
(WI.Sidebar.prototype.addSidebarPanel):
(WI.Sidebar.prototype.insertSidebarPanel):
(WI.Sidebar.prototype.removeSidebarPanel):
(WI.Sidebar.prototype.get selectedSidebarPanel):
(WI.Sidebar.prototype.set selectedSidebarPanel):
(WI.Sidebar.prototype.get collapsed):
(WI.Sidebar.prototype.set collapsed):
(WI.Sidebar.prototype.get collapsable):
(WI.Sidebar.prototype.set collapsable):
(WI.Sidebar.prototype.get minimumWidth):
(WI.Sidebar.prototype.get maximumWidth):
(WI.Sidebar.prototype.shouldInsertSidebarPanel):
(WI.Sidebar.prototype.didInsertSidebarPanel):
(WI.Sidebar.prototype.didRemoveSidebarPanel):
(WI.Sidebar.prototype.willSetSelectedSidebarPanel):
(WI.Sidebar.prototype.didSetSelectedSidebarPanel):
(WI.Sidebar.prototype.didSetCollapsed):
(WI.Sidebar.prototype._findSidebarPanel):
(WI.Sidebar.prototype.get width): Deleted.
(WI.Sidebar.prototype.set width): Deleted.
(WI.Sidebar.prototype.get sidebarPanels): Deleted.
(WI.Sidebar.prototype.findSidebarPanel): Deleted.
(WI.Sidebar.prototype.resizerDragStarted): Deleted.
(WI.Sidebar.prototype.resizerDragging): Deleted.
(WI.Sidebar.prototype.resizerDragEnded): Deleted.
(WI.Sidebar.prototype._recalculateWidth): Deleted.
(WI.Sidebar.prototype._navigationItemSelected): Deleted.
* UserInterface/Views/SidebarPanel.js: Support tracking exclusive display as well as enabling exclusive display.
(WI.SidebarPanel):
(WI.SidebarPanel.prototype.get exclusive):
(WI.SidebarPanel.prototype.set exclusive):
(WI.SidebarPanel.prototype.get allowExclusivePresentation):
* UserInterface/Views/SingleSidebar.css: Moved navigation and resizing from Sidebar.css.
(.single-sidebar > .navigation-bar):
(.single-sidebar.has-navigation-bar > .panel):
(body[dir=ltr] .single-sidebar.trailing > .resizer,):
(body[dir=ltr] .single-sidebar.leading > .resizer,):
(.single-sidebar.leading):
(.single-sidebar.trailing):
* UserInterface/Views/SingleSidebar.js: Added. Contains navigation and resizing previously in Sidebar.js.
(WI.SingleSidebar):
(WI.SingleSidebar.prototype.get allowResizingToCollapse):
(WI.SingleSidebar.prototype.set allowResizingToCollapse):
(WI.SingleSidebar.prototype.get minimumWidth):
(WI.SingleSidebar.prototype.get width):
(WI.SingleSidebar.prototype.set width):
(WI.SingleSidebar.prototype.shouldInsertSidebarPanel):
(WI.SingleSidebar.prototype.didInsertSidebarPanel):
(WI.SingleSidebar.prototype.didRemoveSidebarPanel):
(WI.SingleSidebar.prototype.willSetSelectedSidebarPanel):
(WI.SingleSidebar.prototype.didSetSelectedSidebarPanel):
(WI.SingleSidebar.prototype.didSetCollapsed):
(WI.SingleSidebar.prototype.resizerDragStarted):
(WI.SingleSidebar.prototype.resizerDragging):
(WI.SingleSidebar.prototype.resizerDragEnded):
(WI.SingleSidebar.prototype._recalculateWidth):
(WI.SingleSidebar.prototype._handleNavigationItemSelected):
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css: The last rule row should not show a bottom border,
otherwise a double-border is visible at the bottom of the sidebar.
(.sidebar > .panel.details.css-style > .content > .rules > :nth-last-child(1 of .spreadsheet-css-declaration)):
* UserInterface/Views/TabBrowser.js: Updated naming of handlers and added support for multiple detail sidebars.
(WI.TabBrowser):
(WI.TabBrowser._handleSidebarPanelSelected):
(WI.TabBrowser.prototype._handleSidebarWidthDidChange):
(WI.TabBrowser.prototype._handleMultiSidebarSidebarAdded):
(WI.TabBrowser.prototype._showDetailsSidebarPanelsForTabContentView):
(WI.TabBrowser._sidebarPanelSelected): Deleted.
(WI.TabBrowser.prototype._sidebarCollapsedStateDidChange): Deleted.
(WI.TabBrowser.prototype._sidebarWidthDidChange): Deleted.
* UserInterface/Views/TabContentView.js:
(WI.TabContentView.prototype.get allowMultipleDetailSidebars):
2020-10-16 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r266669): DOMBreakpoint.js:106:23: CONSOLE ASSERT ERROR domNode should not change once set
https://bugs.webkit.org/show_bug.cgi?id=217865
Reviewed by Timothy Hatcher.
* UserInterface/Models/DOMBreakpoint.js:
(WI.DOMBreakpoint.prototype.set domNode):
Adjust the assertion such that `null` is allowed if `_domNode` is already `null`.
* UserInterface/Base/Utilities.js:
(xor): Added.
Global utility function for doing a non-bitwise or that returns `false` if both values are
truthy/falsy and the truthy value if only one is truthy.
2020-10-16 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r266885): Controllers/ConsoleManager.js:177:27: CONSOLE ASSERT ERROR
https://bugs.webkit.org/show_bug.cgi?id=217863
Reviewed by Timothy Hatcher.
r266885 changed `Console.getLoggingChannels` to return any `Console.ChannelSource` that
existed, rather than a hardcoded list. Remove the similarly hardcoded list in the frontend.
* UserInterface/Controllers/ConsoleManager.js:
(WI.ConsoleManager):
(WI.ConsoleManager.prototype.initializeLogChannels):
(WI.ConsoleManager.prototype.get logChannelSources): Deleted.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._messageAdded):
2020-10-16 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r266885): LoggingChannel.js:31:23: CONSOLE ASSERT ERROR
https://bugs.webkit.org/show_bug.cgi?id=217864
Reviewed by Timothy Hatcher.
r266885 changed `Console.getLoggingChannels` to return any `Console.ChannelSource` that
existed, rather than a hardcoded list. Remove the similarly hardcoded list in the frontend.
* UserInterface/Models/LoggingChannel.js:
(WI.LoggingChannel):
2020-10-16 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r266480): line-based JavaScript breakpoint tree element titles also show the file name
https://bugs.webkit.org/show_bug.cgi?id=217859
Reviewed by Timothy Hatcher.
r266480 changed it such that `WI.BreakpointTreeElement` would only call `updateTitles` if
the constructor was not provided a `title` while also adding a fallback for `title` in the
constructor of `WI.JavaScriptBreakpointTreeElement`, ensuring that it would always be set
by the time it reached `WI.BreakpointTreeElement`, meaning that `updateTitles` would never
be called.
Since `updateTitles` was only implemented by `WI.JavaScriptBreakpointTreeElement`, remove
it from `WI.BreakpointTreeElement` and ensure that it is always called for non-special
JavaScript breakpoints (in addition to whenever the `WI.SourceCodeLocation` changes).
* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.updateTitles): Deleted.
* UserInterface/Views/JavaScriptBreakpointTreeElement.js:
(WI.JavaScriptBreakpointTreeElement):
(WI.JavaScriptBreakpointTreeElement.prototype._updateTitles): Added.
(WI.JavaScriptBreakpointTreeElement.prototype._breakpointLocationDidChange):
(WI.JavaScriptBreakpointTreeElement.prototype.updateTitles): Deleted.
2020-10-14 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r267148): new Big Sur styles are not used
https://bugs.webkit.org/show_bug.cgi?id=217682
<rdar://problem/70269030>
Reviewed by Brian Burg.
r267148 changed `navigator.userAgent` from `11_0` to `10_15_7`. This breaks Web Inspector
styling, which relied on this value to know what OS version it was running on in order to
know which styles to use.
* UserInterface/Base/Platform.js:
* UserInterface/Views/Variables.css:
(body.mac-platform): Added.
(body.mac-platform:not(.sierra, .high-sierra)): Deleted.
Use `InspectorFrontendHost.platformVersionName` instead of `navigator.userAgent`. Remove
unnecessary platform version names and other unused data.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI.undockedTitleAreaHeight): Added.
* UserInterface/Views/Popover.js:
(WI.Popover.prototype._update):
Provide a way to get the undocked title area height for use in JavaScript calculations.
* UserInterface/Controllers/HARBuilder.js:
(WI.HARBuilder.creator):
The `WI.Platform.version.build` hasn't changed in a long time, so just remove it.
2020-10-13 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: tab has wrong icon when paused if added after pause
https://bugs.webkit.org/show_bug.cgi?id=217671
Reviewed by Brian Burg.
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.tabInfo):
2020-10-13 Keith Rollin <krollin@apple.com>
Remove leftover MACOSX_DEPLOYMENT_TARGET_macosx support
https://bugs.webkit.org/show_bug.cgi?id=217649
<rdar://problem/70236877>
Reviewed by Darin Adler.
Bug 42796 introduced MACOSX_DEPLOYMENT_TARGET_<PLATFORM> as "support
for compiling WebKit against iOS SDKs". Support for the iOS part of
this feature was later removed in several changes, including Bug
139212, Bug 139463 and Bug 144762. However, vestiges have remained for
five or six years in the form of MACOSX_DEPLOYMENT_TARGET_macosx. The
inclusion of the platform in MACOSX_DEPLOYMENT_TARGET is no longer
needed and can be removed.
This changes brings most projects in conformance with other projects
that don't support including the platform in MACOSX_DEPLOYMENT_TARGET,
including WebEditingTester, gtest, WebKitTestRunner, MiniBrowser, and
TestWebKitAPI.
Along the way, remove a couple of left-over references to macOS 10.16,
and a couple of places where [sdk=macosx*] was still being used.
With this change, initialization of MACOSX_DEPLOYMENT_TARGET should be
consistent across all projects, with two exceptions: WebKitLauncher
(which hardcodes it to 10.12) and libwebrtc's copy of googletest
(which hardcodes it to 10.4). The reasons for these hard-coded values
is not apparent, so leave them be.
* Configurations/DebugRelease.xcconfig:
2020-10-12 Luming Yin <luming_yin@apple.com>
[macOS] Workaround for MAC_OS_X_VERSION_MAJOR incorrectly including minor version when building
with Xcode 12 on macOS Big Sur SUs
https://bugs.webkit.org/show_bug.cgi?id=217602
rdar://70194453
Reviewed by Darin Adler.
The previous workaround turns out to be ineffective because we can't set the value of
TARGET_MAC_OS_X_VERSION_MAJOR based on a previous value of itself. Introduce a new
variable TARGET_MAC_OS_X_VERSION_MAJOR to determine whether we need to explicitly
adjust MAC_OS_X_VERSION_MAJOR to 110000.
* Configurations/DebugRelease.xcconfig:
2020-10-12 Luming Yin <luming_yin@apple.com>
[macOS] Workaround for MAC_OS_X_VERSION_MAJOR incorrectly including minor version when building
with Xcode 12 on macOS Big Sur SUs
https://bugs.webkit.org/show_bug.cgi?id=217602
rdar://70194453
Reviewed by Darin Adler.
Due to a bug in Xcode (rdar://70185899), Xcode 12.0 and Xcode 12.1 Beta incorrectly includes the
minor release number in MAC_OS_X_VERSION_MAJOR, which causes Debug and Release builds of WebKit
to be misconfigured when building on macOS Big Sur SUs, leading to webpages failing to load.
To work around the Xcode bug, when the MAC_OS_X_VERSION_MAJOR includes the minor version number,
drop the minor version number by explicitly setting TARGET_MAC_OS_X_VERSION_MAJOR to 110000.
Note: This change should be reverted after <rdar://70185899> is resolved.
* Configurations/DebugRelease.xcconfig:
2020-10-11 Luming Yin <luming_yin@apple.com>
Strip patch version from TARGET_MAC_OS_X_VERSION_MAJOR when building for macOS Big Sur
or later
https://bugs.webkit.org/show_bug.cgi?id=217594
rdar://70188497
Reviewed by Darin Adler.
To ensure successful Mac Catalyst WebKit builds, strip the patch version from
TARGET_MAC_OS_X_VERSION_MAJOR by using two `base:`s on MACOSX_DEPLOYMENT_TARGET.
* Configurations/Base.xcconfig:
2020-10-11 Luming Yin <luming_yin@apple.com>
Ignore deployment suffix and identifier when computing major OS version for macOS
Big Sur and newer
https://bugs.webkit.org/show_bug.cgi?id=217584
rdar://70168426
Reviewed by Darin Adler.
Stop using MACOSX_DEPLOYMENT_TARGET:suffix:identifier to compute major OS versions.
Only use the deployment target base for macOS Big Sur and newer. Keep the manual
definitions for legacy versions of macOS.
* Configurations/Base.xcconfig:
2020-10-05 Federico Bucchi <fbucchi@apple.com>
Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'error.message')
https://bugs.webkit.org/show_bug.cgi?id=217232
<rdar://problem/69888156>
Reviewed by Devin Rousso.
Add optional chaining for error to check its existence before using error.message
* UserInterface/Models/Resource.js:
2020-10-05 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'breakpoint.disabled = true')
https://bugs.webkit.org/show_bug.cgi?id=217241
Reviewed by Brian Burg.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.removeBreakpointForEventListener):
It's possible for there to not be a breakpoint for a given event listener.
2020-10-05 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: add a + to the Local Overrides section
https://bugs.webkit.org/show_bug.cgi?id=217235
Reviewed by Brian Burg.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateLocalOverrideContextMenu): Added.
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu):
2020-10-05 Devin Rousso <drousso@apple.com>
Web Inspector: unable to create local override for resource that failed to load
https://bugs.webkit.org/show_bug.cgi?id=217234
<rdar://problem/69888143>
Reviewed by Brian Burg.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.async createLocalResourceOverride):
Wrap the `WI.SourceCode.prototype.requestContent` call in a `try` in case the content is not
able to be fetched. If so, determine the MIME from the URL and fall back to `""`.
* UserInterface/Views/ResourceContentView.js:
(WI.ResourceContentView.prototype.requestLocalResourceOverrideInitialContent):
(WI.ResourceContentView.prototype.async _getContentForLocalResourceOverrideFromFile):
Drive-by: drop `initial` from the parameter name as it's not really necessary.
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype.requestLocalResourceOverrideInitialContent):
Drive-by: include the `mimeType` and `base64Encoded` of the related `WI.Resource`.
2020-10-05 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(?): cannot edit Event Breakpoint
https://bugs.webkit.org/show_bug.cgi?id=217244
Reviewed by Brian Burg.
* UserInterface/Models/EventBreakpoint.js:
(WI.EventBreakpoint.get supportsEditing):
(WI.EventBreakpoint.prototype.get editable):
Move the specific listener breakpoint logic to the `prototype` function as `this` won't
exist in the `static` function (not to mention it's not possible to create a specific
listener breakpoint "at will" like it is for global event breakpoints).
* UserInterface/Models/URLBreakpoint.js:
(WI.URLBreakpoint.get supportsEditing): Added.
(WI.URLBreakpoint.prototype.get editable):
(WI.URLBreakpoint.get editable): Deleted.
* UserInterface/Views/URLBreakpointPopover.js:
(WI.URLBreakpointPopover.get supportsEditing):
Drive-by: update naming to match `WI.EventBreakpoint`.
2020-10-05 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Make text selectable in CPU timeline content view
https://bugs.webkit.org/show_bug.cgi?id=216999
Reviewed by Brian Burg.
* UserInterface/Views/CPUTimelineView.css:
(.timeline-view.cpu > .content > .overview .legend):
* UserInterface/Views/CPUUsageCombinedView.css:
(.cpu-usage-combined-view > .details):
2020-09-28 Devin Rousso <drousso@apple.com>
Web Inspector: add checkbox to local override popover to allow it to skip the network
https://bugs.webkit.org/show_bug.cgi?id=217031
Reviewed by Brian Burg.
* UserInterface/Models/LocalResourceOverride.js:
(WI.LocalResourceOverride):
(WI.LocalResourceOverride.create):
(WI.LocalResourceOverride.fromJSON):
(WI.LocalResourceOverride.prototype.toJSON):
(WI.LocalResourceOverride.prototype.get type): Added.
(WI.LocalResourceOverride.prototype.saveIdentityToCookie):
Introduce a `WI.LocalResourceOverride.Type` that is used when handling request/response
interceptions to determined the `Network` command for continuing.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.supportsOverridingRequestsWithResponses): Added.
(WI.NetworkManager.supportsOverridingResponses): Added.
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.addLocalResourceOverride):
(WI.NetworkManager.prototype.removeLocalResourceOverride):
(WI.NetworkManager.prototype.requestIntercepted):
(WI.NetworkManager.prototype.responseIntercepted):
(WI.NetworkManager.prototype._commandArgumentsForInterception):
(WI.NetworkManager.prototype._addInterception): Added.
(WI.NetworkManager.prototype._removeInterception): Added.
(WI.NetworkManager.prototype._handleResourceOverrideDisabledChanged):
(WI.NetworkManager.supportsLocalResourceOverrides): Deleted.
Add logic for `Network.interceptRequestWithResponse` in `Network.requestIntercepted`.
Drive-by: refactor common logic into member functions.
* UserInterface/Views/LocalResourceOverridePopover.js:
(WI.LocalResourceOverridePopover.prototype.get serializedData):
(WI.LocalResourceOverridePopover.prototype.show):
* UserInterface/Views/LocalResourceOverridePopover.css:
(.popover .local-resource-override-popover-content .add-header + .reference-page-link-container): Added.
(.popover .local-resource-override-popover-content .options td): Added.
(.popover .local-resource-override-popover-content .reference-page-link-container): Deleted.
Add an "Options" row containing a "[ ] Skip Network" checkbox for controlling whether
`Network.interceptWithResponse` or `Network.interceptRequestWithResponse` is used.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.async createLocalResourceOverride):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):
* UserInterface/Views/FontResourceContentView.js:
(WI.FontResourceContentView.prototype.contentAvailable):
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView.prototype.contentAvailable):
* UserInterface/Views/LocalResourceOverrideTreeElement.js:
(WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover):
* UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype._addLocalResourceOverrides):
* UserInterface/Views/ResourceContentView.js:
(WI.ResourceContentView):
(WI.ResourceContentView.prototype.closed):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissLocalOverridePopover):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalOverride):
(WI.SourcesNavigationSidebarPanel.prototype._removeResourceOverride):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu):
Rename `supportsLocalResourceOverrides` to `supportsOverridingResponses` for clarity.
* Localizations/en.lproj/localizedStrings.js:
2020-09-25 Nikita Vasilyev <nvasilyev@apple.com>
Uncaught Exception: TypeError: null is not an object (evaluating 'this.listItemElement.classList')
https://bugs.webkit.org/show_bug.cgi?id=216307
<rdar://problem/68565824>
Reviewed by Brian Burg.
* UserInterface/Views/DOMTreeUpdater.js:
(WI.DOMTreeUpdater.prototype._updateModifiedNodes):
Don't update the element if it hasn't been attached yet. It will use the latest data when attached.
2020-09-24 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r267379): Web Inspector: Sources navigation sidebar is empty every other time it's selected
https://bugs.webkit.org/show_bug.cgi?id=216942
<rdar://problem/69520398>
Reviewed by Brian Burg.
* UserInterface/Views/Sidebar.js:
(WI.Sidebar.prototype.insertSidebarPanel):
insertSidebarPanel was exiting early when sidebarPanel.parentSidebar matched the current sidebar,
creating a state when `this._sidebarPanels` is an empty array.
2020-09-22 Brian Burg <bburg@apple.com>
[Cocoa] _WKInspectorDelegate should handle showing external resources
https://bugs.webkit.org/show_bug.cgi?id=216334
Reviewed by Devin Rousso.
Adapt to the rename of InspectorFrontendHost.{openInNewTab => openURLExternally}.
* UserInterface/Base/Main.js:
* UserInterface/Debug/UncaughtExceptionReporter.js:
(sheetElement.innerHTML.div):
* UserInterface/Protocol/InspectorFrontendAPI.js:
* UserInterface/Views/ResourceTreeElement.js:
(WI.ResourceTreeElement.prototype.ondblclick):
2020-09-21 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Uncaught Exception: Missing node for given nodeId
https://bugs.webkit.org/show_bug.cgi?id=216067
<rdar://problem/68520144>
Reviewed by Devin Rousso.
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype.showDetailsSidebarPanels):
Rewrite `showDetailsSidebarPanels` in such way that causes no more than one change of selectedSidebarPanel.
Previously, `removeSidebarPanel` would cause the change of selectedSidebarPanel, resulting in showing
a panel with outdated `this.domNode`.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
Display a useful error with a relevant location instead of a generic Connection.js error.
* UserInterface/Views/Sidebar.js:
(WI.Sidebar.prototype.removeSidebarPanel):
After removing a panel, don't select the nearest panel. There doesn't seem to be a useful case for it.
The selected panel is determined at the removeSidebarPanel callsites.
2020-09-21 Patrick Angle <pangle@apple.com>
Web Inspector: Timelines: remove "stop requested" marker
https://bugs.webkit.org/show_bug.cgi?id=216423
Reviewed by Devin Rousso.
Removed the "Stop Requested" timeline marker, which was made unneccesary in r267038 which makes the recording
head marker stop at the moment the stop was requested, even if more time is required to complete the processing
of incoming data.
* UserInterface/Models/TimelineMarker.js:
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview):
(WI.TimelineOverview.prototype._recordingReset):
(WI.TimelineOverview.prototype._handleTimelineCapturingStateChanged):
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .markers > .marker.current-time::after):
(.timeline-ruler > .markers > .marker.stopping-time): Deleted.
(.timeline-ruler > .markers > .marker:matches(.stopping-time, .current-time)::after): Deleted.
(@media (prefers-color-scheme: dark) .timeline-ruler > .markers > .marker.stopping-time): Deleted.
* UserInterface/Views/TimelineRuler.js:
(WI.TimelineRuler.prototype.addMarker):
2020-09-14 Patrick Angle <pangle@apple.com>
Web Inspector: Stop Recording in Timelines tab doesn't work reliably
https://bugs.webkit.org/show_bug.cgi?id=216416
Reviewed by Devin Rousso.
Improved UX surrounding stopping recordings. In the Frames view, the interface now shows a "Stopping Recording
Timeline Data" message and disables the Stop Recording button as soon as the user has pressed the button to stop
recording. For all timeline views, the Record/Continue/Stop buttons in the top-right are replaced with an
indeterminate progress spinner while recording is being stopped to better indicate that all work has not
completed yet. Lastly, the recording head now stops at the moment recording was stopped. After we have finished
stopping the recording, the timeline is updated one more time to account for any records we receive after the
moment the user requested recording to stop, instead of continously updating during the stopping phase, which
made it appear that recording was instead continuing.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html: Added `IndeterminateProgressSpinnerNavigationItem.css` and
`IndeterminateProgressSpinnerNavigationItem.js`.
* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button.image-only):
* UserInterface/Views/IndeterminateProgressSpinnerNavigationItem.css: Added.
(.navigation-bar .item.indeterminate-progress-spinner):
(.navigation-bar .item.indeterminate-progress-spinner-item .indeterminate-progress-spinner):
* UserInterface/Views/IndeterminateProgressSpinnerNavigationItem.js: Added.
(WI.IndeterminateProgressSpinnerNavigationItem):
* UserInterface/Views/TextNavigationItem.js: Drive-by fix for misplaced `assert`.
(WI.TextNavigationItem):
* UserInterface/Views/TimelineRecordingContentView.js: Don't advanced the recording head after the user requests
recording to stop.
(WI.TimelineRecordingContentView.prototype._updateTimes):
(WI.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
* UserInterface/Views/TimelineRecordingProgressView.js: Listen to the TimelineManager to show different messages
for Recording and Stopping, as well as disabling the Stop Recording button.
(WI.TimelineRecordingProgressView):
(WI.TimelineRecordingProgressView.prototype.set visible):
(WI.TimelineRecordingProgressView.prototype._updateState):
(WI.TimelineRecordingProgressView.prototype._handleTimelineCapturingStateChanged):
* UserInterface/Views/TimelineTabContentView.js: Show a progress spinner while stopping recording.
(WI.TimelineTabContentView):
(WI.TimelineTabContentView.prototype._showRecordButton):
(WI.TimelineTabContentView.prototype._showRecordStoppingSpinner):
(WI.TimelineTabContentView.prototype._showContinueButton):
(WI.TimelineTabContentView.prototype._updateNavigationBarButtons):
(WI.TimelineTabContentView.prototype._handleTimelineCapturingStateChanged):
* UserInterface/Views/Variables.css: New variable for navigation items with only an icon.
(:root):
2020-09-14 Devin Rousso <drousso@apple.com>
Web Inspector: docking buttons don't work when already docked if window is too small
https://bugs.webkit.org/show_bug.cgi?id=216488
<rdar://problem/68242717>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WI.updateDockingAvailability):
(WI.updateDockedState):
(WI._updateDockNavigationItems):
Always be sure to update the docking navigation items when docking becomes unavailable
instead of just forcing Web Inspector to undock as if Web Inspector is already undocked
then none of the docking navigation items will be updated. This makes it so that the
docking navigation items are hidden when docking becomes unavailable while undocked.
2020-09-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] REGRESSION(r266815): Several GTK API tests are timing out
https://bugs.webkit.org/show_bug.cgi?id=216361
Reviewed by Adrian Perez de Castro.
Add missing trailing ';'.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2020-09-10 Devin Rousso <drousso@apple.com>
Web Inspector: modernize generated backend protocol code
https://bugs.webkit.org/show_bug.cgi?id=216302
<rdar://problem/68547649>
Reviewed by Brian Burg.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype.set forcedAppearance):
Now that enums are processed before being passed to backend dispacher handlers, the
`appearance` parameter of `Page.setForcedAppearance` must be marked `optional` as
there's no way for it to accept an empty string, as that's not possible for an enum.
As such, rework the frontend logic for invoking `Page.setForcedAppearance` to instead
not provide an `appearance` parameter at all when wanting to "unset" it.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createConsoleSettingsView):
Now that all logging channels matching a `Console.ChannelSource` are returned instead of
just the hardcoded list, check for a matching `WI.UIString` before showing a `<select>`.
2020-09-09 Patrick Angle <pangle@apple.com>
Web Inspector: InvalidCharacterError: The string contains invalid characters.
https://bugs.webkit.org/show_bug.cgi?id=216138
Reviewed by Brian Burg.
Fixed to no longer use displayName as the identifier for `DOMNodeDetailsSidebarPanel` when creating a
`DetailsSection`, which could end up with illegal characters due to the escaping done by
`DOMNode.prototype.displayName`.
* UserInterface/Models/DOMNode.js:
(WI.DOMNode.prototype.get escapedIdSelector): Changed to use `_idSelector`.
(WI.DOMNode.prototype.get escapedClassSelector): Changed to use `_classSelector`.
(WI.DOMNode.prototype.get unescapedSelector): Added. Uses unescaped forms of `_idSelector` and `_classSelector`.
(WI.DOMNode.prototype._idSelector): Added. Supports optionally not escaping the selector.
(WI.DOMNode.prototype._classSelector): Added. Supports optionally not escaping the selector.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByTarget): Use separate identifier
and title.
2020-09-08 Patrick Angle <pangle@apple.com>
Web Inspector: Incorrect decimal separator in Network web inspector
https://bugs.webkit.org/show_bug.cgi?id=216177
Reviewed by Brian Burg.
Removed separate bytes and suffix pieces for resources sizes, allowing the suffix to be localized and the number
to be correctly formatted for the locale.
* UserInterface/Base/Utilities.js: `Number.bytesToString(...)` now accepts a byte threshold to support
`ResourceSizesContentView` where we want less jitter between B and KB as you up/down through resources.
* UserInterface/Views/ResourceSizesContentView.css:
(.resource-sizes > .content > section.network .bytes): Adopted `text-align` from `.bytes-group`.
(.resource-sizes > .content > section.network .bytes-group): Deleted.
(.resource-sizes > .content > section.network .suffix): Deleted.
* UserInterface/Views/ResourceSizesContentView.js: No longer using a separate `suffix` element for sizes.
(WI.ResourceSizesContentView.prototype.initialLayout.createSizeComponents):
(WI.ResourceSizesContentView.prototype.initialLayout):
(WI.ResourceSizesContentView.prototype._formattedSizeComponent): Replaces `_sizeComponents`.
(WI.ResourceSizesContentView.prototype._refreshResourceSizeSection):
(WI.ResourceSizesContentView.prototype._sizeComponents): Deleted.
2020-09-05 Greg Doolittle <gr3g@apple.com>
Web Inspector: AXI: Audit: obtuse error strings
https://bugs.webkit.org/show_bug.cgi?id=201080
<rdar://problem/54648118>
Reviewed by Devin Rousso.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):
2020-09-05 Devin Rousso <drousso@apple.com>
Web Inspector: allow DOM breakpoints to be configured
https://bugs.webkit.org/show_bug.cgi?id=215795
Reviewed by Brian Burg.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype._setChildNodes):
Dispatch events for each new child node added and each existing child node removed so that
any listeners can also know when new nodes are added via a full children payload update.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager):
(WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
(WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._detachDOMBreakpointsForFrame): Added.
(WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
(WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._setDOMBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._removeDOMBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointEditablePropertyChanged): Added.
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointActionsChanged): Added.
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointDOMNodeWillChange): Added.
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointDOMNodeDidChange): Added.
(WI.DOMDebuggerManager.prototype._childFrameWasRemoved):
(WI.DOMDebuggerManager.prototype._mainResourceDidChange):
(WI.DOMDebuggerManager.prototype._nodeInserted):
(WI.DOMDebuggerManager.prototype._nodeRemoved):
(WI.DOMDebuggerManager.prototype._detachDOMBreakpoint): Deleted.
(WI.DOMDebuggerManager.prototype._detachBreakpointsForFrame): Deleted.
(WI.DOMDebuggerManager.prototype._updateDOMBreakpoint): Deleted.
Recursively walk any added node's subtree to resolve and set any matching DOM breakpoints.
Iterate all existing DOM breakpoints to see if the owner node is part of the subtree of any
removed nodes and remove ot if so.
* UserInterface/Models/DOMBreakpoint.js:
(WI.DOMBreakpoint):
(WI.DOMBreakpoint.displayNameForType):
(WI.DOMBreakpoint.fromJSON):
(WI.DOMBreakpoint.prototype.get editable): Added.
(WI.DOMBreakpoint.prototype.get domNode): Added.
(WI.DOMBreakpoint.prototype.set domNode): Added.
(WI.DOMBreakpoint.prototype.get domNodeIdentifier): Deleted.
(WI.DOMBreakpoint.prototype.set domNodeIdentifier): Deleted.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype.closed):
(WI.DOMTreeContentView.prototype._domTreeElementAdded):
(WI.DOMTreeContentView.prototype._domBreakpointAddedOrRemoved):
(WI.DOMTreeContentView.prototype._handleDOMBreakpointDisabledStateChanged):
(WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeWillChange): Added.
(WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeDidChange): Added.
(WI.DOMTreeContentView.prototype._updateBreakpointStatus):
(WI.DOMTreeContentView.prototype._restoreBreakpointsAfterUpdate):
(WI.DOMTreeContentView.prototype._handleDOMBreakpointDOMNodeChanged): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
(WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointDOMNodeWillChange): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointDOMNodeDidChange): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleDOMBreakpointDOMNodeChanged): Deleted.
Use a `WI.DOMNode` instead of an identifier instead of fetching the node for the identifier
each time and checking if is valid.
2020-09-04 Patrick Angle <pangle@apple.com>
Web Inspector: Localization: typo in WAI-ARIA string ("[the] element have")
https://bugs.webkit.org/show_bug.cgi?id=216176
Reviewed by Devin Rousso.
Resolved element not being pluralized in some audit test descriptions.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):
2020-09-04 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Localization: "Low/Medium/High" strings need separate keys for different uses in the UI
https://bugs.webkit.org/show_bug.cgi?id=216136
Reviewed by Brian Burg.
Provide enough context to understand what nouns "low/medium/high" are used with
("impact" and "priority", in our case). This is necessary to determine adjectives'
grammatical gender.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/Resource.js:
(WI.Resource.displayNameForPriority):
* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype._layoutEnergyChart):
Drive-by: merge two if blocks into one to minimize code repetition.
2020-09-04 Patrick Angle <pangle@apple.com>
Web Inspector: Localization: typo in WAI-ARIA string ("[the] element have")
https://bugs.webkit.org/show_bug.cgi?id=216176
Reviewed by Brian Burg.
Resolved auxiliary verb in localizable strings having the wrong pluralization for the singular element.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):
2020-09-03 Patrick Angle <pangle@apple.com>
Web Inspector fails to preview response from XHR requests
https://bugs.webkit.org/show_bug.cgi?id=215852
Reviewed by Devin Rousso.
Responses with a no content error and a status code of 304 now show a `Resource has no cached content` message instead
of a generic error. Also responses with empty content and no mime type now show a `Resource has no content`
message.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/Resource.js: More consistant error handling model - previously some paths rejected on
failure and some resolved with an error property.
(WI.Resource.prototype.requestContent):
(WI.Resource.prototype._requestContentFailure):
* UserInterface/Views/ResourceContentView.js: Error messages
(WI.ResourceContentView.prototype.async showGenericNoContentMessage): Text now consistent with other messages.
(WI.ResourceContentView.prototype.showNoCachedContentMessage):
(WI.ResourceContentView.prototype._contentAvailable):
2020-09-03 Devin Rousso <drousso@apple.com>
Web Inspector: allow url breakpoints to be configured
https://bugs.webkit.org/show_bug.cgi?id=215793
Reviewed by Brian Burg.
* UserInterface/Models/URLBreakpoint.js:
(WI.URLBreakpoint.get editable): Added.
(WI.URLBreakpoint.fromJSON):
(WI.URLBreakpoint.prototype.get editable):
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager):
(WI.DOMDebuggerManager.prototype.initializeTarget):
(WI.DOMDebuggerManager.prototype.addURLBreakpoint):
(WI.DOMDebuggerManager.prototype.removeURLBreakpoint):
(WI.DOMDebuggerManager.prototype._setURLBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._removeURLBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._handleURLBreakpointEditablePropertyChanged): Added.
(WI.DOMDebuggerManager.prototype._handleURLBreakpointActionsChanged): Added.
(WI.DOMDebuggerManager.prototype._updateURLBreakpoint): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialBreakpoint): Added.
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint): Deleted.
* UserInterface/Views/URLBreakpointPopover.js:
(WI.URLBreakpointPopover.get editable):
* UserInterface/Base/Setting.js:
2020-09-03 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Timelines: record button disappears when UI is narrow
https://bugs.webkit.org/show_bug.cgi?id=216133
Reviewed by Devin Rousso.
The record button is one of the most important items on Timelines toolbar.
It should always be visible.
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
2020-09-03 Devin Rousso <drousso@apple.com>
Web Inspector: allow special JavaScript breakpoints to be configured
https://bugs.webkit.org/show_bug.cgi?id=215794
Reviewed by Brian Burg.
* UserInterface/Models/Breakpoint.js:
(WI.Breakpoint.prototype.reset): Added.
Provide a way to consistently clear the current configuration.
* UserInterface/Models/JavaScriptBreakpoint.js:
(WI.JavaScriptBreakpoint.supportsMicrotasks): Added.
(WI.JavaScriptBreakpoint.supportsDebuggerStatements): Added.
(WI.JavaScriptBreakpoint.fromJSON):
(WI.JavaScriptBreakpoint.prototype.toJSON):
(WI.JavaScriptBreakpoint.prototype.get editable):
(WI.JavaScriptBreakpoint.prototype._isSpecial):
* UserInterface/Models/SourceCodeLocation.js:
(WI.SourceCodeLocation.get specialBreakpointLocation): Added.
Add a helper for the special `null:Infinity:Infinity` breakpoint location for consistency.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):
(WI.DebuggerManager.prototype.async initializeTarget):
(WI.DebuggerManager.prototype.createAssertionFailuresBreakpoint): Added.
(WI.DebuggerManager.prototype.createAllMicrotasksBreakpoint): Added.
(WI.DebuggerManager.prototype.set breakpointsEnabled):
(WI.DebuggerManager.prototype.addBreakpoint):
(WI.DebuggerManager.prototype.removeBreakpoint):
(WI.DebuggerManager.prototype._setPauseOnExceptions): Added.
(WI.DebuggerManager.prototype._createSpecialBreakpoint): Added.
(WI.DebuggerManager.prototype._updateSpecialBreakpoint): Added.
(WI.DebuggerManager.prototype._breakpointDisabledStateDidChange):
(WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
(WI.DebuggerManager.prototype._updateBreakOnExceptionsState): Deleted.
Maintain a `WI.Setting` for the configuration of each special `WI.JavaScriptBreakpoint`.
Have a common path for updating all special `WI.JavaScriptBreakpoint` to avoid duplicated
code.
Add methods for creating the Assertion Failures and All Microtasks `WI.JavaScriptBreakpoint`
since they can be removed (in addition to being disabled) and re-added.
* UserInterface/Views/BreakpointPopover.js:
(WI.BreakpointPopover.appendContextMenuItems):
* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.ondelete):
If the `WI.Breakpoint` is not removable, make sure to `reset` it in addition to disabling
it so that no configuration persists if the `WI.Breakpoint` is later enabled.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointTreeOutlineElementRemoved): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved): Deleted.
Eliminate the need to listen for when breakpoints are added to the `WI.TreeOutline`, which
was previously used to update the `WI.Setting` for whether special `WI.JavaScriptBreakpoint`
are visible.
Don't assume that a `WI.Breakpoint` exists for each special `WI.JavaScriptBreakpoint`.
* UserInterface/Base/Setting.js:
(WI.Setting):
(WI.Setting.migrateValue):
(WI.Setting.reset):
(WI.Setting.prototype.get value):
(WI.Setting.prototype.save):
(WI.Setting._localStorageKeyPrefix): Added.
(WI.Setting._localStorageKey): Deleted.
Eagerly compute the key prefix as it shouldn't change through the lifetime of Web Inspector
and is used early on too.
Add a static member `isFirstLaunch` which can be used by other `WI.Setting` to adjust their
value when Web Inspector is in a clean state (e.g. show the Assertion Failures breakpoint by
default, but only for the first launch). This is needed because `WI.Setting` clears the key
from `localStorage` if the current `value` matches the `_defaultValue`.
* UserInterface/Models/ProbeSet.js:
(WI.ProbeSet):
(WI.ProbeSet.prototype.willRemove):
(WI.ProbeSet.prototype._sampleCollected):
(WI.ProbeSet.prototype._breakpointResolvedStateDidChange): Deleted.
Drive-by: remove an unused event.
* Localizations/en.lproj/localizedStrings.js:
2020-09-02 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r251254): Web Inspector: Text insertion point is invisible when editing DOM nodes
https://bugs.webkit.org/show_bug.cgi?id=210197
<rdar://problem/61485409>
Reviewed by Devin Rousso.
r251254 promoted the selection area into a layer on top the the tree outline item.
Combined with the existing WebKit bug (https://webkit.org/b/213501), it introduced the regression.
This patch is largely a workaround for the WebKit bug.
Revert r251254 and instead change the background color of the shadow DOM items from
the semi-transparent gray to black (white in the dark mode) with 5% transparency, which
produced the same gray color overlayed on top of the white background of the DOM tree outline.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom):
(.tree-outline.dom li .selection-area):
(.tree-outline.dom li > :not(.selection-area)): Deleted.
Don't introduce a layer for every DOM node.
(.tree-outline.dom li.parent.shadow::after):
(.tree-outline.dom li.parent.shadow + ol.children.expanded):
(@media (prefers-color-scheme: dark) .tree-outline.dom):
(@media (prefers-color-scheme: dark) .tree-outline.dom .shadow):
2020-09-02 Devin Rousso <drousso@apple.com>
Web Inspector: allow event breakpoints to be configured when they're added
https://bugs.webkit.org/show_bug.cgi?id=215747
Reviewed by Brian Burg.
* UserInterface/Models/Breakpoint.js:
(WI.Breakpoint):
(WI.Breakpoint.prototype.get displayName): Added.
(WI.Breakpoint.prototype.addAction): Added.
(WI.Breakpoint.prototype.removeAction):
(WI.Breakpoint.prototype._handleBreakpointActionChanged): Added.
(WI.Breakpoint.prototype.createAction): Deleted.
(WI.Breakpoint.prototype.recreateAction): Deleted.
(WI.Breakpoint.prototype.breakpointActionDidChange): Deleted.
* UserInterface/Models/DOMBreakpoint.js:
(WI.DOMBreakpoint.displayNameForType):
(WI.DOMBreakpoint.prototype.get displayName): Added.
* UserInterface/Models/EventBreakpoint.js:
(WI.EventBreakpoint.get editable): Added.
(WI.EventBreakpoint.fromJSON):
(WI.EventBreakpoint.prototype.get displayName): Added.
(WI.EventBreakpoint.prototype.get editable):
* UserInterface/Models/JavaScriptBreakpoint.js:
(WI.JavaScriptBreakpoint.fromJSON):
(WI.JavaScriptBreakpoint.prototype.get displayName): Added.
* UserInterface/Models/URLBreakpoint.js:
(WI.URLBreakpoint.prototype.get displayName): Added.
Add a `get displayName` "virtual" member function.
* UserInterface/Models/BreakpointAction.js:
(WI.BreakpointAction):
(WI.BreakpointAction.fromJSON):
(WI.BreakpointAction.prototype.get type):
(WI.BreakpointAction.prototype.set type): Added.
(WI.BreakpointAction.prototype.set data): Added.
(WI.BreakpointAction.prototype.get breakpoint): Deleted.
Remove the requirement that `WI.BreakpointAction` be passed a `WI.Breakpoint` when its
constructed. Instead, have `WI.BreakpointAction` dispatch events when its `type` or `data`
changes.
* UserInterface/Views/BreakpointActionView.js:
(WI.BreakpointActionView):
(WI.BreakpointActionView.prototype._pickerChanged):
(WI.BreakpointActionView.prototype._appendActionButtonClicked):
(WI.BreakpointActionView.prototype._removeAction):
(WI.BreakpointActionView.prototype._updateBody):
(WI.BreakpointActionView.prototype._handleLogInputInput): Added.
(WI.BreakpointActionView.prototype._handleJavaScriptCodeMirrorChange): Added.
(WI.BreakpointActionView.prototype._logInputChanged): Deleted.
(WI.BreakpointActionView.prototype._codeMirrorBlurred): Deleted.
Call functions on the `delegate` instead of directly manipulating a `WI.Breakpoint` as there
is no longer a `WI.Breakpoint` to manipulate since `WI.BreakpointAction` doesn't have one.
* UserInterface/Controllers/BreakpointPopoverController.js: Removed.
* UserInterface/Views/BreakpointPopoverController.css: Removed.
* UserInterface/Views/BreakpointPopover.js: Renamed from Source/WebInspectorUI/UserInterface/Views/BreakpointPopoverController.css.
(WI.BreakpointPopover):
(WI.BreakpointPopover.appendContextMenuItems):
(WI.BreakpointPopover.prototype.get breakpoint):
(WI.BreakpointPopover.prototype.show):
(WI.BreakpointPopover.dismiss):
(WI.BreakpointPopover.prototype.completionControllerShouldAllowEscapeCompletion):
(WI.BreakpointPopover.prototype.breakpointActionViewAppendActionView):
(WI.BreakpointPopover.prototype.breakpointActionViewRemoveActionView):
(WI.BreakpointPopover.prototype.breakpointActionViewResized):
(WI.BreakpointPopover.prototype.populateContent):
(WI.BreakpointPopover.prototype.addRow):
(WI.BreakpointPopover.prototype.createBreakpoint):
(WI.BreakpointPopover.prototype._presentOverTargetElement):
(WI.BreakpointPopover.prototype._parseIgnoreCountNumber):
(WI.BreakpointPopover.prototype._updateIgnoreCountText):
(WI.BreakpointPopover.prototype._createAddActionButton):
(WI.BreakpointPopover.prototype._insertBreakpointActionView):
(WI.BreakpointPopover.prototype._handleEnabledCheckboxChange):
(WI.BreakpointPopover.prototype._handleConditionCodeMirrorBeforeChange):
(WI.BreakpointPopover.prototype._handleConditionCodeMirrorChange):
(WI.BreakpointPopover.prototype._handleIgnoreCountInputChange):
(WI.BreakpointPopover.prototype._handleAddActionButtonClick):
(WI.BreakpointPopover.prototype._handleAutoContinueCheckboxChange):
* UserInterface/Views/BreakpointPopover.css: Added.
(.popover .edit-breakpoint-popover-content):
(.popover .edit-breakpoint-popover-content.wide):
(.popover .edit-breakpoint-popover-content > label.toggle):
(.popover .edit-breakpoint-popover-content > table):
(.popover .edit-breakpoint-popover-content > table > tr > th):
(.popover .edit-breakpoint-popover-content > table > tr > td):
(.popover .edit-breakpoint-popover-content > table > tr.condition > td > .editor):
(.popover .edit-breakpoint-popover-content > table > tr.condition > td > .editor > .CodeMirror):
(.popover .edit-breakpoint-popover-content.wide .condition > .CodeMirror):
(.popover .edit-breakpoint-popover-content input#edit-breakpoint-popover-ignore-count):
(.popover .edit-breakpoint-popover-content input:is(#edit-breakpoint-popover-ignore-count, #edit-breakpoint-popover-auto-continue)):
(.popover .edit-breakpoint-popover-content > .reference-page-link-container):
(body[dir=ltr] .popover .edit-breakpoint-popover-content > .reference-page-link-container):
(body[dir=rtl] .popover .edit-breakpoint-popover-content > .reference-page-link-container):
(@media (prefers-color-scheme: dark) .popover .edit-breakpoint-popover-content > table > tr > th):
* UserInterface/Views/EventBreakpointPopover.js:
(WI.EventBreakpointPopover):
(WI.EventBreakpointPopover.get editable): Added.
(WI.EventBreakpointPopover.prototype.dismiss):
(WI.EventBreakpointPopover.prototype.populateContent): Added.
(WI.EventBreakpointPopover.prototype.createBreakpoint): Added.
(WI.EventBreakpointPopover.prototype._showSuggestionsView):
(WI.EventBreakpointPopover.prototype._handleDOMEventNameInputKeydown): Added.
(WI.EventBreakpointPopover.prototype._handleDOMEventNameInputInput): Added.
(WI.EventBreakpointPopover.prototype._handleDOMEventNameInputBlur): Added.
(WI.EventBreakpointPopover.prototype.get breakpoint): Deleted.
(WI.EventBreakpointPopover.prototype.show): Deleted.
(WI.EventBreakpointPopover.prototype._presentOverTargetElement): Deleted.
* UserInterface/Views/EventBreakpointPopover.css:
(.popover .edit-breakpoint-popover-content .event input): Added.
(.popover .edit-breakpoint-popover-content .event:last-child input): Added.
(.popover .edit-breakpoint-popover-content .event input::placeholder): Added.
(.popover .event-breakpoint-content): Deleted.
(.popover .event-breakpoint-content > input): Deleted.
(.popover .event-breakpoint-content > input::placeholder): Deleted.
(.popover .event-breakpoint-content .reference-page-link-container): Deleted.
* UserInterface/Views/URLBreakpointPopover.js:
(WI.URLBreakpointPopover):
(WI.URLBreakpointPopover.get editable): Added.
(WI.URLBreakpointPopover.prototype.populateContent): Added.
(WI.URLBreakpointPopover.prototype.createBreakpoint): Added.
(WI.URLBreakpointPopover.prototype._updateEditor):
(WI.URLBreakpointPopover.prototype.get breakpoint): Deleted.
(WI.URLBreakpointPopover.prototype.show): Deleted.
(WI.URLBreakpointPopover.prototype.dismiss): Deleted.
(WI.URLBreakpointPopover.prototype._createEditor): Deleted.
(WI.URLBreakpointPopover.prototype._presentOverTargetElement): Deleted.
* UserInterface/Views/URLBreakpointPopover.css:
(.popover .edit-breakpoint-popover-content .url .editor): Added.
(.popover .edit-breakpoint-popover-content .url:last-child .editor): Added.
(.popover .edit-breakpoint-popover-content .url .editor > .CodeMirror): Added.
(.popover .edit-breakpoint-popover-content .url .editor > .CodeMirror-scroll): Added.
(@media (prefers-color-scheme: dark) .popover .edit-breakpoint-popover-content .url .editor): Added.
(.popover .url-breakpoint-content): Deleted.
(.popover .url-breakpoint-content > .editor-wrapper): Deleted.
(.popover .url-breakpoint-content > .editor-wrapper > .editor): Deleted.
(.popover .url-breakpoint-content > .editor-wrapper > .editor > .CodeMirror): Deleted.
(.popover .url-breakpoint-content > .editor-wrapper > .editor > .CodeMirror-scroll): Deleted.
(.popover .url-breakpoint-content .reference-page-link-container): Deleted.
(@media (prefers-color-scheme: dark) .popover .url-breakpoint-content > .editor-wrapper > .editor): Deleted.
Make `WI.BreakpointPopoverController` into a subclass of `WI.Popover` with a `static` member
function for adding context menu items. This allows both `WI.EventBreakpointPopover` and
`WI.URLBreakpointPopover` to inherit from `WI.BreakpointPopover`, meaning that they can show
the configuration UI when adding the breakpoint instead of as a second step after creating
the breakpoint.
* UserInterface/Models/ProbeSet.js:
(WI.ProbeSet.prototype.createProbe):
Update to use newly named `WI.Breakpoint.prototype.addAction`.
* UserInterface/Views/ContextMenuUtilities.js:
* UserInterface/Views/DOMBreakpointTreeElement.js:
(WI.DOMBreakpointTreeElement):
(WI.DOMBreakpointTreeElement.displayNameForType): Deleted.
* UserInterface/Views/EventBreakpointTreeElement.js:
(WI.EventBreakpointTreeElement):
* UserInterface/Views/JavaScriptBreakpointTreeElement.js:
(WI.JavaScriptBreakpointTreeElement):
(WI.JavaScriptBreakpointTreeElement.prototype.updateTitles):
* UserInterface/Views/URLBreakpointTreeElement.js:
(WI.URLBreakpointTreeElement):
* UserInterface/Views/ProbeSetDetailsSection.js:
(WI.ProbeSetDetailsSection):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
Use the new `WI.Breakpoint.prototype.get displayName`.
* UserInterface/Base/Main.js:
* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.populateContextMenu):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
Replace `WI.breakpointPopoverController` with `WI.BreakpointPopover`.
* UserInterface/Views/Variables.css:
(:root):
* UserInterface/Views/Main.css:
(.reference-page-link):
Create a variable for the size of the reference page (?) button so it can be use elsewhere.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/LoadLocalizedStrings.js:
(WI.repeatedUIString.debuggerStatements): Added.
(WI.repeatedUIString.allExceptions): Added.
(WI.repeatedUIString.uncaughtExceptions): Added.
(WI.repeatedUIString.assertionFailures): Added.
(WI.repeatedUIString.allMicrotasks): Added.
(WI.repeatedUIString.allAnimationFrames): Added.
(WI.repeatedUIString.allIntervals): Added.
(WI.repeatedUIString.allEvents): Added.
(WI.repeatedUIString.allTimeouts): Added.
Create repeated localized string helper functions for special breakpoints.
* UserInterface/Base/ReferencePage.js: Added.
Add an enum for reference page URLs.
* UserInterface/Main.html:
2020-09-02 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: duplicate "Timeline Recording 1" on open
https://bugs.webkit.org/show_bug.cgi?id=216060
Reviewed by Brian Burg.
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager):
(WI.TimelineManager.prototype.get recordings): Deleted.
Don't `reset` in the `constructor` as this is already done in `enable` and `disable`, which
is called whenever the Timeline Tab is added/removed.
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
There should never be any existing recordings when adding the Timelines Tab, as they should
have been removed when the tab was last removed (via `WI.TimelineManager.prototype.disable`).
2020-09-02 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(?): Timelines: Frames: clicking a record bar to select it when another record bar is already selected instead removes all selections
https://bugs.webkit.org/show_bug.cgi?id=216045
<rdar://problem/68156740>
Reviewed by Brian Burg.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WI.RenderingFrameTimelineOverviewGraph.prototype._mouseClicked):
2020-09-02 Devin Rousso <drousso@apple.com>
Web Inspector: Graphics: reloading the page doesn't automatically deselect shaders if they are shown
https://bugs.webkit.org/show_bug.cgi?id=216054
<rdar://problem/68167882>
Reviewed by Brian Burg.
* UserInterface/Views/GraphicsTabContentView.js:
(WI.GraphicsTabContentView.prototype._removeCanvas):
2020-09-02 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: re-enabling the JavaScript Allocations timeline doesn't show previously captured heap snapshots in the table
https://bugs.webkit.org/show_bug.cgi?id=216057
<rdar://problem/68172848>
Reviewed by Brian Burg.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WI.HeapAllocationsTimelineView):
Add a `WI.HeapAllocationsTimelineDataGridNode` for each `WI.HeapAllocationsTimelineRecord`
that already exists when the `WI.HeapAllocationsTimelineView` is created.
2020-09-01 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r243264): Web Inspector: Style pane doesn't update after toggling CSS class
https://bugs.webkit.org/show_bug.cgi?id=202065
<rdar://problem/55149141>
Reviewed by Brian Burg.
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
(WI.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WI.DOMNodeStyles.prototype.refresh):
(WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
r243264 introduced this bug by never clearing `_styleMap` making it impossible to diff old
and new style declarations. Create and clear `_styleMap` at the same place as it was before r243264.
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
Layout now always re-layouts everything. Rules with modified selectors are now preserved by
exiting layout early.
(WI.SpreadsheetRulesStyleDetailsPanel.prototype._handleSectionSelectorWillChange):
Remove logic that tried to preserve indexes of CSS rules with modified selectors that
don't match (SectionIndexSymbol and everything related to it). Instead, avoid re-layout after
editing a selector.
2020-09-01 Devin Rousso <drousso@apple.com>
Web Inspector: WebSockets should be reported as type 'websocket' in Network Tab
https://bugs.webkit.org/show_bug.cgi?id=216055
<rdar://problem/68171040>
Reviewed by Darin Adler.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.shortDisplayNameForResourceType):
2020-08-28 Devin Rousso <drousso@apple.com>
Web Inspector: Audit: should be able to create/edit imported audits
https://bugs.webkit.org/show_bug.cgi?id=215555
<rdar://problem/67255483>
Reviewed by Devin Rousso.
Extend the existing audit edit mode (which previously only let audits be disabled/deleted)
to also allow other JSON properties of audits to be added/edited/removed, meaning that
audits can now be completely created/configured from within the Web Inspector UI. \(o.o)/
* UserInterface/Models/AuditTestBase.js:
(WI.AuditTestBase):
(WI.AuditTestBase.prototype.set name): Added.
(WI.AuditTestBase.prototype.set description): Added.
(WI.AuditTestBase.prototype.get supports): Added.
(WI.AuditTestBase.prototype.set supports): Added.
(WI.AuditTestBase.prototype.get setup): Added.
(WI.AuditTestBase.prototype.set setup): Added.
(WI.AuditTestBase.prototype.set disabled):
(WI.AuditTestBase.prototype.get editable): Added.
(WI.AuditTestBase.prototype.get default): Added.
(WI.AuditTestBase.prototype.markAsDefault): Added.
(WI.AuditTestBase.prototype.get topLevelTest): Added.
(WI.AuditTestBase.prototype.async runSetup): Added.
(WI.AuditTestBase.prototype.async start()):
(WI.AuditTestBase.prototype.stop()):
(WI.AuditTestBase.prototype.async clone): Added.
(WI.AuditTestBase.remove): Added.
(WI.AuditTestBase.saveIdentityToCookie):
(WI.AuditTestBase.toJSON):
(WI.AuditTestBase.prototype.determineIfSupported): Added.
(WI.AuditTestBase.prototype.updateSupported): Added.
(WI.AuditTestBase.prototype.updateResult): Added.
(WI.AuditTestBase.prototype.set supported): Deleted.
(WI.AuditTestBase.async setup): Deleted.
(WI.AuditTestBase.prototype.async setup): Deleted.
* UserInterface/Models/AuditTestGroup.js:
(WI.AuditTestGroup):
(WI.AuditTestGroup.prototype.addTest): Added.
(WI.AuditTestGroup.prototype.removeTest): Added.
(WI.AuditTestGroup.prototype.clearResult):
(WI.AuditTestGroup.prototype.async run):
(WI.AuditTestGroup.prototype.determineIfSupported): Added.
(WI.AuditTestGroup.prototype.updateSupported): Added.
(WI.AuditTestGroup.prototype.updateResult): Added.
(WI.AuditTestGroup.prototype._checkDisabled): Added.
(WI.AuditTestGroup.prototype._handleTestCompleted):
(WI.AuditTestGroup.prototype._handleTestDisabledChanged):
(WI.AuditTestGroup.prototype._handleTestSupportedChanged): Added.
(WI.AuditTestGroup.prototype._handleTestChanged): Added.
(WI.AuditTestGroup.prototype.get supported): Deleted.
(WI.AuditTestGroup.prototype.set supported): Deleted.
(WI.AuditTestGroup.prototype.get disabled): Deleted.
(WI.AuditTestGroup.prototype.set disabled): Deleted.
(WI.AuditTestGroup.prototype._updateResult): Deleted.
(WI.AuditTestGroup.prototype._updateResult): Deleted.
* UserInterface/Models/AuditTestCase.js:
(WI.AuditTestCase):
(WI.AuditTestCase.stringifyFunction): Added.
(WI.AuditTestCase.prototype.set test): Added.
(WI.AuditTestCase.prototype.async run):
Allow additional JSON keys to be changed in the UI:
- `name`
- `description`
- `supports` (ensure that changes recalculate whether the audit is actually supported)
- `setup`
- (groups) `tests` (via separate add and remove functions)
- (test cases) the actual `test` function
These properties are expected to only change in edit mode.
* UserInterface/Models/AuditTestResultBase.js:
(WI.AuditTestResultBase.prototype.get disabled): Added.
(WI.AuditTestResultBase.prototype.get editable): Added.
Audit results are never disabled and not editable.
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager):
(WI.AuditManager.prototype.set editing):
(WI.AuditManager.async start):
(WI.AuditManager.prototype.async start):
(WI.AuditManager.prototype.stop):
(WI.AuditManager.prototype.async processJSON):
(WI.AuditManager.prototype.loadStoredTests):
(WI.AuditManager.prototype.async addTest): Added.
(WI.AuditManager.prototype.removeTest):
(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager.prototype._addDefaultTests.removeWhitespace):
(WI.AuditManager.prototype._addTest): Deleted.
(WI.AuditManager.prototype._topLevelTestForTest): Deleted.
Add helper functions and events for when the audit manager running mode changes to update UI.
Also add another default test that demonstrates the `supports` JSON key.
* UserInterface/Views/AuditNavigationSidebarPanel.js:
(WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
(WI.AuditNavigationSidebarPanel.prototype.willDismissPopover): Added.
(WI.AuditNavigationSidebarPanel.prototype.initialLayout):
(WI.AuditNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WI.AuditNavigationSidebarPanel.prototype._addTest):
(WI.AuditNavigationSidebarPanel.prototype._addResult):
(WI.AuditNavigationSidebarPanel.prototype._updateControlNavigationItems): Added.
(WI.AuditNavigationSidebarPanel.prototype._updateEditNavigationItems): Added.
(WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerEditingChanged):
(WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerRunningStateChanged): Added.
(WI.AuditNavigationSidebarPanel.prototype._handleAuditTestAdded):
(WI.AuditNavigationSidebarPanel.prototype._handleAuditTestCompleted):
(WI.AuditNavigationSidebarPanel.prototype._handleAuditTestRemoved):
(WI.AuditNavigationSidebarPanel.prototype._handleAuditTestScheduled):
(WI.AuditNavigationSidebarPanel.prototype._treeSelectionDidChange):
(WI.AuditNavigationSidebarPanel.prototype._handleStartStopButtonNavigationItemClicked):
(WI.AuditNavigationSidebarPanel.prototype._handleCreateButtonNavigationItemClicked): Added.
(WI.AuditNavigationSidebarPanel.prototype._updateStartStopButtonNavigationItemState): Deleted.
(WI.AuditNavigationSidebarPanel.prototype._updateEditButtonNavigationItemState): Deleted.
* UserInterface/Views/AuditNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.audit .edit-audits:not(.disabled):active): Added.
(.sidebar > .panel.navigation.audit .edit-audits:not(.disabled).activated): Added.
(.sidebar > .panel.navigation.audit .edit-audits:not(.disabled).activated:active): Added.
(.sidebar > .panel.navigation.audit .edit-audits.disabled): Added.
(.content-view.audit .message-text-view .navigation-item-help:is(.start-editing-audits, .stop-editing-audits) .navigation-bar): Added.
(.content-view.tab.audit .content-view > .audit-version): Added.
(.content-view.tab.audit .content-view .reference-page-link-container): Added.
(body[dir=ltr] .content-view.tab.audit .content-view .reference-page-link-container): Added.
(body[dir=rtl] .content-view.tab.audit .content-view .reference-page-link-container): Added.
(.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled):active): Deleted.
(.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated): Deleted.
(.sidebar > .panel.navigation.audit > .content .edit-audits:not(.disabled).activated:active): Deleted.
(.sidebar > .panel.navigation.audit > .content .edit-audits.disabled): Deleted.
(.finish-editing-audits-placeholder.message-text-view .navigation-item-help .navigation-bar): Deleted.
(.audit-version): Deleted.
Move the "Edit" toggle to be next to the filter bar so that it's always visible. Replace the
"[|>] Start" button with a "[+] Create" button when in edit mode, which adds a new audit at
the top-level.
* UserInterface/Views/AuditTestContentView.js:
(WI.AuditTestContentView):
(WI.AuditTestContentView.get navigationItems):
(WI.AuditTestContentView.get supportsSave):
(WI.AuditTestContentView.prototype.createNameElement): Added.
(WI.AuditTestContentView.prototype.createDescriptionElement): Added.
(WI.AuditTestContentView.prototype.createControlsTableElement): Added.
(WI.AuditTestContentView.prototype.layout):
(WI.AuditTestContentView.prototype.shown):
(WI.AuditTestContentView.prototype.hidden):
(WI.AuditTestContentView.prototype.handleResultChanged):
(WI.AuditTestContentView.prototype.showStoppingPlaceholder):
(WI.AuditTestContentView.prototype.showNoResultPlaceholder):
(WI.AuditTestContentView.prototype.showNoResultDataPlaceholder):
(WI.AuditTestContentView.prototype.showFilteredPlaceholder):
(WI.AuditTestContentView.prototype._updateExportNavigationItems): Added.
(WI.AuditTestContentView.prototype._updateSupportsInputState): Added.
(WI.AuditTestContentView.prototype._createSetupEditor): Added.
(WI.AuditTestContentView.prototype._handleEditorKeydown): Added.
(WI.AuditTestContentView.prototype._handleExportTestButtonNavigationItemClicked): Added.
(WI.AuditTestContentView.prototype._handleExportResultButtonNavigationItemClicked): Added.
(WI.AuditTestContentView.prototype._handleTestDisabledChanged): Added.
(WI.AuditTestContentView.prototype._handleTestSupportedChanged): Added.
(WI.AuditTestContentView.prototype._handleEditingChanged): Added.
(WI.AuditTestContentView.prototype._updateExportButtonNavigationItemState): Deleted.
(WI.AuditTestContentView.prototype._handleExportButtonNavigationItemClicked): Deleted.
* UserInterface/Views/AuditTestContentView.css:
(.content-view.audit-test:is(.unsupported, .disabled):not(.manager-editing)): Added.
(.content-view.audit-test.manager-editing .editor:not(:empty)): Added.
(.content-view.audit-test.manager-editing :is(.content-view.audit-test, header) .editor:not(:empty)): Added.
(.content-view.audit-test .CodeMirror): Added.
(.content-view.audit-test > header :is(.name, .description):not([contenteditable])): Added.
(.content-view.audit-test.manager-editing > header :is(.name, .description)[contenteditable]): Added.
(.content-view.audit-test.manager-editing > header .name[contenteditable]:empty): Added.
(.content-view.audit-test.manager-editing > header .name[contenteditable]:empty:before): Added.
(.content-view.audit-test.manager-editing > header .description[contenteditable]:empty:before): Added.
(.content-view.audit-test:not(.manager-editing) > header .description:empty): Added.
(.content-view.audit-test:not(.manager-editing) > header .description:empty, .content-view.audit-test:not(.manager-editing) > header table.controls): Added.
(.content-view.audit-test > header table.controls, .content-view.audit-test > header table.controls > tr > td): Added.
(.content-view.audit-test > header table.controls > tr > th): Added.
(.content-view.audit-test > header table.controls > tr.supports input[type="number"]): Added.
(.content-view.audit-test > header table.controls > tr.supports .warning): Added.
(.content-view.audit-test > header table.controls > tr.supports .warning:not(:empty)::before ): Added.
(.content-view.audit-test > header table.controls > tr.setup .editor): Added.
(.content-view.audit-test > section > .message-text-view > :is(progress, .indeterminate-progress-spinner)): Added.
(@media (prefers-color-scheme: dark) .content-view.audit-test > header table.controls > tr > th): Added.
Create helper functions for subclasses that simplify creating the editing UI. When in edit
mode, add `contenteditable` to the `name`/`description` and inputs for `supports`/`setup`.
* UserInterface/Views/AuditTestGroupContentView.js:
(WI.AuditTestGroupContentView):
(WI.AuditTestGroupContentView.prototype.willDismissPopover): Added.
(WI.AuditTestGroupContentView.prototype.createControlsTableElement): Added.
(WI.AuditTestGroupContentView.prototype.initialLayout):
(WI.AuditTestGroupContentView.prototype.layout):
(WI.AuditTestGroupContentView.prototype.shown):
(WI.AuditTestGroupContentView.prototype.hidden):
(WI.AuditTestGroupContentView.prototype.showRunningPlaceholder):
(WI.AuditTestGroupContentView.prototype._updateClassList): Added.
(WI.AuditTestGroupContentView.prototype._updateLevelScopeBar):
(WI.AuditTestGroupContentView.prototype._addTest): Added.
(WI.AuditTestGroupContentView.prototype._handleTestGroupTestAdded): Added.
(WI.AuditTestGroupContentView.prototype._handleTestGroupTestRemoved): Added.
* UserInterface/Views/AuditTestGroupContentView.css:
(.content-view.audit-test-group > section > .audit-test-group > header): Added.
(.content-view.audit-test-group.contains-test-case > header):
(.content-view.audit-test-group > section > .audit-test-group.contains-test-case > header): Added.
(.content-view.audit-test-group.contains-test-case + .audit-test-group.contains-test-case, .content-view.audit-test-group + .content-view.audit-test-case): Added.
(.content-view.audit-test-group.contains-test-case + .audit-test-group.contains-test-case): Deleted.
When in edit mode, add buttons for removing the audit and adding a new sub-audit (using the
new `WI.CreateAuditPopover` popover).
* UserInterface/Views/AuditTestCaseContentView.js:
(WI.AuditTestCaseContentView):
(WI.AuditTestCaseContentView.prototype.initialLayout):
(WI.AuditTestCaseContentView.prototype.layout):
(WI.AuditTestCaseContentView.prototype.showRunningPlaceholder):
* UserInterface/Views/AuditTestCaseContentView.css:
(.content-view-container > .content-view.audit-test-case): Added.
(.content-view-container > .content-view.audit-test-case > header):
(.content-view-container > .content-view.audit-test-case.manager-editing > header h1 > img): Added.
(.content-view-container > .content-view.audit-test-case > section > :not(.message-text-view, .editor):first-child): Added.
(.content-view-container > .content-view.audit-test-case > section): Added.
(.content-view-container > .content-view.audit-test-case > section, .content-view-container > .content-view.audit-test-case > section :is(.editor, .CodeMirror)): Added.
(.content-view.audit-test-case.manager-editing.disabled:not(.editable) > header h1 > img): Added.
(.content-view.audit-test-case > section > :not(.message-text-view, .editor)): Added.
(.content-view.audit-test-case > section > :not(.message-text-view, .editor):last-child): Added.
(.content-view.audit-test-case > section > :not(.message-text-view, .editor) + :not(.message-text-view, .editor)): Added.
(@media (prefers-color-scheme: dark) .content-view.audit-test-case.manager-editing > header h1 > img): Added.
(.content-view-container > .content-view.audit-test-case > section > :not(.message-text-view):first-child): Deleted.
(.content-view.audit-test-case > section > :not(.message-text-view)): Deleted.
(.content-view.audit-test-case > section > :not(.message-text-view):last-child): Deleted.
(.content-view.audit-test-case > section > :not(.message-text-view) + :not(.message-text-view)): Deleted.
(.content-view.audit-test-case > section .CodeMirror): Deleted.
When in edit mode, replace the icon with a (X) to remove the audit and show a `CodeMirror`
instance to allow editing the content.
* UserInterface/Views/AuditTreeElement.js:
(WI.AuditTreeElement):
(WI.AuditTreeElement.expandedSettingKey): Added.
(WI.AuditTreeElement.prototype.onattach):
(WI.AuditTreeElement.prototype.ondelete):
(WI.AuditTreeElement.prototype.canSelectOnMouseDown): Added.
(WI.AuditTreeElement.prototype.populateContextMenu):
(WI.AuditTreeElement.prototype._handleTestNameChanged): Added.
(WI.AuditTreeElement.prototype._handleTestSupportedChanged): Added.
(WI.AuditTreeElement.prototype._handleTestGroupTestAdded): Added.
* UserInterface/Views/AuditTreeElement.css:
(.tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active):hover > .status > img): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active).selected:hover > .status > img, body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.audit.test-case.selected > .status > .indeterminate-progress-spinner, body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.audit.test-group.selected > .status > progress): Added.
(.tree-outline .item.audit:not(:hover) > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.unsupported, .editing-audits):not(:hover) > .status): Added.
(.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits):hover > .status > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status, .tree-outline .item.audit.unsupported + .children .item.audit.unsupported > .status > img): Added.
(@media (prefers-color-scheme: dark) .tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active):hover > .status > img): Added.
(.tree-outline .item.audit:matches(.test-case, .test-group):not(.unsupported, .manager-active) > .status:hover > img): Deleted.
(.tree-outline .item.audit > .status:not(:hover) > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.unsupported, .editing-audits) > .status:not(:hover)): Deleted.
(.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded:not(.editing-audits) > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status, .tree-outline .item.audit.unsupported + .children .item.audit.unsupported > .status > img): Deleted.
Add context menu items for duplicating/deleting tests when in edit mode. Adjust the label
and disabled state of existing context menu items for clarity.
* UserInterface/Views/CreateAuditPopover.js: Added.
(WI.CreateAuditPopover):
(WI.CreateAuditPopover.prototype.get audit):
(WI.CreateAuditPopover.prototype.show):
(WI.CreateAuditPopover.prototype.dismiss.const.testFunction):
(WI.CreateAuditPopover.prototype.dismiss):
(WI.CreateAuditPopover.prototype._presentOverTargetElement):
* UserInterface/Views/CreateAuditPopover.css: Added.
(.popover .create-audit-content):
(.popover .create-audit-content > .editor-wrapper):
(.popover .create-audit-content > .editor-wrapper > .reference-page-link):
New popover for creating an audit:
[<select> of group or test case] [<input> for name] (?)
* UserInterface/Views/Main.css:
(.navigation-item-help > .navigation-bar):
(.message-text-view > .navigation-item-help + .navigation-item-help): Added.
Add styles for when multiple navigation help items are used in the same message text view.
* UserInterface/Views/Variables.css:
(:root):
(@media (prefers-color-scheme: dark) :root):
Add `--filter-invert` to light mode too.
* UserInterface/Base/Utilities.js:
(HTMLInputElement.prototype.autosize):
* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype._updateRecordingAutoCaptureInputElementSize):
(WI.CanvasOverviewContentView.get recordingAutoCaptureInputMargin): Deleted.
* UserInterface/Views/CanvasOverviewContentView.css:
(.navigation-bar > .item.canvas-recording-auto-capture > label > input):
(.navigation-bar > .item.canvas-recording-auto-capture > label > input::-webkit-inner-spin-button): Deleted.
Create a helper function for autosizing an `<input>`.
* UserInterface/Views/AuditTabContentView.js:
(WI.AuditTabContentView):
(WI.AuditTabContentView.prototype.initialLayout):
Remove the back/foward arrows as they can get into an inconsistent state when editing.
Drive-by: update the drop zone text for clarity.
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.showDefaultContentView):
Drive-by: add period to help text.
* UserInterface/Main.html:
* Localizations/en.lproj/localizedStrings.js:
2020-08-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Include the run loop source name in frame rendering timeline
https://bugs.webkit.org/show_bug.cgi?id=215847
Reviewed by Adrian Perez de Castro.
Show the frame name if present in timeline panel.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype._processRecord):
* UserInterface/Models/RenderingFrameTimelineRecord.js:
(WI.RenderingFrameTimelineRecord):
(WI.RenderingFrameTimelineRecord.prototype.get name):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.displayNameForRecord):
2020-08-26 Brian Burg <bburg@apple.com>
Web Inspector: button for Inspector^2 doesn't work without setting default for DeveloperExtrasEnabled
https://bugs.webkit.org/show_bug.cgi?id=215828
Reviewed by Devin Rousso.
Drive-by: because the Inspector^2 button is text-only and has no
.name element, the '2' button does not become dimmed when the
window is inactive, unlike every other item in the tab bar.
Fix this by coloring the text-only button similar to tab labels.
* UserInterface/Debug/Bootstrap.css:
(body.window-inactive .tab-bar > .navigation-bar .item.button.text-only):
(.tab-bar > .navigation-bar .item.button.text-only):
(.tab-bar > .navigation-bar .item.button.text-only:not(.selected):hover):
(.tab-bar > .navigation-bar .item.button.text-only:not(.disabled).selected):
(body.window-inactive .tab-bar > .navigation-bar .item.button.text-only:not(.disabled).selected >):
2020-08-26 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r266074): cannot edit JavaScript breakpoints
https://bugs.webkit.org/show_bug.cgi?id=215860
Reviewed by Brian Burg.
* UserInterface/Models/JavaScriptBreakpoint.js:
(WI.JavaScriptBreakpoint.prototype.get editable):
2020-08-24 Devin Rousso <drousso@apple.com>
Web Inspector: remove legacy code for replacing the Resources Tab and Debugger Tab with the Sources Tab
https://bugs.webkit.org/show_bug.cgi?id=205826
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WI.loaded):
2020-08-24 Devin Rousso <drousso@apple.com>
Web Inspector: allow event breakpoints to be configured
https://bugs.webkit.org/show_bug.cgi?id=215362
<rdar://problem/66932921>
Reviewed by Brian Burg.
This allows developers to do things like:
- only pause when `window.event.type` is a certain value
- ignore the first N pauses
- evaluate JavaScript whenever an event listener is invoked without pausing
* UserInterface/Models/Breakpoint.js:
(WI.Breakpoint):
(WI.Breakpoint.prototype.toJSON):
(WI.Breakpoint.prototype.get special): Added.
(WI.Breakpoint.prototype.get removable): Added.
(WI.Breakpoint.prototype.get editable): Added.
(WI.Breakpoint.prototype.set condition):
(WI.Breakpoint.prototype.get ignoreCount):
(WI.Breakpoint.prototype.set ignoreCount):
(WI.Breakpoint.prototype.get autoContinue):
(WI.Breakpoint.prototype.set autoContinue):
(WI.Breakpoint.prototype.get actions):
(WI.Breakpoint.prototype.get probeActions):
(WI.Breakpoint.prototype.cycleToNextMode):
(WI.Breakpoint.prototype.createAction):
(WI.Breakpoint.prototype.recreateAction):
(WI.Breakpoint.prototype.removeAction):
(WI.Breakpoint.prototype.clearActions):
(WI.Breakpoint.prototype.remove): Added.
(WI.Breakpoint.prototype.optionsToProtocol): Added.
(WI.Breakpoint.prototype.breakpointActionDidChange):
(WI.Breakpoint.fromJSON): Deleted.
(WI.Breakpoint.prototype.get sourceCodeLocation): Deleted.
(WI.Breakpoint.prototype.get contentIdentifier): Deleted.
(WI.Breakpoint.prototype.get scriptIdentifier): Deleted.
(WI.Breakpoint.prototype.get target): Deleted.
(WI.Breakpoint.prototype.get identifier): Deleted.
(WI.Breakpoint.prototype.set identifier): Deleted.
(WI.Breakpoint.prototype.get resolved): Deleted.
(WI.Breakpoint.prototype.set resolved): Deleted.
(WI.Breakpoint.prototype.saveIdentityToCookie): Deleted.
(WI.Breakpoint.prototype._isSpecial): Deleted.
(WI.Breakpoint.prototype._sourceCodeLocationLocationChanged): Deleted.
(WI.Breakpoint.prototype._sourceCodeLocationDisplayLocationChanged): Deleted.
* UserInterface/Models/DOMBreakpoint.js:
(WI.DOMBreakpoint):
(WI.DOMBreakpoint.fromJSON): Added.
(WI.DOMBreakpoint.prototype.remove): Added.
(WI.DOMBreakpoint.prototype.toJSON):
(WI.DOMBreakpoint.deserialize): Deleted.
(WI.DOMBreakpoint.prototype.get disabled): Deleted.
(WI.DOMBreakpoint.prototype.set disabled): Deleted.
* UserInterface/Models/EventBreakpoint.js:
(WI.EventBreakpoint):
(WI.EventBreakpoint.fromJSON): Added.
(WI.EventBreakpoint.prototype.get special): Added.
(WI.EventBreakpoint.prototype.get editable): Added.
(WI.EventBreakpoint.prototype.remove): Added.
(WI.EventBreakpoint.prototype.saveIdentityToCookie):
(WI.EventBreakpoint.prototype.toJSON):
(WI.EventBreakpoint.deserialize): Deleted.
(WI.EventBreakpoint.prototype.get disabled): Deleted.
(WI.EventBreakpoint.prototype.set disabled): Deleted.
* UserInterface/Models/JavaScriptBreakpoint.js: Copied from UserInterface/Models/Breakpoint.js.
(WI.JavaScriptBreakpoint):
(WI.JavaScriptBreakpoint.fromJSON):
(WI.JavaScriptBreakpoint.prototype.toJSON):
(WI.JavaScriptBreakpoint.prototype.get sourceCodeLocation):
(WI.JavaScriptBreakpoint.prototype.get contentIdentifier):
(WI.JavaScriptBreakpoint.prototype.get scriptIdentifier):
(WI.JavaScriptBreakpoint.prototype.get target):
(WI.JavaScriptBreakpoint.prototype.get special): Added.
(WI.JavaScriptBreakpoint.prototype.get removable): Added.
(WI.JavaScriptBreakpoint.prototype.get editable): Added.
(WI.JavaScriptBreakpoint.prototype.get identifier):
(WI.JavaScriptBreakpoint.prototype.set identifier):
(WI.JavaScriptBreakpoint.prototype.get resolved):
(WI.JavaScriptBreakpoint.prototype.set resolved):
(WI.JavaScriptBreakpoint.prototype.remove): Added.
(WI.JavaScriptBreakpoint.prototype.saveIdentityToCookie):
(WI.JavaScriptBreakpoint.prototype._isSpecial):
(WI.JavaScriptBreakpoint.prototype._sourceCodeLocationLocationChanged):
(WI.JavaScriptBreakpoint.prototype._sourceCodeLocationDisplayLocationChanged):
* UserInterface/Models/URLBreakpoint.js:
(WI.URLBreakpoint):
(WI.URLBreakpoint.fromJSON): Added.
(WI.URLBreakpoint.prototype.get special): Added.
(WI.URLBreakpoint.prototype.remove): Added.
(WI.URLBreakpoint.prototype.toJSON):
(WI.URLBreakpoint.deserialize): Deleted.
(WI.URLBreakpoint.prototype.get disabled): Deleted.
(WI.URLBreakpoint.prototype.set disabled): Deleted.
Rename `WI.Breakpoint` to `WI.JavaScriptBreakpoint` and use `WI.Breakpoint` as a new common
base class for all breakpoint types, allowing more logic to be shared (e.g. disabled state).
Additionally, breakpoints are now able to
- determine whether or not they're
- special
- removable
- editable (i.e. configurable)
- remove themselves
without the caller needing to know what manager to consult with.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager):
(WI.DOMManager.supportsEventListenerBreakpointConfiguration): Added.
(WI.DOMManager.prototype.setBreakpointForEventListener):
(WI.DOMManager.prototype.removeBreakpointForEventListener):
(WI.DOMManager.prototype._setEventBreakpoint): Added.
(WI.DOMManager.prototype._removeEventBreakpoint): Added.
(WI.DOMManager.prototype._handleEventBreakpointEditablePropertyChanged): Added.
(WI.DOMManager.prototype._handleEventBreakpointActionsChanged): Added.
(WI.DOMManager.prototype._updateEventBreakpoint): Deleted.
Keep track of configuration changes for specific listener breakpoints.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager):
(WI.DOMDebuggerManager.prototype.initializeTarget):
(WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
(WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
(WI.DOMDebuggerManager.prototype.addEventBreakpoint):
(WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
(WI.DOMDebuggerManager.prototype.addURLBreakpoint):
(WI.DOMDebuggerManager.prototype.removeURLBreakpoint):
(WI.DOMDebuggerManager.prototype._commandArgumentsForEventBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._setEventBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._removeEventBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged): Added.
(WI.DOMDebuggerManager.prototype._handleEventBreakpointEditablePropertyChanged): Added.
(WI.DOMDebuggerManager.prototype._handleEventBreakpointActionsChanged): Added.
(WI.DOMDebuggerManager.prototype.isBreakpointSpecial): Deleted.
(WI.DOMDebuggerManager.prototype._updateEventBreakpoint): Deleted.
Keep track of configuration changes for special event breakpoints.
Store special event breakpoints inside `WI.objectStores.eventBreakpoints`.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):
(WI.DebuggerManager.prototype.addBreakpoint):
(WI.DebuggerManager.prototype.removeBreakpoint):
(WI.DebuggerManager.prototype.addProbesForBreakpoint): Added.
(WI.DebuggerManager.prototype.removeProbesForBreakpoint): Added.
(WI.DebuggerManager.prototype.updateProbesForBreakpoint): Added.
(WI.DebuggerManager.prototype._setBreakpoint):
(WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
(WI.DebuggerManager.prototype._handleBreakpointActionsDidChange):
(WI.DebuggerManager.prototype.isBreakpointRemovable): Deleted.
(WI.DebuggerManager.prototype.isBreakpointSpecial): Deleted.
(WI.DebuggerManager.prototype.isBreakpointEditable): Deleted.
(WI.DebuggerManager.prototype._debuggerBreakpointActionType): Deleted.
(WI.DebuggerManager.prototype._debuggerBreakpointOptions): Deleted.
(WI.DebuggerManager.prototype._addProbesForBreakpoint): Deleted.
(WI.DebuggerManager.prototype._removeProbesForBreakpoint): Deleted.
(WI.DebuggerManager.prototype._updateProbesForBreakpoint): Deleted.
Replace `WI.Breakpoint` with `WI.JavaScriptBreakpoint`.
Probes now support `WI.EventBreakpoint` in addition to `WI.JavaScriptBreakpoint`.
* UserInterface/Controllers/BreakpointPopoverController.js:
(WI.BreakpointPopoverController.prototype.appendContextMenuItems):
(WI.BreakpointPopoverController.prototype._createPopoverContent):
Allow any breakpoint instead of only `WI.JavaScriptBreakpoint`.
Drive-by: the existing `ignoreCount` value wasn't being used to populate the `<input>`.
* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.ondelete):
(WI.BreakpointTreeElement.prototype.get listenerSet): Added.
(WI.BreakpointTreeElement.prototype.updateStatus): Added.
(WI.BreakpointTreeElement.prototype.updateTitles): Added.
(WI.BreakpointTreeElement.prototype.get breakpoint): Deleted.
(WI.BreakpointTreeElement.prototype.get filterableData): Deleted.
(WI.BreakpointTreeElement.prototype._updateTitles): Deleted.
(WI.BreakpointTreeElement.prototype._updateStatus): Deleted.
(WI.BreakpointTreeElement.prototype._breakpointLocationDidChange): Deleted.
* UserInterface/Views/BreakpointTreeElement.css:
(.item.breakpoint .status > .status-image):
(.item.breakpoint.paused .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.paused .icon): Added.
(.item.breakpoint .status > .status-image.resolved): Deleted.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.breakpoint.selected .status > .status-image.resolved): Deleted.
(.item.breakpoint .subtitle.formatted-location): Deleted.
(.breakpoint-debugger-statement-icon .icon): Deleted.
(.breakpoint-exception-icon .icon): Deleted.
(.breakpoint-assertion-icon .icon): Deleted.
(.breakpoint-microtask-icon .icon): Deleted.
(.breakpoint-paused-icon .icon): Deleted.
(.breakpoint-generic-line-icon .icon): Deleted.
(.breakpoint-generic-line-icon .icon > span): Deleted.
(.data-updated.breakpoint-generic-line-icon .icon > span): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint-debugger-statement-icon .icon): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint-exception-icon .icon): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint-assertion-icon .icon): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint-microtask-icon .icon): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint-paused-icon .icon): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint-generic-line-icon .icon): Deleted.
* UserInterface/Views/DOMBreakpointTreeElement.js:
(WI.DOMBreakpointTreeElement):
(WI.DOMBreakpointTreeElement.prototype.onattach): Deleted.
(WI.DOMBreakpointTreeElement.prototype.ondetach): Deleted.
(WI.DOMBreakpointTreeElement.prototype.ondelete): Deleted.
(WI.DOMBreakpointTreeElement.prototype.onenter): Deleted.
(WI.DOMBreakpointTreeElement.prototype.onspace): Deleted.
(WI.DOMBreakpointTreeElement.prototype.populateContextMenu): Deleted.
(WI.DOMBreakpointTreeElement.prototype._statusImageElementClicked): Deleted.
(WI.DOMBreakpointTreeElement.prototype._statusImageElementFocused): Deleted.
(WI.DOMBreakpointTreeElement.prototype._statusImageElementMouseDown): Deleted.
(WI.DOMBreakpointTreeElement.prototype._toggleBreakpoint): Deleted.
(WI.DOMBreakpointTreeElement.prototype._updateStatus): Deleted.
* UserInterface/Views/DOMBreakpointTreeElement.css:
(.item.breakpoint.dom.subtree-modified:not(.paused) .icon): Added.
(.item.breakpoint.dom.attribute-modified:not(.paused) .icon): Added.
(.item.breakpoint.dom.node-removed:not(.paused) .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.dom.subtree-modified:not(.paused) .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.dom.attribute-modified:not(.paused) .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.dom.node-removed:not(.paused) .icon): Added.
(.breakpoint.dom.breakpoint-for-subtree-modified:not(.breakpoint-paused-icon) .icon): Deleted.
(.breakpoint.dom.breakpoint-for-attribute-modified:not(.breakpoint-paused-icon) .icon): Deleted.
(.breakpoint.dom.breakpoint-for-node-removed:not(.breakpoint-paused-icon) .icon): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint.dom.breakpoint-for-subtree-modified:not(.breakpoint-paused-icon) .icon): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint.dom.breakpoint-for-attribute-modified:not(.breakpoint-paused-icon) .icon): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint.dom.breakpoint-for-node-removed:not(.breakpoint-paused-icon) .icon): Deleted.
* UserInterface/Views/EventBreakpointTreeElement.js:
(WI.EventBreakpointTreeElement):
(WI.EventBreakpointTreeElement.prototype.onattach): Deleted.
(WI.EventBreakpointTreeElement.prototype.ondetach): Deleted.
(WI.EventBreakpointTreeElement.prototype.ondelete): Deleted.
(WI.EventBreakpointTreeElement.prototype.onenter): Deleted.
(WI.EventBreakpointTreeElement.prototype.onspace): Deleted.
(WI.EventBreakpointTreeElement.prototype.populateContextMenu): Deleted.
(WI.EventBreakpointTreeElement.prototype._statusImageElementClicked): Deleted.
(WI.EventBreakpointTreeElement.prototype._statusImageElementFocused): Deleted.
(WI.EventBreakpointTreeElement.prototype._statusImageElementMouseDown): Deleted.
(WI.EventBreakpointTreeElement.prototype._toggleBreakpoint): Deleted.
(WI.EventBreakpointTreeElement.prototype._updateStatus): Deleted.
* UserInterface/Views/EventBreakpointTreeElement.css:
(.item.breakpoint.event.animation-frame:not(.paused) .icon): Added.
(.item.breakpoint.event.interval:not(.paused) .icon): Added.
(.item.breakpoint.event.listener:not(.paused) .icon): Added.
(.item.breakpoint.event.timeout:not(.paused) .icon): Added.
(@media(prefers-color-scheme: dark) .item.breakpoint.event.animation-frame:not(.paused) .icon): Added.
(@media(prefers-color-scheme: dark) .item.breakpoint.event.interval:not(.paused) .icon): Added.
(@media(prefers-color-scheme: dark) .item.breakpoint.event.listener:not(.paused) .icon): Added.
(@media(prefers-color-scheme: dark) .item.breakpoint.event.timeout:not(.paused) .icon): Added.
(.breakpoint.event.breakpoint-for-animation-frame:not(.breakpoint-paused-icon) .icon): Deleted.
(.breakpoint.event.breakpoint-for-interval:not(.breakpoint-paused-icon) .icon): Deleted.
(.breakpoint.event.breakpoint-for-listener:not(.breakpoint-paused-icon) .icon): Deleted.
(.breakpoint.event.breakpoint-for-timeout:not(.breakpoint-paused-icon) .icon): Deleted.
(@media(prefers-color-scheme: dark) .breakpoint.event.breakpoint-for-animation-frame:not(.breakpoint-paused-icon) .icon): Deleted.
(@media(prefers-color-scheme: dark) .breakpoint.event.breakpoint-for-interval:not(.breakpoint-paused-icon) .icon): Deleted.
(@media(prefers-color-scheme: dark) .breakpoint.event.breakpoint-for-listener:not(.breakpoint-paused-icon) .icon): Deleted.
(@media(prefers-color-scheme: dark) .breakpoint.event.breakpoint-for-timeout:not(.breakpoint-paused-icon) .icon): Deleted.
* UserInterface/Views/JavaScriptBreakpointTreeElement.js: Copied from Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js.
(WI.JavaScriptBreakpointTreeElement):
(WI.JavaScriptBreakpointTreeElement.prototype.get filterableData):
(WI.JavaScriptBreakpointTreeElement.prototype.updateStatus): Added.
(WI.JavaScriptBreakpointTreeElement.prototype.updateTitles): Added.
(WI.JavaScriptBreakpointTreeElement.prototype._breakpointLocationDidChange):
* UserInterface/Views/JavaScriptBreakpointTreeElement.css: Copied from Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.css.
(.item.breakpoint.javascript .status > .status-image): Added.
(.item.breakpoint.javascript .status > .status-image.resolved): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.breakpoint.javascript.selected .status > .status-image.resolved): Added.
(.item.breakpoint.javascript .subtitle.formatted-location): Added.
(.item.breakpoint.javascript.line .icon): Added.
(.item.breakpoint.javascript.line .icon > span): Added.
(.data-updated.item.breakpoint.javascript.line .icon > span): Added.
(.item.breakpoint.javascript.debugger-statement .icon): Added.
(.item.breakpoint.javascript.exception .icon): Added.
(.item.breakpoint.javascript.assertion .icon): Added.
(.item.breakpoint.javascript.microtask .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.javascript.line .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.javascript.debugger-statement .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.javascript.exception .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.javascript.assertion .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.javascript.microtask .icon): Added.
* UserInterface/Views/URLBreakpointTreeElement.js:
(WI.URLBreakpointTreeElement):
(WI.URLBreakpointTreeElement.prototype.onattach): Deleted.
(WI.URLBreakpointTreeElement.prototype.ondetach): Deleted.
(WI.URLBreakpointTreeElement.prototype.ondelete): Deleted.
(WI.URLBreakpointTreeElement.prototype.onenter): Deleted.
(WI.URLBreakpointTreeElement.prototype.onspace): Deleted.
(WI.URLBreakpointTreeElement.prototype.populateContextMenu): Deleted.
(WI.URLBreakpointTreeElement.prototype._statusImageElementClicked): Deleted.
(WI.URLBreakpointTreeElement.prototype._statusImageElementFocused): Deleted.
(WI.URLBreakpointTreeElement.prototype._statusImageElementMouseDown): Deleted.
(WI.URLBreakpointTreeElement.prototype._toggleBreakpoint): Deleted.
(WI.URLBreakpointTreeElement.prototype._updateStatus): Deleted.
* UserInterface/Views/URLBreakpointTreeElement.css:
(.item.breakpoint.url .subtitle): Added.
(.item.breakpoint.url:not(.paused) .icon): Added.
(@media (prefers-color-scheme: dark) .item.breakpoint.url:not(.paused) .icon): Added.
(.breakpoint.url .subtitle): Deleted.
(.breakpoint.url:not(.breakpoint-paused-icon) .icon): Deleted.
(@media (prefers-color-scheme: dark) .breakpoint.url:not(.breakpoint-paused-icon) .icon): Deleted.
Rename `WI.BreakpointTreeElement` to `WI.JavaScriptBreakpointTreeElement` and use
`WI.BreakpointTreeElement` as a new common base class for all breakpoint tree elements,
allowing more logic and styles to be shared (e.g. disabled state).
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.closed):
(WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._compareJavaScriptBreakpointTreeElements): Added.
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
(WI.SourcesNavigationSidebarPanel.prototype._removeAllBreakpoints):
(WI.SourcesNavigationSidebarPanel.prototype._breakpointsBeneathTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addIssue):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._compareBreakpointTreeElements): Deleted.
* UserInterface/Models/ProbeSet.js:
(WI.ProbeSet):
(WI.ProbeSet.prototype.createProbe):
(WI.ProbeSet.prototype.willRemove):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype._processRecord):
* UserInterface/Views/ProbeSetDetailsSection.js:
(WI.ProbeSetDetailsSection):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WI.ProbeDetailsSidebarPanel.prototype.inspect):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor):
(WI.SourceCodeTextEditor.prototype.close):
(WI.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype.get supplementalRepresentedObjects):
(WI.TextResourceContentView.prototype._probeSetsChanged):
Probes now support `WI.EventBreakpoint` in addition to `WI.JavaScriptBreakpoint`.
* UserInterface/Views/ContentView.js:
(WI.ContentView.createFromRepresentedObject):
(WI.ContentView.resolvedRepresentedObjectForRepresentedObject):
(WI.ContentView.isViewable):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):
Replace `WI.Breakpoint` with `WI.JavaScriptBreakpoint`.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
Replace `WI.DOMBreakpoint` with `WI.Breakpoint`.
* UserInterface/Views/EventListenerSectionGroup.js:
(WI.EventListenerSectionGroup):
* UserInterface/Views/EventListenerSectionGroup.css:
(.event-listener-section > .content input[type="checkbox"] + .go-to-arrow): Added.
(.event-listener-section > .content input[type="checkbox"]:not(:checked) + .go-to-arrow): Added.
Add a go-to arrow next to the Breakpoint checkbox that reveals the `WI.EventBreakpoint` in
the Sources Tab.
* UserInterface/Views/BreakpointActionView.js:
(WI.BreakpointActionView.prototype._appendActionButtonClicked):
Drive-by: minor code cleanup.
* UserInterface/Views/CallFrameTreeElement.js:
(WI.CallFrameTreeElement.prototype.populateContextMenu):
Drive-by: include source code location context menu items.
* UserInterface/Base/Setting.js:
* UserInterface/Main.html:
* UserInterface/Test.html:
2020-08-24 Devin Rousso <drousso@apple.com>
Web Inspector: remove "extra domains" concept now that domains can be added based on the debuggable type
https://bugs.webkit.org/show_bug.cgi?id=201150
<rdar://problem/56545911>
Reviewed by Brian Burg.
* UserInterface/Base/Object.js:
* UserInterface/Protocol/InspectorObserver.js:
(WI.InspectorObserver.prototype.activateExtraDomains):
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.activateExtraDomain):
* UserInterface/Controllers/AppController.js:
(WI.AppController.prototype.activateExtraDomains):
* UserInterface/Controllers/AnimationManager.js:
(WI.AnimationManager.prototype.activateExtraDomain):
* UserInterface/Controllers/ApplicationCacheManager.js:
(WI.ApplicationCacheManager.prototype.activateExtraDomain):
* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.activateExtraDomain):
* UserInterface/Controllers/DOMStorageManager.js:
(WI.DOMStorageManager.prototype.activateExtraDomain):
* UserInterface/Controllers/DatabaseManager.js:
(WI.DatabaseManager.prototype.activateExtraDomain):
* UserInterface/Controllers/HeapManager.js:
(WI.HeapManager.prototype.activateExtraDomain):
* UserInterface/Controllers/IndexedDBManager.js:
(WI.IndexedDBManager.prototype.activateExtraDomain):
* UserInterface/Controllers/MemoryManager.js:
(WI.MemoryManager.prototype.activateExtraDomain):
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype._extraDomainsActivated):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.activateExtraDomain):
* UserInterface/Base/Main.js:
(WI.activateExtraDomains):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._handleExtraDomainsActivated):
Add compatibility comments.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackend.Domain):
Add FIXMEs.
2020-08-24 Devin Rousso <drousso@apple.com>
Web Inspector: remove legacy code for replacing the Canvas Tab with the Graphics Tab
https://bugs.webkit.org/show_bug.cgi?id=205827
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WI.loaded):
2020-08-24 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Styles: don't show swatches for properties that aren't used/apply
https://bugs.webkit.org/show_bug.cgi?id=215681
Reviewed by Brian Burg.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._renderValue):
2020-08-24 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Styles: don't show non-inherited properties
https://bugs.webkit.org/show_bug.cgi?id=215682
Reviewed by Brian Burg.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
2020-08-24 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Styles: grey out properties that aren't used/apply
https://bugs.webkit.org/show_bug.cgi?id=215680
Reviewed by Brian Burg.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .name:not(.editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .name:not(:hover, .editing)): Added.
(body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .value:not(.editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .value:not(:hover, .editing)): Added.
(body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled):is(.invalid-name, .invalid-value, .other-vendor, .overridden) > .content > .name:not(.editing), body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled):is(.invalid-name, .invalid-value, .other-vendor, .overridden) > .content > .value-container > .value:not(.editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled):is(.invalid-name, .invalid-value, .other-vendor, .overridden) > .content > .name:not(:hover, .editing), body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled):is(.invalid-name, .invalid-value, .other-vendor, .overridden) > .content > .value-container > .value:not(:hover, .editing)): Added.
(body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .value:not(.editing) .token-link, body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .value:not(:hover, .editing) .token-link): Added.
(body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .value:not(.editing) .token-string, body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .value:not(:hover, .editing) .token-string): Added.
(body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .value:not(.editing) .token-comment, body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:not(.disabled, .invalid-name, .invalid-value, .other-vendor, .overridden) > .content .value:not(:hover, .editing) .token-comment): Added.
(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)): Deleted.
(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)): Deleted.
(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): Deleted.
(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): Deleted.
(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): Deleted.
Add additional `:not`s to existing rules to ensure that they don't conflict with a new rule
that changes the color of the `.name`/`.value` to grey when the property is not applied/used.
2020-08-14 Devin Rousso <drousso@apple.com>
Web Inspector: Assertion Failed: Appended a string with newlines. This breaks the source map.
https://bugs.webkit.org/show_bug.cgi?id=215494
Reviewed by Joseph Pecoraro.
* UserInterface/Workers/Formatter/JSFormatter.js:
(JSFormatter.prototype._insertComment):
C-style comments can contain newlines, so use `appendStringWithPossibleNewlines`.
2020-08-14 Devin Rousso <drousso@apple.com>
Web Inspector: Assertion Failed: removeEventListener cannot remove css-manager-style-sheet-added because it doesn't exist.
https://bugs.webkit.org/show_bug.cgi?id=215495
Reviewed by Joseph Pecoraro.
* UserInterface/Views/FrameTreeElement.js:
(WI.FrameTreeElement.prototype.ondetach):
Check `this.listItemElement`, which is equivalent to `WI.View.prototype.didInitialLayout` for `WI.TreeElement`.
2020-08-14 Devin Rousso <drousso@apple.com>
Web Inspector: Assertion Failed: removeEventListener cannot remove frame-main-resource-did-change because it doesn't exist.
https://bugs.webkit.org/show_bug.cgi?id=215496
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
(WI.ChangesDetailsSidebarPanel.prototype.shown):
(WI.ChangesDetailsSidebarPanel.prototype.attached): Added.
(WI.ChangesDetailsSidebarPanel.prototype.detached):
Move event listener to `attach`, which is guaranteed to be called before `detach`.
2020-08-14 Devin Rousso <drousso@apple.com>
Web Inspector: use `WI.DropZoneView` instead of `handleFileDrop`
https://bugs.webkit.org/show_bug.cgi?id=215493
Reviewed by Joseph Pecoraro.
`WI.DropZoneView` indicates that things can be dropped, whereas `handleFileDrop` has no UI.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI._handleDrop): Deleted.
* UserInterface/Views/AuditTabContentView.js:
(WI.AuditTabContentView.prototype.dropZoneShouldAppearForDragEvent): Added.
(WI.AuditTabContentView.prototype.dropZoneHandleDrop): Added.
(WI.AuditTabContentView.prototype.initialLayout):
(WI.AuditTabContentView.prototype.async handleFileDrop): Deleted.
* UserInterface/Views/GraphicsTabContentView.js:
(WI.GraphicsTabContentView.prototype.dropZoneShouldAppearForDragEvent): Added.
(WI.GraphicsTabContentView.prototype.dropZoneHandleDrop): Added.
(WI.GraphicsTabContentView.prototype.initialLayout):
(WI.GraphicsTabContentView.prototype.async handleFileDrop): Deleted.
* UserInterface/Views/NetworkTabContentView.js:
(WI.NetworkTabContentView.prototype.initialLayout):
(WI.NetworkTabContentView.prototype.dropZoneShouldAppearForDragEvent): Added.
(WI.NetworkTabContentView.prototype.dropZoneHandleDrop): Added.
(WI.NetworkTabContentView.prototype.async handleFileDrop): Deleted.
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.prototype.dropZoneShouldAppearForDragEvent): Added.
(WI.TimelineTabContentView.prototype.dropZoneHandleDrop): Added.
(WI.TimelineTabContentView.prototype.initialLayout):
(WI.TimelineTabContentView.prototype.async handleFileDrop): Deleted.
* UserInterface/Views/GraphicsOverviewContentView.js:
(WI.GraphicsOverviewContentView.prototype.initialLayout):
(WI.GraphicsOverviewContentView.prototype.dropZoneShouldAppearForDragEvent): Deleted.
(WI.GraphicsOverviewContentView.prototype.dropZoneHandleDrop): Deleted.
Remove this `WI.DropZoneView` as it's now handled by `WI.GraphicsTabContentView`.
* Localizations/en.lproj/localizedStrings.js:
2020-08-14 Patrick Angle <pangle@apple.com>
Web Inspector: add aria-label for [>>] overflow tab picker
https://bugs.webkit.org/show_bug.cgi?id=215342
<rdar://problem/66804113>
Reviewed by Devin Rousso.
* UserInterface/Views/TabBar.js: Moved title for `tabPickerTabBarItem` to `title` attribute instead of the unused `displayName` argument
(WI.TabBar):
2020-08-14 Patrick Angle <pangle@apple.com>
REGRESSION (r265224): Web Inspector: LOCALIZED STRING NOT FOUND next to the Image checkbox in the Sources prefs panel
https://bugs.webkit.org/show_bug.cgi?id=215387
<rdar://problem/66855263>
Reviewed by Devin Rousso.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/LoadLocalizedStrings.js:
(WI.repeatedUIString.showTransparencyGridTooltip):
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView):
* UserInterface/Views/GraphicsOverviewContentView.js:
(WI.GraphicsOverviewContentView):
* UserInterface/Views/ImageResourceContentView.js:
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView):
* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createSourcesSettingsView):
2020-08-12 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r259170): text inputs in box-shadow editor push sliders offscreen
https://bugs.webkit.org/show_bug.cgi?id=215436
Reviewed by Darin Adler.
* UserInterface/Views/BoxShadowEditor.js:
(WI.BoxShadowEditor.createInputRow):
Make sure the inputs are `type="text"` so that CSS is able to distinguish them from sliders.
2020-08-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Clicking on sortable Table headers should expand vertical borders
https://bugs.webkit.org/show_bug.cgi?id=215140
Reviewed by Devin Rousso.
* UserInterface/Views/Table.css:
(.table > .header .cell:not(:first-child):active::before,):
2020-08-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Dark Mode: Timelines: wrong background colors of even/odd items
https://bugs.webkit.org/show_bug.cgi?id=214565
<rdar://problem/65841762>
Reviewed by Darin Adler.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview.edit-instruments > .tree-outline.timelines .item:nth-child(even),):
(.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:not(:first-child)):
2020-08-06 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Media & Animations timeline shouldn't shift when sorting
https://bugs.webkit.org/show_bug.cgi?id=215085
Reviewed by Devin Rousso.
* UserInterface/Views/DataGrid.css:
(.data-grid):
(.data-grid th):
(.data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child::after):
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline th.graph-column > .timeline-ruler):
Override padding defined in `.data-grid th > .header-cell-content`.
(.data-grid.timeline th > .header-cell-content.timeline-ruler > .markers):
(.data-grid.timeline th:matches(.sort-ascending, .sort-descending) > .header-cell-content.timeline-ruler:first-child::after):
`.header-cell-content.timeline-ruler` is different from `.header-cell-content` in the sense that the former takes the entire
height of DataGrid and has no padding. Place the chevron in the middle of `--data-grid-header-height`.
2020-08-05 Tim Horton <timothy_horton@apple.com>
Remove all references to non-existent 10.16
https://bugs.webkit.org/show_bug.cgi?id=215202
Reviewed by Wenson Hsieh.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:
2020-08-04 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Use border-inline-start/end properties instead of border-left/right for DataGrid and Table
https://bugs.webkit.org/show_bug.cgi?id=215138
Reviewed by Devin Rousso.
Simplify LTR/RTL CSS code by using logical CSS properties. This patch doesn't introduce any visual changes.
* UserInterface/Views/DataGrid.css:
(.data-grid):
(.data-grid th:not(:last-child) > .header-cell-content):
(.data-grid:focus tr.selected td:not(:last-child)):
(body[dir=ltr] .data-grid th:not(:last-child) > .header-cell-content): Deleted.
(body[dir=rtl] .data-grid th:not(:last-child) > .header-cell-content): Deleted.
(body[dir=ltr] .data-grid:focus tr.selected td:not(:last-child)): Deleted.
(body[dir=rtl] .data-grid:focus tr.selected td:not(:last-child)): Deleted.
* UserInterface/Views/NetworkDetailView.css:
(.network-table.showing-detail .network-detail):
(body[dir=ltr] .network-table.showing-detail .network-detail): Deleted.
(body[dir=rtl] .network-table.showing-detail .network-detail): Deleted.
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline td.graph-column):
(body[dir=ltr] .data-grid.timeline td.graph-column): Deleted.
(body[dir=rtl] .data-grid.timeline td.graph-column): Deleted.
2020-08-03 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Change DataGrid and Table styles to closer match macOS
https://bugs.webkit.org/show_bug.cgi?id=214563
<rdar://problem/65841032>
Reviewed by Devin Rousso.
- Remove vertical borders from table contents and only keep them on the table headers.
- Use 1px borders instead of hairline (0.5px) borders to closer match macOS.
- Refactoring: add "sorted" CSS class on sorted header columns to replace `th:matches(.sort-ascending, .sort-descending)`
that is used 10 times with `.sorted`.
* UserInterface/Views/CPUTimelineView.css:
(.timeline-view.cpu :matches(.area-chart, .stacked-area-chart) .markers > div):
* UserInterface/Views/DataGrid.css:
(.data-grid):
--data-grid-column-border-start is no longer used, remove it.
(.data-grid.inline):
(.data-grid th):
(.data-grid th > .header-cell-content):
(body[dir=ltr] .data-grid th:not(:last-child) > .header-cell-content):
(body[dir=rtl] .data-grid th:not(:last-child) > .header-cell-content):
(.data-grid th.sortable:active):
(.data-grid th:matches(.sort-ascending, .sort-descending)):
(.data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child):
(.data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child::after):
(body[dir=ltr] .data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child::after):
(body[dir=rtl] .data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child::after):
Remove styles that are no longer relevant because columns don't have vertical borders anymore.
(.data-grid th.sort-ascending > .header-cell-content:first-child::after):
(.data-grid th.sort-descending > .header-cell-content:first-child::after):
(@media (prefers-color-scheme: dark) .data-grid th:matches(.sort-ascending, .sort-descending) > .header-cell-content:first-child::after):
Don't change the background color of the sorted header cells to match macOS.
(body[dir=ltr] .data-grid :matches(th, td):not(:last-child)): Deleted.
(body[dir=rtl] .data-grid :matches(th, td):not(:last-child)): Deleted.
(.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child): Deleted.
(.data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child::after): Deleted.
(body[dir=ltr] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child::after): Deleted.
(body[dir=rtl] .data-grid th:matches(.sort-ascending, .sort-descending) > div:first-child::after): Deleted.
(.data-grid th.sort-ascending > div:first-child::after): Deleted.
(.data-grid th.sort-descending > div:first-child::after): Deleted.
(.data-grid table:matches(.header, .data)): Deleted.
(body[dir=ltr] .data-grid :matches(th, td):first-child): Deleted.
(body[dir=rtl] .data-grid :matches(th, td):first-child): Deleted.
(@media (-webkit-min-device-pixel-ratio: 2) .data-grid table:matches(.header, .data)): Deleted.
(@media (-webkit-min-device-pixel-ratio: 2) .data-grid :matches(th, td):first-child): Deleted.
(@media (prefers-color-scheme: dark) .data-grid th.sortable:active): Deleted.
(@media (prefers-color-scheme: dark) .data-grid th.sort-ascending > div:first-child::after,): Deleted.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.insertColumn):
* UserInterface/Views/NetworkDetailView.css:
(body[dir=ltr] .network-table.showing-detail .network-detail):
(body[dir=rtl] .network-table.showing-detail .network-detail):
Now that columns don't have borders, add a vertical border to the Network details pane.
* UserInterface/Views/NetworkTableContentView.css:
(.network-table > .table .header .cell.waterfall:matches(.sort-ascending, .sort-descending)):
(body[dir=ltr] .network-table > .table :not(.header) .cell.waterfall):
(body[dir=rtl] .network-table > .table :not(.header) .cell.waterfall):
Add a vertical border for the zeroth mark of the graph.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
(.timeline-overview-graph.rendering-frame > .divider):
* UserInterface/Views/Table.css:
(.table):
(.table > .header > .sortable:active):
(.table > .header > :matches(.sort-ascending, .sort-descending)):
(.table > .header .cell):
(.table > .header .cell:not(:first-child)::before):
(body[dir=ltr] .table > .header .cell:not(:first-child)::before):
(body[dir=rtl] .table > .header .cell:not(:first-child)::before):
(body[dir=ltr] .table .cell:not(:last-child)): Deleted.
(body[dir=rtl] .table .cell:not(:last-child)): Deleted.
(body[dir=ltr] .table .cell:first-child): Deleted.
(body[dir=rtl] .table .cell:first-child): Deleted.
(@media (prefers-color-scheme: dark) .table > .header > .sortable:active): Deleted.
(@media (prefers-color-scheme: dark) .table > .header > :matches(.sort-ascending, .sort-descending)): Deleted.
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid th.graph-column:matches(.sort-ascending, .sort-descending)):
(.data-grid.timeline th.graph-column > .timeline-ruler):
(body[dir=ltr] .data-grid.timeline td.graph-column):
(body[dir=rtl] .data-grid.timeline td.graph-column):
Add a vertical border for the zeroth mark of the graph.
(.data-grid.timeline td.graph-column .timeline-record-bar):
(@media (prefers-color-scheme: dark) .data-grid th:matches(.sort-ascending, .sort-descending)): Deleted.
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .header > .divider > .label):
Reset font-weight from sorted column header.
(.timeline-ruler > .markers > .divider):
* UserInterface/Views/Variables.css:
(:root):
(@media (prefers-color-scheme: dark) :root):
Use more precise color for --even-zebra-stripe-row-background-color.
Drive-by: remove unused --border-color-dark variable.
2020-08-03 Brian Burg <bburg@apple.com>
Web Inspector: "Show transparency grid" string needs to be disambiguated for localization
https://bugs.webkit.org/show_bug.cgi?id=215101
Reviewed by Darin Adler.
Add two different string keys with the same English translation. This is specifically
needed for Portuguese, apparently.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView):
* UserInterface/Views/GraphicsOverviewContentView.js:
(WI.GraphicsOverviewContentView):
* UserInterface/Views/ImageResourceContentView.js:
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView):
* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createSourcesSettingsView):
2020-08-03 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r243301): Network: initiator column missing
https://bugs.webkit.org/show_bug.cgi?id=215044
Reviewed by Brian Burg.
* UserInterface/Views/NetworkTimelineView.js:
(WI.NetworkTimelineView):
2020-07-30 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r?): Web Inspector: Timelines: blue border below selected timeline when in edit mode
https://bugs.webkit.org/show_bug.cgi?id=214979
<rdar://problem/66338399>
Reviewed by Devin Rousso.
Color the top border after the selected item with the same background as the selected item.
When editing, don't color that border with the selected item background.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview.edit-instruments > .tree-outline.timelines .item:not(:first-child),):
(body:matches(.window-inactive, .window-docked-inactive) .timeline-overview:not(.edit-instruments) > .tree-outline.timelines .item.selected + .item):
(body:not(.window-inactive, .window-docked-inactive) .timeline-overview:not(.edit-instruments) > .tree-outline.timelines:focus-within .item.selected + .item):
(@media (prefers-color-scheme: dark) .timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:nth-child(even)):
(.timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
(body:not(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines:focus-within .item.selected + .item): Deleted.
(@media (prefers-color-scheme: dark) .timeline-overview.edit-instruments > .tree-outline.timelines .item:not(:first-child),): Deleted.
(@media (prefers-color-scheme: dark) .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
2020-07-30 Devin Rousso <drousso@apple.com>
Web Inspector: Add another Protocol Version (iOS 14.0)
https://bugs.webkit.org/show_bug.cgi?id=214991
<rdar://problem/59156892>
Reviewed by Brian Burg.
* UserInterface/Protocol/Legacy/14.0/InspectorBackendCommands.js: Added.
* Versions/Inspector-iOS-14.0.json: Added.
2020-07-30 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: on Big Sur, match OS background, text, and border colors
https://bugs.webkit.org/show_bug.cgi?id=214366
<rdar://problem/65617290>
Reviewed by Devin Rousso.
Refactoring:
- Remove --background-color-code because it was always the same value as --background-color-content.
- Replace commonly hardcoded `hsl(0, 0%, 97%)` background with --background-color-intermediate.
* UserInterface/Views/AnimationDetailsSidebarPanel.css:
(.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section):
(.sidebar > .panel.details.animation > .content > .details-section.animation-keyframes .details-section .row.styles .CodeMirror):
* UserInterface/Views/BoxShadowEditor.css:
(.box-shadow-editor > table > tr > td > input[type="text"]):
* UserInterface/Views/BreakpointActionView.css:
(@media (prefers-color-scheme: dark) .breakpoint-action-eval-editor):
* UserInterface/Views/BreakpointPopoverController.css:
(.edit-breakpoint-popover-condition):
* UserInterface/Views/ChangesDetailsSidebarPanel.css:
(.sidebar > .panel.changes-panel .css-rule):
* UserInterface/Views/ComputedStyleSection.css:
(.computed-style-section .computed-property-item.expanded):
(.computed-style-properties.details-section > .content,):
* UserInterface/Views/ConsolePrompt.css:
(.console-prompt):
(.console-prompt > .CodeMirror-scroll):
* UserInterface/Views/CookiePopover.css:
(.popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"])):
* UserInterface/Views/DetailsSection.css:
(.details-section .details-section):
(.details-section .details-section > .header):
Refactor. --background-color-content is the same color value.
(.details-section .details-section:not(.collapsed) > .header):
Refactor. --border-color-secondary is the same color value.
(.details-section > .content > .group:nth-child(even)):
(.details-section > .content > .group > .row:matches(.empty, .text)):
(@media (prefers-color-scheme: dark) .details-section > .header > label,):
* UserInterface/Views/DividerNavigationItem.css:
(.navigation-bar .item.divider):
Don't use hairline dividers. MacOS Catalina and Big Sur don't use hairline borders.
* UserInterface/Views/GraphicsOverviewContentView.css:
(.content-view.graphics-overview > section > .header):
(@media (prefers-color-scheme: dark) .content-view.graphics-overview):
* UserInterface/Views/LocalResourceOverridePopover.css:
(.popover .local-resource-override-popover-content .editor):
* UserInterface/Views/LogContentView.css:
(@media (prefers-color-scheme: dark) .console-messages):
* UserInterface/Views/QuickConsole.css:
(.quick-console):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.css:
(@media (prefers-color-scheme: dark) .watch-expression-editor):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration):
(.spreadsheet-css-declaration.locked):
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
(@media (prefers-color-scheme: dark) .cm-s-default,):
* UserInterface/Views/TabBar.css:
(body.big-sur.docked .tab-bar > .border.bottom):
* UserInterface/Views/URLBreakpointPopover.css:
(.popover .url-breakpoint-content > .editor-wrapper > .editor):
* UserInterface/Views/Variables.css:
(:root):
Add --separator-color, which has the same semantics as `separator` color from Apple HIG
(https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/color/#dynamic-system-colors).
--border-color-secondary was only defined in the dark mode. Define it in the light mode, too.
(body.window-inactive):
Remove unused variable.
(body.big-sur):
(@media (prefers-color-scheme: dark) :root):
(@media (prefers-color-scheme: dark) body.big-sur):
(@media (prefers-color-scheme: dark) body.window-inactive):
(body.window-inactive *): Remove unnecessarily greedy selector.
2020-07-30 Devin Rousso <drousso@apple.com>
Web Inspector: only show scrollbars when needed
https://bugs.webkit.org/show_bug.cgi?id=214980
Reviewed by Brian Burg.
Prefer `overflow: auto;` instead of `overflow: scroll;` wherever possible, as when using a
hardware mouse scrollbars are always shown for the latter, even when the content fits.
* UserInterface/Debug/UncaughtExceptionReporter.css:
(.sheet-container):
* UserInterface/Views/AuditTestContentView.css:
(.content-view-container > .content-view.audit-test):
* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview > .content-view.canvas.saved-recordings .tree-outline):
* UserInterface/Views/CanvasSidebarPanel.css:
(.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
* UserInterface/Views/DOMEventsBreakdownView.css:
(.waterfall-popover-content .dom-events-breakdown):
* UserInterface/Views/DOMNodeEventsContentView.css:
(.dom-node-details.dom-events):
* UserInterface/Views/GraphicsOverviewContentView.css:
(.content-view.graphics-overview):
* UserInterface/Views/LocalRemoteObjectContentView.css:
(.content-view.local-remote-object):
* UserInterface/Views/NetworkResourceDetailView.css:
(.content-view.resource-details):
* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog > .tree-outline):
* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content > .body):
* UserInterface/Views/CPUTimelineView.css:
(.timeline-view.cpu): Added.
(body .timeline-view.cpu): Deleted.
* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory): Added.
(body .timeline-view.memory): Deleted.
Although `!important` is kind of a "hack", adding `body` to the selector is more of a "hack"
and is easier to unintentionally break.
2020-07-28 Brian Burg <bburg@apple.com>
Web Inspector: REGRESSION(r255396): Audit: button to exit edit mode in main content area is missing border
https://bugs.webkit.org/show_bug.cgi?id=214898
<rdar://problem/66238391>
Reviewed by Devin Rousso.
* UserInterface/Base/Main.js: codify that this function only accepts ButtonNavigationItems.
Future developers, you'll need to adjust the CSS for non-button navigation items to work out.
* UserInterface/Views/Main.css:
(.navigation-item-help > .navigation-bar > .item.button):
(.navigation-item-help > .navigation-bar > .item.button:not(.text-only)):
(.navigation-item-help > .navigation-bar > .item.button.text-only):
(.navigation-item-help > .navigation-bar > .item): Deleted.
(.navigation-item-help > .navigation-bar > .item:not(.text-only)): Deleted.
(.navigation-item-help > .navigation-bar > .item.text-only): Deleted.
Split out the rules for text-only buttons. The regressing change added more specificity
for the text + image case which made the border transparent and removed extra padding.
Also add .button since we only expect buttons to be used in this context.
2020-07-28 Brian Burg <bburg@apple.com>
REGRESSION(r262716) Web Inspector: start button is misaligned in Audit content view
https://bugs.webkit.org/show_bug.cgi?id=214891
Reviewed by Devin Rousso.
In r262716, a rendering defect related to flexbox was fixed. Web Inspector
layout inadvertently relied on the defect. Now that it's fixed, a CSS rule is
pushing the outline for navigation help buttons out of vertical alignment
with surrounding textt.
* UserInterface/Views/Main.css:
(.navigation-item-help): Remove line-height. It was previously ignored
due to a layout bug, and now its presence messes up vertical alignment.
2020-07-27 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Change default tab order to display most commonly used tabs first
https://bugs.webkit.org/show_bug.cgi?id=212189
<rdar://problem/62267309>
Reviewed by Timothy Hatcher.
Changet the default tab order to:
Elements, Console, Sources, Network, Timelines, Storage, Graphics, Layers, Audit.
* UserInterface/Base/Main.js:
(WI.loaded):
2020-07-22 Conrad Shultz <conrad_shultz@apple.com>
Update macOS Version macros
https://bugs.webkit.org/show_bug.cgi?id=214653
Reviewed by Tim Horton.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:
2020-07-22 Brian Burg <bburg@apple.com>
Web Inspector: Sources tab empty, sidebar nonfunctional
https://bugs.webkit.org/show_bug.cgi?id=214611
<rdar://problem/65898051>
Reviewed by Devin Rousso.
This is caused when a subresource fails its initial load. This generates a
networking IssueMessage without a source code location, which is not adequately handled.
* UserInterface/Views/IssueTreeElement.js:
(WI.IssueTreeElement.prototype._updateTitles):
(WI.IssueTreeElement):
If there is no sourceCodeLocation for the issue, then don't try to compute line numbers.
2020-07-21 Devin Rousso <drousso@apple.com>
Web Inspector: unable to save files that are base64 encoded
https://bugs.webkit.org/show_bug.cgi?id=214601
Reviewed by Brian Burg.
* UserInterface/Models/SourceCode.js:
(WI.SourceCode.prototype.get base64Encoded): Added.
Expose if the current content is base64 encoded. The current content is already exposed.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):
Include the base64 encoded state in the save data.
2020-07-21 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Styles: don't blur the add class input when a class is added
https://bugs.webkit.org/show_bug.cgi?id=214604
Reviewed by Brian Burg.
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype._addClassInputKeyPressed):
(WI.GeneralStyleDetailsSidebarPanel.prototype._addClassInputBlur):
(WI.GeneralStyleDetailsSidebarPanel.prototype._addClassFromInput): Added.
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .class-list-container):
Drive-by: don't show a scrollbar unless needed.
2020-07-21 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(?): file names are not shown in the open resource dialog
https://bugs.webkit.org/show_bug.cgi?id=214605
Reviewed by Brian Burg.
When a `DocumentFragment` is added to a parent node, the children of the `DocumentFragment`
are added as children of the parent instead of the `DocumentFragment` itself, effectively
emptying the `DocumentFragment`, meaning that adding that `DocumentFragment` to a parent
node again will basically do nothing as there are no children for that `DocumentFragment`.
* UserInterface/Views/GeneralTreeElement.js:
(WI.GeneralTreeElement.prototype._updateTitleElements):
Because the `_mainTitleElement`/`_subtitleElement` is cleared (`removeChildren`), if the
`_mainTitle`/`_subtitle` is a `DocumentFragment` nothing will be added due to the above.
Instead, if the `_mainTitle`/`_subtitle` is a `DocumentFragment`, change it to be the
`textContent` of the `_mainTitleElement`/`_subtitleElement` so that the above does not
happen and so that future calls to `_updateTitleElements` won't make any changes the
`_mainTitle`/`_subtitle` is now a `String` which matches the `textContent`.
2020-07-15 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Tab bar colors of undocked Inspector should match Safari in Big Sur
https://bugs.webkit.org/show_bug.cgi?id=214163
<rdar://problem/65293335>
Reviewed by Brian Burg.
* UserInterface/Views/Main.css:
(#undocked-title-area):
(body.big-sur #undocked-title-area):
(body:not(.big-sur) #undocked-title-area):
(body.window-inactive #undocked-title-area):
(@media (prefers-color-scheme: dark) body.big-sur #undocked-title-area):
(@media (prefers-color-scheme: dark) body:not(.big-sur) #undocked-title-area):
(@media (prefers-color-scheme: dark) body.big-sur.window-inactive #undocked-title-area):
(@media (prefers-color-scheme: dark) body:not(.big-sur).window-inactive #undocked-title-area):
* UserInterface/Views/TabBar.css:
(.tab-bar):
(body.big-sur .tab-bar):
(body:not(.docked) .tab-bar):
(body.big-sur:not(.docked) .tab-bar):
(body:not(.big-sur):not(.docked) .tab-bar):
(body.big-sur:not(.docked).window-inactive .tab-bar,):
(.tab-bar > .border):
(.tab-bar > .tabs > .item):
(body:not(.docked) .tab-bar > .tabs > .item):
(body.big-sur:not(.docked) .tab-bar > .tabs > .item):
(body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item):
(body.big-sur:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected):
(body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected):
(body.big-sur:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover):
(body:not(.big-sur):not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover):
(body:not(.docked).window-inactive .tab-bar > .tabs > .item):
(body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item,):
(body:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected):
(.tab-bar > .tabs.animating.inserting-tab > .item.being-inserted):
(.tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) body.big-sur .tab-bar,):
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar):
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar):
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item):
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover):
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover):
(@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar):
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar,):
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item):
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item):
(@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected):
2020-07-13 Brian Burg <bburg@apple.com>
Web Inspector: wrong bundle version being used for WebInspectorUI.framework in macOS Big Sur
https://bugs.webkit.org/show_bug.cgi?id=214274
Reviewed by Tim Horton.
* Configurations/Version.xcconfig: Make this match other Version.xcconfig after
the changes in <https://trac.webkit.org/changeset/263364>.
2020-07-09 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: title bar of undocked inspector should be white in BigSur
https://bugs.webkit.org/show_bug.cgi?id=214161
<rdar://problem/65289224>
Reviewed by Brian Burg.
Make the title bar white when the window is focused.
When the window is unfocused, the title bar background is
the same on Big Sur and Catalina. No changes were needed.
* UserInterface/Views/Main.css:
(#undocked-title-area):
(body.big-sur #undocked-title-area):
(body:not(.big-sur) #undocked-title-area):
(@media (prefers-color-scheme: dark) #undocked-title-area):
(@media (prefers-color-scheme: dark) body.big-sur #undocked-title-area):
(@media (prefers-color-scheme: dark) body:not(.big-sur) #undocked-title-area):
2020-07-08 Christopher Reid <chris.reid@sony.com>
Heap Snapshot Object Graph view doesn't get populated in some cases when inspecting a JSContext
https://bugs.webkit.org/show_bug.cgi?id=214054
Reviewed by Devin Rousso.
When JSContexts are created with a custom globalObjectClass, that object is an
instance of CallbackGlobalObject and not GlobalObject so the view doesn't get populated.
Add instances of CallbackGlobalObject to the Object Graph view as top level nodes.
* UserInterface/Views/HeapSnapshotDataGridTree.js:
2020-07-07 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: show an error message if unable to fetch shader source
https://bugs.webkit.org/show_bug.cgi?id=213661
Reviewed by Brian Burg.
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView):
(WI.ShaderProgramContentView.prototype._refreshContent):
* UserInterface/Views/ShaderProgramContentView.css:
(.content-view.shader-program > .spinner-container): Added.
(.content-view.shader-program > .spinner-container > .indeterminate-progress-spinner): Added.
2020-07-03 Sam Weinig <weinig@apple.com>
Add "-Wliteral-conversion" warning to Xcode based builds and fix the issues it finds
https://bugs.webkit.org/show_bug.cgi?id=213931
Reviewed by Darin Adler.
* Configurations/Base.xcconfig:
Add -Wliteral-conversion.
2020-07-02 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Allow selecting text of Response (DOM Tree)
https://bugs.webkit.org/show_bug.cgi?id=213617
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom.non-selectable):
2020-07-01 Devin Rousso <drousso@apple.com>
Web Inspector: add back support for 10.3.1
https://bugs.webkit.org/show_bug.cgi?id=213764
Reviewed by Brian Burg.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.webSocketWillSendHandshakeRequest):
(WI.NetworkManager.prototype.markResourceRequestAsServedFromMemoryCache): Added.
(WI.NetworkManager.prototype.resourceRequestDidReceiveResponse):
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.legacyMarkServedFromMemoryCache): Added.
(WI.Resource.prototype.legacyMarkServedFromDiskCache): Added.
* UserInterface/Models/WebSocketResource.js:
(WI.WebSocketResource.prototype.addFrame):
* UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: Added.
* UserInterface/Protocol/NetworkObserver.js:
(WI.NetworkObserver.prototype.requestServedFromCache): Added.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WI.NetworkTimelineView):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
* UserInterface/Views/WebSocketContentView.js:
(WI.WebSocketContentView):
(WI.WebSocketContentView.prototype._addRow):
* Versions/Inspector-iOS-10.3.json: Added.
2020-06-30 Andy Estes <aestes@apple.com>
[Xcode] Enable the "My Mac (Mac Catalyst)" destination in WebKit Xcode projects
https://bugs.webkit.org/show_bug.cgi?id=213740
Reviewed by Darin Adler.
* Configurations/Base.xcconfig: Set SUPPORTS_MACCATALYST to YES to tell Xcode that this
project supports building for Mac Catalyst.
2020-06-23 Devin Rousso <drousso@apple.com>
Web Inspector: add a tooltip to the icon of overridden resources to clarify meaning
https://bugs.webkit.org/show_bug.cgi?id=213531
Reviewed by Brian Burg.
* UserInterface/Views/LocalResourceOverrideWarningView.js:
(WI.LocalResourceOverrideWarningView.prototype.initialLayout):
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._responseSourceDisplayString):
Rephrase "local resource override" to just "local override" to match the reference page name.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._populateNameCell.createIconElement):
(WI.NetworkTableContentView.prototype._populateNameCell):
(WI.NetworkTableContentView.prototype._populateTransferSizeCell):
Add a `title` for the special transfer size cases, such as for `(local override)`.
* UserInterface/Views/ResourceTreeElement.js:
(WI.ResourceTreeElement.prototype._updateIcon):
* UserInterface/Views/ResourceSizesContentView.js:
(WI.ResourceSizesContentView.prototype.initialLayout):
* UserInterface/Views/TimelineDataGridNode.js:
(WI.TimelineDataGridNode.prototype.createCellContent):
(WI.TimelineDataGridNode.prototype.generateIconTitle): Added.
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WI.ResourceTimelineDataGridNode.prototype.get data):
(WI.ResourceTimelineDataGridNode.prototype.generateIconTitle): Added.
Add a `title` to the overridden resource icon that clarifies the fact that the resource was
overridden by a local override.
* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WI.LayoutTimelineDataGridNode.prototype.get data):
Cache the `initiatorCallFrame` in the `source` column as well as the `initiator` column, as
it is used by the general timeline overview table.
* UserInterface/Views/DataGridNode.js:
(WI.DataGridNode.prototype.createCell):
(WI.DataGridNode.prototype.generateIconTitle): Added.
Provide a way to set a `title` on just the icon.
* Localizations/en.lproj/localizedStrings.js:
2020-06-23 Devin Rousso <drousso@apple.com>
Web Inspector: adjust height of undocked title area to match macOS Big Sur
https://bugs.webkit.org/show_bug.cgi?id=213490
Reviewed by Brian Burg.
* UserInterface/Views/Variables.css:
(body.mac-platform.big-sur:not(.docked)):
The title bar height is based on the close/minimize/maximize buttons, not the title text.
2020-06-23 Devin Rousso <drousso@apple.com>
Keyframe animation doesn't 't show up in the Animations timeline
https://bugs.webkit.org/show_bug.cgi?id=213441
Reviewed by Brian Burg.
* UserInterface/Models/Animation.js:
(WI.Animation):
(WI.Animation.prototype._updateEffect):
An `interationCount` of `Infinity` is not JSON serializable, so represent it as `-1` instead.
* UserInterface/Models/MediaTimelineRecord.js:
(WI.MediaTimelineRecord):
* UserInterface/Views/MediaTimelineDataGridNode.js:
(WI.MediaTimelineDataGridNode.prototype.createCellContent):
(WI.MediaTimelineDataGridNode.prototype.filterableDataForColumn):
The DOM node may not be able to be instrumented if the timeline recording starts before the
frontend has had a chance to request the main document, so it's possible for the DOM node
to not be set.
2020-06-22 Devin Rousso <drousso@apple.com>
Web Inspector: adjust height of undocked title area to match macOS Big Sur
https://bugs.webkit.org/show_bug.cgi?id=213490
Reviewed by Timothy Hatcher.
* UserInterface/Views/Variables.css:
(body.mac-platform:not(.big-sur):not(.docked)): Added.
(body.mac-platform.big-sur:not(.docked)): Added.
(body.mac-platform:not(.docked)): Deleted.
* UserInterface/Base/Platform.js:
Add logic for detecting macOS Big Sur (and Catalina).
2020-06-22 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Node: use a `WI.ContextMenu` instead of a `<select>` for listener filtering
https://bugs.webkit.org/show_bug.cgi?id=213492
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
(WI.DOMNodeDetailsSidebarPanel.prototype._populateEventListenersFilterContextMenu): Added.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter > select): Deleted.
* Localizations/en.lproj/localizedStrings.js:
2020-06-22 Tim Horton <timothy_horton@apple.com>
Update macOS version macros
https://bugs.webkit.org/show_bug.cgi?id=213484
Reviewed by Alexey Proskuryakov.
* Configurations/DebugRelease.xcconfig:
* Configurations/WebKitTargetConditionals.xcconfig:
2020-06-18 Devin Rousso <drousso@apple.com>
Web Inspector: Console: add comments for localized strings in execution context picker
https://bugs.webkit.org/show_bug.cgi?id=213280
Reviewed by Joseph Pecoraro.
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype._populateActiveExecutionContextNavigationItemContextMenu):
* Localizations/en.lproj/localizedStrings.js:
2020-06-16 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: objects in Scope Chain panel flicker when resizing details sidebar
https://bugs.webkit.org/show_bug.cgi?id=213234
<rdar://problem/64391213>
Reviewed by David Kilzer.
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WI.ScopeChainDetailsSidebarPanel.prototype.layout):
Don't regenerate the DOM in `layout` unless the reason is `WI.View.LayoutReason.Dirty`, such
as if the current call frame changes or a watch expression is added/updated/removed.
2020-06-15 Pavel Feldman <pavel.feldman@gmail.com>
Web Inspector: introduce request interception
https://bugs.webkit.org/show_bug.cgi?id=207446
Reviewed by Devin Rousso.
This change introduces network request interception to the Network
protocol domain. It adds Network.interceptWithRequest notification that
can be continued, modified or fulfilled. NetworkStage enum can now have
'request' and 'response' values.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.addLocalResourceOverride):
(WI.NetworkManager.prototype.removeLocalResourceOverride):
(WI.NetworkManager.prototype.requestIntercepted):
(WI.NetworkManager.prototype.responseIntercepted):
(WI.NetworkManager.prototype._handleResourceOverrideDisabledChanged):
* UserInterface/Protocol/NetworkObserver.js:
(WI.NetworkObserver.prototype.requestIntercepted):
2020-06-12 Devin Rousso <drousso@apple.com>
Web Inspector: modify initial content localized string for Inspector Bootstrap Script
https://bugs.webkit.org/show_bug.cgi?id=213134
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.async createBootstrapScript):
* Localizations/en.lproj/localizedStrings.js:
2020-06-10 Devin Rousso <drousso@apple.com>
Web Inspector: text inputs should not spellcheck
https://bugs.webkit.org/show_bug.cgi?id=213032
<rdar://problem/64195429>
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WI._handleDeviceSettingsTabBarButtonClicked.showUserAgentInput):
* UserInterface/Views/BoxShadowEditor.js:
(WI.BoxShadowEditor):
* UserInterface/Views/CookiePopover.js:
(WI.CookiePopover.prototype.show.createInputRow):
* UserInterface/Views/EditableDataGridNode.js:
(WI.EditableDataGridNode.prototype.createCellContent):
* UserInterface/Views/InputPopover.js:
(WI.InputPopover.prototype.show):
* UserInterface/Views/ProbeSetDetailsSection.js:
(WI.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createConsoleSettingsView):
2020-06-10 Devin Rousso <drousso@apple.com>
Web Inspector: XHR request with same URL as main resource will hide the main resource request
https://bugs.webkit.org/show_bug.cgi?id=212850
<rdar://problem/33072149>
Reviewed by Brian Burg.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype._addNewResourceToFrameOrTarget):
When creating a new resource, don't re-use the frame's main resource if the URL matches.
2020-06-09 Devin Rousso <drousso@apple.com>
Web Inspector: allow multiple resources for a given URL
https://bugs.webkit.org/show_bug.cgi?id=212852
Reviewed by Brian Burg.
Previously, when a new resource is added with a URL that matches an existing resource, any
`resourceForURL` call with that URL will return the new resource instead of the old one. Now
that there is a `Multimap` of URL to resource, it is possible to pick which resource is used
instead of always using the newest one.
* UserInterface/Models/ResourceCollection.js:
(WI.ResourceCollection):
(WI.ResourceCollection.prototype.resourcesForURL): Added.
(WI.ResourceCollection.prototype._associateWithResource):
(WI.ResourceCollection.prototype._disassociateWithResource):
(WI.ResourceCollection.prototype._resourceURLDidChange):
(WI.ResourceCollection.prototype.resourceForURL): Deleted.
* UserInterface/Models/Frame.js:
(WI.Frame.prototype.resourcesForURL): Added.
(WI.Frame.prototype.resourceForURL): Deleted.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.resourcesForURL): Added.
(WI.NetworkManager.prototype.resourceRequestDidReceiveResponse):
(WI.NetworkManager.prototype._initiatorSourceCodeLocationFromPayload):
(WI.NetworkManager.prototype.resourceForURL): Deleted.
* UserInterface/Models/Script.js:
(WI.Script.prototype._resolveResource):
(WI.Script.prototype._resolveResource.isScriptResource): Added.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
* UserInterface/Base/Utilities.js:
(Set.prototype.find): Added.
Add utility for finding an item in a `Set` to avoid having to `Array.from`.
* UserInterface/Base/Main.js:
(WI.openURL):
(WI.sourceCodeForURL):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype._processRecord):
* UserInterface/Models/CallFrame.js:
(WI.CallFrame.fromPayload):
* UserInterface/Models/ConsoleMessage.js:
(WI.ConsoleMessage.prototype.get sourceCodeLocation):
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype.createSourceCodeLocation):
* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForURL):
* UserInterface/Views/DOMDetailsSidebarPanel.js:
(WI.DOMDetailsSidebarPanel.prototype._mouseWasClicked):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch):
Use the `firstValue` instead of the implicit `lastValue` to match existing nearby usage of
`WI.DebuggerManager.prototype.scriptsForURL`, which explicitly chooses the first script.
2020-06-04 Tim Horton <timothy_horton@apple.com>
Work around broken system version macro
https://bugs.webkit.org/show_bug.cgi?id=212726
Reviewed by Dan Bernstein.
* Configurations/DebugRelease.xcconfig:
2020-06-01 Devin Rousso <drousso@apple.com>
Web Inspector: Graphics: should use the `id` (name) of the animation if it exists
https://bugs.webkit.org/show_bug.cgi?id=212618
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/AnimationObserver.js:
(WI.AnimationObserver.prototype.nameChanged): Added.
* UserInterface/Controllers/AnimationManager.js:
(WI.AnimationManager.prototype.nameChanged): Added.
* UserInterface/Models/Animation.js:
(WI.Animation):
(WI.Animation.fromPayload):
(WI.Animation.prototype.get name): Added.
(WI.Animation.prototype.get cssAnimationName): Added.
(WI.Animation.prototype.get cssTransitionProperty): Added.
(WI.Animation.prototype.get displayName):
(WI.Animation.prototype.nameChanged): Added.
* UserInterface/Views/AnimationContentView.js:
(WI.AnimationContentView.prototype.initialLayout):
(WI.AnimationContentView.prototype.layout):
(WI.AnimationContentView.prototype.attached):
(WI.AnimationContentView.prototype.detached):
(WI.AnimationContentView.prototype._refreshTitle): Added.
(WI.AnimationContentView.prototype._handleNameChanged): Added.
* UserInterface/Views/AnimationContentView.css:
(.content-view.animation):
(.content-view.animation > header > .titles):
(.content-view.animation > header > .titles > .title > code): Added.
Show the `animation-name`/`transition-property`/count in parenthesis after the `id` (only if
it has been specified).
Drive-by: ensure that the `<header>` doesn't overflow.
* UserInterface/Views/AnimationDetailsSidebarPanel.js:
(WI.AnimationDetailsSidebarPanel.prototype.set animation):
(WI.AnimationDetailsSidebarPanel.prototype.initialLayout):
(WI.AnimationDetailsSidebarPanel.prototype._refreshIdentitySection):
(WI.AnimationDetailsSidebarPanel.prototype._handleAnimationNameChanged): Added.
Only show the "Identifier" row if an `id` is actually set. If there is a CSS
`animation-name`/`transition-property`, show it in a separate row.
* Localizations/en.lproj/localizedStrings.js:
2020-06-01 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Timelines: Edit button has wrong outline
https://bugs.webkit.org/show_bug.cgi?id=211105
<rdar://problem/62475815>
Reviewed by Devin Rousso.
* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button.text-only:focus):
Add `.text-only` to the selector to make specificity higher than of the button selector.
* UserInterface/Views/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only:focus):
Add `.text-only` to the selector to make specificity higher than of the button selector.
(.navigation-bar .item.radio.button:not(.text-only)): Deleted.
(.navigation-bar.collapsed .item.radio.button:not(.text-only)): Deleted.
Remove dead code. We only have text-only buttons now.
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem):
(WI.RadioButtonNavigationItem.prototype.get buttonStyle):
(WI.RadioButtonNavigationItem.prototype.set buttonStyle):
2020-05-29 Devin Rousso <drousso@apple.com>
Web Inspector: Graphics: text editors in Keyframes section don't populate when sidebar is first shown
https://bugs.webkit.org/show_bug.cgi?id=212509
Reviewed by Timothy Hatcher.
* UserInterface/Views/AnimationDetailsSidebarPanel.js:
(WI.AnimationDetailsSidebarPanel.prototype.shown): Added.
Refresh all `CodeMirror` whenever this panel is shown.
* UserInterface/Views/Sidebar.js:
(WI.Sidebar.prototype.removeSidebarPanel):
(WI.Sidebar.prototype.selectedSidebarPanel):
(WI.Sidebar.prototype.set collapsed):
* UserInterface/Views/SidebarPanel.js:
(WI.SidebarPanel.prototype.visibilityDidChange): Deleted.
Drive-by: remove unused function.
2020-05-29 Devin Rousso <drousso@apple.com>
Web Inspector: add ITML debuggable/target type
https://bugs.webkit.org/show_bug.cgi?id=203300
<rdar://problem/56545896>
Reviewed by Joseph Pecoraro and Brian Burg.
* UserInterface/Base/DebuggableType.js:
(WI.DebuggableType.fromString):
(WI.DebuggableType.supportedTargetTypes): Added.
* UserInterface/Base/TargetType.js:
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.activateDomain):
* UserInterface/Controllers/TargetManager.js:
(WI.TargetManager.prototype.createDirectBackendTarget):
(WI.TargetManager.prototype._initializePageTarget):
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype.pushNodeToFrontend):
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.supportsInspectorStyleSheet): Added.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.setInspectedNode):
* UserInterface/Controllers/LayerTreeManager.js:
(WI.LayerTreeManager.supportsVisibleCompositingBorders):
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype._loadAndParseSourceMap):
* UserInterface/Controllers/TimelineManager.js:
(WI.NetworkManager.defaultTimelineTypes):
(WI.NetworkManager.availableTimelineTypes):
(WI.NetworkManager.prototype.set autoCaptureOnPageLoad):
(WI.NetworkManager.prototype.scriptProfilerTrackingCompleted):
* UserInterface/Models/CSSCompletions.js:
(WI.CSSCompletions.initializeCSSCompletions):
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get selectorEditable):
* UserInterface/Models/CSSStyleSheet.js:
(WI.CSSStyleSheet.prototype.handleCurrentRevisionContentChange):
* UserInterface/Models/DOMNode.js:
(WI.DOMNode.prototype._makeUndoableCallback):
* UserInterface/Models/SourceMapResource.js:
(WI.SourceMapResource.prototype.requestContentFromBackend):
* UserInterface/Base/Main.js:
(WI._updateDownloadToolbarButton):
(WI.undo):
(WI.redo):
(WI.canArchiveMainFrame):
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.refresh):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForDOMNode):
* UserInterface/Views/CookieStorageContentView.js:
(WI.CookieStorageContentView):
(WI.CookieStorageContentView.prototype.get navigationItems):
(WI.CookieStorageContentView.prototype.tableCellContextMenuClicked):
(WI.CookieStorageContentView.prototype._reloadCookies):
(WI.CookieStorageContentView.prototype._handleTableKeyDown):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype.initialLayout):
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype._restoreSelectedNodeAfterUpdate):
(WI.DOMTreeContentView.prototype._showPrintStylesChanged):
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
(WI.DOMTreeElement.prototype._startEditingTagName):
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.get supportsNewRule):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
* UserInterface/Controllers/AppControllerBase.js:
(WI.AppControllerBase.prototype.get hasExtraDomains): Deleted.
* UserInterface/Controllers/AppController.js:
(WI.AppController):
(WI.AppController.prototype.activateExtraDomains):
(WI.AppController.prototype.get hasExtraDomains): Deleted.
* UserInterface/Test/TestAppController.js:
(WI.TestAppController.prototype.get hasExtraDomains): Deleted.
* UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/13.4/InspectorBackendCommands.js:
* Versions/Inspector-iOS-11.0.json:
* Versions/Inspector-iOS-11.3.json:
* Versions/Inspector-iOS-12.0.json:
* Versions/Inspector-iOS-12.2.json:
* Versions/Inspector-iOS-13.0.json:
* Versions/Inspector-iOS-13.4.json:
Update protocol files for older versions of iOS.
* Localizations/en.lproj/localizedStrings.js:
2020-05-28 Devin Rousso <drousso@apple.com>
Web Inspector: Network: statistics don't update when filtering
https://bugs.webkit.org/show_bug.cgi?id=212394
Reviewed by Timothy Hatcher.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._updateFilteredEntries):
(WI.NetworkTableContentView.prototype._updateStatistics):
(WI.NetworkTableContentView.prototype._updateLoadTimeStatistic):
If the URL/type filter is active, hide the load time statistic, similar to how it's hidden
when viewing imported HARs. Additionally, update the other statistics to show info based on
the entries that are still shown.
2020-05-27 Yoshiaki JITSUKAWA <yoshiaki.jitsukawa@sony.com>
[WebInspectorUI] Inconsistent check for WI.ImageUtilities.supportsCanvasPathDebugging
https://bugs.webkit.org/show_bug.cgi?id=212450
Reviewed by Devin Rousso.
In RecordContentView.js _updateCanvasPath() should not be called if CanvasPathDebugging
is not supported otherwise _updateCanvasPath() tries to access _showPathButtonNavigationItem,
which is created only if CanvasPathDebugging is supported, but fails and raises an exception.
* UserInterface/Views/RecordingContentView.js:
Check if WI.ImageUtilities.supportsCanvasPathDebugging() before
calling _updateCanvasPath()
2020-05-27 Devin Rousso <drousso@apple.com>
Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro
https://bugs.webkit.org/show_bug.cgi?id=210014
Reviewed by Brian Burg.
Previously, the generated InspectorBackendCommands.js would include code for things that the
backend doesn't actually support. By using actual macros and preprocessing that file, we can
ensure that the frontend doesn't incorrectly think that something is supported by the page
being inspected:
- the `Canvas` commands and events related to shader programs/pipelines should only exist
when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`.
- iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled`
that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional
parameter, as well as removing `Page.setShowRulers` entirely.
- setting the forced appearance should only be possible if dark mode is supported.
- web archives only exist if CF is used.
* CMakeLists.txt:
Add a dependency on the new `InspectorBackendCommands` target.
* UserInterface/Base/Main.js:
(WI._updateDownloadTabBarButton):
2020-05-26 Devin Rousso <drousso@apple.com>
Web Inspector: ⌘G should not override the current query of the find banner if it's visible
https://bugs.webkit.org/show_bug.cgi?id=212395
Reviewed by Simon Fraser.
* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser.prototype.async handleFindNextShortcut):
(WI.ContentBrowser.prototype.async handleFindPreviousShortcut):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.highlightPreviousSearchMatch):
(WI.LogContentView.prototype.highlightNextSearchMatch):
2020-05-26 Devin Rousso <drousso@apple.com>
Web Inspector: Network: Timing: gaps around the "An error occurred trying to load this resource" message
https://bugs.webkit.org/show_bug.cgi?id=212384
Reviewed by Timothy Hatcher.
* UserInterface/Views/NetworkTableContentView.css:
(.content-view.network-table > .message-text-view): Added.
(.content-view.network-table > .message-text-view > .message): Added.
(.content-view.network .message-text-view): Deleted.
(.content-view.network .message-text-view > .message): Deleted.
Be more specific with the selector so it doesn't apply as broadly.
2020-05-22 Devin Rousso <drousso@apple.com>
Web Inspector: Storage: don't request the list of IndexedDB database names multiple times for the same security origin
https://bugs.webkit.org/show_bug.cgi?id=212253
<rdar://problem/62945903>
Reviewed by Joseph Pecoraro.
This can happen if additional frames are added that share the same security origin as the
main frame. Simply maintain a `Set` of security origins that've already been requested for
and ignore any repeat requests.
* UserInterface/Controllers/IndexedDBManager.js:
(WI.IndexedDBManager):
(WI.IndexedDBManager.prototype._reset):
2020-05-20 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Left/Right arrow keys should collapse/expand details sections
https://bugs.webkit.org/show_bug.cgi?id=212064
<rdar://problem/63384091>
Reviewed by Devin Rousso.
* UserInterface/Views/DetailsSection.js:
(WI.DetailsSection):
(WI.DetailsSection.prototype._headerElementClicked):
(WI.DetailsSection.prototype._handleHeaderElementKeyDown):
Use keydown event instead of keypress because the latter doesn't fire for arrow keys.
Drive-by: remove unused `expandedByUser`.
* UserInterface/Views/ExpandableView.js:
(WI.ExpandableView):
(WI.ExpandableView.prototype._handleDisclosureButtonKeyDown):
Computed panel items should also collapse/expand by pressing Left/Right keys.
2020-05-20 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r260978): Web Inspector: Styles: Pressing Space no longer toggles selected properties
https://bugs.webkit.org/show_bug.cgi?id=212121
Reviewed by Devin Rousso.
r260978 removed `tabIndex = -1` from the style property element so it wouldn't have a focus outline
when in the Computed panel. However, this also made style properties non-focusable in the Styles panel.
This patch sets `tabIndex = -1` on style property elements when they can be selected (e.g. in the Styles panel).
It doesn't set any tabIndex for style property elements in Computed or Changes panels.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
* UserInterface/Views/SpreadsheetStyleProperty.js:
2020-05-15 Devin Rousso <drousso@apple.com>
Web Inspector: Fails to pretty-print a particular CSS file
https://bugs.webkit.org/show_bug.cgi?id=211930
Reviewed by Joseph Pecoraro.
* UserInterface/Workers/Formatter/CSSFormatter.js:
(CSSFormatter.prototype._format):
Keep a stack of special sequences (e.g. `"`, `'`, `/*`, etc.), only outputting the text in
between the start and end of the sequence when the stack is empty. Ignore all other special
sequences when in a comma sequence. Add proper checks for if the star/end is escaped.
Drive-by: minor refactor so that the arrow functions are created outside the loop.
2020-05-13 Devin Rousso <drousso@apple.com>
Web Inspector: rename CSS.StyleSheetOrigin.Regular to CSS.StyleSheetOrigin.Author to match the spec
https://bugs.webkit.org/show_bug.cgi?id=211827
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.protocolStyleSheetOriginToEnum):
2020-05-11 Devin Rousso <drousso@apple.com>
Web Inspector: Network: Timing: gaps around the "Resource does not have timing data" message
https://bugs.webkit.org/show_bug.cgi?id=211648
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/Views/ResourceTimingContentView.css: Added.
(.resource-details.resource-timing > .message-text-view):
2020-05-11 Devin Rousso <drousso@apple.com>
Web Inspector: Network: Preview: default detached window size not wide enough for navigation items to be visible
https://bugs.webkit.org/show_bug.cgi?id=211649
Reviewed by Timothy Hatcher.
* UserInterface/Views/NetworkDetailView.js:
(WI.NetworkDetailView.prototype.initialLayout):
Don't center the panel switcher radio buttons as when they are centered, there's not always
enough room for `WI.NavigationItem`s for the currently showing `WI.ContentView`. Aligning
the panel switcher radio buttons to the start allows for as much room as possible.
2020-05-07 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Timelines: visible outline after clicking the close X button
https://bugs.webkit.org/show_bug.cgi?id=211604
<rdar://problem/62998871>
Reviewed by Timothy Hatcher.
Never display focus outline for TreeOutline items.
* UserInterface/Views/TreeOutline.css:
(.tree-outline .item):
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.selected):
2020-05-07 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'mimeType.endsWith')
https://bugs.webkit.org/show_bug.cgi?id=211593
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype._normalizeMIMETypeForDOM):
2020-05-07 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: Breakpoints status not remembered/restored correctly
https://bugs.webkit.org/show_bug.cgi?id=211558
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype.initializeTarget):
2020-05-07 Devin Rousso <drousso@apple.com>
Web Inspector: Storage: double clicking on a cookie field doesn't start editing it
https://bugs.webkit.org/show_bug.cgi?id=211598
Reviewed by Timothy Hatcher.
* UserInterface/Views/CookieStorageContentView.js:
(WI.CookieStorageContentView):
(WI.CookieStorageContentView.prototype.tableCellContextMenuClicked):
(WI.CookieStorageContentView.prototype.tablePopulateCell):
(WI.CookieStorageContentView.prototype._showCookiePopover):
(WI.CookieStorageContentView.prototype._handleSetCookieButtonClick):
Add a `"dblclick"` event listener to each cell that shows a `WI.CookiePopover` for that cell
and automatically select the current value of that field in the `WI.Cookie`. Unify the few
different ways to show a `WI.CookiePopover`.
* UserInterface/Views/CookiePopover.js:
(WI.CookiePopover.prototype.show.createRow):
Provide a way to programmatically trigger the focusing of an editor once shown.
* Localizations/en.lproj/localizedStrings.js:
2020-05-06 Devin Rousso <drousso@apple.com>
Web Inspector: Layers: the text at the bottom of the details sidebar can get squished
https://bugs.webkit.org/show_bug.cgi?id=211486
Reviewed by Brian Burg.
* UserInterface/Views/Sidebar.js:
(WI.Sidebar.prototype.get minimumWidth):
Ask both the `this._navigationBar` and `this._selectedSidebarPanel` instead of just one.
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.get minimumWidth): Added.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.get minimumWidth): Addede.
* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WI.BoxModelDetailsSectionRow):
(WI.BoxModelDetailsSectionRow.prototype.get minimumWidth): Added.
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
* UserInterface/Views/BoxModelDetailsSectionRow.css:
(.details-section .row.box-model):
Keep track of the outermost box and provide a way to report its width.
* UserInterface/Views/LayerDetailsSidebarPanel.js:
(WI.LayerDetailsSidebarPanel):
(WI.LayerDetailsSidebarPanel.prototype.get minimumWidth): Added.
(WI.LayerDetailsSidebarPanel.prototype._buildBottomBar):
(WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
* UserInterface/Views/LayerDetailsSidebarPanel.css:
(.panel.details.layer .bottom-bar):
(.panel.details.layer .bottom-bar > div):
Cache the width of the items in the bottom bar and use it in `get minimumWidth`.
2020-05-05 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r239175): Source Maps: original source not shown when in nested folder
https://bugs.webkit.org/show_bug.cgi?id=198276
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype.removeChildren):
r239175 made it so that `WI.TreeOutline.prototype.removeChildren` actually modified the
`this.children` member property array (which is not a getter), meaning that if a caller had
previously saved a reference to it before calling `removeChildren()`, the saved reference
would also be modified, preventing it from being of any real use afterwards. At that time,
`WI.TreeOutline` maintained an index value for each `WI.TreeElement`, which meant that it
was necessary to remove from `this.children` as otherwise `Array.prototype.indexOf` calls
would not be accurate. Since then, `WI.TreeOutline` has moved to using `representedObject`,
meaning it's no longer necessary to modify `this.children`.
* UserInterface/Views/SourceCodeTreeElement.js:
(WI.SourceCodeTreeElement.prototype.onpopulate):
(WI.SourceCodeTreeElement.prototype.onpopulate.combineFolderChain): Deleted.
(WI.SourceCodeTreeElement.prototype.onpopulate.findAndCombineFolderChains): Deleted.
Drive-by: don't attempt to combine folder chains when "Group by Path" to match the rest of
the look/feel of the navigation sidebar.
* UserInterface/Models/SourceMapResource.js:
(WI.SourceMapResource.prototype.get sourceMapDisplaySubpath):
Drive-by: fix "null" being shown as the root subpath folder when using a local server.
2020-05-05 Devin Rousso <drousso@apple.com>
Web Inspector: the divider before the console message icons in the tab bar is shown even if there are no other icons
https://bugs.webkit.org/show_bug.cgi?id=211390
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WI._updateTabBarDividers):
(WI._updateTabBarDividers.isHidden): Added.
If the various `WI.ButtonNavigationItem` aren't actually created, then the optional chain
will return `undefined` instead of the desired `true` when checking whether it is `hidden`.
Effectively, a `WI.ButtonNavigationItem` that does not exist should be considered `hidden`.
2020-05-05 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: Memory: the stacked area graph should not extend beyond the "stopping time" marker
https://bugs.webkit.org/show_bug.cgi?id=211327
Reviewed by Brian Burg.
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WI.MemoryTimelineOverviewGraph.prototype.layout):
(WI.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
2020-05-05 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'this.InspectorAgent.initialized')
https://bugs.webkit.org/show_bug.cgi?id=211434
Reviewed by Joseph Pecoraro.
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.initialize):
`Worker` targets don't (and are not expected to) have an `Inspector` domain.
2020-05-04 Devin Rousso <drousso@apple.com>
Web Inspector: add a tool for viewing UserInterface/Images files
https://bugs.webkit.org/show_bug.cgi?id=211422
Reviewed by Timothy Hatcher.
* Tools/Images/index.html: Added.
* Tools/Images/index.css: Added.
(body):
(h1):
(textarea):
(.flex):
(#preview):
(#preview > img):
(#preview > img.light):
(#preview > img.dark):
* Tools/Images/index.js: Added.
(async loadImage):
(async parseSVG):
(async loadPNG):
(normalizePath):
(changeSize):
(updateURL):
2020-05-04 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Tabs jiggle on click
https://bugs.webkit.org/show_bug.cgi?id=211177
<rdar://problem/62590810>
Reviewed by Devin Rousso.
Currently, tab dragging starts immediately after mouse down. With this patch,
dragging starts only after the mouse cursor moving 12 pixels. This roughly matches
macOS Safari tabs.
* UserInterface/Views/TabBar.js:
(WI.TabBar):
(WI.TabBar.prototype._handleTabContainerMouseDown):
(WI.TabBar.prototype._handleMouseUp):
(WI.TabBar.prototype._handleTabContainerMouseLeave):
2020-05-04 Devin Rousso <drousso@apple.com>
Web Inspector: drop support for iOS 9.*
https://bugs.webkit.org/show_bug.cgi?id=211314
Reviewed by Daniel Bates.
* UserInterface/Controllers/BreakpointPopoverController.js:
(WI.BreakpointPopoverController.prototype._createPopoverContent):
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager):
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
(WI.CSSManager.prototype._mainResourceDidChange):
(WI.CSSManager.prototype._fetchInfoForAllStyleSheets):
(WI.CSSManager.prototype.fetchStyleSheetsIfNeeded): Deleted.
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame.documentNodeAvailable): Deleted.
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame.bodyNodeAvailable): Deleted.
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame.cssRuleAvailable): Deleted.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype._scopeChainNodeFromPayload):
* UserInterface/Controllers/LayerTreeManager.js:
(WI.LayerTreeManager.prototype.set showPaintRects):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.initializeTarget):
(WI.TimelineManager.defaultTimelineTypes):
(WI.TimelineManager.availableTimelineTypes):
(WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
(WI.TimelineManager.prototype._processRecord):
(WI.TimelineManager.prototype._attemptAutoCapturingForFrame):
* UserInterface/Models/CSSCompletions.js:
(WI.CSSCompletions.initializeCSSCompletions):
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype.refresh):
* UserInterface/Models/HeapAllocationsInstrument.js:
(WI.HeapAllocationsInstrument):
(WI.HeapAllocationsInstrument.supported): Deleted.
* UserInterface/Models/MemoryInstrument.js:
(WI.MemoryInstrument): Deleted.
(WI.MemoryInstrument.supported): Deleted.
* UserInterface/Models/NativeFunctionParameters.js:
* UserInterface/Models/ScriptInstrument.js:
(WI.ScriptInstrument.prototype.startInstrumentation):
(WI.ScriptInstrument.prototype.stopInstrumentation):
* UserInterface/Models/ScriptSyntaxTree.js:
(WI.ScriptSyntaxTree.functionReturnDivot):
* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord):
(WI.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
* UserInterface/Protocol/DebuggerObserver.js:
(WI.DebuggerObserver.prototype.scriptParsed):
* UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js: Removed.
* UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js: Removed.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WI.ScriptClusterTimelineView):
(WI.ScriptClusterTimelineView.createPathComponent):
(WI.ScriptClusterTimelineView.prototype.reset):
(WI.ScriptClusterTimelineView.prototype.showProfile):
(WI.ScriptClusterTimelineView.prototype._canShowProfileView): Deleted.
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WI.ScriptDetailsTimelineView):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch):
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
(WI.TimelineRecordingContentView.prototype._recordingTimesUpdated):
* Versions/Inspector-iOS-9.0.json: Removed.
* Versions/Inspector-iOS-9.3.json: Removed.
2020-05-04 Devin Rousso <drousso@apple.com>
Web Inspector: drop support for iOS 8.*
https://bugs.webkit.org/show_bug.cgi?id=211312
Reviewed by Daniel Bates.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.highlightSelector):
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.resourceRequestWillBeSent):
* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype.initializeTarget):
(WI.RuntimeManager.prototype.evaluateInInspectedWindow):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.defaultTimelineTypes):
(WI.TimelineManager.prototype._loadNewRecording):
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.parseSelectorListPayload):
* UserInterface/Models/FPSInstrument.js:
(WI.FPSInstrument): Deleted.
(WI.FPSInstrument.supported): Deleted.
* UserInterface/Models/ObjectPreview.js:
(WI.ObjectPreview.fromPayload):
* UserInterface/Models/ProfileNode.js:
(WI.ProfileNode):
(WI.ProfileNode.prototype.get startTime):
(WI.ProfileNode.prototype.get endTime):
(WI.ProfileNode.prototype.computeCallInfoForTimeRange):
(WI.ProfileNode.prototype.get calls): Deleted.
(WI.ProfileNode.prototype.computeCallInfoForTimeRange.totalTimeInRange): Deleted.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.get initiatedResources):
(WI.Resource.prototype.get originalRequestWillBeSentTimestamp): Deleted.
* UserInterface/Models/ResourceTimingData.js:
(WI.ResourceTimingData.fromPayload):
* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
* UserInterface/Models/TimelineRecording.js:
(WI.TimelineRecording):
(WI.TimelineRecording.prototype.computeElapsedTime):
(WI.TimelineRecording.prototype.setLegacyBaseTimestamp): Deleted.
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: Removed.
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.fromPayload):
(WI.RemoteObject.prototype.getDisplayablePropertyDescriptors):
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.initialize):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WI.ObjectTreePropertyTreeElement.prototype._updateProperties):
(WI.ObjectTreePropertyTreeElement):
* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.prototype._updateProperties):
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WI.ScriptTimelineDataGridNode.prototype.get data):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._createTypeTokenAnnotator):
(WI.SourceCodeTextEditor.prototype._createBasicBlockAnnotator):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
(WI.TimelineTabContentView.prototype.closed):
(WI.TimelineTabContentView.prototype.restoreFromCookie):
* Versions/Inspector-iOS-8.0.json: Removed.
2020-05-04 Devin Rousso <drousso@apple.com>
Web Inspector: drop support for iOS 10.*
https://bugs.webkit.org/show_bug.cgi?id=211318
Reviewed by Daniel Bates.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.supportsDOMBreakpoints):
(WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.async initializeTarget):
(WI.DebuggerManager.prototype.debuggerDidResume):
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.webSocketWillSendHandshakeRequest):
(WI.NetworkManager.prototype.resourceRequestDidReceiveResponse):
(WI.NetworkManager.prototype.markResourceRequestAsServedFromMemoryCache): Deleted.
* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype.initializeTarget):
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.legacyMarkServedFromMemoryCache): Deleted.
(WI.Resource.prototype.legacyMarkServedFromDiskCache): Deleted.
* UserInterface/Models/ResourceTimingData.js:
(WI.ResourceTimingData.fromPayload):
* UserInterface/Models/WebSocketResource.js:
(WI.WebSocketResource.prototype.addFrame):
* UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js: Removed.
* UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: Removed.
* UserInterface/Protocol/NetworkObserver.js:
(WI.NetworkObserver.prototype.requestServedFromCache): Deleted.
* UserInterface/Protocol/PageObserver.js:
(WI.PageObserver.prototype.frameClearedScheduledNavigation):
(WI.PageObserver):
(WI.PageObserver.prototype.javascriptDialogOpening): Deleted.
(WI.PageObserver.prototype.javascriptDialogClosed): Deleted.
(WI.PageObserver.prototype.scriptsEnabled): Deleted.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._garbageCollect):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WI.NetworkTimelineView):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
* UserInterface/Views/WebSocketContentView.js:
(WI.WebSocketContentView):
(WI.WebSocketContentView.prototype._addRow):
* Versions/Inspector-iOS-10.0.json: Removed.
* Versions/Inspector-iOS-10.3.json: Removed.
* UserInterface/Protocol/CSSObserver.js:
(WI.CSSObserver.prototype.namedFlowCreated):
(WI.CSSObserver.prototype.namedFlowRemoved):
(WI.CSSObserver.prototype.regionOversetChanged):
(WI.CSSObserver.prototype.registeredNamedFlowContentElement):
(WI.CSSObserver.prototype.unregisteredNamedFlowContentElement):
Fix compatibility comments.
2020-05-04 Devin Rousso <drousso@apple.com>
Web Inspector: Worker: should use the name of the worker if it exists
https://bugs.webkit.org/show_bug.cgi?id=211244
Reviewed by Brian Burg.
* UserInterface/Protocol/WorkerObserver.js:
(WI.WorkerObserver.prototype.workerCreated):
* UserInterface/Controllers/WorkerManager.js:
(WI.WorkerManager.prototype.workerCreated):
* UserInterface/Protocol/WorkerTarget.js:
(WI.WorkerTarget):
(WI.WorkerTarget.prototype.get customName): Added.
(WI.WorkerTarget.prototype.get displayName):
(WI.WorkerTarget.prototype.get displayURL): Added.
Use the `name` from the `WorkerOptions` given to the `Worker` when it's constructed as the
`displayName` of the `WI.WorkerTarget` if able. Also exposed via `get customName`.
* UserInterface/Views/ScriptTreeElement.js:
(WI.ScriptTreeElement):
* UserInterface/Views/WorkerTreeElement.js:
(WI.WorkerTreeElement):
Accept an `options` optional object that can be used to override the `mainTitle`.
2020-05-04 Devin Rousso <drousso@apple.com>
Web Inspector: provide a way for inspector to turn on/off ITP debug mode and AdClickAttribution debug mode
https://bugs.webkit.org/show_bug.cgi?id=209763
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WI._handleDeviceSettingsTabBarButtonClicked):
Add a new section to the device settings popover:
Enable: [ ] ITP Debug Mode
[ ] Ad Click Attribution Debug Mode
* Localizations/en.lproj/localizedStrings.js:
2020-05-02 Devin Rousso <drousso@apple.com>
[CSS Easing 1] implement `jump-*` step positions
https://bugs.webkit.org/show_bug.cgi?id=211271
Reviewed by Dean Jackson.
* UserInterface/Models/CSSKeywordCompletions.js:
(WI.CSSKeywordCompletions.forFunction):
Include the step position keywords when autocompleting the `steps()` CSS function.
2020-04-30 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Computed: shouldn't display focus outline on click
https://bugs.webkit.org/show_bug.cgi?id=211118
<rdar://problem/62491002>
Reviewed by Devin Rousso.
- CSS property view is no longer focusable.
- Disclosure triangle is now tabbable.
* UserInterface/Views/ComputedStyleSection.css:
(.computed-style-section .computed-property-item):
(.computed-style-section .computed-property-item.expanded):
(.computed-style-section .computed-property-item > .disclosure-button:focus):
* UserInterface/Views/ExpandableView.js:
(WI.ExpandableView):
(WI.ExpandableView.prototype._onDisclosureButtonClick):
(WI.ExpandableView.prototype._update):
Drive-by: add `ariaExpanded` so VoiceOver reads whether it's expanded or collapsed.
* UserInterface/Views/SpreadsheetStyleProperty.js:
Remove tabIndex so we don't show any focus outline around the entire CSS property view.
2020-04-30 Devin Rousso <drousso@apple.com>
WebKit.WebContent process crashes when web developer tools are opened in Safari
https://bugs.webkit.org/show_bug.cgi?id=210794
<rdar://problem/62214651>
Reviewed by Brian Burg.
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype._handleFrameExecutionContextsCleared):
(WI.QuickConsole.prototype._handleTargetRemoved):
If a `Worker` is removed and is not the active execution context, still check to see if the
execution context picker should be hidden, such as if there is only one other execution
context (e.g. the main page execution context). Previously, the execution context picker
would only be hidden in this case if the `Worker` was the active execution context.
2020-04-30 Christopher Reid <chris.reid@sony.com>
[CMake] Don't copy inspector resources in every incremental build
https://bugs.webkit.org/show_bug.cgi?id=211212
Reviewed by Žan Doberšek.
Moving the copy to a custom_command with a stamp so the copy isn't done each build.
* CMakeLists.txt:
2020-04-29 Devin Rousso <drousso@apple.com>
Web Inspector: don't immediately attempt to perform a search whenever the find string changes
https://bugs.webkit.org/show_bug.cgi?id=211164
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WI.updateFindString):
(WI._populateFind):
* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser.prototype.handlePopulateFindShortcut):
(WI.ContentBrowser.prototype.handleFindStringUpdated): Deleted.
Only update the `searchQuery` of the `WI.FindBanner` and `performSearch` when the find
next/previous keyboard shortcut is activated, not when the find string is populated/updated,
unless the update came from the populate find keyboard shortcut.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.handlePopulateFindShortcut):
(WI.LogContentView.prototype.handleFindNextShortcut):
(WI.LogContentView.prototype.handleFindPreviousShortcut):
(WI.LogContentView.prototype.highlightPreviousSearchMatch):
(WI.LogContentView.prototype.highlightNextSearchMatch):
(WI.LogContentView.prototype.handleFindStringUpdated): Deleted.
Ensure that the logic for performing a search if the `searchQuery` of the `WI.FindBanner`
doesn't match the current `WI.findString` is also performed when in the split console.
2020-04-28 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Debug: "Outline focused element" should also outline elements with tabIndex=0
https://bugs.webkit.org/show_bug.cgi?id=211109
Reviewed by Devin Rousso.
* UserInterface/Debug/Bootstrap.css:
(body.focus-debug [tabindex="0"]):
(body.focus-debug *:focus):
2020-04-28 Devin Rousso <drousso@apple.com>
Web Inspector: find dialog does not populate search string from system find pasteboard
https://bugs.webkit.org/show_bug.cgi?id=113588
<rdar://problem/19281466>
Reviewed by Brian Burg.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.updateFindString): Added.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI.updateFindString): Added.
(WI._populateFind):
(WI._findNext):
(WI._findPrevious):
* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser.prototype.handleFindStringUpdated): Added.
(WI.ContentBrowser.prototype.handlePopulateFindShortcut):
(WI.ContentBrowser.prototype.handleFindNextShortcut):
(WI.ContentBrowser.prototype.handleFindPreviousShortcut):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.handleFindStringUpdated): Added.
(WI.LogContentView.prototype.handlePopulateFindShortcut):
(WI.LogContentView.prototype.handleFindNextShortcut):
(WI.LogContentView.prototype.handleFindPreviousShortcut):
When the find string gets updated, tell the active view. The `findNextKeyboardShortcut` and
`findPreviousKeyboardShortcut` will also update the related `WI.FindBanner` when invoked if
the current search query does not match the find string.
* UserInterface/Test/Test.js:
(WI.updateFindString): Added.
2020-04-28 Christopher Reid <chris.reid@sony.com>
[Win] Bundle Inspector Resources in Release builds
https://bugs.webkit.org/show_bug.cgi?id=210942
Reviewed by Fujii Hironori.
Add CMake files for copying inspector resources
* CMakeLists.txt: Added.
* PlatformGTK.cmake: Added.
* PlatformWin.cmake: Added.
2020-04-28 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Elements: Classes toggle button has wrong outline on focus
https://bugs.webkit.org/show_bug.cgi?id=211104
<rdar://problem/62475340>
Reviewed by Devin Rousso.
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .options-container > .toggle-class-toggle:focus):
* UserInterface/Views/Variables.css:
(:root):
2020-04-27 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r258730): Web Inspector: Sidebar tabs have incorrect tabIndex
https://bugs.webkit.org/show_bug.cgi?id=211072
<rdar://problem/62445067>
Reviewed by Brian Burg.
Only selected radio button should be focusable. This matches native macOS radio buttons.
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem.prototype.get tabbable):
This getter was incorrectly returning -1 or 0 instead of a boolean value.
2020-04-27 Diego Pino Garcia <dpino@igalia.com>
Unreviewed, reverting r260672.
[GTK] WebInspector tests are timing out after r260672
Reverted changeset:
"[Win] Bundle Inspector Resources in Release builds"
https://bugs.webkit.org/show_bug.cgi?id=210942
https://trac.webkit.org/changeset/260672
2020-04-27 Diego Pino Garcia <dpino@igalia.com>
Unreviewed, reverting r260728.
Build fix after r260672, no needed since r260672 is also being reverted.
Reverted changeset:
"[Win] Fix windows build with MSBuild after 260672"
https://bugs.webkit.org/show_bug.cgi?id=211047
https://trac.webkit.org/changeset/260728
2020-04-27 Diego Pino Garcia <dpino@igalia.com>
Unreviewed, reverting r260696.
Build fix after r260672, no needed since r260672 is also being reverted.
Reverted changeset:
"REGRESSION(210942): [GTK][WPE] Unreviewed, EWS build bots
fail in compile-webkit step"
https://bugs.webkit.org/show_bug.cgi?id=211014
https://trac.webkit.org/changeset/260696
2020-04-26 Christopher Reid <chris.reid@sony.com>
[Win] Fix windows build with MSBuild after 260672
https://bugs.webkit.org/show_bug.cgi?id=211047
Unreviewed build fix.
* CMakeLists.txt:
2020-04-25 Darin Adler <darin@apple.com>
[Cocoa] Deal with another round of Xcode upgrade checks
https://bugs.webkit.org/show_bug.cgi?id=211027
Reviewed by Alexey Proskuryakov.
* WebInspectorUI.xcodeproj/project.pbxproj: Bump the upgrade check version.
Add a harmless base localization; this project contains nothing localized.
2020-04-25 Diego Pino Garcia <dpino@igalia.com>
REGRESSION(210942): [GTK][WPE] Unreviewed, EWS build bots fail in compile-webkit step
https://bugs.webkit.org/show_bug.cgi?id=211014
* CMakeLists.txt: Remove creation of file 'inspector-resources.stamp'.
2020-04-24 Christopher Reid <chris.reid@sony.com>
[Win] Bundle Inspector Resources in Release builds
https://bugs.webkit.org/show_bug.cgi?id=210942
Reviewed by Fujii Hironori.
Add CMake files for copying inspector resources
* CMakeLists.txt: Added.
* PlatformGTK.cmake: Added.
* PlatformWin.cmake: Added.
2020-04-23 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r257759): Network: waterfall popover is missing bars
https://bugs.webkit.org/show_bug.cgi?id=210947
Reviewed by Brian Burg.
`WI.ResourceTimingBreakdownView` is also used inside of a `WI.Popover`, meaning that the
waterfall graph won't be a child of the `.network-table`. Add a `.network` class to all
instances of `.waterfall` so that the selector can be more specific.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._populateWaterfallGraph):
* UserInterface/Views/NetworkTableContentView.css:
(.waterfall.network .block): Added.
(body[dir=ltr] .waterfall.network .block): Added.
(body[dir=rtl] .waterfall.network .block): Added.
(.waterfall.network .block + .block): Added.
(.waterfall.network .block:matches(.mouse-tracking, .filler) + .block:not(.mouse-tracking, .filler), .waterfall.network .block:not(.request, .response) + :matches(.request, .response)): Added.
(.waterfall.network .block:last-child): Added.
(.waterfall.network .block.request,): Added.
(.waterfall.network .block.mouse-tracking): Added.
(.waterfall.network .block.filler): Added.
(.waterfall.network .block.redirect): Added.
(.waterfall.network .block.queue): Added.
(.waterfall.network .block.dns): Added.
(.waterfall.network .block.connect): Added.
(.waterfall.network .block.secure): Added.
(.waterfall.network .block.request): Added.
(.waterfall.network .block.response): Added.
(.network-table .waterfall .block): Deleted.
(body[dir=ltr] .network-table .waterfall .block): Deleted.
(body[dir=rtl] .network-table .waterfall .block): Deleted.
(.network-table .waterfall .block + .block): Deleted.
(.network-table .waterfall .block:matches(.mouse-tracking, .filler) + .block:not(.mouse-tracking, .filler), .network-table .waterfall .block:not(.request, .response) + :matches(.request, .response)): Deleted.
(.network-table .waterfall .block:last-child): Deleted.
(.network-table .waterfall .block.request,): Deleted.
(.network-table .waterfall .block.mouse-tracking): Deleted.
(.network-table .waterfall .block.filler): Deleted.
(.network-table .waterfall .block.redirect): Deleted.
(.network-table .waterfall .block.queue): Deleted.
(.network-table .waterfall .block.dns): Deleted.
(.network-table .waterfall .block.connect): Deleted.
(.network-table .waterfall .block.secure): Deleted.
(.network-table .waterfall .block.request): Deleted.
(.network-table .waterfall .block.response): Deleted.
* UserInterface/Views/ResourceTimingBreakdownView.js:
(WI.ResourceTimingBreakdownView.prototype.initialLayout):
2020-04-23 Devin Rousso <drousso@apple.com>
Web Insspector: Storage: cannot select multiple local storage entries
https://bugs.webkit.org/show_bug.cgi?id=210876
Reviewed by Brian Burg.
Support multiple selection using `WI.DataGrid`.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid):
(WI.DataGrid.prototype.get allowsMultipleSelection): Added.
(WI.DataGrid.prototype.set allowsMultipleSelection): Added.
(WI.DataGrid.prototype.get selectedNode):
(WI.DataGrid.prototype.set selectedNode):
(WI.DataGrid.prototype.get selectedDataGridNodes): Added.
(WI.DataGrid.prototype._keyDown):
(WI.DataGrid.prototype.selectNodes):
(WI.DataGrid.prototype._mouseDownInDataTable):
(WI.DataGrid.prototype._contextMenuInDataTable):
(WI.DataGrid.prototype.handleCopyEvent):
(WI.DataGrid.prototype._copyRow):
(WI.DataGrid.prototype._copyTable):
(WI.DataGrid.prototype._hasCopyableData):
(WI.DataGrid.prototype.selectDataGridNodeInternal): Added.
(WI.DataGrid.prototype.deselectDataGridNodeInternal): Added.
(WI.DataGrid.prototype._dispatchSelectedNodeChangedEvent): Added.
(WI.DataGrid.prototype.dataGridNodeForSelectionItem): Added.
(WI.DataGrid.prototype.selectionItemForDataGridNode): Added.
(WI.DataGrid.prototype.selectionControllerSelectionDidChange): Added.
(WI.DataGrid.prototype.selectionControllerFirstSelectableItem): Added.
(WI.DataGrid.prototype.selectionControllerLastSelectableItem): Added.
(WI.DataGrid.prototype.selectionControllerPreviousSelectableItem): Added.
(WI.DataGrid.prototype.selectionControllerNextSelectableItem): Added.
* UserInterface/Views/DataGridNode.js:
(WI.DataGridNode.prototype.select):
(WI.DataGridNode.prototype.deselect):
Replace `selectedNode` with a `WI.SelectionController` that behaves like a `WI.TreeOutline`.
Use the `WI.SelectionController.Operation` to ensure that `WI.PlaceholderDataGridNode` are
not selected unless directly chosen (i.e. not during shift selection or ⌘A). Add logic such
that `WI.PlaceholderDataGridNode` are not copied. Prefer `_rows` instead of `children` as
the latter is not sorted/filtered.
* UserInterface/Controllers/SelectionController.js:
(WI.SelectionController.createTreeComparator): Added.
(WI.SelectionController.createListComparator): Added.
Create `static` helper functions for common comparators.
(WI.SelectionController.prototype.deselectItem):
(WI.SelectionController.prototype.selectAll):
(WI.SelectionController.prototype.removeSelectedItems):
(WI.SelectionController.prototype.handleItemMouseDown):
(WI.SelectionController.prototype._selectItemsFromArrowKey):
(WI.SelectionController.prototype._firstSelectableItem):
(WI.SelectionController.prototype._lastSelectableItem):
(WI.SelectionController.prototype._previousSelectableItem):
(WI.SelectionController.prototype._nextSelectableItem):
(WI.SelectionController.prototype._addRange):
(WI.SelectionController.prototype._deleteRange):
Introduce a `WI.SelectionController.Operation` which is used to tell the `_delegate` about
why it's being asked for information.
* UserInterface/Views/DOMStorageContentView.js:
(WI.DOMStorageContentView):
(WI.DOMStorageContentView.prototype._deleteCallback):
Support multiple selection, including deleting multiple rows at once.
* UserInterface/Views/Table.js:
(WI.Table):
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline):
(WI.TreeOutline.prototype.selectionControllerNumberOfItems): Deleted.
Removed unused `selectionControllerNumberOfItems`.
* UserInterface/Views/ProfileView.js:
(WI.ProfileView):
(WI.ProfileView.prototype._dataGridNodeSelected):
Maintain a `_selectedDataGridNode` so that `oldSelectedNode` doesn't have to be included
when dispatching `WI.DataGrid.Event.SelectedNodeChanged`.
2020-04-23 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: Elements: Styles: color functions are missing swatches
https://bugs.webkit.org/show_bug.cgi?id=210930
Reviewed by Brian Burg.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens):
(WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):
(WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
(WI.SpreadsheetStyleProperty.prototype._addBoxShadowTokens):
(WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
Only attempt to `WI.Color.fromString` when at a ")" that is not part of another function.
Drive-by: add variable tokens after variable text is resolved, as otherwise the variable is
replaced with a `WI.InlineSwatch`, which replaces the original text, preventing it
from being used for looking up the variable name.
2020-04-23 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: SyntaxError: Invalid regular expression: missing )
https://bugs.webkit.org/show_bug.cgi?id=210890
Reviewed by Brian Burg.
* UserInterface/Base/SearchUtilities.js:
(WI.SearchUtilities.prototype._regExpForString):
Catch any exceptions from `new RegExp` and return `null` in that case.
* UserInterface/Views/FilterBar.js:
(WI.FilterBar):
(WI.FilterBar.prototype.get invalid): Added.
(WI.FilterBar.prototype.set invalid): Added.
(WI.FilterBar.prototype.clear):
* UserInterface/Views/FilterBar.css:
(:matches(.filter-bar, .search-bar).invalid > input[type="search"]): Added.
* UserInterface/Views/CookieStorageContentView.js:
(WI.CookieStorageContentView.prototype._updateFilteredCookies):
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WI.IndexedDatabaseObjectStoreContentView.prototype.dataGridMatchNodeAgainstCustomFilters):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.updateFilter):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._urlFilterDidChange):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel):
(WI.SearchSidebarPanel.prototype.performSearch):
(WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]): Added.
Mark the `WI.FilterBar` as invalid if the `filterRegExpForString` is invalid.
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype._highlightSearchResults):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.performSearch):
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
* UserInterface/Views/ResourceSecurityContentView.js:
(WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch):
(WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype.performSearch):
Ensure that the `WI.FindBanner` shows 0 results if the `searchRegExpForString` is invalid.
* UserInterface/Main.html:
* UserInterface/Views/SearchBar.js: Removed.
* UserInterface/Views/SearchBar.css: Removed.
Removed unused `WI.SearchBar`.
2020-04-22 Devin Rousso <drousso@apple.com>
Web Inspector: Storage: unable to filter cookies
https://bugs.webkit.org/show_bug.cgi?id=210837
Reviewed by Brian Burg.
* UserInterface/Views/CookieStorageContentView.js:
(WI.CookieStorageContentView):
(WI.CookieStorageContentView.prototype.get navigationItems):
(WI.CookieStorageContentView.prototype.get canFocusFilterBar): Added.
(WI.CookieStorageContentView.prototype.focusFilterBar): Added.
(WI.CookieStorageContentView.prototype.tableIndexForRepresentedObject):
(WI.CookieStorageContentView.prototype.tableRepresentedObjectForIndex):
(WI.CookieStorageContentView.prototype.tableNumberOfRows):
(WI.CookieStorageContentView.prototype.tableSortChanged):
(WI.CookieStorageContentView.prototype.tableCellContextMenuClicked):
(WI.CookieStorageContentView.prototype.tableDidRemoveRows):
(WI.CookieStorageContentView.prototype.tablePopulateCell):
(WI.CookieStorageContentView.prototype._getCookiesForHost): Renamed from `_filterCookies`.
(WI.CookieStorageContentView.prototype.async _willDismissCookiePopover):
(WI.CookieStorageContentView.prototype._handleFilterBarFilterDidChange): Added.
(WI.CookieStorageContentView.prototype._handleClearNavigationItemClicked):
(WI.CookieStorageContentView.prototype._reloadCookies):
(WI.CookieStorageContentView.prototype._updateFilteredCookies): Added.
(WI.CookieStorageContentView.prototype._updateEmptyFilterResultsMessage): Added.
(WI.CookieStorageContentView.prototype._cookiesAtIndexes):
(WI.CookieStorageContentView.prototype._filterCookies): Deleted.
* UserInterface/Views/CookieStorageContentView.css:
(.content-view.cookie-storage > .message-text-view): Added.
(.content-view.cookie-storage > .message-text-view > .message): Added.
(.content-view.cookie-storage > .data-grid): Deleted.
Add a filter bar to the navigation bar that checks the regex-ified filter text against the
formatted text of each cell for each cookie. Also hook it up to the global find shortcut.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype.layout):
(WI.NetworkTableContentView.prototype._showEmptyFilterResultsMessage):
(WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
(WI.NetworkTableContentView.prototype._positionEmptyFilterMessage): Deleted.
* UserInterface/Views/NetworkTableContentView.css:
(.content-view.network .message-text-view): Added.
Drive-by: instead of having the "No Filter Results" view only cover the "Name" column, it
should cover the entire table so as to be as noticable as possible (not to mention
the table will be empty anyways, so it's not like anything is being hidden).
Drive-by: ensure that the "No Filter Results" view doesn't cover the statistics.
2020-04-21 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r255396): Graphics: viewing a shader program hides the navigation sidebar
https://bugs.webkit.org/show_bug.cgi?id=210838
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype.canShowRepresentedObject):
Include `WI.ShaderProgram` in the list of displayable represented objects.
* UserInterface/Base/Main.js:
(WI.tabContentViewClassForRepresentedObject):
* UserInterface/Views/GraphicsTabContentView.js:
(WI.GraphicsTabContentView.prototype.canShowRepresentedObject):
Update the list of represented objects that are displayable by the Graphics Tab.
* UserInterface/Views/GraphicsOverviewContentView.css:
(.content-view.graphics-overview > section > .header):
(.content-view.graphics-overview > section:not(:first-of-type) > .header): Deleted.
Drive-by: add a top border to the first section when overscrolling.
* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview > .content-view.canvas > .preview > .message-text-view): Added.
Drive-by: ensure that the "No Preview Available" view doesn't overlap the section header.
2020-04-20 Devin Rousso <drousso@apple.com>
Web Inspector: the filter bar in the navigation sidebar should respect the global search settings
https://bugs.webkit.org/show_bug.cgi?id=210679
Reviewed by Joseph Pecoraro.
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.updateFilter):
2020-04-20 Devin Rousso <drousso@apple.com>
Web Inspector: removing a `WI.TreeElement` in a `WI.NavigationSidebar` doesn't check if the `WI.TreeOutline` still matches the current filter
https://bugs.webkit.org/show_bug.cgi?id=210672
Reviewed by Joseph Pecoraro.
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.NavigationSidebarPanel.prototype.updateFilter):
(WI.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
(WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WI.NavigationSidebarPanel.prototype._handleTreeElementRemoved): Added.
2020-04-17 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r242018): using `RegExp.prototype.test` with a global `RegExp` will ignore one potential match after each successful match
https://bugs.webkit.org/show_bug.cgi?id=210671
Reviewed by Timothy Hatcher.
* UserInterface/Base/SearchUtilities.js:
(WI.SearchUtilities.searchRegExpForString):
(WI.SearchUtilities.filterRegExpForString):
(WI.SearchUtilities._regExpForString):
(WI.SearchUtilities.regExpForString): Deleted.
Many uses of `WI.SearchUtilities.regExpForString` use the returned `RegExp` multiple times,
expecting each use to be done in isolation from every other use (e.g. filtering). In these
cases, the global flag `g` should not be set on the `RegExp`, as otherwise it will keep a
state of the last matched index, thereby breaking this isolation. As such, it is necessary
to split `WI.SearchUtilities.regExpForString` into two versions, one for each use case.
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype._highlightSearchResults):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.performSearch):
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
* UserInterface/Views/ResourceSecurityContentView.js:
(WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
Use `WI.SearchUtilities.searchRegExpForString` as these views expect the search to maintain
its current position throughout the contents of the view.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype._updateFilter):
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WI.IndexedDatabaseObjectStoreContentView.prototype.dataGridMatchNodeAgainstCustomFilters):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._urlFilterDidChange):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype.performSearch):
Use `WI.SearchUtilities.filterRegExpForString` as these views expect each search to be done
in isolation from every other search (e.g. filtering).
2020-04-17 Devin Rousso <drousso@apple.com>
Implement Promise.any and AggregateError
https://bugs.webkit.org/show_bug.cgi?id=202566
Reviewed by Yusuke Suzuki.
* UserInterface/Models/IssueMessage.js:
Mark `AggregateError` as a `WI.IssueMessage.Type.SemanticIssue`.
2020-04-17 Alexey Shvayka <shvaikalesh@gmail.com>
MediaQueryList should extend EventTarget
https://bugs.webkit.org/show_bug.cgi?id=203288
Reviewed by Darin Adler.
* UserInterface/Models/NativeFunctionParameters.js:
2020-04-14 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: add a Step next that steps by expression
https://bugs.webkit.org/show_bug.cgi?id=210324
Reviewed by Timothy Hatcher.
Step next is a hybrid of Step over and Step into which continues execution to the next pause
opportunity within the current (or ancestor) call frame. It is especially useful when trying
to debug minified code, such as trying to continue to `c()` in `a() && b() && c();`, where
Step over would continue to the next statement (i.e. after the `;`) and Step in would
continue to the first line inside `a()` (and would require a Step out to get back).
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.stepNext): Added.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI.debuggerStepNext): Added.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/StepNext.svg: Added.
2020-04-14 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Don't show tooltips for tabs
https://bugs.webkit.org/show_bug.cgi?id=210464
Reviewed by Devin Rousso.
Don't show tooltips when they match the name of the tab. We no longer truncate tab names
so the tooltip is redundant.
Only show tooltips for settings and search (pinned tabs).
* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem):
(WI.TabBarItem.prototype.set title):
2020-04-14 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Computed: de-indent items in the Variables section so that wrapped content doesn't line up with the `--`
https://bugs.webkit.org/show_bug.cgi?id=210384
Reviewed by Timothy Hatcher.
* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content > .computed .property):
2020-04-14 Devin Rousso <drousso@apple.com>
Web Inspector: Console: treat long strings as non-simple so they aren't truncated
https://bugs.webkit.org/show_bug.cgi?id=210511
<rdar://problem/49570592>
Reviewed by Joseph Pecoraro.
Treat strings longer than 140 characters (`WI.FormattedValue.MaxPreviewStringLength`) as not
simple so that `WI.ConsoleMessageView` makes itself expandable, which will show the full
length string when expanded (the truncated string is still shown when collapsed).
* UserInterface/Views/FormattedValue.js:
(WI.FormattedValue.isSimpleString): Added.
(WI.FormattedValue.hasSimpleDisplay):
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype._shouldConsiderObjectLossless):
2020-04-12 Darin Adler <darin@apple.com>
Fix a few mispellings of descendant and propagation
https://bugs.webkit.org/show_bug.cgi?id=210409
Reviewed by Mark Lam.
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype._rememberTreeElement):
(WI.TreeOutline.prototype._forgetTreeElement):
(WI.TreeOutline.prototype.selectionControllerNumberOfItems):
2020-04-11 Devin Rousso <drousso@apple.com>
Web Inspector: CSS: variables should have a go-to arrow to quickly jump to the definition
https://bugs.webkit.org/show_bug.cgi?id=195775
<rdar://problem/48905785>
Reviewed by Timothy Hatcher.
Often when debugging/editing styles that use CSS variables, the desired workflow is to
modify the variable itself, not that specific usage. This is especially helpful when editing
colors saved in CSS variables.
Add an always visible go-to arrow immediately after the variable (e.g. `--XYZ (->)`) that
will jump to the declaration of the variable elsewhere in the style cascade.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property .select-variable-property): Added.
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* Localizations/en.lproj/localizedStrings.js:
2020-04-09 Devin Rousso <drousso@apple.com>
Web Inspector: Storage: should be able to set a cookie with no value
https://bugs.webkit.org/show_bug.cgi?id=210237
Reviewed by Timothy Hatcher.
* UserInterface/Views/CookiePopover.js:
(WI.CookiePopover.prototype.get serializedData):
Require an explicitly set `name` instead of falling back to the `placeholder`. Allow the
`value` to be an empty string.
(WI.CookiePopover.prototype.show):
Don't have default placeholder values for `name` or `value` for the reasons above.
Drive-by: if an existing `WI.Cookie` is provided, use its `SameSite` value.
* UserInterface/Views/CookiePopover.css: Added.
(.popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"]):matches(:invalid, .invalid)): Added.
(.popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"]).invalid): Deleted.
Instead of changing the text color, change the border color.
2020-04-09 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: debug hooks should also be emitted for the first sub-expression in a comma expression
https://bugs.webkit.org/show_bug.cgi?id=210253
Reviewed by Joseph Pecoraro.
* UserInterface/Workers/Formatter/JSFormatter.js:
(JSFormatter.prototype._handleTokenAtNode):
(JSFormatter.prototype._isLikelyToHaveNewline): Deleted.
If an arrow function wraps it's body with `{` and `}`, always add newlines to make setting
breakpoints inside the function body easier.
2020-04-08 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: treat comma sub-expressions as separate statements
https://bugs.webkit.org/show_bug.cgi?id=209998
Reviewed by Joseph Pecoraro.
Minifiers sometimes use `,` instead of `;` as a way of compressing multiple statements into
a single statement (e.g. inside an `if` conditional). This makes stepping through minified
code much less useful, as our current stepping logic is based on expressions (not including
step in or step out). In most cases, we do actually want to treat each sub-expression in a
comma expression as a statement so as to emulate the behaviour as if there were `;` instead.
* UserInterface/Workers/Formatter/JSFormatter.js:
(JSFormatter.prototype._isLikelyToHaveNewline):
(JSFormatter.prototype._handleTokenAtNode):
Put each sub-expression in a comma expression on it's own line.
2020-04-08 Devin Rousso <drousso@apple.com>
Web Inspector: Search: populate the search field with the current selection when using the global search shortcut
https://bugs.webkit.org/show_bug.cgi?id=210207
Reviewed by Timothy Hatcher.
Add a setting to control whether the global search (⇧⌘F) should be populated by the current
selection (if it exists), allowing for a quicker flow for "show me everywhere this exists".
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
* UserInterface/Base/Main.js:
(WI._focusSearchField)
* Localizations/en.lproj/localizedStrings.js:
2020-04-08 Devin Rousso <drousso@apple.com>
Web Inspector: Storage: cannot clear out multiple or all local storage entries
https://bugs.webkit.org/show_bug.cgi?id=209867
Reviewed by Timothy Hatcher.
* UserInterface/Models/DOMStorageObject.js:
(WI.DOMStorageObject.prototype.removeItem):
(WI.DOMStorageObject.prototype.setItem):
(WI.DOMStorageObject.prototype.clear): Added.
(WI.DOMStorageObject.prototype.itemsCleared):
(WI.DOMStorageObject.prototype.itemRemoved):
(WI.DOMStorageObject.prototype.itemAdded):
(WI.DOMStorageObject.prototype.itemUpdated):
Add some assertions.
* UserInterface/Views/DOMStorageContentView.js:
(WI.DOMStorageContentView):
(WI.DOMStorageContentView.prototype.get navigationItems):
(WI.DOMStorageContentView.prototype._handleClearNavigationItemClicked): Added.
Add a "Clear" navigation item that calls the new `DOMStorage.clearDOMStorageItems`.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.removeChild):
If the removed item was selected, select the next (or previous if there is no next) item.
* UserInterface/Views/CookieStorageContentView.js:
(WI.CookieStorageContentView):
(WI.CookieStorageContentView.prototype.get navigationItems):
(WI.CookieStorageContentView.prototype._handleClearNavigationItemClicked): Added.
Drive-by: also add a "Clear" navigation item that calls `Page.deleteCookie` for each row.
* UserInterface/Protocol/DOMStorageObserver.js:
(WI.DOMStorageObserver.prototype.domStorageItemUpdated):
* UserInterface/Controllers/DOMStorageManager.js:
(WI.DOMStorageManager.prototype.itemUpdated):
Drive-by: rename `value` to `newValue` to match the protocol.
* Localizations/en.lproj/localizedStrings.js:
2020-04-08 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'this._target.NetworkAgent.getResponseBody')
https://bugs.webkit.org/show_bug.cgi?id=210168
Reviewed by Timothy Hatcher.
If a script is loaded by the main page and a `Worker`, the `WI.Script` from the `Worker`
will be associated with the `WI.Resource` from the main page, the call stack in the Sources
Tab will use the `WI.Resource` over the `WI.Script`, but the `WI.Target` for a `Worker` does
not have a `NetworkAgent` or `PageAgent`. As such, inside `WI.Resource`, if the `_target` is
a `WI.TargetType.Worker`, use the `DebuggerAgent`.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.requestContentFromBackend):
* UserInterface/Main.html:
Drive-by: remove unnecessary `<script>`.
2020-04-08 Devin Rousso <drousso@apple.com>
Web Inspector: don't reveal the prototype methods when using the "Expand All" context menu item for property-only object trees
https://bugs.webkit.org/show_bug.cgi?id=210123
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree.properties-only.json-only .object-tree-property.prototype-property, .object-tree.properties-only.json-only .object-tree-property.prototype-property + .children): Added.
(.object-tree.properties-only.json-only .object-tree-property.prototype-property): Deleted.
2020-04-08 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: support copying selected call frame(s) in the Call Stack
https://bugs.webkit.org/show_bug.cgi?id=210172
Reviewed by Timothy Hatcher.
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.prototype.handleCopyEvent): Added.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.handleCopyEvent): Added.
Copy the function name and source location for each selected call frame. If the selected
call frames span an async boundary, include the async boundary in the form `--- <name> ---`
where name is the reason for the async behavior (e.g. `addEventListener`). If the selected
call frames span multiple threads (e.g. `Worker`), include the thread name and indent all
of the call frames for that thread.
* UserInterface/Views/CallFrameTreeElement.js:
(WI.CallFrameTreeElement):
(WI.CallFrameTreeElement.prototype.get isAsyncBoundaryCallFrame): Added.
2020-04-07 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: focus outline of scope bar is clipped
https://bugs.webkit.org/show_bug.cgi?id=209877
<rdar://problem/61173598>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ScopeBar.css:
(.scope-bar):
2020-04-03 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: disclosure arrows should be shown if a folder is added to the navigation sidebar
https://bugs.webkit.org/show_bug.cgi?id=209937
Reviewed by Timothy Hatcher.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
(WI.SourcesNavigationSidebarPanel.prototype._addStyleSheet):
(WI.SourcesNavigationSidebarPanel.prototype._addScript):
2020-04-03 David Kilzer <ddkilzer@apple.com>
[Xcode] Replace ASAN_OTHER_CFLAGS and ASAN_OTHER_CPLUSPLUSFLAGS with $(inherited)
<https://webkit.org/b/209963>
<rdar://problem/61257504>
Reviewed by Alexey Proskuryakov.
* Configurations/Base.xcconfig:
- Remove ASAN_OTHER_CFLAGS, ASAN_OTHER_CPLUSPLUSFLAGS and
ASAN_OTHER_LDFLAGS.
2020-04-02 Devin Rousso <drousso@apple.com>
Context menu for local storage puts quotes around key and value
https://bugs.webkit.org/show_bug.cgi?id=209868
Reviewed by Joseph Pecoraro.
There are only two `WI.DataGrid` that support editing right now. Both of them use obvious
names for their columns (e.g. "Key", "Name", "Value", etc.), so rather than quote the column
name in the context menu, just display it as is.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype._contextMenuInDataTable):
* Localizations/en.lproj/localizedStrings.js:
2020-04-02 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Network tab summary bar jiggles
https://bugs.webkit.org/show_bug.cgi?id=209927
Reviewed by Timothy Hatcher.
* UserInterface/Views/NetworkTableContentView.css:
(.network-table > .statistics > .statistic > .text):
2020-04-01 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Use ECMAScript Numeric Separators for numbers with 5 or more digits
https://bugs.webkit.org/show_bug.cgi?id=209879
Reviewed by Joseph Pecoraro.
Instead of `1000000` write `1_000_000` so it's easier to read.
* UserInterface/Base/Utilities.js:
* UserInterface/Controllers/JavaScriptLogViewController.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Models/Gradient.js:
(WI.Gradient.prototype.stringFromStops):
* UserInterface/Models/HeapAllocationsInstrument.js:
(WI.HeapAllocationsInstrument.prototype.startInstrumentation):
* UserInterface/Protocol/Connection.js:
(InspectorBackend.Connection.prototype._dispatchResponse):
* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView.prototype.initialLayout):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._updateLoadTimeStatistic):
2020-03-31 Jon Davis <jond@apple.com>
Added new WebSocket icon
https://bugs.webkit.org/show_bug.cgi?id=209433
Reviewed by Joseph Pecoraro.
Drive-by: remove unused #doc-orig
* UserInterface/Images/DocumentIcons.svg:
* UserInterface/Views/ResourceIcons.css:
(.resource-icon.resource-type-websocket .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-websocket .icon):
2020-03-30 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: the Dock Side navigation item is automatically focused when Web Inspector is opened detached, preventing any global spacebar shortcuts from working
https://bugs.webkit.org/show_bug.cgi?id=209760
Reviewed by Devin Rousso.
When undocking, Web Inspector focuses on the first visible focusable element. I don't know why.
This patch restores the focus to the previously focused element.
* UserInterface/Base/Main.js:
2020-03-30 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r259101): items in the contextmenu of the tab bar don't have any text
https://bugs.webkit.org/show_bug.cgi?id=209793
Reviewed by Timothy Hatcher.
Fix a few places that weren't changed to use `displayName` instead of `title`.
* UserInterface/Base/Main.js:
(WI._tabBrowserSelectedTabContentViewDidChange):
* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype._handleTabContainerMouseDown):
(WI.TabBar.prototype._handleTabContainerContextMenu):
2020-03-30 Devin Rousso <drousso@apple.com>
Web Inspector: provide a way to log messages from the network process
https://bugs.webkit.org/show_bug.cgi?id=204775
Reviewed by Brian Burg.
ITP can be influenced by multiple pages simultaneously, meaning that sending a console
message to the Web Inspector that's connected to the page that caused a change may not be
useful as developers often don't test in complete isolation. As such, having a way to
broadcast a console message to all Web Inspectors ensures that any changes caused by any
page are always able to be seen, no matter which page is being actively inspected.
* UserInterface/Models/ConsoleMessage.js:
* UserInterface/Models/IssueMessage.js:
(WI.IssueMessage):
Add `ITPDebug` and `AdClickAttribution` message sources.
2020-03-30 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: the current time marker should always be on top
https://bugs.webkit.org/show_bug.cgi?id=209758
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .markers):
(.timeline-ruler > .markers > .divider):
(.timeline-ruler > .markers > .marker):
(.timeline-ruler > .markers > .marker.current-time):
Move the `z-index` from the `.markers` container to each individual marker element so that
the `.marker.current-time` can override it.
* UserInterface/Views/Variables.css:
(:root):
Add `--timeline-current-time-z-index` that is above `--timeline-record-z-index`.
2020-03-28 Devin Rousso <drousso@apple.com>
Web Inspector: support editing cookie key/values from inspector
https://bugs.webkit.org/show_bug.cgi?id=31157
<rdar://problem/19281523>
Reviewed by Timothy Hatcher.
* UserInterface/Models/Cookie.js:
(WI.Cookie):
(WI.Cookie.fromPayload):
(WI.Cookie.parseSetCookieResponseHeader):
(WI.Cookie.prototype.get session): Added.
(WI.Cookie.prototype.expirationDate):
(WI.Cookie.prototype.equals): Added.
(WI.Cookie.prototype.toProtocol): Added.
Add `session` value in addition to the existing `expires` value. Create helper methods for
comparing `WI.Cookie` objects and for using the `WI.Cookie` as a `Page.Cookie` type when
invoking protocol commands (right now just `Page.setCookie`).
* UserInterface/Views/CookieStorageContentView.js:
(WI.CookieStorageContentView):
(WI.CookieStorageContentView.prototype.get navigationItems):
(WI.CookieStorageContentView.prototype.tableCellContextMenuClicked):
(WI.CookieStorageContentView.prototype.willDismissPopover): Added.
(WI.CookieStorageContentView.prototype.async _willDismissCookiePopover): Added.
(WI.CookieStorageContentView.prototype._handleSetCookieButtonClick): Added.
(WI.CookieStorageContentView.prototype._reloadCookies):
(WI.CookieStorageContentView.prototype._formatCookiePropertyForColumn):
Add a + navigation item that shows a popover for creating a new cookie. When contextmenu
clicking on a table row, add an "Edit" item that shows a popover for creating a new cookie
with the values from the existing cookie, which will "replace" (delete and set) the existing
cookie upon being dismissed.
* UserInterface/Views/ResourceCookiesContentView.js:
(WI.ResourceCookiesContentView.prototype.tablePopulateCell):
If only use the `expires` value if `session` is not set.
* UserInterface/Views/CookiePopover.js: Added.
(WI.CookiePopover):
(WI.CookiePopover.prototype.get serializedData):
(WI.CookiePopover.prototype.show.createRow):
(WI.CookiePopover.prototype.show.createInputRow):
(WI.CookiePopover.prototype.show):
(WI.CookiePopover.prototype._presentOverTargetElement):
(WI.CookiePopover.prototype._defaultExpires):
(WI.CookiePopover.prototype._parseExpires):
(WI.CookiePopover.prototype._handleInputKeyDown):
* UserInterface/Views/CookiePopover.css: Added.
(.popover .cookie-popover-content):
(.popover .cookie-popover-content > table):
(.popover .cookie-popover-content > table > tr > th):
(.popover .cookie-popover-content > table > tr > td):
(.popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"])):
(.popover .cookie-popover-content > table > tr > td > input:matches([type="text"], [type="datetime-local"]).invalid):
(@media (prefers-color-scheme: dark) .popover .cookie-popover-content > table > tr > th):
Show an `<input>` (or `<select>`) for each configuration option when creating a cookie.
Hide the `<input>` for `expires` if the `<input type="checkbox">` for `session` is checked.
Indicate when the value in the `<input>` for `expires` is not a valid date.
* UserInterface/Main.html:
* Localizations/en.lproj/localizedStrings.js:
2020-03-28 Devin Rousso <drousso@apple.com>
Web Inspector: CSS: create visual editor for `box-shadow`
https://bugs.webkit.org/show_bug.cgi?id=208380
Reviewed by Timothy Hatcher.
Recognize `box-shadow` CSS properties in the Styles sidebar, parse the comma-separated list
value for individual box shadows, and create a `WI.InlineSwatch` for each. When clicked,
show a `WI.Popover` with a `WI.BoxShadowEditor`, which contains a table of editors:
Offset X | <input type="text"> | [ 2D (X & Y) ]
Offset Y | <input type="text"> | [ Slider ]
Inset | <input type="checkbox"> |
Blur | <input type="text"> | <input type="range">
Spread | <input type="text"> | <input type="range">
[ ]
[ ]
[ full color picker ]
[ ]
[ ]
* UserInterface/Models/BoxShadow.js: Added.
(WI.BoxShadow):
(WI.BoxShadow.fromString):
(WI.BoxShadow.parseNumberComponent):
(WI.BoxShadow.prototype.get offsetX):
(WI.BoxShadow.prototype.get offsetY):
(WI.BoxShadow.prototype.get blurRadius):
(WI.BoxShadow.prototype.get spreadRadius):
(WI.BoxShadow.prototype.get inset):
(WI.BoxShadow.prototype.get color):
(WI.BoxShadow.prototype.copy):
(WI.BoxShadow.prototype.toString):
(WI.BoxShadow.prototype.toString.stringifyNumberComponent):
* UserInterface/Models/CSSCompletions.js:
Add a `Set` of allowed CSS length units.
* UserInterface/Views/BoxShadowEditor.js: Added.
(WI.BoxShadowEditor):
(WI.BoxShadowEditor.createInputRow):
(WI.BoxShadowEditor.createSlider):
(WI.BoxShadowEditor.prototype.get element):
(WI.BoxShadowEditor.prototype.get boxShadow):
(WI.BoxShadowEditor.prototype.set boxShadow):
(WI.BoxShadowEditor.prototype.handleEvent):
(WI.BoxShadowEditor.prototype._updateBoxShadow):
(WI.BoxShadowEditor.prototype._updateBoxShadowOffsetFromSliderMouseEvent):
(WI.BoxShadowEditor.prototype._determineShiftForEvent):
(WI.BoxShadowEditor.prototype._handleOffsetSliderSVGKeyDown):
(WI.BoxShadowEditor.prototype._handleOffsetSliderSVGMouseDown):
(WI.BoxShadowEditor.prototype._handleWindowMouseMove):
(WI.BoxShadowEditor.prototype._handleWindowMouseUp):
(WI.BoxShadowEditor.prototype._handleOffsetXInputInput):
(WI.BoxShadowEditor.prototype._handleOffsetXInputKeyDown):
(WI.BoxShadowEditor.prototype._handleOffsetYInputInput):
(WI.BoxShadowEditor.prototype._handleOffsetYInputKeyDown):
(WI.BoxShadowEditor.prototype._handleBlurRadiusInputInput):
(WI.BoxShadowEditor.prototype._handleBlurRadiusInputKeyDown):
(WI.BoxShadowEditor.prototype._handleBlurRadiusSliderInput):
(WI.BoxShadowEditor.prototype._handleSpreadRadiusInputInput):
(WI.BoxShadowEditor.prototype._handleSpreadRadiusInputKeyDown):
(WI.BoxShadowEditor.prototype._handleSpreadRadiusSliderInput):
(WI.BoxShadowEditor.prototype._handleInsetCheckboxChange):
(WI.BoxShadowEditor.prototype._handleColorChanged):
* UserInterface/Views/BoxShadowEditor.css: Added.
(.box-shadow-editor):
(.box-shadow-editor > table):
(.box-shadow-editor > table > tr > th):
(.box-shadow-editor > table > tr > td):
(.box-shadow-editor > table > tr > td > input[type="text"]):
(.box-shadow-editor > table > tr > td > input[type="range"]):
(.box-shadow-editor > table > tr > td > svg):
(.box-shadow-editor > table > tr > td > svg line.axis):
(.box-shadow-editor > table > tr > td > svg line:not(.axis)):
(.box-shadow-editor > table > tr > td > svg circle):
(@media (prefers-color-scheme: dark) .box-shadow-editor > table > tr > th):
* UserInterface/Views/InlineSwatch.js:
(WI.InlineSwatch):
(WI.InlineSwatch.prototype._fallbackValue):
(WI.InlineSwatch.prototype._valueEditorValueDidChange):
* UserInterface/Views/InlineSwatch.css:
(.inline-swatch):
(.inline-swatch:not(.box-shadow), .inline-swatch.box-shadow:matches(:hover, :active)): Added.
(.inline-swatch:matches(.bezier, .box-shadow, .spring, .variable)): Added.
(.inline-swatch:not(.read-only):matches(.bezier, .box-shadow, .spring, .variable):hover): Added.
(.inline-swatch:not(.read-only):matches(.bezier, .box-shadow, .spring, .variable):active): Added.
(.inline-swatch:matches(.bezier, .box-shadow, .spring, .variable) > span): Added.
(@media (prefers-color-scheme: dark) .inline-swatch.box-shadow > svg): Added.
(.inline-swatch:not(.read-only):matches(.bezier, .spring, .variable):hover): Deleted.
(.inline-swatch:not(.read-only):matches(.bezier, .spring, .variable):active): Deleted.
(.inline-swatch:matches(.bezier, .spring, .variable) > span): Deleted.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens):
(WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):
(WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
(WI.SpreadsheetStyleProperty.prototype._addBoxShadowTokens):
(WI.SpreadsheetStyleProperty.prototype._resolveVariables):
* UserInterface/Views/Variables.css:
(:root):
* UserInterface/Views/ColorPicker.css:
(.color-picker):
Move `--color-picker-width` to `:root` so that `WI.BoxShadowEditor` can use it.
* UserInterface/Main.html:
* UserInterface/Test.html:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/BoxShadow.svg: Added.
2020-03-28 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r257759): Network: graph in Timing pane of selected resource is missing bars
https://bugs.webkit.org/show_bug.cgi?id=209525
Reviewed by Timothy Hatcher.
`WI.ResourceTimingBreakdownView` uses the same CSS classes and DOM structure as the parent
`WI.NetworkTableContentView`, relying on the styles defined there for it's own styles.
* UserInterface/Views/NetworkTableContentView.css:
(.network-table > .table li:not(.filler, .selected) .cell:not(.current-session)): Added.
(.network-table .error): Added.
(.network-table .waterfall .block): Added.
(body[dir=ltr] .network-table .waterfall .block): Added.
(body[dir=rtl] .network-table .waterfall .block): Added.
(.network-table .waterfall .block.request,): Added.
(.network-table .waterfall .block.mouse-tracking): Added.
(.network-table .waterfall .block.filler): Added.
(.network-table .waterfall .block.redirect): Added.
(.network-table .waterfall .block.queue): Added.
(.network-table .waterfall .block.dns): Added.
(.network-table .waterfall .block.connect): Added.
(.network-table .waterfall .block.secure): Added.
(.network-table .waterfall .block.request): Added.
(.network-table .waterfall .block.response): Added.
(.network-table > .table li:not(.selected) .cell:not(.current-session)): Deleted.
(.network-table > .table .error): Deleted.
(.network-table > .table .waterfall .block): Deleted.
(body[dir=ltr] .network-table > .table .waterfall .block): Deleted.
(body[dir=rtl] .network-table > .table .waterfall .block): Deleted.
(.network-table > .table .waterfall .block.request,): Deleted.
(.network-table > .table .waterfall .block.mouse-tracking): Deleted.
(.network-table > .table .waterfall .block.filler): Deleted.
(.network-table > .table .waterfall .block.redirect): Deleted.
(.network-table > .table .waterfall .block.queue): Deleted.
(.network-table > .table .waterfall .block.dns): Deleted.
(.network-table > .table .waterfall .block.connect): Deleted.
(.network-table > .table .waterfall .block.secure): Deleted.
(.network-table > .table .waterfall .block.request): Deleted.
(.network-table > .table .waterfall .block.response): Deleted.
Drive-by: the `WI.Table` filler row should not be dimmed.
* UserInterface/Views/ResourceTimingBreakdownView.css:
(.resource-timing-breakdown .waterfall .block):
2020-03-28 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Network: pressing RightArrow or LeftArrow unexpectedly changes panels
https://bugs.webkit.org/show_bug.cgi?id=209625
<rdar://problem/60940609>
Reviewed by Timothy Hatcher.
* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar.prototype._keyDown):
2020-03-27 Devin Rousso <drousso@apple.com>
Web Inspector: should also escape the method when Copy as cURL
https://bugs.webkit.org/show_bug.cgi?id=209665
<rdar://problem/58432154>
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-03-26 Devin Rousso <drousso@apple.com>
Web Inspector: add keyboard shortcut to tooltip of pinned tabs
https://bugs.webkit.org/show_bug.cgi?id=209640
Reviewed by Timothy Hatcher.
* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem):
(WI.TabBarItem.prototype.get displayName): Added.
(WI.TabBarItem.prototype.set displayName): Added.
(WI.TabBarItem.prototype.set title):
(WI.TabBarItem.prototype.titleDidChange): Deleted.
* UserInterface/Views/GeneralTabBarItem.js:
(WI.GeneralTabBarItem.fromTabContentView):
(WI.GeneralTabBarItem.prototype.get displayName): Added.
(WI.GeneralTabBarItem.prototype.set displayName): Added.
(WI.GeneralTabBarItem.prototype.get title): Deleted.
(WI.GeneralTabBarItem.prototype.set title): Deleted.
* UserInterface/Views/PinnedTabBarItem.js:
(WI.PinnedTabBarItem):
(WI.PinnedTabBarItem.fromTabContentView):
(WI.PinnedTabBarItem.titleDidChange): Deleted.
* UserInterface/Views/TabBar.css:
(.tab-bar > .tabs > .item > .name): Added.
(body.window-inactive .tab-bar > .tabs > .item > .name): Added.
(.tab-bar > .tabs > .item > .name > .content): Added.
(.tab-bar > .tabs > .item:not(.selected):hover > .name): Added.
(.tab-bar > .tabs > .item:not(.disabled).selected > .name): Added.
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .name): Added.
(.tab-bar > .tabs > .item > .title): Deleted.
(body.window-inactive .tab-bar > .tabs > .item > .title): Deleted.
(.tab-bar > .tabs > .item > .title > .content): Deleted.
(.tab-bar > .tabs > .item:not(.selected):hover > .title): Deleted.
(.tab-bar > .tabs > .item:not(.disabled).selected > .title): Deleted.
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .title): Deleted.
Separate the shown name of the tab (`displayName`) from the tooltip text (`title`).
* UserInterface/Views/SearchTabContentView.js:
(WI.SearchTabContentView.tabInfo):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.tabInfo):
Move the current `title` value to `displayName` and add a new `title` value with the
keyboard shortcut in parenthesis.
* UserInterface/Views/AuditTabContentView.js:
(WI.AuditTabContentView.tabInfo):
* UserInterface/Views/ConsoleTabContentView.js:
(WI.ConsoleTabContentView.tabInfo):
* UserInterface/Views/ElementsTabContentView.js:
(WI.ElementsTabContentView.tabInfo):
* UserInterface/Views/GraphicsTabContentView.js:
(WI.GraphicsTabContentView.tabInfo):
* UserInterface/Views/LayersTabContentView.js:
(WI.LayersTabContentView.tabInfo):
* UserInterface/Views/NetworkTabContentView.js:
(WI.NetworkTabContentView.tabInfo):
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.tabInfo):
* UserInterface/Views/StorageTabContentView.js:
(WI.StorageTabContentView.tabInfo):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.tabInfo):
Use `displayName` instead of `title` since the name is shown in the UI.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
Make the Settings Tab shortcut public.
* Localizations/en.lproj/localizedStrings.js:
2020-03-26 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: RTL: ArrowLeft and ArrowRight keys select wrong navigation bar items
https://bugs.webkit.org/show_bug.cgi?id=209617
Reviewed by Devin Rousso.
* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar.prototype._keyDown):
Reverse direction for RTL mode.
2020-03-23 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r257791): event breakpoint icon should be [E]
https://bugs.webkit.org/show_bug.cgi?id=209434
Reviewed by Timothy Hatcher.
* UserInterface/Images/TypeIcons.svg:
* UserInterface/Views/PathComponentIcons.css:
(.snapshot-list-icon .icon):
(@media (prefers-color-scheme: dark) .snapshot-list-icon .icon):
Drive-by: make a separate "HeapSnapshotList" target so that it won't be affected if "Events"
is ever changed.
2020-03-23 Devin Rousso <drousso@apple.com>
REGRESSION(r257759, r258623): Web Inspector: Settings icon sometimes placed below the tab bar
https://bugs.webkit.org/show_bug.cgi?id=208603
<rdar://problem/60108967>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.layout):
If the total width of all `WI.GeneralTabBarItem` is not an integer, it needs to be rounded
when compared to the width of the container `WI.TabBar`. This is be necessary because CSS
often rounds to the nearest pixel, meaning that `99.5px` would actually render as `100px`,
whereas `99.4px` would render as `99px`.
* UserInterface/Views/TabBar.css:
(body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)): Added.
(.tab-bar > .tabs.calculate-width > .item:not(.pinned)): Added.
(body:not(.docked) .tab-bar > .tabs > .item:not(.pinned)): Deleted.
(.tab-bar > .tabs.calculate-width > .item): Deleted.
When undocked, force all `WI.GeneralTabBarItem` to take up as little width as possible when
resizing so that if there isn't enough room for all of them, any that `flex-wrap` won't be
incorrectly perceived as needing a much larger width.
* UserInterface/Debug/Bootstrap.css:
(.tab-bar > .navigation-bar .inspect-inspector):
Ensure that the "inspect inspector" navigation item has an integer pixel width.
2020-03-23 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: TypeError: this._springEditor.removeListeners is not a function. (In 'this._springEditor.removeListeners()', 'this._springEditor.removeListeners' is undefined)
https://bugs.webkit.org/show_bug.cgi?id=209325
Reviewed by Brian Burg.
* UserInterface/Controllers/CodeMirrorSpringEditingController.js:
(WI.CodeMirrorSpringEditingController.prototype.popoverDidDismiss): Deleted.
2020-03-22 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: Right side of assignment cannot be destructured (at QuickConsole.js:358:30)
https://bugs.webkit.org/show_bug.cgi?id=209388
Reviewed by Joseph Pecoraro.
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype._handleFramePageExecutionContextChanged):
2020-03-21 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r257380, r257759): focusing the inspected page when docked dims most of the interface
https://bugs.webkit.org/show_bug.cgi?id=209366
Reviewed by Timothy Hatcher.
* UserInterface/Views/ButtonNavigationItem.css:
(body.window-inactive .navigation-bar .item.button > img): Added.
(body.window-inactive .navigation-bar .item.button.disabled > img): Added.
(body:matches(.window-inactive, .window-docked-inactive) .navigation-bar .item.button > img): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .navigation-bar .item.button.disabled > img): Deleted.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
(body.window-inactive .timeline-overview-graph.rendering-frame > .frame-marker): Added.
(body:matches(.window-inactive, .window-docked-inactive) .timeline-overview-graph.rendering-frame > .frame-marker): Deleted.
* UserInterface/Views/TabBar.css:
(body:not(.docked).window-inactive .tab-bar): Added.
(body.docked.window-inactive .tab-bar): Added.
(body.window-inactive .tab-bar > .border): Added.
(body.window-inactive .tab-bar > .navigation-bar > .item.divider): Added.
(body:not(.docked).window-inactive .tab-bar > .tabs > .item): Added.
(body:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body.window-inactive .tab-bar > .tabs > .item > .icon): Added.
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .icon): Added.
(body.window-inactive .tab-bar > .tabs > .item > .title): Added.
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .title): Added.
(body:not(.docked).window-inactive .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked).window-inactive .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked).window-inactive .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar): Deleted.
(body.docked:matches(.window-inactive, .window-docked-inactive) .tab-bar): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .border): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .navigation-bar > .item.divider): Deleted.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item): Deleted.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body.docked:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item > .icon): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected > .icon): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item > .title): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected > .title): Deleted.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked):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:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body.docked:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item): Deleted.
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
* UserInterface/Views/TimelineRecordFrame.css:
(body.window-inactive .timeline-record-frame.selected): Added.
(body:matches(.window-inactive, .window-docked-inactive) .timeline-record-frame.selected): Deleted.
* UserInterface/Views/TimelineRuler.css:
(body.window-inactive .timeline-ruler > .header > .divider): Added.
(body:matches(.window-inactive, .window-docked-inactive) .timeline-ruler > .header > .divider): Deleted.
* UserInterface/Views/Variables.css:
(body.window-inactive): Added.
(body.window-inactive *): Added.
(@media (prefers-color-scheme: dark) body.window-inactive): Added.
(@media (prefers-color-scheme: dark) body.window-inactive *): Added.
(body:matches(.window-inactive, .window-docked-inactive)): Deleted.
(body:matches(.window-inactive, .window-docked-inactive) *): Deleted.
(@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive)): Deleted.
(@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive) *): Deleted.
Remove usage of `.window-docked-inactive` as we don't want the UI to change when the focus
switches between the inspected page and the docked Web Inspector area, which happens a lot.
* UserInterface/Views/BreakpointTreeElement.css:
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.breakpoint.selected .status > .status-image.resolved): Added.
(.tree-outline:focus .item.breakpoint.selected .status > .status-image.resolved): Deleted.
* UserInterface/Views/CallFrameTreeElement.css:
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.call-frame.selected .status > .status-image): Added.
(.tree-outline:focus .item.call-frame.selected .status > .status-image): Deleted.
* UserInterface/Views/CanvasSidebarPanel.css:
(body:not(.window-inactive, .window-docked-inactive) .sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline:focus-within .item.processing.selected .subtitle > progress): Added.
(.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline:focus .item.processing.selected .subtitle > progress): Deleted.
* UserInterface/Views/DOMTreeContentView.css:
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom-tree:focus-within .tree-outline.dom li:matches(.selected, .hovered) .status-image.breakpoint): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom-tree:focus-within .tree-outline.dom li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Added.
(body:not(.window-inactive, .window-docked-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint): Deleted.
(body:not(.window-inactive, .window-docked-inactive) .content-view.dom-tree .tree-outline.dom:focus li:matches(.selected, .hovered) .status-image.breakpoint.subtree): Deleted.
* UserInterface/Views/DOMTreeOutline.css:
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:not(.non-selectable):focus-within li.selected .selection-area): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.inspected-node.selected > span::after): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .pseudo-class-indicator): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected *): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.parent.selected::before): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.parent.expanded.selected::before): Added.
(.tree-outline.dom:not(.non-selectable):focus-within li.selected .selection-area): Deleted.
(.tree-outline.dom:focus-within li.inspected-node.selected > span::after): Deleted.
(.tree-outline.dom:focus-within li.selected .pseudo-class-indicator): Deleted.
(.tree-outline.dom:focus-within li.selected): Deleted.
(.tree-outline.dom:focus-within li.selected *): Deleted.
(.tree-outline.dom:focus-within li.parent.selected::before): Deleted.
(.tree-outline.dom:focus-within li.parent.expanded.selected::before): Deleted.
* UserInterface/Views/Main.css:
(:focus .selected .go-to-arrow, .selected:focus .go-to-arrow): Added.
(:focus .selected .go-to-arrow:active, .selected .go:focus-to-arrow:active): Added.
(@media (prefers-color-scheme: dark) :focus .selected .go-to-arrow, .selected:focus .go-to-arrow): Added.
(:focus .selected .go-to-arrow): Deleted.
(:focus .selected .go-to-arrow:active): Deleted.
(@media (prefers-color-scheme: dark) :focus .selected .go-to-arrow): Deleted.
* UserInterface/Views/RecordingActionTreeElement.css:
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Added.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.recording-action.selected > .titles .parameter.swizzled, body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.recording-action.selected::before): Added.
(.tree-outline:focus .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon): Deleted.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus .item.recording-action.selected > .titles .parameter.swizzled, body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus .item.recording-action.selected::before): Deleted.
* UserInterface/Views/ResourceTreeElement.css:
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.open, .tree-outline:not(:focus-within) .item.resource.resource-type-websocket.selected .status .ready-state.open, body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .ready-state.open): Added.
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.connecting, .tree-outline:not(:focus-within) .item.resource.resource-type-websocket.selected .status .ready-state.connecting, body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .ready-state.connecting): Added.
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.open, .tree-outline:not(:focus) .item.resource.resource-type-websocket.selected .status .ready-state.open, body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .ready-state.open): Deleted.
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.connecting, .tree-outline:not(:focus) .item.resource.resource-type-websocket.selected .status .ready-state.connecting, body:matches(.window-inactive, .window-docked-inactive) .item.resource.resource-type-websocket.selected .status .ready-state.connecting): Deleted.
* UserInterface/Views/ScriptDetailsTimelineView.css:
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.selected .alternate-subtitle): Added.
(.tree-outline:focus .item.selected .alternate-subtitle): Deleted.
* UserInterface/Views/SourceCodeTreeElement.css:
(.tree-outline .item .status > .toggle-script-blackbox, body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.selected .status > .toggle-script-blackbox.pattern-blackboxed): Added.
(.tree-outline .item .status > .toggle-script-blackbox, .tree-outline:focus .item.selected .status > .toggle-script-blackbox.pattern-blackboxed): Deleted.
* UserInterface/Views/ThreadTreeElement.css:
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within > .item.thread.selected .status-button.resume): Added.
(.tree-outline:focus > .item.thread.selected .status-button.resume): Deleted.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > .tree-outline.timelines .item.selected + .item): Added.
(body:not(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines:focus-within .item.selected + .item): Added.
(@media (prefers-color-scheme: dark) .timeline-overview > .tree-outline.timelines .item.selected + .item): Added.
(.timeline-overview > .tree-outline.timelines .item.selected + .item, body:matches(.window-inactive, .window-docked-inactive) .timeline-overview > .tree-outline.timelines .item.selected + .item): Deleted.
(.timeline-overview > .tree-outline.timelines :focus .item.selected + .item): Deleted.
(@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): Deleted.
* UserInterface/Views/TreeElementStatusButton.css:
(body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.selected > .status > .status-button): Added.
(:focus .item.selected > .status > .status-button): Deleted.
Fix cases where `:focus` was still being checked from the `WI.TreeOutline` instead of the
individual `WI.TreeElement`. We should be using `:focus-within`, but only if the window or
docked Web Inspector area is also focused.
2020-03-20 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r257835): close and undock buttons are shown in remote inspector
https://bugs.webkit.org/show_bug.cgi?id=209346
Reviewed by Timothy Hatcher.
In the case of remote inspection, the frontend is told that docking is not available before
it is even shown (via `InspectorFrontendAPI.setDockingUnavailable`). Additionally, the
backend (`WebKit::RemoteWebInspectorUI`) never tells the frontend what dock side it actually
is (via `InspectorFrontendAPI.setDockSide`), as there would be no point, given that docking
is unavailable, meaning that the frontend must be undocked.
Before r257835, the docking state held by `WI._dockConfiguration` and `WI.docked`, neither
of which would be set as described above. As a result, in `WI._updateDockNavigationItems`
`WI.docked` would be undefined, which is falsy, thereby causing all docking navigation items
to be hidden. After r257835, these were merged into one `WI.dockConfiguration`, which is
compared against `WI.DockConfiguration.Undocked` instead of just being falsy checked,
meaning it would result in `true` which would not hide all of the docking navigation items.
Change the logic of `WI.updateDockingAvailability` such that if the frontend is told that
docking is unavailable, mark the `WI.dockConfiguration` as `WI.DockConfiguration.Undocked`.
This way, the frontend will always have a valid value for `WI.dockConfiguration`.
Additionally, further leverage `InspectorFrontendHost.supportsDockSide` to only create the
docking navigation items that are actually supported by the host.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI.updateDockingAvailability):
(WI.resizeDockedFrameMouseDown):
(WI.dockedConfigurationSupportsSplitContentBrowser):
(WI._updateDockNavigationItems):
(WI._updateTabBarDividers):
* UserInterface/Views/TabBar.js:
(WI.TabBar.get horizontalPadding):
(WI.TabBar.prototype.resetCachedWidths): Added.
When switching dock configurations, we need to reset the cached width of each tab bar item,
as otherwise, a large width cached when undocked can incorrectly be used when docked.
* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem.get horizontalMargin):
Replace negative checks of `WI.dockConfiguration` with positive ones that can't be fooled by
a falsy value.
2020-03-19 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: AXI: disabled buttons shouldn't be focusable
https://bugs.webkit.org/show_bug.cgi?id=208283
<rdar://problem/59832150>
Reviewed by Devin Rousso.
Set tabIndex to "-1" when button becomes disabled.
* UserInterface/Views/ActivateButtonNavigationItem.js:
(WI.ActivateButtonNavigationItem):
* UserInterface/Views/ButtonNavigationItem.js:
`_role` is defined in the parent class now.
(WI.ButtonNavigationItem):
(WI.ButtonNavigationItem.prototype.set enabled):
(WI.ButtonNavigationItem.prototype.get tabbable):
(WI.ButtonNavigationItem.prototype._updateTabIndex):
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem.prototype.get tabbable):
(WI.RadioButtonNavigationItem):
2020-03-19 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: remove redundant code in TreeOutline.prototype.removeChildAtIndex
https://bugs.webkit.org/show_bug.cgi?id=209301
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype.removeChildAtIndex):
Check `suppressSelectSibling` once instead of three times.
2020-03-17 Devin Rousso <drousso@apple.com>
Web Inspector: the width of `WI.TabBarItem` can change if the detached window is resized
https://bugs.webkit.org/show_bug.cgi?id=209200
Reviewed by Timothy Hatcher.
* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.layout):
(WI.TabBar.prototype.layout.measureWidth): Renamed from `measureItemWidth`.
When undocked, `WI.TabBarItem` grow to fill any available space. As a result, if a
`WI.TabBarItem` is added or removed, the width of all `WI.TabBarItem` will change.
Wait to measure widths until all `WI.TabBarItem` are un-hidden for the reason above.
2020-03-17 Devin Rousso <drousso@apple.com>
Web Inspector: Network: we should prefer showing "Preserve Log" over "Group Media Requests"
https://bugs.webkit.org/show_bug.cgi?id=209199
Reviewed by Timothy Hatcher.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
Change the `WI.NavigationItem.VisibilityPriority` of the various `WI.NavigationItem`:
High:
- URL filter
- resource type filter
- live/HAR view switcher
- disable resource caching toggle
Normal:
- Preserve Log checkbox
- clear button
Low:
- Group Media Requests checkbox
- HAR import/export buttons
This way, items that have alternate ways of being triggered (e.g. keyboard shortcuts) are
hidden first, and vica versa.
2020-03-17 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: hovering the title of an object preview popup for a DOM node doesn't highlight it
https://bugs.webkit.org/show_bug.cgi?id=209159
Reviewed by Timothy Hatcher.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._showPopoverForObject):
2020-03-17 Devin Rousso <drousso@apple.com>
REGRESSION(r257759): Web Inspector: Settings icon sometimes placed below the tab bar
https://bugs.webkit.org/show_bug.cgi?id=208603
<rdar://problem/60108967>
Reviewed by Brian Burg.
* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.layout):
Don't take into account the width of the flexible space before or after the normal tab bar
items since they will shrink to fit (the container is using `display: flex;`). Instead, use
determine the available space by subtracting the width of every `WI.PinnedTabBarItem` from
the `realOffsetWidth` of the container, comparing against the sum of the `realOffsetWidth`
of all `WI.GeneralTabBarItem`. If the sum is greater than the available space, successively
mark items from the end (right in LTR, left in RTL) as hidden until the remaining will fit.
2020-03-16 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r257380): Web Inspector: deleting node causes TreeOutline to lose focus
https://bugs.webkit.org/show_bug.cgi?id=208364
<rdar://problem/59871772>
Reviewed by Devin Rousso.
Maintain keyboard focus within TreeOutline when selection changes.
* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.select):
2020-03-15 Yusuke Suzuki <ysuzuki@apple.com>
Should not use variable-length-array (VLA)
https://bugs.webkit.org/show_bug.cgi?id=209043
Reviewed by Mark Lam.
* Configurations/Base.xcconfig:
2020-03-10 Devin Rousso <drousso@apple.com>
REGRESSION(r253759): Web Inspector: Audits: results folder doesn't get selected by pressing Arrow Down key
https://bugs.webkit.org/show_bug.cgi?id=208679
<rdar://problem/60108942>
Reviewed by Timothy Hatcher.
* UserInterface/Views/AuditNavigationSidebarPanel.js:
(WI.AuditNavigationSidebarPanel.prototype.initialLayout):
(WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerEditingChanged):
We do actually want to prevent repeat selection, as we may end up attempting to select the
same `WI.TreeElement` twice due to the nature of `WI.SelectionController`, which would call
through to `WI.NavigationSidebarPanel.prototype.showDefaultContentView()` which deselects
any selected `WI.TreeElement`. Reselecting the previously selected `WI.TreeElement` when
exiting edit mode is much more of a special case than any of the ways for moving selection
to a `WI.FolderTreeElement`, so add logic just for that case instead of affecting the entire
`WI.TreeOutline`. When restoring the selection after leaving edit mode, if the currently
selected `WI.TreeElement` was also the previously selected `WI.TreeElement`, deselect and
reselect it so we're "reset" back to a fresh state.
2020-03-06 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: AXI: no way to expand/collapse sidebar sections with Tab navigation
https://bugs.webkit.org/show_bug.cgi?id=208562
<rdar://problem/60028941>
Reviewed by Devin Rousso.
* UserInterface/Views/DetailsSection.css:
(.details-section > .header):
(.details-section > .header::before):
Increase the height of the clickble area so it matches the height
of the header section.
(.details-section .header:focus):
(.details-section .header:focus::before):
Adjust the focus ring around the expand/collapse triangle so it has rounded corners.
* UserInterface/Views/DetailsSection.js:
(WI.DetailsSection):
(WI.DetailsSection.prototype._headerElementClicked):
(WI.DetailsSection.prototype._headerElementMouseDown):
(WI.DetailsSection.prototype._headerElementKeyPress):
2020-03-06 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: AXI: scope bars should be focusable when navigating by pressing Tab
https://bugs.webkit.org/show_bug.cgi?id=208277
<rdar://problem/59828111>
Reviewed by Devin Rousso.
Make resource type filter in the Network tab and message type filter in the Console tab focusable.
* UserInterface/Views/AuditTestGroupContentView.css:
(.content-view.audit-test-group > header > nav):
(.content-view.audit-test-group > header > nav > .scope-bar):
Prevent outline of the focused scope bar item from clipping.
* UserInterface/Views/ScopeBar.css:
(.scope-bar > li:focus):
(.scope-bar > li:focus::after,):
* UserInterface/Views/ScopeBar.js:
(WI.ScopeBar):
(WI.ScopeBar.prototype._handleKeyDown):
Make Arrow Left an Arrow Right keys move focus within the scope bar.
This matches the behavior of macOS radio buttons.
* UserInterface/Views/ScopeBarItem.js:
(WI.ScopeBarItem.prototype.get scopeBar):
(WI.ScopeBarItem.prototype.set scopeBar):
(WI.ScopeBarItem.prototype.toggle):
(WI.ScopeBarItem.prototype._updateSelected):
(WI.ScopeBarItem.prototype._handleMouseDown):
(WI.ScopeBarItem.prototype._handleKeyDown):
Allow to toggle focused scope bar item by pressing Space or Enter.
2020-03-06 Jon Davis <jond@apple.com>
Fixed missing icons for WI.ThreadTreeElement and selected Heap Snapshots
https://bugs.webkit.org/show_bug.cgi?id=208719
Reviewed by Devin Rousso.
* UserInterface/Images/InstrumentIcons.svg: Removed.
* UserInterface/Images/TypeIcons.svg:
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
(.timeline-overview-graph.heap-allocations > img.snapshot.selected):
* UserInterface/Views/NetworkTableContentView.css:
(.network-table > .table .cell.dom-node.name .icon):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .breakpoints-container .tree-outline .item.event-target-window .icon):
(@media (prefers-color-scheme: dark) .sidebar > .panel.navigation.sources > .content > .breakpoints-container .tree-outline .item.event-target-window .icon):
* UserInterface/Views/ThreadTreeElement.css:
(.tree-outline > .item.thread .icon):
(.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):
(@media (prefers-color-scheme: dark) .tree-outline > .item.thread .icon):
(@media (prefers-color-scheme: dark) .tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):
* UserInterface/Views/TimelineIcons.css:
(.network-icon .icon):
(.script-icon .icon):
(.cpu-icon .icon):
(.memory-icon .icon):
(.heap-allocations-icon .icon):
(.layout-icon .icon):
(.rendering-frame-icon .icon):
(.media-icon .icon):
(@media (prefers-color-scheme: dark) .network-icon .icon):
(@media (prefers-color-scheme: dark) .script-icon .icon):
(@media (prefers-color-scheme: dark) .cpu-icon .icon):
(@media (prefers-color-scheme: dark) .memory-icon .icon):
(@media (prefers-color-scheme: dark) .heap-allocations-icon .icon):
(@media (prefers-color-scheme: dark) .layout-icon .icon):
(@media (prefers-color-scheme: dark) .rendering-frame-icon .icon):
(@media (prefers-color-scheme: dark) .media-icon .icon):
2020-03-05 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: AXI: annotate tab panels
https://bugs.webkit.org/show_bug.cgi?id=208542
Reviewed by Devin Rousso.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
Remove `role=main` since it was providing very generic and not useful description to VoiceOver.
2020-03-05 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: AXI: can't leave Styles and Computed panels by pressing Tab
https://bugs.webkit.org/show_bug.cgi?id=208549
<rdar://problem/60020149>
Reviewed by Devin Rousso.
Remove focus cycling inside of the Styles and Computed panels.
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype._handleForcedPseudoClassCheckboxKeydown):
(WI.GeneralStyleDetailsSidebarPanel.prototype._handleFilterBarInputFieldKeyDown):
2020-03-04 Devin Rousso <drousso@apple.com>
Web Inspector: the execution context picker is shown on pages with only one execution context if there are internal execution contexts
https://bugs.webkit.org/show_bug.cgi?id=208502
Reviewed by Timothy Hatcher.
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype._updateActiveExecutionContextDisplay):
(WI.QuickConsole.prototype._handleEngineeringShowInternalExecutionContextsSettingChanged):
2020-03-04 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(?): Elements: unable to edit a tag name more than once
https://bugs.webkit.org/show_bug.cgi?id=208586
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype._insertInLastAttributePosition):
When inserting a new attribute, don't wipe out the existing DOM structure, which is required
in order for tag name editing to work (specifically having a `.html-tag-name` node).
2020-03-03 Devin Rousso <drousso@apple.com>
Web Inspector: re-add `InspectorFrontendHost` support for moving the inspected window
https://bugs.webkit.org/show_bug.cgi?id=208555
Reviewed by Timothy Hatcher.
Partially revert r257759, as the design changed enough such that this code is still useful.
* UserInterface/Base/Main.js:
(WI.loaded):
(WI.updateDockedState):
(WI.resizeDockedFrameMouseDown): Added.
(WI.moveUndockedWindowMouseDown): Added.
(WI.dockedConfigurationSupportsSplitContentBrowser):
(WI._windowFocused):
(WI._windowBlurred):
(WI._updateDockNavigationItems):
(WI._handleDockedResizerMouseDown):
(WI._handleUndockedTitleAreaMouseDown):
(WI._updateTabBarDividers):
(WI.setLayoutDirection):
Don't create tab bar navigation items for the various docking configurations if the platform
doesn't support that particular configuration.
* UserInterface/Views/TabBar.js:
(WI.TabBar):
(WI.TabBar.get horizontalPadding):
(WI.TabBar.prototype._handleMouseDown):
(WI.TabBar.prototype._handleTabContainerMouseDown): Added.
(WI.TabBar.prototype._handleTabContainerClick): Added.
(WI.TabBar.prototype._handleTabContainerMouseLeave): Added.
(WI.TabBar.prototype._handleTabContainerContextMenu): Added.
(WI.TabBar.prototype._handleClick): Deleted.
(WI.TabBar.prototype._handleMouseLeave): Deleted.
(WI.TabBar.prototype._handleContextMenu): Deleted.
* UserInterface/Views/TabBar.css:
(body.docked.bottom .tab-bar > .tabs > .flexible-space):
Dragging on empty space in the tab bar should adjust Web Inspector's bottom docked height.
* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem.get horizontalMargin):
2020-03-03 Devin Rousso <drousso@apple.com>
Web Inspector: the background of the navigation items in the tab bar doesn't match when unfocusing the window
https://bugs.webkit.org/show_bug.cgi?id=208538
Reviewed by Timothy Hatcher.
* UserInterface/Views/TabBar.css:
(body[dir=ltr]:not(.docked) .tab-bar > .tabs > .item:nth-child(n + 3 of :not(.hidden)), body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.hide-border-start) > .item:nth-child(2 of :not(.hidden)), body[dir=ltr]:not(.docked) .tab-bar > .tabs.dragging-tab > .item.selected, body[dir=rtl]:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden))): Added.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden)), body[dir=rtl]:not(.docked) .tab-bar > .tabs > .item:nth-child(n + 3 of :not(.hidden)), body[dir=rtl]:not(.docked) .tab-bar > .tabs:not(.hide-border-start) > .item:nth-child(2 of :not(.hidden)), body[dir=rtl]:not(.docked) .tab-bar > .tabs.dragging-tab > .item.selected): Added.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs > .item:not(:first-child), body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.hide-border-start) > .item:first-child, body[dir=ltr]:not(.docked) .tab-bar > .tabs.dragging-tab > .item.selected, body[dir=rtl]:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:last-child): Deleted.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:last-child, body[dir=rtl]:not(.docked) .tab-bar > .tabs > .item:not(:first-child), body[dir=rtl]:not(.docked) .tab-bar > .tabs:not(.hide-border-start) > .item:first-child, body[dir=rtl]:not(.docked) .tab-bar > .tabs.dragging-tab > .item.selected): Deleted.
Use `nth-child` and `nth-last-child` instead of `:first-child` and `:last-child` now that
there are `.flexible-space` elements alongside tab bar items.
(@media (prefers-color-scheme: dark) .tab-bar):
(@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body.docked .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive) .tab-bar): Deleted.
Ensure completely separate styles for `background-color` and `background-image` when `.docked`
vs when `:not(.docked)` so that they don't "bleed" into eachother.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar):
(body.docked:matches(.window-inactive, .window-docked-inactive) .tab-bar):
(.tab-bar > .navigation-bar > .item.group > .item):
(.tab-bar > .navigation-bar > .item.group > .item:nth-child(1 of :not(.hidden))):
(.tab-bar > .navigation-bar > .item.group > .item:nth-last-child(1 of :not(.hidden))):
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item):
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected):
(.tab-bar > .tabs.static-layout > :matches(.flexible-space, .item)):
(.tab-bar > .tabs.animating.inserting-tab > .item.being-inserted):
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked):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:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover):
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item):
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected):
Drive-by: remove as many `!important` as possible to make future modification simpler.
2020-03-03 Jon Davis <jond@apple.com>
Removed old raster icons for object types and resources
https://bugs.webkit.org/show_bug.cgi?id=208458
Reviewed by Devin Rousso.
* UserInterface/Images/ApplicationCache.png: Removed.
* UserInterface/Images/ApplicationCache@2x.png: Removed.
* UserInterface/Images/ApplicationCacheManifest.png: Removed.
* UserInterface/Images/ApplicationCacheManifest@2x.png: Removed.
* UserInterface/Images/Assertion.svg: Removed.
* UserInterface/Images/AuditTestCase.svg: Removed.
* UserInterface/Images/AuditTestCaseResult.svg: Removed.
* UserInterface/Images/AuditTestGroup.svg: Removed.
* UserInterface/Images/AuditTestGroupResult.svg: Removed.
* UserInterface/Images/CPUInstrument.svg: Removed.
* UserInterface/Images/CallTrees.svg: Removed.
* UserInterface/Images/ClippingCSS.png: Removed.
* UserInterface/Images/ClippingCSS@2x.png: Removed.
* UserInterface/Images/ClippingCSSLarge.png: Removed.
* UserInterface/Images/ClippingCSSLarge@2x.png: Removed.
* UserInterface/Images/ClippingGeneric.png: Removed.
* UserInterface/Images/ClippingGeneric@2x.png: Removed.
* UserInterface/Images/ClippingGenericLarge.png: Removed.
* UserInterface/Images/ClippingGenericLarge@2x.png: Removed.
* UserInterface/Images/ClippingJS.png: Removed.
* UserInterface/Images/ClippingJS@2x.png: Removed.
* UserInterface/Images/ClippingJSLarge.png: Removed.
* UserInterface/Images/ClippingJSLarge@2x.png: Removed.
* UserInterface/Images/Cookie.png: Removed.
* UserInterface/Images/Cookie@2x.png: Removed.
* UserInterface/Images/DOMBreakpointAttributeModified.svg: Removed.
* UserInterface/Images/DOMBreakpointNodeRemoved.svg: Removed.
* UserInterface/Images/DOMBreakpointSubtreeModified.svg: Removed.
* UserInterface/Images/DOMCharacterData.svg: Removed.
* UserInterface/Images/DOMComment.svg: Removed.
* UserInterface/Images/DOMDocument.svg: Removed.
* UserInterface/Images/DOMDocumentType.svg: Removed.
* UserInterface/Images/DOMElement.svg: Removed.
* UserInterface/Images/DOMNode.svg: Removed.
* UserInterface/Images/DOMTextNode.svg: Removed.
* UserInterface/Images/Database.png: Removed.
* UserInterface/Images/Database@2x.png: Removed.
* UserInterface/Images/DatabaseTable.png: Removed.
* UserInterface/Images/DatabaseTable@2x.png: Removed.
* UserInterface/Images/DebuggerStatement.svg: Removed.
* UserInterface/Images/DocumentCSS.png: Removed.
* UserInterface/Images/DocumentCSS@2x.png: Removed.
* UserInterface/Images/DocumentCSSLarge.png: Removed.
* UserInterface/Images/DocumentCSSLarge@2x.png: Removed.
* UserInterface/Images/DocumentFont.png: Removed.
* UserInterface/Images/DocumentFont@2x.png: Removed.
* UserInterface/Images/DocumentFontLarge.png: Removed.
* UserInterface/Images/DocumentFontLarge@2x.png: Removed.
* UserInterface/Images/DocumentGL.png: Removed.
* UserInterface/Images/DocumentGL@2x.png: Removed.
* UserInterface/Images/DocumentGeneric.png: Removed.
* UserInterface/Images/DocumentGeneric@2x.png: Removed.
* UserInterface/Images/DocumentGenericLarge.png: Removed.
* UserInterface/Images/DocumentGenericLarge@2x.png: Removed.
* UserInterface/Images/DocumentImage.png: Removed.
* UserInterface/Images/DocumentImage@2x.png: Removed.
* UserInterface/Images/DocumentImageLarge.png: Removed.
* UserInterface/Images/DocumentImageLarge@2x.png: Removed.
* UserInterface/Images/DocumentJS.png: Removed.
* UserInterface/Images/DocumentJS@2x.png: Removed.
* UserInterface/Images/DocumentJSLarge.png: Removed.
* UserInterface/Images/DocumentJSLarge@2x.png: Removed.
* UserInterface/Images/DocumentMarkup.png: Removed.
* UserInterface/Images/DocumentMarkup@2x.png: Removed.
* UserInterface/Images/DocumentMarkupLarge.png: Removed.
* UserInterface/Images/DocumentMarkupLarge@2x.png: Removed.
* UserInterface/Images/EventBreakpointAnimationFrame.svg: Removed.
* UserInterface/Images/EventBreakpointInterval.svg: Removed.
* UserInterface/Images/EventBreakpointListener.svg: Removed.
* UserInterface/Images/EventBreakpointTimeout.svg: Removed.
* UserInterface/Images/EventListener.svg: Removed.
* UserInterface/Images/Events.svg: Removed.
* UserInterface/Images/Exception.svg: Removed.
* UserInterface/Images/FolderGeneric.png: Removed.
* UserInterface/Images/FolderGeneric@2x.png: Removed.
* UserInterface/Images/Function.svg: Removed.
* UserInterface/Images/HeapAllocationsInstrument.svg: Removed.
* UserInterface/Images/HeapSnapshot.svg: Removed.
* UserInterface/Images/HeapSnapshotDiff.svg: Removed.
* UserInterface/Images/HeapSnapshotInstances.svg: Removed.
* UserInterface/Images/HeapSnapshotObjectGraph.svg: Removed.
* UserInterface/Images/HeapSnapshotSelected.svg: Removed.
* UserInterface/Images/HeapSnapshotSummary.svg: Removed.
* UserInterface/Images/LayoutInstrument.svg: Removed.
* UserInterface/Images/LocalStorage.png: Removed.
* UserInterface/Images/LocalStorage@2x.png: Removed.
* UserInterface/Images/MediaInstrument.svg: Removed.
* UserInterface/Images/MemoryInstrument.svg: Removed.
* UserInterface/Images/Microtask.svg: Removed.
* UserInterface/Images/Native.svg: Removed.
* UserInterface/Images/NetworkInstrument.svg: Removed.
* UserInterface/Images/Object.svg: Removed.
* UserInterface/Images/PausedBreakpoint.svg: Removed.
* UserInterface/Images/Program.svg: Removed.
* UserInterface/Images/PseudoElement.svg: Removed.
* UserInterface/Images/Range.svg: Removed.
* UserInterface/Images/RangeLarge.svg: Removed.
* UserInterface/Images/Reflection.svg: Removed.
* UserInterface/Images/RenderingFrame.svg: Removed.
* UserInterface/Images/RenderingFramesInstrument.svg: Removed.
* UserInterface/Images/Request.svg: Removed.
* UserInterface/Images/Response.svg: Removed.
* UserInterface/Images/ScriptsInstrument.svg: Removed.
* UserInterface/Images/SessionStorage.png: Removed.
* UserInterface/Images/SessionStorage@2x.png: Removed.
* UserInterface/Images/Source.svg: Removed.
* UserInterface/Images/StyleRuleInheritedElement.svg: Removed.
* UserInterface/Images/TailDeletedFunction.svg: Removed.
* UserInterface/Images/Thread.svg: Removed.
* UserInterface/Images/TimelineRecordAPI.svg: Removed.
* UserInterface/Images/TimelineRecordAnimationFrame.svg: Removed.
* UserInterface/Images/TimelineRecordCSSAnimation.svg: Removed.
* UserInterface/Images/TimelineRecordCSSTransition.svg: Removed.
* UserInterface/Images/TimelineRecordComposite.svg: Removed.
* UserInterface/Images/TimelineRecordConsoleProfile.svg: Removed.
* UserInterface/Images/TimelineRecordEvent.svg: Removed.
* UserInterface/Images/TimelineRecordGarbageCollection.svg: Removed.
* UserInterface/Images/TimelineRecordLayout.svg: Removed.
* UserInterface/Images/TimelineRecordMediaElement.svg: Removed.
* UserInterface/Images/TimelineRecordPaint.svg: Removed.
* UserInterface/Images/TimelineRecordProbeSampled.svg: Removed.
* UserInterface/Images/TimelineRecordScriptEvaluated.svg: Removed.
* UserInterface/Images/TimelineRecordStyle.svg: Removed.
* UserInterface/Images/TimelineRecordTimer.svg: Removed.
* UserInterface/Images/TypeBigInt.svg: Removed.
* UserInterface/Images/TypeBoolean.svg: Removed.
* UserInterface/Images/TypeNull.svg: Removed.
* UserInterface/Images/TypeNumber.svg: Removed.
* UserInterface/Images/TypeObject.svg: Removed.
* UserInterface/Images/TypeRegex.svg: Removed.
* UserInterface/Images/TypeString.svg: Removed.
* UserInterface/Images/TypeSymbol.svg: Removed.
* UserInterface/Images/TypeUndefined.svg: Removed.
* UserInterface/Images/URLBreakpoint.svg: Removed.
* UserInterface/Images/WebSocket.png: Removed.
* UserInterface/Images/WebSocket@2x.png: Removed.
* UserInterface/Images/WebSocketLarge.png: Removed.
* UserInterface/Images/WebSocketLarge@2x.png: Removed.
* UserInterface/Images/WorkerScript.png: Removed.
* UserInterface/Images/WorkerScript@2x.png: Removed.
* UserInterface/Images/WorkerScriptLarge.png: Removed.
* UserInterface/Images/WorkerScriptLarge@2x.png: Removed.
2020-03-02 Devin Rousso <drousso@apple.com>
Web Inspector: visual artifacts in the corner of selected tabs when docked in dark mode
https://bugs.webkit.org/show_bug.cgi?id=208498
Reviewed by Timothy Hatcher.
* UserInterface/Views/TabBar.css:
(@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body.docked .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body.docked:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
The `background-color` set by `body.docked .tab-bar > .tabs > .item:not(.disabled).selected`
in light mode was also being applied in dark mode. When docked, don't use `background-image`
and instead exclusively use `background-color` so nothing is still applied.
2020-03-02 Devin Rousso <drousso@apple.com>
Web Inspector: Items in the toolbar take up to much vertical space
https://bugs.webkit.org/show_bug.cgi?id=204627
<rdar://problem/59091905>
Reviewed by Timothy Hatcher.
Merge the toolbar are and tab bar to waste less vertical space.
Existing toolbar buttons have been moved to a space before the tab bar, and are only shown
when needed (e.g. only show the reload button when remotely inspecting).
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 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.get horizontalPadding): Added.
(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.layout.measureItemWidth):
(WI.TabBar.prototype.layout.recalculateItemWidths):
(WI.TabBar.prototype.didLayoutSubtree): Added.
(WI.TabBar.prototype._recordTabBarItemSizesAndPositions):
(WI.TabBar.prototype._recordTabBarItemSizesAndPositions.add): Added.
(WI.TabBar.prototype._applyTabBarItemSizesAndPositions):
(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._handleMouseMoved.inlineStyleValue): Added.
(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:not(.docked) .tab-bar): Added.
(body.docked .tab-bar): Added.
(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.
(.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.docked .tab-bar .tabs): Added.
(.tab-bar > .tabs > .item): Added.
(body:not(.docked) .tab-bar > .tabs > .item): Added.
(body:not(.docked) .tab-bar > .tabs > .item:not(.pinned)): Added.
(body.docked .tab-bar > .tabs > .item): Added.
(.tab-bar > .tabs.calculate-width > .item): Added.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs > .item:not(:first-child), body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.hide-border-start) > .item:first-child, body[dir=ltr]:not(.docked) .tab-bar > .tabs.dragging-tab > .item.selected, body[dir=rtl]:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:last-child): Added.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:last-child, body[dir=rtl]:not(.docked) .tab-bar > .tabs > .item:not(:first-child), body[dir=rtl]:not(.docked) .tab-bar > .tabs:not(.hide-border-start) > .item:first-child, body[dir=rtl]:not(.docked) .tab-bar > .tabs.dragging-tab > .item.selected): Added.
(.tab-bar > .tabs > .item.pinned): Added.
(body.docked .tab-bar > .tabs > .item.pinned): Added.
(body:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body.docked .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(body.docked .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover, body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover + .item, body[dir=rtl]:not(.docked) .tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover): Added.
(body[dir=ltr]:not(.docked) .tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover, body[dir=rtl]:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover, body[dir=rtl]:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover + .item): Added.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item): Added.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body.docked:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(.tab-bar > .tabs > .item > .flex-space): Added.
(.tab-bar > .tabs > .item > .icon): Added.
(.tab-bar > .tabs > .item.pinned > .icon): Added.
(.tab-bar > .tabs > .item:not(.selected):hover > .icon): Added.
(.tab-bar > .tabs > .item:not(.disabled).selected > .icon): Added.
(.tab-bar > .tabs > .item.disabled > .icon): Added.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item > .icon): Added.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected > .icon): Added.
(.tab-bar > .tabs > .item > .title): Added.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item > .title): Added.
(.tab-bar > .tabs > .item > .title > .content): Added.
(.tab-bar > .tabs:not(.animating) > .item:not(.selected):hover > .title): Added.
(.tab-bar > .tabs > .item:not(.disabled).selected > .title): Added.
(body:matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected > .title): Added.
(.tab-bar > .tabs.static-layout): Added.
(.tab-bar > .tabs.static-layout > :matches(.flexible-space, .item)): Added.
(.tab-bar > .tabs.animating.closing-tab > .item): Added.
(.tab-bar > .tabs.animating:matches(.expanding-tabs, .inserting-tab) > .item): Added.
(.tab-bar > .tabs.animating.inserting-tab > .item.being-inserted): Added.
(body:not(.docked) .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked) .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked) .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Added.
(body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked):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:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Added.
(.tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body.docked.bottom .tab-bar > .border.top): Added.
(@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(@media (prefers-color-scheme: dark) body.docked .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
(@media (prefers-color-scheme: dark) .tab-bar > .tabs > .item > .icon): Added.
(@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover > .icon): Added.
(@media (prefers-color-scheme: dark) body:matches(.window-inactive, .window-docked-inactive) .tab-bar): Added.
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item): Added.
(@media (prefers-color-scheme: dark) body:not(.docked):matches(.window-inactive, .window-docked-inactive) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
(body.window-inactive .tab-bar): Deleted.
(.tab-bar > .top-border): Deleted.
(body.window-inactive .tab-bar > .top-border): Deleted.
(.tab-bar > .item): Deleted.
(.tab-bar.calculate-width > .item): Deleted.
(body[dir=ltr] .tab-bar > :nth-child(n + 2 of .item),): Deleted.
(body[dir=rtl] .tab-bar > :nth-child(n + 2 of .item),): Deleted.
(.tab-bar > .item.pinned): Deleted.
(.tab-bar > .item.pinned.tab-picker): Deleted.
(.tab-bar > .item:not(.disabled).selected): Deleted.
(.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
(body[dir=ltr] .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,): Deleted.
(body[dir=rtl] .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,): Deleted.
(body.window-inactive .tab-bar > .item): Deleted.
(body[dir=ltr].window-inactive .tab-bar > .item): Deleted.
(body[dir=rtl].window-inactive .tab-bar > .item): Deleted.
(body.window-inactive .tab-bar > .item.selected): Deleted.
(.tab-bar > .item > .close): Deleted.
(body:not(.window-inactive) .tab-bar > .item:hover > .close): Deleted.
(body:not(.window-inactive) .tab-bar.single-tab > .item.default-tab:hover > .close): Deleted.
(.tab-bar.single-tab > .item.default-tab > .close): Deleted.
(.tab-bar > .item > .close:hover): Deleted.
(.tab-bar > .item > .close:active): Deleted.
(.tab-bar > .item > .flex-space): Deleted.
(.tab-bar > .item.ephemeral > .flex-space:last-child): Deleted.
(.tab-bar > .item > .icon): Deleted.
(.tab-bar > .item.pinned > .icon): Deleted.
(.tab-bar > .item.selected > .icon): Deleted.
(.tab-bar > .item.disabled > .icon): Deleted.
(@media not (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon): Deleted.
(.tab-bar > .item > .title): Deleted.
(.tab-bar:not(.collapsed) > .item > .title): Deleted.
(.tab-bar > .item > .title > .content): Deleted.
(.tab-bar:not(.animating) > .item:not(.selected):hover > .title): Deleted.
(.tab-bar > .item.selected > .title): Deleted.
(.tab-bar.collapsed > .item): Deleted.
(.tab-bar.collapsed > .item:not(.pinned) > .icon): Deleted.
(.tab-bar.collapsed > .item > .flex-space): Deleted.
(.tab-bar.collapsed > .item > .close): Deleted.
(.tab-bar.collapsed > .item:hover > .close): Deleted.
(.tab-bar.collapsed > .item.ephemeral:hover > .icon): Deleted.
(.tab-bar.collapsed > .item.ephemeral:hover > .title): Deleted.
(.tab-bar.static-layout): Deleted.
(.tab-bar.static-layout > .item): Deleted.
(.tab-bar.animating.closing-tab > .item): Deleted.
(.tab-bar.animating:matches(.expanding-tabs, .inserting-tab) > .item): Deleted.
(.tab-bar.animating.inserting-tab > .item.being-inserted): Deleted.
(.tab-bar.dragging-tab > .item.selected,): Deleted.
(body.window-inactive .tab-bar.dragging-tab > .item.selected,): Deleted.
(.tab-bar.dragging-tab > .item.selected): Deleted.
(@media (prefers-color-scheme: dark) .tab-bar > .item): Deleted.
(@media (prefers-color-scheme: dark) .tab-bar > .item > .title): Deleted.
(@media (prefers-color-scheme: dark) .tab-bar > .item:not(.disabled).selected): Deleted.
(@media (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected):hover): Deleted.
(@media (prefers-color-scheme: dark) .tab-bar > .item > .close,): Deleted.
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar): Deleted.
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item): Deleted.
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item.selected): Deleted.
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item > .title): Deleted.
* 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:
(.content-view.network .network-table): Added.
(.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.
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
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.get horizontalMargin): Added.
(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): Deleted.
(WI.GeneralTabBarItem.fromTabInfo): Deleted.
(WI.GeneralTabBarItem.prototype.get isEphemeral): Deleted.
(WI.GeneralTabBarItem.prototype._handleContextMenuEvent): 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):
* UserInterface/Views/GraphicsOverviewContentView.js:
(WI.GraphicsOverviewContentView.prototype.initialLayout):
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 `<img>` instead of an `<svg>` for it's image. This
is to work around a compositing bug <https://webkit.org/b/207022>.
* 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.
Define `--tab-bar-height` in terms of `--navigation-bar-height` so they share the same value.
* 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/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-03-02 Jon Davis <jond@apple.com>
Updated breakpoint and search type icons
https://bugs.webkit.org/show_bug.cgi?id=208453
Reviewed by Devin Rousso.
* UserInterface/Images/ApplicationCacheManifest.svg:
* UserInterface/Images/ClippingIcons.svg:
* UserInterface/Images/DocumentIcons.svg:
* UserInterface/Images/FolderGeneric.svg:
* UserInterface/Images/InstrumentIcons.svg:
* UserInterface/Images/NavigationItemNetworkOverride.svg:
* UserInterface/Images/Origin.svg:
* UserInterface/Images/TableIcons.svg:
* UserInterface/Images/TypeIcons.svg:
* UserInterface/Views/BreakpointTreeElement.css:
(.breakpoint-debugger-statement-icon .icon):
(.breakpoint-generic-line-icon .icon):
(@media (prefers-color-scheme: dark) .breakpoint-debugger-statement-icon .icon):
(@media (prefers-color-scheme: dark) .breakpoint-generic-line-icon .icon):
* UserInterface/Views/EventBreakpointTreeElement.css:
(.breakpoint.event.breakpoint-for-animation-frame:not(.breakpoint-paused-icon) .icon):
(.breakpoint.event.breakpoint-for-interval:not(.breakpoint-paused-icon) .icon):
(.breakpoint.event.breakpoint-for-listener:not(.breakpoint-paused-icon) .icon):
(.breakpoint.event.breakpoint-for-timeout:not(.breakpoint-paused-icon) .icon):
(@media(prefers-color-scheme: dark) .breakpoint.event.breakpoint-for-animation-frame:not(.breakpoint-paused-icon) .icon):
(@media(prefers-color-scheme: dark) .breakpoint.event.breakpoint-for-interval:not(.breakpoint-paused-icon) .icon):
(@media(prefers-color-scheme: dark) .breakpoint.event.breakpoint-for-listener:not(.breakpoint-paused-icon) .icon):
(@media(prefers-color-scheme: dark) .breakpoint.event.breakpoint-for-timeout:not(.breakpoint-paused-icon) .icon):
* UserInterface/Views/FolderIcon.css:
(.tree-outline .folder-icon.selected:focus .icon):
(.tree-outline .origin-icon.selected:focus .icon):
(.tree-outline:focus .folder-icon.selected .icon): Deleted.
(.tree-outline:focus .origin-icon.selected .icon): Deleted.
* UserInterface/Views/RecordingActionTreeElement.css:
(.item.recording-action > .icon):
(@media (prefers-color-scheme: dark) .item.recording-action > .icon):
2020-03-02 Jon Davis <jond@apple.com>
Update the resource override button icon
https://bugs.webkit.org/show_bug.cgi?id=208459
Reviewed by Devin Rousso.
* UserInterface/Images/NavigationItemNetworkOverride.svg:
2020-02-28 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r257411): Web Inspector: Can't add a breakpoint by pressing the plus button
https://bugs.webkit.org/show_bug.cgi?id=208359
<rdar://problem/59870712>
Reviewed by Brian Burg.
In r257411 I added event.stop() (which is a shortcut for event.preventDefault() and
event.stopImmediatePropagation()) to mousedown handler. Calling event.stopImmediatePropagation()
prevented other mousedown event handlers from running.
This patch no longer calls event.stopImmediatePropagation().
* UserInterface/Views/ButtonNavigationItem.js:
(WI.ButtonNavigationItem.prototype._handleMouseDown):
2020-02-27 Devin Rousso <drousso@apple.com>
Web Inspector: allow use of dark mode theme independently from system-wide theme
https://bugs.webkit.org/show_bug.cgi?id=186308
<rdar://problem/40785895>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
Create a setting for controlling/preserving the theme of the frontend UI.
* UserInterface/Base/Main.js:
(WI.loaded):
(WI.contentLoaded):
Apply the created setting when Web Inspector is opened or if its value changes.
* UserInterface/Views/SettingEditor.js:
(WI.SettingEditor.prototype._createEditorElement):
Allow horizontal dividers in `<select>` setting editors.
* Localizations/en.lproj/localizedStrings.js:
2020-02-27 Devin Rousso <drousso@apple.com>
Web Inspector: localize the placeholder "Header" and "value" when editing a local override
https://bugs.webkit.org/show_bug.cgi?id=208276
<rdar://problem/59763619>
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/LocalResourceOverridePopover.js:
(WI.LocalResourceOverridePopover.prototype.show):
2020-02-26 Devin Rousso <drousso@apple.com>
REGRESSION: (257410) [ macOS ] inspector/network/client-blocked-load.html is failing
https://bugs.webkit.org/show_bug.cgi?id=208251
<rdar://problem/59812765>
Reviewed by Timothy Hatcher.
* UserInterface/Models/SourceCode.js:
(WI.SourceCode):
The test failed because it expected `url` to be an empty string (`""`) instead of `null`.
Use the given `url` parameter exactly as provided instead of trying to add a fallback in the
case of a falsy value. Given the prevalence of usage of `WI.SourceCode`, it's better to
match the existing behavior of before r257410 than change it and risk other subtle bugs.
2020-02-25 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: AXI: buttons should be focusable when navigating by pressing Tab
https://bugs.webkit.org/show_bug.cgi?id=208163
<rdar://problem/59745448>
Reviewed by Brian Burg.
Buttons now accessible with Tab navigation. The focused button has the native focus outline.
Clicking on the button does NOT move the focus. For example, when you're focused on the
console prompt, clicking on the icon to hide the right sidebar keeps you focused where
you were — the console prompt. This behavior matches macOS.
Convert WI.NavigationItem with role=button from `<div>` to `<button>` elements.
Button elements have implicit tabIndex=0. When focused, pressing Space or Enter
triggers "click" event.
* UserInterface/Views/ActivateButtonNavigationItem.js:
(WI.ActivateButtonNavigationItem.prototype.set activated):
Add "aria-pressed" and "aria-label" attributes for VoiceOver.
* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button:not(.image-only):focus,):
(.navigation-bar .item.button.image-only:focus):
(.navigation-bar .item.button:not(.disabled):matches(.activate.activated, .radio.selected) > .glyph):
(.navigation-bar .item.button:not(.disabled):active:matches(.activate.activated, .radio.selected) > .glyph):
Before this patch, focused button looked the same as activated buttons.
For example, the focused (non-active) bullseye icon looked exactly the
same as unfocused active bullseye icon, which was misleading.
* UserInterface/Views/ButtonNavigationItem.js:
(WI.ButtonNavigationItem):
(WI.ButtonNavigationItem.prototype._mouseClicked):
(WI.ButtonNavigationItem.prototype._handleMouseDown):
Clicking on a button shouldn't move focus. For example, when you're focused on the console prompt,
clicking on the icon to hide the right sidebar should keep you focused where you were - the console prompt.
(WI.ButtonNavigationItem.prototype._handleKeyDown):
* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button):
Adjust outline offset to remove the gap between the outline and the border of the button.
(.toolbar .item.button:not(.disabled).activate.activated):
(@media (prefers-color-scheme: dark) body:not(.window-inactive) .toolbar .item.button:not(.disabled).activate.activated > .glyph):
* UserInterface/Views/ControlToolbarItem.css:
(.toolbar .item.control:focus):
(.toolbar .item.control:focus > .glyph):
Draw the outline around the X (close button) glyph, not the button itself (which is much wider than the glyph).
* UserInterface/Views/NavigationBar.css:
(.navigation-bar .item):
(.navigation-bar .item:focus):
* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar):
"focus" and "blur" events don't bubble. These event handlers didn't capture the event.
(WI.NavigationBar.prototype._mouseDown):
(WI.NavigationBar.prototype._keyDown):
* UserInterface/Views/NavigationItem.js:
(WI.NavigationItem):
* UserInterface/Views/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button:focus):
* UserInterface/Views/Toolbar.css:
(.toolbar .item):
2020-02-25 Devin Rousso <drousso@apple.com>
Web Inspector: safari app extension isolated worlds and injected files use the extension's identifier instead of its name
https://bugs.webkit.org/show_bug.cgi?id=206911
<rdar://problem/58026635>
Reviewed by Brian Burg.
* UserInterface/Controllers/BrowserManager.js: Added.
(WI.BrowserManager):
(WI.BrowserManager.prototype.initializeTarget):
(WI.BrowserManager.prototype.enable):
(WI.BrowserManager.prototype.disable):
(WI.BrowserManager.prototype.isExtensionScheme):
(WI.BrowserManager.prototype.extensionNameForId):
(WI.BrowserManager.prototype.extensionNameForURL):
* UserInterface/Protocol/BrowserObserver.js: Added.
(WI.BrowserObserver.prototype.extensionsEnabled):
(WI.BrowserObserver.prototype.extensionsDisabled):
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.get BrowserAgent): Added.
* UserInterface/Base/Main.js:
(WI.loaded):
* UserInterface/Main.html:
* UserInterface/Test/Test.js:
(WI.loaded):
* UserInterface/Test.html:
Add an observer and manager for the `Browser` domain.
* UserInterface/Protocol/MultiplexingBackendTarget.js:
(WI.MultiplexingBackendTarget):
(WI.MultiplexingBackendTarget.prototype.initialize):
* UserInterface/Controllers/TargetManager.js:
(WI.TargetManager.prototype.initializeTarget): Added.
The `Browser` agent lives in the UIProcess alongside the `Target` agent (meaning there
should only be one per debuggable rather than one per target) and as such is not routed
through the `Target` agent.
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype._displayNameForExecutionContext):
Attempt to match the execution context name against any known extension identifier, and
use the extension's display name if one is found.
* UserInterface/Base/URLUtilities.js:
(WI.displayNameForHost):
Attempt to match the host against any known extension identifier, and use the extension's
display name if one is found.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addStyleSheet):
(WI.SourcesNavigationSidebarPanel.prototype._addScript):
* UserInterface/Base/Utilities.js:
(isWebKitExtensionScheme): Deleted.
* .eslintrc:
Use `WI.BrowserManager.prototype.isExtensionScheme` instead of the global function.
* UserInterface/Models/SourceCode.js:
(WI.SourceCode):
(WI.SourceCode.prototype.get url): Added.
(WI.SourceCode.prototype.get urlComponents): Added.
* UserInterface/Models/CSSStyleSheet.js:
(WI.CSSStyleSheet):
(WI.CSSStyleSheet.prototype.get injected):
(WI.CSSStyleSheet.prototype.get url): Deleted.
(WI.CSSStyleSheet.prototype.get urlComponents): Deleted.
* UserInterface/Models/Resource.js:
(WI.Resource):
(WI.Resource.prototype.get url): Deleted.
(WI.Resource.prototype.get urlComponents): Deleted.
* UserInterface/Models/Script.js:
(WI.Script):
(WI.Script.prototype.get url): Deleted.
(WI.Script.prototype.get urlComponents): Deleted.
All subclasses of `WI.SourceCode` have separate `get url` and `get urlComponents` functions,
so unify them in the common superclass so that it's guaranteed to exist.
2020-02-25 Devin Rousso <drousso@apple.com>
Web Inspector: move code for debug outlined focus element to the Debug folder so it isn't shipped
https://bugs.webkit.org/show_bug.cgi?id=208217
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI.contentLoaded.setFocusDebugOutline): Deleted.
* UserInterface/Views/Main.css:
(body.focus-debug *:focus): Deleted.
* UserInterface/Debug/Bootstrap.js:
(WI.runBootstrapOperations):
(WI.runBootstrapOperations.setFocusDebugOutline): Added.
* UserInterface/Debug/Bootstrap.css: Added.
(body.focus-debug *:focus):
* UserInterface/Main.html:
2020-02-25 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: VoiceOver should read "Console prompt" when focusing on it
https://bugs.webkit.org/show_bug.cgi?id=208028
<rdar://problem/59641238>
Reviewed by Brian Burg.
Before this change, VoiceOver read "edit text blank" when focusing on the console prompt.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ConsolePrompt.js:
(WI.ConsolePrompt):
2020-02-25 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: VoiceOver: TreeOutline does not correctly indicate selected item
https://bugs.webkit.org/show_bug.cgi?id=207968
Reviewed by Brian Burg.
Previously, the entire TreeOutline's DOM element had focus. With this patch,
selected item DOM element has focus instead. When clicking on the treeElement,
set tabIndex to 0 and focus on it.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom): Fix indentation.
(.tree-outline.dom:not(.non-selectable):focus-within li.selected .selection-area):
(.tree-outline.dom:not(.non-selectable) li.hovered:not(.selected) .selection-area):
(.tree-outline.dom:focus-within li.inspected-node.selected > span::after):
(.tree-outline.dom li):
Remove outline - selection is already indicated by the background.
(.tree-outline.dom:focus-within li.selected .pseudo-class-indicator):
(.tree-outline.dom:focus-within li.selected):
(.tree-outline.dom:focus-within li.selected *):
(.tree-outline.dom:focus-within li.parent.selected::before):
(.tree-outline.dom:focus-within li.parent.expanded.selected::before):
* UserInterface/Views/DOMTreeOutline.js:
* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype._attach):
(WI.TreeElement.prototype.collapse):
(WI.TreeElement.prototype.expand):
(WI.TreeElement.prototype.select):
(WI.TreeElement.prototype.deselect):
(WI.TreeElement.prototype.focus):
(WI.TreeElement.prototype.unfocus):
* UserInterface/Views/TreeOutline.css:
(.tree-outline .item.selected:focus .disclosure-button):
(.tree-outline .item.selected.expanded:focus .disclosure-button):
(.tree-outline .item.selected:focus):
(.tree-outline .item.selected:focus .subtitle):
(.tree-outline:not(.large) .item.selected:focus .status .indeterminate-progress-spinner):
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype._treeKeyDown):
(WI.TreeOutline.prototype._handleMouseDown):
2020-02-19 Jon Davis <jond@apple.com>
Fixed object trees using the wrong theme of type icon
https://bugs.webkit.org/show_bug.cgi?id=207980
Reviewed by Darin Adler.
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property.boolean > .icon):
(.object-tree-property.function > .icon):
(.object-tree-property.number > .icon):
(.object-tree-property.bigint > .icon):
(.object-tree-property.object > .icon):
(.object-tree-property.object.null > .icon):
(.object-tree-property.object.node > .icon):
(.object-tree-property.regex > .icon):
(.object-tree-property.string > .icon):
(.object-tree-property.symbol > .icon):
(.object-tree-property.accessor > .icon,):
(.object-tree-property.had-error > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.boolean > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.function > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.number > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.bigint > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.object > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.object.null > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.object.node > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.regex > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.string > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.symbol > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.accessor > .icon,):
(@media (prefers-color-scheme: dark) .object-tree-property.had-error > .icon):
2020-02-17 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Add "outline focused element" debug setting
https://bugs.webkit.org/show_bug.cgi?id=207819
<rdar://problem/59489993>
Reviewed by Timothy Hatcher.
When debugging accessibility issues of Web Inspector, it's helpful
to know what element is focused. Many elements have `outline: none`
and no clear indication of what's focused.
Add a debug setting to display a bright purple outline for all focused
elements.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
* UserInterface/Base/Setting.js:
* UserInterface/Views/Main.css:
(body.focus-debug *:focus):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createDebugSettingsView):
2020-02-17 Jon Davis <jond@apple.com>
Update resource, type, and instrument icons for light, dark, and override colors
https://bugs.webkit.org/show_bug.cgi?id=207587
Reviewed by Timothy Hatcher.
* UserInterface/Images/ApplicationCacheManifest.svg: Added.
* UserInterface/Images/Beacon.svg:
* UserInterface/Images/ClippingIcons.svg: Added.
* UserInterface/Images/Cookie.svg: Added.
* UserInterface/Images/Database.svg: Added.
* UserInterface/Images/DocumentIcons.svg: Added.
* UserInterface/Images/FolderGeneric.svg: Added.
* UserInterface/Images/InstrumentIcons.svg: Added.
* UserInterface/Images/Origin.svg:
* UserInterface/Images/Stopwatch.svg:
* UserInterface/Images/TableIcons.svg: Added.
* UserInterface/Images/TypeIcons.svg: Added.
* UserInterface/Views/AuditTreeElement.css:
(.audit.test-case .icon):
(.audit.test-group .icon):
(.audit.test-case-result .icon):
(.audit.test-group-result .icon):
(@media (prefers-color-scheme: dark) .audit.test-case .icon):
(@media (prefers-color-scheme: dark) .audit.test-group .icon):
(@media (prefers-color-scheme: dark) .audit.test-case-result .icon):
(@media (prefers-color-scheme: dark) .audit.test-group-result .icon):
* UserInterface/Views/BreakpointTreeElement.css:
(.breakpoint-exception-icon .icon):
(.breakpoint-assertion-icon .icon):
(.breakpoint-microtask-icon .icon):
(.breakpoint-paused-icon .icon):
(@media (prefers-color-scheme: dark) .breakpoint-exception-icon .icon):
(@media (prefers-color-scheme: dark) .breakpoint-assertion-icon .icon):
(@media (prefers-color-scheme: dark) .breakpoint-microtask-icon .icon):
(@media (prefers-color-scheme: dark) .breakpoint-paused-icon .icon):
* UserInterface/Views/CallFrameIcons.css:
(.program-icon .icon):
(.function-icon .icon):
(.event-listener-icon .icon):
(.native-icon .icon):
(.tail-deleted .icon):
(@media (prefers-color-scheme: dark) .program-icon .icon):
(@media (prefers-color-scheme: dark) .function-icon .icon):
(@media (prefers-color-scheme: dark) .event-listener-icon .icon):
(@media (prefers-color-scheme: dark) .native-icon .icon):
(@media (prefers-color-scheme: dark) .tail-deleted .icon):
* UserInterface/Views/CanvasSidebarPanel.css:
(.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .icon):
(@media (prefers-color-scheme: dark) .sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .icon):
* UserInterface/Views/DOMBreakpointTreeElement.css:
(.breakpoint.dom.breakpoint-for-subtree-modified:not(.breakpoint-paused-icon) .icon):
(.breakpoint.dom.breakpoint-for-attribute-modified:not(.breakpoint-paused-icon) .icon):
(.breakpoint.dom.breakpoint-for-node-removed:not(.breakpoint-paused-icon) .icon):
(@media (prefers-color-scheme: dark) .breakpoint.dom.breakpoint-for-subtree-modified:not(.breakpoint-paused-icon) .icon):
(@media (prefers-color-scheme: dark) .breakpoint.dom.breakpoint-for-attribute-modified:not(.breakpoint-paused-icon) .icon):
(@media (prefers-color-scheme: dark) .breakpoint.dom.breakpoint-for-node-removed:not(.breakpoint-paused-icon) .icon):
* UserInterface/Views/DOMNodeTreeElement.css:
(.tree-outline .item.dom-node .icon):
(@media (prefers-color-scheme: dark) .tree-outline .item.dom-node .icon):
* UserInterface/Views/FolderIcon.css:
(.folder-icon .icon):
(.tree-outline:focus .folder-icon.selected .icon):
(.origin-icon .icon):
(.tree-outline:focus .origin-icon.selected .icon):
(@media (prefers-color-scheme: dark) .folder-icon .icon):
(@media (prefers-color-scheme: dark) .origin-icon .icon):
* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
(.timeline-overview-graph.heap-allocations > img.snapshot):
(@media (prefers-color-scheme: dark) .timeline-overview-graph.heap-allocations > img.snapshot):
* UserInterface/Views/HeapAllocationsTimelineView.css:
(.timeline-view.heap-allocations > .data-grid td .icon.heap-snapshot):
(@media (prefers-color-scheme: dark) .timeline-view.heap-allocations > .data-grid td .icon.heap-snapshot):
* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot .icon):
(.heap-snapshot .icon.native):
(.heap-snapshot .icon.boolean):
(.heap-snapshot .icon.function):
(.heap-snapshot .icon.number):
(.heap-snapshot .icon.bigint):
(.heap-snapshot .icon.object):
(.heap-snapshot .icon.node):
(.heap-snapshot .icon.regex):
(.heap-snapshot .icon.string):
(.heap-snapshot .icon.symbol):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.native):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.boolean):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.function):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.number):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.bigint):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.object):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.node):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.regex):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.string):
(@media (prefers-color-scheme: dark) .heap-snapshot .icon.symbol):
* UserInterface/Views/IdleTreeElement.css:
(.details-section.call-stack .idle .icon):
(@media (prefers-color-scheme: dark) .details-section.call-stack .idle .icon):
* UserInterface/Views/LayerDetailsSidebarPanel.css:
(.panel.details.layer .name-column .icon):
(.panel.details.layer tr.reflection .name-column .icon):
(.panel.details.layer tr.pseudo-element .name-column .icon):
(@media (prefers-color-scheme: dark) .panel.details.layer .name-column .icon):
(@media (prefers-color-scheme: dark) .panel.details.layer tr.reflection .name-column .icon):
(@media (prefers-color-scheme: dark) .panel.details.layer tr.pseudo-element .name-column .icon):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
(.panel.details.layer-tree .name-column .icon):
(.panel.details.layer-tree tr.reflection .name-column .icon):
(.panel.details.layer-tree tr.pseudo-element .name-column .icon):
(@media (prefers-color-scheme: dark) .panel.details.layer-tree .name-column .icon):
(@media (prefers-color-scheme: dark) .panel.details.layer-tree tr.reflection .name-column .icon):
(@media (prefers-color-scheme: dark) .panel.details.layer-tree tr.pseudo-element .name-column .icon):
* UserInterface/Views/NetworkTableContentView.css:
(.network-table > .table li:not(.selected) .cell:not(.current-session)):
(.network-table > .table .cell.dom-node.name .icon):
(@media (prefers-color-scheme: dark) .breakpoint-assertion-icon .icon):
(@media (prefers-color-scheme: dark) .network-table > .table .cell.dom-node.name .icon):
(.network-table .cell.dom-node.name .icon): Deleted.
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property.boolean > .icon):
(.object-tree-property.function > .icon):
(.object-tree-property.number > .icon):
(.object-tree-property.bigint > .icon):
(.object-tree-property.object > .icon):
(.object-tree-property.object.null > .icon):
(.object-tree-property.object.node > .icon):
(.object-tree-property.regex > .icon):
(.object-tree-property.string > .icon):
(.object-tree-property.symbol > .icon):
(.object-tree-property.accessor > .icon,):
(.object-tree-property.had-error > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.boolean > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.function > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.number > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.bigint > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.object > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.object.null > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.object.node > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.regex > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.string > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.symbol > .icon):
(@media (prefers-color-scheme: dark) .object-tree-property.accessor > .icon,):
(@media (prefers-color-scheme: dark) .object-tree-property.had-error > .icon):
* UserInterface/Views/PathComponentIcons.css:
(.request-icon .icon):
(.response-icon .icon):
(.heap-snapshot-summary-icon .icon):
(.heap-snapshot-instances-icon .icon):
(.heap-snapshot-object-graph-icon .icon):
(.dom-element-icon .icon):
(.dom-pseudo-element-icon .icon):
(.dom-text-node-icon .icon):
(.dom-comment-icon .icon):
(.dom-document-type-icon .icon):
(.dom-document-icon .icon):
(.dom-character-data-icon .icon):
(.dom-node-icon .icon):
(.object-icon .icon):
(.function-icon .icon):
(.native-icon .icon):
(.program-icon .icon):
(.events-icon .icon):
(.call-trees-icon .icon):
(.snapshot-list-icon .icon):
(.snapshot-diff-icon .icon):
(.image-icon .icon):
(.source-icon .icon):
(@media (prefers-color-scheme: dark) .request-icon .icon):
(@media (prefers-color-scheme: dark) .response-icon .icon):
(@media (prefers-color-scheme: dark) .heap-snapshot-summary-icon .icon):
(@media (prefers-color-scheme: dark) .heap-snapshot-instances-icon .icon):
(@media (prefers-color-scheme: dark) .heap-snapshot-object-graph-icon .icon):
(@media (prefers-color-scheme: dark) .dom-element-icon .icon):
(@media (prefers-color-scheme: dark) .dom-pseudo-element-icon .icon):
(@media (prefers-color-scheme: dark) .dom-text-node-icon .icon):
(@media (prefers-color-scheme: dark) .dom-comment-icon .icon):
(@media (prefers-color-scheme: dark) .dom-document-type-icon .icon):
(@media (prefers-color-scheme: dark) .dom-document-icon .icon):
(@media (prefers-color-scheme: dark) .dom-character-data-icon .icon):
(@media (prefers-color-scheme: dark) .dom-node-icon .icon):
(@media (prefers-color-scheme: dark) .object-icon .icon):
(@media (prefers-color-scheme: dark) .function-icon .icon):
(@media (prefers-color-scheme: dark) .native-icon .icon):
(@media (prefers-color-scheme: dark) .program-icon .icon):
(@media (prefers-color-scheme: dark) .events-icon .icon):
(@media (prefers-color-scheme: dark) .call-trees-icon .icon):
(@media (prefers-color-scheme: dark) .snapshot-list-icon .icon):
(@media (prefers-color-scheme: dark) .snapshot-diff-icon .icon):
(@media (prefers-color-scheme: dark) .source-icon .icon):
* UserInterface/Views/ProfileView.css:
(.profile > .data-grid td .icon.function-icon):
(.profile > .data-grid td .icon.native-icon):
(.profile > .data-grid td .icon.program-icon):
(@media (prefers-color-scheme: dark) .profile > .data-grid td .icon.function-icon):
(@media (prefers-color-scheme: dark) .profile > .data-grid td .icon.native-icon):
(@media (prefers-color-scheme: dark) .profile > .data-grid td .icon.program-icon):
* UserInterface/Views/ResourceIcons.css:
(.resource-icon .icon):
(.resource-icon.override .icon):
(.resource-icon.resource-type-document .icon):
(.resource-icon.resource-type-document.override .icon):
(.resource-icon.resource-type-image .icon):
(.resource-icon.resource-type-image.override .icon):
(.resource-icon.resource-type-font .icon):
(.resource-icon.resource-type-font.override .icon):
(:matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon):
(:matches(.resource-icon.resource-type-style-sheet.override, .style-sheet-icon.override) .icon):
(.resource-icon.resource-type-script .icon):
(.resource-icon.resource-type-script.override .icon):
(.anonymous-script-icon .icon):
(.source-map-resource.resource-icon .icon):
(.source-map-resource.resource-icon.resource-type-style-sheet .icon):
(.source-map-resource.resource-icon.resource-type-script .icon):
(.script.worker-icon .icon):
(.script.worker-icon.override .icon):
(.resource-icon.resource-type-websocket .icon):
(.resource-icon.resource-type-ping .icon,):
(.resource-icon.resource-type-range .icon):
(@media (prefers-color-scheme: dark) .resource-icon .icon):
(@media (prefers-color-scheme: dark) .resource-icon.override .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-document .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-document.override .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-image .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-image.override .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-font .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-font.override .icon):
(@media (prefers-color-scheme: dark) :matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon):
(@media (prefers-color-scheme: dark) :matches(.resource-icon.resource-type-style-sheet.override, .style-sheet-icon.override) .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-script .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-script.override .icon):
(@media (prefers-color-scheme: dark) .anonymous-script-icon .icon):
(@media (prefers-color-scheme: dark) .source-map-resource.resource-icon .icon):
(@media (prefers-color-scheme: dark) .source-map-resource.resource-icon.resource-type-style-sheet .icon):
(@media (prefers-color-scheme: dark) .source-map-resource.resource-icon.resource-type-script .icon):
(@media (prefers-color-scheme: dark) .script.worker-icon .icon):
(@media (prefers-color-scheme: dark) .script.worker-icon.override .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-websocket .icon):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-ping .icon,):
(@media (prefers-color-scheme: dark) .resource-icon.resource-type-range .icon):
(.large .resource-icon .icon): Deleted.
(.large .resource-icon.resource-type-document .icon): Deleted.
(.large .resource-icon.resource-type-image .icon): Deleted.
(.large .resource-icon.resource-type-font .icon): Deleted.
(.large :matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Deleted.
(.large .resource-icon.resource-type-script .icon): Deleted.
(.large .anonymous-script-icon .icon): Deleted.
(.large .source-map-resource.resource-icon .icon): Deleted.
(.large .source-map-resource.resource-icon.resource-type-style-sheet .icon): Deleted.
(.large .source-map-resource.resource-icon.resource-type-script .icon): Deleted.
(.large .script.worker-icon .icon): Deleted.
(.large .resource-icon.resource-type-websocket .icon): Deleted.
(.large .resource-icon.resource-type-range .icon): Deleted.
* UserInterface/Views/SearchIcons.css:
(.dom-match-element-icon .icon):
(.dom-match-text-node-icon .icon):
(.dom-match-comment-icon .icon):
(.dom-match-document-type-icon .icon):
(.dom-match-character-data-icon .icon):
(.dom-match-node-icon .icon):
(.source-code-match .icon):
(@media (prefers-color-scheme: dark) .dom-match-element-icon .icon):
(@media (prefers-color-scheme: dark) .dom-match-text-node-icon .icon):
(@media (prefers-color-scheme: dark) .dom-match-comment-icon .icon):
(@media (prefers-color-scheme: dark) .dom-match-document-type-icon .icon):
(@media (prefers-color-scheme: dark) .dom-match-character-data-icon .icon):
(@media (prefers-color-scheme: dark) .dom-match-node-icon .icon):
(@media (prefers-color-scheme: dark) .source-code-match .icon):
* UserInterface/Views/StorageIcons.css:
(.application-cache-manifest .icon):
(.application-cache-frame .icon):
(.cookie-icon .icon):
(.local-storage-icon .icon):
(.session-storage-icon .icon):
(.database-icon .icon):
(.database-table-icon .icon):
(@media (prefers-color-scheme: dark) .application-cache-manifest .icon):
(@media (prefers-color-scheme: dark) .application-cache-frame .icon):
(@media (prefers-color-scheme: dark) .local-storage-icon .icon):
(@media (prefers-color-scheme: dark) .session-storage-icon .icon):
(@media (prefers-color-scheme: dark) .database-icon .icon):
(@media (prefers-color-scheme: dark) .database-table-icon .icon):
* UserInterface/Views/StyleRuleIcons.css:
(.author-style-rule-icon .icon):
(.author-style-rule-icon.pseudo-selector .icon):
(.user-style-rule-icon .icon):
(.user-style-rule-icon.pseudo-selector .icon):
(.user-agent-style-rule-icon .icon):
(.user-agent-style-rule-icon.pseudo-selector .icon):
(.inspector-style-rule-icon .icon):
(.inspector-style-rule-icon.pseudo-selector .icon):
(.inherited-style-rule-icon .icon):
(.inherited-element-style-rule-icon .icon):
(@media (prefers-color-scheme: dark) .author-style-rule-icon .icon):
(@media (prefers-color-scheme: dark) .author-style-rule-icon.pseudo-selector .icon):
(@media (prefers-color-scheme: dark) .user-style-rule-icon .icon):
(@media (prefers-color-scheme: dark) .user-style-rule-icon.pseudo-selector .icon):
(@media (prefers-color-scheme: dark) .user-agent-style-rule-icon .icon):
(@media (prefers-color-scheme: dark) .user-agent-style-rule-icon.pseudo-selector .icon):
(@media (prefers-color-scheme: dark) .inspector-style-rule-icon .icon):
(@media (prefers-color-scheme: dark) .inspector-style-rule-icon.pseudo-selector .icon):
(@media (prefers-color-scheme: dark) .inherited-style-rule-icon .icon):
(@media (prefers-color-scheme: dark) .inherited-element-style-rule-icon .icon):
* UserInterface/Views/TimelineIcons.css:
(.network-icon .icon):
(.script-icon .icon):
(.cpu-icon .icon):
(.memory-icon .icon):
(.heap-allocations-icon .icon):
(.layout-icon .icon):
(.rendering-frame-icon .icon):
(.media-icon .icon):
(.stopwatch-icon .icon):
(.style-record .icon):
(.layout-record .icon):
(.paint-record .icon):
(.composite-record .icon):
(.rendering-frame-record .icon):
(.api-record .icon):
(.evaluated-record .icon):
(.event-record .icon):
(.probe-record .icon):
(.console-profile-record .icon):
(.garbage-collection-profile-record .icon):
(.timer-record .icon):
(.animation-frame-record .icon):
(.css-animation-record .icon):
(.css-transition-record .icon):
(.media-element-record .icon):
(.heap-snapshot-record .icon):
(@media (prefers-color-scheme: dark) .network-icon .icon):
(@media (prefers-color-scheme: dark) .script-icon .icon):
(@media (prefers-color-scheme: dark) .cpu-icon .icon):
(@media (prefers-color-scheme: dark) .memory-icon .icon):
(@media (prefers-color-scheme: dark) .heap-allocations-icon .icon):
(@media (prefers-color-scheme: dark) .layout-icon .icon):
(@media (prefers-color-scheme: dark) .rendering-frame-icon .icon):
(@media (prefers-color-scheme: dark) .media-icon .icon):
(@media (prefers-color-scheme: dark) .stopwatch-icon .icon):
(@media (prefers-color-scheme: dark) .style-record .icon):
(@media (prefers-color-scheme: dark) .layout-record .icon):
(@media (prefers-color-scheme: dark) .paint-record .icon):
(@media (prefers-color-scheme: dark) .composite-record .icon):
(@media (prefers-color-scheme: dark) .rendering-frame-record .icon):
(@media (prefers-color-scheme: dark) .api-record .icon):
(@media (prefers-color-scheme: dark) .evaluated-record .icon):
(@media (prefers-color-scheme: dark) .event-record .icon):
(@media (prefers-color-scheme: dark) .probe-record .icon):
(@media (prefers-color-scheme: dark) .console-profile-record .icon):
(@media (prefers-color-scheme: dark) .garbage-collection-profile-record .icon):
(@media (prefers-color-scheme: dark) .timer-record .icon):
(@media (prefers-color-scheme: dark) .animation-frame-record .icon):
(@media (prefers-color-scheme: dark) .css-animation-record .icon):
(@media (prefers-color-scheme: dark) .css-transition-record .icon):
(@media (prefers-color-scheme: dark) .media-element-record .icon):
(@media (prefers-color-scheme: dark) .heap-snapshot-record .icon):
* UserInterface/Views/URLBreakpointTreeElement.css:
(.breakpoint.url:not(.breakpoint-paused-icon) .icon):
(@media (prefers-color-scheme: dark) .breakpoint.url:not(.breakpoint-paused-icon) .icon):
2020-02-14 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: VoiceOver doesn't read selected panel tab
https://bugs.webkit.org/show_bug.cgi?id=207735
<rdar://problem/59445157>
Reviewed by Timothy Hatcher.
* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar):
(WI.NavigationBar.prototype._mouseDown):
(WI.NavigationBar.prototype._mouseUp):
Navigation bar itself shouldn't receive focus - its items should.
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem):
"tab" was passed as a label by mistake. VoiceOver read every tab as "tab" instead of it's actual label.
(WI.RadioButtonNavigationItem.prototype.set selected):
When clicking on a tab, focus on it so VoiceOver could read it.
2020-02-14 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Bezier editor popover should be strictly LTR
https://bugs.webkit.org/show_bug.cgi?id=206968
<rdar://problem/59007065>
Reviewed by Timothy Hatcher.
webkitConvertPointFromPageToNode does not work correctly with the zoom level other than 1.
Replace all uses of webkitConvertPointFromPageToNode with getBoundingClientRect.
* UserInterface/Models/Geometry.js:
(WI.Point.fromEventInElement):
* UserInterface/Views/ColorSquare.js:
(WI.ColorSquare.prototype._updateColorForMouseEvent):
* UserInterface/Views/GradientSlider.js:
(WI.GradientSlider.prototype._updateShadowKnob):
* UserInterface/Views/Slider.js:
(WI.Slider.prototype._localPointForEvent):
(WI.Slider):
2020-02-12 Pavel Feldman <pavel.feldman@gmail.com>
Web Inspector: encode binary web socket frames using base64
https://bugs.webkit.org/show_bug.cgi?id=207448
Previous representation of binary frames is lossy using fromUTF8WithLatin1Fallback,
this patch consistently encodes binary data using base64.
Reviewed by Timothy Hatcher.
* UserInterface/Models/WebSocketResource.js:
(WI.WebSocketResource.prototype.addFrame):
2020-02-11 Nikita Vasilyev <nvasilyev@apple.com>
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-09 Keith Rollin <krollin@apple.com>
Re-enable LTO for ARM builds
https://bugs.webkit.org/show_bug.cgi?id=207402
<rdar://problem/49190767>
Reviewed by Sam Weinig.
Bug 190758 re-enabled LTO for Production builds for x86-family CPUs.
Enabling it for ARM was left out due to a compiler issue. That issue
has been fixed, and so now we can re-enable LTO for ARM.
* Configurations/Base.xcconfig:
2020-02-07 Jon Lee <jonlee@apple.com>
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-07 Devin Rousso <drousso@apple.com>
Web Inspector: Add another Protocol Version (iOS 13.4)
https://bugs.webkit.org/show_bug.cgi?id=207213
<rdar://problem/52846208>
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/Legacy/13.4/InspectorBackendCommands.js: Added.
* Versions/Inspector-iOS-13.4.json: Added.
2020-02-06 Fujii Hironori <Hironori.Fujii@sony.com>
[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 <drousso@apple.com>
Web Inspector: REGRESSION(r249831): Sources: endless spinner when trying to view a resource
https://bugs.webkit.org/show_bug.cgi?id=207346
<rdar://problem/59209016>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 `<body>`.
* 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 <https://webkit.org/b/204627#c47>
2020-02-05 Nikita Vasilyev <nvasilyev@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <nvasilyev@apple.com>
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 <drousso@apple.com>
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 <nvasilyev@apple.com>
Web Inspector: Bezier editor popover should be strictly LTR
https://bugs.webkit.org/show_bug.cgi?id=206968
<rdar://problem/59007065>
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 <cgarcia@igalia.com>
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 <drousso@apple.com>
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 `<img>` instead of an `<svg>` for it's image. This
is to work around a compositing bug <https://webkit.org/b/207022>.
* 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 <drousso@apple.com>
Web Inspector: add instrumentation for showing existing Web Animations
https://bugs.webkit.org/show_bug.cgi?id=205434
<rdar://problem/28328087>
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 <drousso@apple.com>
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 <drousso@apple.com>
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
<rdar://problem/16945643>
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 - <display name for execution context of inspected DOM node>
----------
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 <krollin@apple.com>
Fix tvOS values in SUPPORTED_PLATFORMS
https://bugs.webkit.org/show_bug.cgi?id=206435
<rdar://problem/58674587>
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 <nvasilyev@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <nvasilyev@apple.com>
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 <ddkilzer@apple.com>
Enable -Wconditional-uninitialized in WebInspectorUI, WebKitLegacy, WebKit projects
<https://webkit.org/b/206270>
<rdar://problem/58589767>
Reviewed by Tim Horton.
* Configurations/Base.xcconfig:
(WARNING_CFLAGS): Add -Wconditional-uninitialized switch.
2020-01-15 Devin Rousso <drousso@apple.com>
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 <drousso@apple.com>
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
<rdar://problem/58409880>
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 <nvasilyev@apple.com>
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 <drousso@apple.com>
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 <nvasilyev@apple.com>
Web Inspector: Show RGBA input fields for p3 color picker
https://bugs.webkit.org/show_bug.cgi?id=203928
<rdar://problem/56963805>
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 <drousso@apple.com>
REGRESSION: (r254186) [ Mac ] inspector/css/add-rule.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205938
<rdar://problem/58413597>
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 <drousso@apple.com>
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
<rdar://problem/57898773>
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 <drousso@apple.com>
REGRESSION: [ Mac Debug ] inspector/page/setBootstrapScript-main-frame.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=205807
<rdar://problem/58344669>
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 <yurys@chromium.org>
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
<rdar://problem/58093690>
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 <nvasilyev@apple.com>
Web Inspector: Color picker: make it keyboard accessible
https://bugs.webkit.org/show_bug.cgi?id=205572
<rdar://problem/58169943>
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 <nvasilyev@apple.com>
REGRESSION(r218839): Web Inspector: Color picker: pressing Esc should hide color picker
https://bugs.webkit.org/show_bug.cgi?id=205570
<rdar://problem/58169820>
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 <drousso@apple.com>
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 <bburg@apple.com>
Web Inspector: add InspectedTargetTypes diagnostic event and related hooks
https://bugs.webkit.org/show_bug.cgi?id=205174
<rdar://problem/57887953>
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 <nvasilyev@apple.com>
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
<rdar://problem/56762879>
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 <bburg@apple.com>
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 <nvasilyev@apple.com>
Web Inspector: Enable p3 color picker by default
https://bugs.webkit.org/show_bug.cgi?id=203931
<rdar://problem/56965236>
Reviewed by Devin Rousso.
* UserInterface/Base/Setting.js:
* UserInterface/Views/InlineSwatch.js:
2019-12-19 Devin Rousso <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <yurys@chromium.org>
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 <drousso@apple.com>
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 <bburg@apple.com>
Web Inspector: add TabNavigation diagnostic event and related hooks
https://bugs.webkit.org/show_bug.cgi?id=205138
<rdar://problem/57855456>
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 <emilio@crisal.io>
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 <yurys@chromium.org>
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 <drousso@apple.com>
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 <drousso@apple.com>
Web Inspector: REGRESSION: Console: unable to switch execution contexts
https://bugs.webkit.org/show_bug.cgi?id=205102
<rdar://problem/57748393>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
Web Inspector: Uncaught Exception: Missing frame for given frameId (on techcrunch.com)
https://bugs.webkit.org/show_bug.cgi?id=205130
<rdar://problem/57847699>
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 <drousso@apple.com>
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
<rdar://problem/57773470>
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 <drousso@apple.com>
REGRESSION(r252523): Web Inspector: Styles: semicolon is wrongly positioned in multiline values
https://bugs.webkit.org/show_bug.cgi?id=205034
<rdar://problem/57772846>
Reviewed by Brian Burg.
Wrap the value node in another `<span class="value-container">` 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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <https://webkit.org/b/189687>.
* 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 <drousso@apple.com>
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 <drousso@apple.com>
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 <bburg@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
Web Inspector: Support search on IndexedDB stores and indexes
https://bugs.webkit.org/show_bug.cgi?id=129208
<rdar://problem/16142046>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <simon.fraser@apple.com>
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 <yurys@chromium.org>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <nvasilyev@apple.com>
Web Inspector: Provide UI to convert between sRGB and p3 color spaces
https://bugs.webkit.org/show_bug.cgi?id=203534
<rdar://problem/56688523>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 <drousso@apple.com>
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 `<body>`. 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 <bburg@apple.com>
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 <nvasilyev@apple.com>
Web Inspector: Outline sRGB-safe areas on P3 color picker
https://bugs.webkit.org/show_bug.cgi?id=203533
<rdar://problem/56688057>
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 <drousso@apple.com>
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 <yurys@chromium.org>
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 <drousso@apple.com>
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 <bburg@apple.com>
[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 <drousso@apple.com>
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 <drousso@apple.com>
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 <script> in an HTML file), which can sometimes be tricky of the content is dynamically
loaded (e.g. an XHR with a non-hardcoded URL).
Allowing for local overrides to be set using a regular expression pattern would help resolve
this limitation.
* UserInterface/Models/LocalResourceOverride.js:
(WI.LocalResourceOverride):
(WI.LocalResourceOverride.create):
(WI.LocalResourceOverride.fromJSON):
(WI.LocalResourceOverride.prototype.toJSON):
(WI.LocalResourceOverride.prototype.get isCaseSensitive): Added.
(WI.LocalResourceOverride.prototype.get isRegex): Added.
(WI.LocalResourceOverride.prototype.matches): Added.
(WI.LocalResourceOverride.prototype.saveIdentityToCookie):
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager):
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.get localResourceOverrides):
(WI.NetworkManager.prototype.addLocalResourceOverride):
(WI.NetworkManager.prototype.removeLocalResourceOverride):
(WI.NetworkManager.prototype.localResourceOverrideForURL):
(WI.NetworkManager.prototype.responseIntercepted):
* UserInterface/Views/LocalResourceOverridePopover.js:
(WI.LocalResourceOverridePopover):
(WI.LocalResourceOverridePopover.prototype.get serializedData):
(WI.LocalResourceOverridePopover.prototype.show):
(WI.LocalResourceOverridePopover.prototype._createEditor):
* UserInterface/Views/LocalResourceOverrideTreeElement.js:
(WI.LocalResourceOverrideTreeElement.prototype.get mainTitleText): Added.
(WI.LocalResourceOverrideTreeElement.prototype.onattach):
(WI.LocalResourceOverrideTreeElement.prototype.ondetach):
(WI.LocalResourceOverrideTreeElement.prototype.populateContextMenu):
(WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._willDismissLocalOverridePopover):
2019-11-15 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Styles: support multiline CSS property values
https://bugs.webkit.org/show_bug.cgi?id=203754
<rdar://problem/56819044>
Reviewed by Brian Burg.
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype.update):
(WI.CSSProperty.prototype._updateStyleText):
When the property is updated from the backend, find the first newline inside the value and
preserve the indent string so it can be re-added when updating the backend.
* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField.prototype._handleKeyDown):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property:not(.disabled) .value):
(.spreadsheet-style-declaration-editor .property:not(.disabled).has-newline .value): Added.
(.spreadsheet-style-declaration-editor .property:not(.disabled).has-newline .semicolon): Added.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.updateStatus):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldAllowsNewlines): Added.
(WI.SpreadsheetStyleProperty.prototype._handleValueChange):
Support shift-enter when editing a CSS property's value to insert a newline.
2019-11-15 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: move the "Local Override..." creation context menu item from the Breakpoints section options menu to the Create Resource menu
https://bugs.webkit.org/show_bug.cgi?id=204178
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissLocalOverridePopover):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalOverride):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu):
If the Local Overrides section isn't already visible, show it. Use the Local Overrides title
as the anchor for the configuration popover. If there are no existing Local Overrides, show
placeholder "No Overrides" text temporarily.
* UserInterface/Views/EventBreakpointPopover.js:
(WI.EventBreakpointPopover.prototype._showSuggestionsView):
* UserInterface/Views/LocalResourceOverridePopover.js:
(WI.LocalResourceOverridePopover.prototype._presentOverTargetElement):
* UserInterface/Views/URLBreakpointPopover.js:
(WI.URLBreakpointPopover.prototype._presentOverTargetElement):
Add some padding around the popover's anchor so the arrow doesn't overlap it.
* Localizations/en.lproj/localizedStrings.js:
2019-11-15 Devin Rousso <drousso@apple.com>
Web Inspector: Local Overrides: add context menu item to reveal the local override when a resource is loaded from it
https://bugs.webkit.org/show_bug.cgi?id=204206
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):
* Localizations/en.lproj/localizedStrings.js:
2019-11-15 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: "Style Sheet" appears twice in the resource type scope bar
https://bugs.webkit.org/show_bug.cgi?id=204172
Reviewed by Joseph Pecoraro.
* UserInterface/Models/Resource.js:
(WI.Resource):
(WI.Resource.prototype.updateForResponse):
Remove compatibility `WI.Resource.Type.Stylesheet` (which previously existed since the
protocol values for `Page.ResourceType` match the keys) and instead add compatibility cases
at the necessary callsites.
2019-11-13 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: "aqua" and "fuchsia" aren't detected as colors
https://bugs.webkit.org/show_bug.cgi?id=204085
Reviewed by Devin Rousso.
* UserInterface/Models/Color.js:
2019-11-13 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: Invalid type of argument 'eventName' for command 'DOMDebugger.setEventBreakpoint' call. It must be 'string' but it is 'object'.
https://bugs.webkit.org/show_bug.cgi?id=204176
Reviewed by Timothy Hatcher.
* UserInterface/Views/EventBreakpointPopover.js:
(WI.EventBreakpointPopover.prototype.dismiss):
Only create the `WI.EventBreakpoint` if the <input> has a value.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype.addEventBreakpoint):
(WI.DOMDebuggerManager.prototype.addURLBreakpoint):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._willDismissEventBreakpointPopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissURLBreakpointPopover):
Drive-by: if the configuration isn't valid (e.g. no breakpoint) or the breakpoint already
exists, beep.
2019-11-12 Devin Rousso <drousso@apple.com>
Web Inspector: Local Overrides: drop zone overlay doesn't take up the full content area
https://bugs.webkit.org/show_bug.cgi?id=204093
Reviewed by Joseph Pecoraro.
* UserInterface/Views/FontResourceContentView.css:
(.content-view.resource.font > :matches(.local-resource-override-label-view, .local-resource-override-warning-view):not([hidden]) ~ .drop-zone): Added.
(.content-view.resource.font > .drop-zone): Deleted.
* UserInterface/Views/ImageResourceContentView.css:
(.content-view.resource.image > :matches(.local-resource-override-label-view, .local-resource-override-warning-view):not([hidden]) ~ .drop-zone): Added.
(.content-view.resource.image > .drop-zone): Deleted.
2019-11-12 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: create/update local override drop zone shown in image collection view
https://bugs.webkit.org/show_bug.cgi?id=204097
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CollectionContentView.js:
(WI.CollectionContentView):
(WI.CollectionContentView.prototype.get contentViewConstructorOptions): Added.
(WI.CollectionContentView.prototype.addContentViewForItem):
* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView.prototype.get contentViewConstructorOptions): Added.
Provide a way to pass options when instantiating the content view from the constructor.
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView.prototype.contentAvailable):
Support an optional object parameter that can be used to disable the `WI.DropZone`.
2019-11-07 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r251958): console prompt is automatically focused when page is reloaded
https://bugs.webkit.org/show_bug.cgi?id=203932
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WI._restoreCookieForOpenTabs):
Only attempt to autofocus when Web Inspector is first opened.
2019-11-07 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r250087): inspector/model/remote-object.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=202934
<rdar://problem/56270900>
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.addShowMoreIfNeeded):
Drive-by: ensure that the indeterminate progress spinner is added after the last button.
2019-11-07 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r249451): missing "Reveal in DOM Tree" on nodes logged to the console
https://bugs.webkit.org/show_bug.cgi?id=203836
Reviewed by Timothy Hatcher.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForDOMNode):
* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype.populateContextMenu):
DOM trees in the console are marked as being non-editable, which is intended to prevent
modifications (e.g. changing an attribute) from being made in the console as the DOM tree
there is not hooked up to the associated DOM agent. In r249451 however, this guard was over
expanded to include non-editing actions, like "Reveal in DOM Tree" and DOM breakpoints.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._handleContextMenuEvent):
Drive-by: add a separator before "Copy Selected" so it doesn't end up in the same group as
any "Collapse All" from a `WI.TreeOutline`.
2019-11-07 Devin Rousso <drousso@apple.com>
Web Inspector: Local Resource Overrides: automatically show a file picker when attempting to create an override for non-text resources
https://bugs.webkit.org/show_bug.cgi?id=203917
Reviewed by Timothy Hatcher.
Since there's no way to edit non-text resources (e.g. images, fonts, etc.) in Web Inspector,
when creating a local override for non-text resources, default to showing a file picker and
creating a local override from the content and MIME type of whatever file is chosen.
Still provide a way (shift-click) to create a local override for non-text resources from the
resource's contents, as that can be useful if the user just wants to change some headers.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.async createLocalResourceOverride):
* UserInterface/Views/ResourceContentView.js:
(WI.ResourceContentView):
(WI.ResourceContentView.prototype.get createLocalResourceOverrideTooltip): Added.
(WI.ResourceContentView.prototype.requestLocalResourceOverrideInitialContent): Added.
(WI.ResourceContentView.prototype.async _getContentForLocalResourceOverrideFromFile): Added.
(WI.ResourceContentView.prototype._handleCreateLocalResourceOverride):
(WI.ResourceContentView.prototype._handleImportLocalResourceOverride):
(WI.ResourceContentView.prototype.localResourceOverrideInitialContent): Deleted.
(WI.ResourceContentView.prototype.async _handleCreateLocalResourceOverride): Deleted.
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype.get createLocalResourceOverrideTooltip): Added.
(WI.TextResourceContentView.prototype.requestLocalResourceOverrideInitialContent): Added.
(WI.TextResourceContentView.prototype.localResourceOverrideInitialContent): Deleted.
* Localizations/en.lproj/localizedStrings.js:
2019-11-07 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: add a marker for when a stop was requested
https://bugs.webkit.org/show_bug.cgi?id=203935
Reviewed by Timothy Hatcher.
After r244195, the Web Inspector frontend doesn't stop updating the current time marker
until after it receives all of the corresponding `*.trackingComplete` events. This means
that sometimes, the current time marker can move far past the time at which the stop was
requested, such as if there's a blocking script.
We should indicate where the stop was requested, as that is often right after a particular
issue is reproduced during a timeline recording, rather than have the user try to figure out
where they stopped.
Only keep a marker for the last stop request, and hide the marker once capturing resumes.
It's still useful to have the current time marker continue updating, as we should show all
the information we have about captured things, such as blocking scripts.
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview):
(WI.TimelineOverview.prototype._handleTimelineCapturingStateChanged):
* UserInterface/Models/TimelineMarker.js:
* UserInterface/Views/TimelineRuler.js:
(WI.TimelineRuler.prototype.addMarker):
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .markers > .marker.stopping-time): Added.
(.timeline-ruler > .markers > .marker.current-time):
(.timeline-ruler > .markers > .marker:matches(.stopping-time, .current-time)::after): Added.
(@media (prefers-color-scheme: dark) .timeline-ruler > .markers > .marker.stopping-time): Added.
(.timeline-ruler > .markers > .marker.current-time::after): Deleted.
Make the current time marker always on top (`z-index`).
* Localizations/en.lproj/localizedStrings.js:
2019-11-07 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r251958): automatic console prompt focusing prevents any "space" shortcuts from working
https://bugs.webkit.org/show_bug.cgi?id=203939
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WI.isShowingTimelineTab): Added.
(WI.isShowingAuditTab): Added.
(WI._restoreCookieForOpenTabs):
2019-11-07 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: Unable to get object details - GlobalObject
https://bugs.webkit.org/show_bug.cgi?id=203930
<rdar://problem/56960937>
In r248286, calls to `Heap.snapshot`, `Heap.getPreview`, and `Heap.getRemoteObject` were
moved to the `WI.HeapManager` instead of being inside view code. During this move, extra
`WI.reportInternalError` calls were added, which wasn't entirely correct as it is fully
possible (and expected) that any of these commands are invoked with old heap snapshot nodes
that may no longer exist. As such, calling any error an "internal error" isn't strictly
correct, and instead should just be a log. Also, the frontend code that calls these commands
is able to handle errors, again because it is expected.
Reviewed by Brian Burg.
* UserInterface/Controllers/HeapManager.js:
(WI.HeapManager.prototype.snapshot):
(WI.HeapManager.prototype.getPreview):
(WI.HeapManager.prototype.getRemoteObject):
2019-11-06 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Display color picker for p3 colors
https://bugs.webkit.org/show_bug.cgi?id=203436
<rdar://problem/56635062>
Reviewed by Brian Burg.
For p3 colors, display ColorSquare with display-p3 gamut.
Continue showing ColorSquare with sRGB gamut by default.
* UserInterface/Base/Setting.js:
* UserInterface/Models/Color.js:
(WI.Color):
(WI.Color.rgb2hsv):
(WI.Color.hsv2rgb.fraction):
(WI.Color.hsv2rgb):
(WI.Color.prototype.get hsla):
(WI.Color.prototype.isKeyword):
* UserInterface/Views/ColorPicker.css:
(.color-picker > .hue):
(@media (color-gamut: p3)):
(.color-picker.gamut-p3 > .hue):
* UserInterface/Views/ColorPicker.js:
(WI.ColorPicker.prototype._updateColor):
(WI.ColorPicker.prototype._updateOpacitySlider):
(WI.ColorPicker.prototype._handleFormatChange):
Introduce `gamut` parameter. Previously, the only available `gamut` was sRGB.
* UserInterface/Views/ColorSquare.css:
(.color-square > .crosshair):
Update the crosshair style to look better for both light and dark backgrounds.
* UserInterface/Views/ColorSquare.js:
(WI.ColorSquare):
(WI.ColorSquare.prototype.get tintedColor):
(WI.ColorSquare.prototype.set tintedColor):
(WI.ColorSquare.prototype._setCrosshairPosition):
(WI.ColorSquare.prototype._updateBaseColor):
(WI.ColorSquare.prototype._updateCrosshairBackground):
* UserInterface/Views/InlineSwatch.js:
Make p3 color picker a preview (e.g. STP-only) feature.
2019-11-05 Ross Kirsling <ross.kirsling@sony.com>
Web Inspector: Layers: enable tab by default
https://bugs.webkit.org/show_bug.cgi?id=203833
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Setting.js:
* UserInterface/Views/ContextMenuUtilities.js:
* UserInterface/Views/LayersTabContentView.js:
(WI.LayersTabContentView.isTabAllowed):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2019-11-04 Devin Rousso <drousso@apple.com>
Web Inspector: "Toggle Visibility" does not work for element inside Shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=202218
<rdar://problem/55713078>
Reviewed by Brian Burg.
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.toggleElementVisibility.inspectedPage_node_injectStyleAndToggleClass):
If the node is inside a shadow tree, store the `<style>` inside the shadow root instead of
always using `document.head`.
2019-11-02 Devin Rousso <drousso@apple.com>
Web Inspector: Add diagnostic logging for frontend feature usage
https://bugs.webkit.org/show_bug.cgi?id=203579
<rdar://problem/56717410>
Reviewed by Brian Burg.
Add a `DiagnosticController` class for reporting Web Inspector telemetry.
The controller initially measures a single "TabActivity" data point,
which logs the active tab during the specified time interval (one minute).
If the UI is not active during the time interval, no logging takes place.
The UI is considered to be active if mouse/keyboard interaction occurs
during the time interval, or the selected `TabContentView` changes.
Original patch by Matt Baker <mattbaker@apple.com>.
* UserInterface/Controllers/DiagnosticController.js: Added.
(WI.DiagnosticController):
(WI.DiagnosticController.supportsDiagnosticLogging):
(WI.DiagnosticController.prototype.logDiagnosticMessage):
(WI.DiagnosticController.prototype._didInteractWithTabContent):
(WI.DiagnosticController.prototype._clearTabActivityTimeout):
(WI.DiagnosticController.prototype._beginTabActivityTimeout):
(WI.DiagnosticController.prototype._stopTrackingTabActivity):
(WI.DiagnosticController.prototype._handleWindowFocus):
(WI.DiagnosticController.prototype._handleWindowBlur):
(WI.DiagnosticController.prototype._handleWindowKeyDown):
(WI.DiagnosticController.prototype._handleWindowMouseDown):
(WI.DiagnosticController.prototype._handleTabBrowserSelectedTabContentViewDidChange):
* UserInterface/Main.html:
* UserInterface/Base/Main.js:
(WI.contentLoaded):
2019-11-01 Devin Rousso <drousso@apple.com>
Web Inspector: switching tabs should re-focus the previously focused element
https://bugs.webkit.org/show_bug.cgi?id=203744
Reviewed by Brian Burg.
* UserInterface/Views/TabBrowser.js:
(WI.TabBrowser.prototype._tabBarItemSelected):
(WI.TabBrowser.prototype._saveFocusedNodeForTabContentView): Added.
(WI.TabBrowser.prototype._restoreFocusedNodeForTabContentView): Added.
Store the `document.activeElement` on the `WI.TabContentView` and `.focus()` it after we're
done showing the newly selected tab, but only if there isn't already something focused.
* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.set selectedTabBarItem):
* UserInterface/Views/LegacyTabBar.js:
(WI.LegacyTabBar.prototype.set selectedTabBarItem):
Include the previously selected tab bar item when dispatching selection change events.
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
Don't omit focus when revealing represented objects.
2019-11-01 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: add a timeline that shows information about any recorded CSS animation/transition
https://bugs.webkit.org/show_bug.cgi?id=203651
<rdar://problem/56128726>
Reviewed by Brian Burg.
Unlike all other forms of Web Animations, CSS animations/transitions, are _not_ created by
JavaScript, and therefore can seemingly appear out of nowhere. This patch expands the Media
timeline to be the Media & Animations timeline, which tracks when CSS animations/transitions
are created, started, delayed, iterated, canceled, or finished.
* UserInterface/Protocol/AnimationObserver.js: Added.
(WI.AnimationObserver.prototype.trackingStart):
(WI.AnimationObserver.prototype.trackingUpdate):
(WI.AnimationObserver.prototype.trackingComplete):
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.get AnimationAgent): Added.
* UserInterface/Main.html:
* UserInterface/Base/Main.js:
(WI.loaded):
* UserInterface/Test.html:
* UserInterface/Test/Test.js:
(WI.loaded):
Add an Animation domain for handling the tracking of CSS Web Animations.
* UserInterface/Models/MediaInstrument.js:
(WI.MediaInstrument.prototype.startInstrumentation):
(WI.MediaInstrument.prototype.stopInstrumentation):
(WI.MediaInstrument):
* UserInterface/Models/MediaTimeline.js: Added.
(WI.MediaTimeline.prototype.recordForTrackingAnimationId):
(WI.MediaTimeline.prototype.recordForMediaElementEvents):
(WI.MediaTimeline.prototype.reset):
(WI.MediaTimeline.prototype.addRecord):
* UserInterface/Models/MediaTimelineRecord.js:
(WI.MediaTimelineRecord):
(WI.MediaTimelineRecord.async fromJSON):
(WI.MediaTimelineRecord.prototype.toJSON):
(WI.MediaTimelineRecord.prototype.get trackingAnimationId): Added.
(WI.MediaTimelineRecord.prototype.get timestamps): Added.
(WI.MediaTimelineRecord.prototype.get activeStartTime): Added.
(WI.MediaTimelineRecord.prototype.get updatesDynamically): Added.
(WI.MediaTimelineRecord.prototype.get usesActiveStartTime): Added.
(WI.MediaTimelineRecord.prototype.get displayName):
(WI.MediaTimelineRecord.prototype.get subtitle): Added.
(WI.MediaTimelineRecord.prototype.saveIdentityToCookie):
(WI.MediaTimelineRecord.prototype.updateProgress): Added.
(WI.MediaTimelineRecord.prototype.addDOMEvent): Added.
(WI.MediaTimelineRecord.prototype.powerEfficientPlaybackStateChanged): Added.
(WI.MediaTimelineRecord.prototype._updateTimes): Added.
(WI.MediaTimelineRecord.fromJSON): Deleted.
(WI.MediaTimelineRecord.prototype.get domEvent): Deleted.
(WI.MediaTimelineRecord.prototype.get isPowerEfficient): Deleted.
* UserInterface/Models/Timeline.js:
(WI.Timeline.create):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager):
(WI.TimelineManager.prototype.async processJSON):
(WI.TimelineManager.prototype.animationTrackingStarted): Added.
(WI.TimelineManager.prototype.animationTrackingUpdated): Added.
(WI.TimelineManager.prototype.animationTrackingCompleted): Added.
(WI.TimelineManager.prototype._updateAutoCaptureInstruments):
(WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
(WI.TimelineManager.prototype._handleDOMNodePowerEfficientPlaybackStateChanged):
Start/Stop tracking animations based on whether the Media & Animations timeline is enabled.
* UserInterface/Views/MediaTimelineOverviewGraph.js:
(WI.MediaTimelineOverviewGraph):
(WI.MediaTimelineOverviewGraph.get maximumRowCount): Added.
(WI.MediaTimelineOverviewGraph.prototype.reset):
(WI.MediaTimelineOverviewGraph.prototype.layout):
(WI.MediaTimelineOverviewGraph.prototype.updateSelectedRecord):
(WI.MediaTimelineOverviewGraph.prototype._processRecord): Added.
(WI.MediaTimelineOverviewGraph.prototype._processRecord.compareByStartTime): Added.
(WI.MediaTimelineOverviewGraph.prototype._handleRecordAdded):
(WI.MediaTimelineOverviewGraph.prototype._handleTimesUpdated): Added.
(WI.MediaTimelineOverviewGraph.prototype.shown): Deleted.
(WI.MediaTimelineOverviewGraph.prototype.hidden): Deleted.
* UserInterface/Views/MediaTimelineOverviewGraph.css:
(.timeline-overview-graph.media): Added.
(.timeline-overview-graph.media > .graph-row): Added.
(.timeline-overview-graph.media > .graph-row > .timeline-record-bar): Added.
(.timeline-overview-graph.media > .graph-row > .timeline-record-bar:not(.unfinished) > .segment:not(.inactive)): Added.
(.timeline-overview-graph.media:nth-child(even) > .graph-row > .timeline-record-bar:not(.unfinished) > .segment:not(.inactive)): Added.
(.timeline-overview-graph.media > .timeline-record-bar): Deleted.
(.timeline-overview-graph.media > .timeline-record-bar > .segment): Deleted.
* UserInterface/Views/MediaTimelineView.js:
(WI.MediaTimelineView):
(WI.MediaTimelineView.prototype.shown): Added.
(WI.MediaTimelineView.prototype.hidden): Added.
(WI.MediaTimelineView.prototype.closed):
(WI.MediaTimelineView.prototype.reset):
(WI.MediaTimelineView.prototype.dataGridSortComparator):
(WI.MediaTimelineView.prototype.dataGridSortComparator.compareDOMNodes):
(WI.MediaTimelineView.prototype._processPendingRecords):
* UserInterface/Views/MediaTimelineDataGridNode.js:
(WI.MediaTimelineDataGridNode):
(WI.MediaTimelineDataGridNode.prototype.get data):
(WI.MediaTimelineDataGridNode.prototype.createCellContent):
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren): Added.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addReadySegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addDelaySegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addActiveSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addFullScreenSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addPowerEfficientPlaybackSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addPausedSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.timelineRecordBarCustomChildren.addPlayingSegment): ADded.
(WI.MediaTimelineDataGridNode.prototype.filterableDataForColumn):
(WI.MediaTimelineDataGridNode.prototype._createNameCellDocumentFragment): Added.
(WI.MediaTimelineDataGridNode.prototype.iconClassNames): Deleted.
* UserInterface/Views/TimelineRecordBar.js:
(WI.TimelineRecordBar):
(WI.TimelineRecordBar.prototype.refresh):
(WI.TimelineRecordBar.prototype._handleClick):
* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar):
(.timeline-record-bar > :matches(img, .segment)):
(.timeline-record-bar > img):
(.timeline-record-bar > .segment):
(body[dir=ltr] .timeline-record-bar > .segment):
(body[dir=ltr] .timeline-record-bar > .segment:first-of-type):
(body[dir=ltr] .timeline-record-bar > .segment:last-of-type):
(body[dir=rtl] .timeline-record-bar > .segment):
(body[dir=rtl] .timeline-record-bar > .segment:first-of-type):
(body[dir=rtl] .timeline-record-bar > .segment:last-of-type):
(.timeline-record-bar > .segment:not(:last-of-type)):
(.timeline-record-bar.selected > .segment):
(.timeline-record-bar > .segment.inactive,):
(.timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(:focus .selected .timeline-record-bar:not(.has-custom-children) > .segment):
(:focus .selected .timeline-record-bar:not(.has-custom-children) > .segment.inactive):
(:focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(.timeline-record-bar.timeline-record-type-network > .segment):
(.timeline-record-bar.timeline-record-type-network > .segment.inactive):
(.timeline-record-bar.timeline-record-type-layout > .segment):
(.timeline-record-bar.timeline-record-type-layout.paint > .segment,):
(.timeline-record-bar.timeline-record-type-script > .segment):
(.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment,):
(.timeline-record-bar.timeline-record-type-media > .segment):
(.timeline-record-bar.has-custom-children.timeline-record-type-media > .segment):
(.timeline-record-bar.has-custom-children.timeline-record-type-media > .segment.css-animation-ready):
(.timeline-record-bar.has-custom-children.timeline-record-type-media > .segment:matches(.css-animation-delay, .media-element-paused)):
(.timeline-record-bar.has-custom-children.timeline-record-type-media.media-element > .segment):
(.timeline-record-bar.has-custom-children.timeline-record-type-media.media-element > .segment.media-element-full-screen):
(.timeline-record-bar.has-custom-children.timeline-record-type-media.media-element > .segment.media-element-power-efficient-playback):
(body[dir=ltr] .timeline-record-bar > .segment.inactive,): Deleted.
(body[dir=ltr] .timeline-record-bar.has-inactive-segment > .segment:not(.inactive),): Deleted.
(:focus .selected .timeline-record-bar > .segment): Deleted.
(:focus .selected .timeline-record-bar > .segment.inactive): Deleted.
(body[dir=ltr] :focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)): Deleted.
(body[dir=rtl] :focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)): Deleted.
Allow timeline record bars to be customized through a delegate callback. If provided, it
will be used instead of any default content. It is expected to return an array of objects,
each having a `startTime` number, `classNames` array, and `title` string. It can also have a
`endTime` number and an `image` string. If `endTime` is `NaN`, the record is unfinished. If
`image` is provided, an `<img>` will be used instead of a segment, allowing for markers.
* UserInterface/Views/TimelineDataGridNode.js:
(WI.TimelineDataGridNode.prototype.createCellContent):
Add a default fallback for `WI.DOMNode` values.
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.displayNameForTimelineType):
(WI.TimelineTabContentView.iconClassNameForRecord):
(WI.TimelineTabContentView.displayNameForRecord):
* UserInterface/Views/TimelineRecordTreeElement.js:
* UserInterface/Views/TimelineIcons.css:
(.animation-frame-record .icon):
(.css-animation-record .icon): Added.
(.css-transition-record .icon): Added.
(.media-element-record .icon): Added.
(.animation-record .icon): Deleted.
(.dom-event-record .icon): Deleted.
(.dom-event-record.fullscreen .icon): Deleted.
(.power-efficient-playback-state-changed-record .icon): Deleted.
* UserInterface/Images/DOMEventFullscreen.svg: Removed.
* UserInterface/Images/EventCancel.svg: Added.
* UserInterface/Images/EventIteration.svg: Added.
* UserInterface/Images/EventPause.svg:
* UserInterface/Images/EventPlay.svg:
* UserInterface/Images/EventProcessing.svg:
* UserInterface/Images/EventStop.svg:
* UserInterface/Images/PowerEfficientPlaybackStateChanged.svg: Removed.
* UserInterface/Images/TimelineRecordAnimationFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/TimelineRecordAnimation.svg.
* UserInterface/Images/TimelineRecordCSSAnimation.svg: Added.
* UserInterface/Images/TimelineRecordCSSTransition.svg: Added.
* UserInterface/Images/TimelineRecordMediaElement.svg: Added.
Add new media icons.
* UserInterface/Models/TimelineRecording.js:
(WI.TimelineRecording.async import): Added.
(WI.TimelineRecording.import): Deleted.
* UserInterface/Models/TimelineRecord.js:
* UserInterface/Models/CPUTimelineRecord.js:
* UserInterface/Models/HeapAllocationsTimelineRecord.js:
(WI.HeapAllocationsTimelineRecord.async fromJSON): Added.
(WI.HeapAllocationsTimelineRecord.fromJSON): Deleted.
* UserInterface/Models/LayoutTimelineRecord.js:
* UserInterface/Models/MemoryTimelineRecord.js:
* UserInterface/Models/RenderingFrameTimelineRecord.js:
* UserInterface/Models/ResourceTimelineRecord.js:
* UserInterface/Models/ScriptTimelineRecord.js:
Make the importing of timeline records `async` so we can attempt to rehydrate the DOM nodes
of any media records (as well as wait for heap snapshots).
* UserInterface/Models/DOMNode.js:
(WI.DOMNode):
(WI.DOMNode.prototype.isMediaElement): Added.
(WI.DOMNode.prototype._shouldListenForEventListeners): Deleted.
* Localizations/en.lproj/localizedStrings.js:
2019-11-01 Devin Rousso <drousso@apple.com>
Web Inspector: default to focusing the console prompt if no other content is focused after opening Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=203743
Reviewed by Eric Carlson and Brian Burg.
* UserInterface/Base/Main.js:
(WI.isContentAreaFocused): Added.
(WI.isConsoleFocused):
(WI._focusChanged):
(WI._restoreCookieForOpenTabs):
2019-11-01 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Display color swatches for p3 colors
https://bugs.webkit.org/show_bug.cgi?id=203439
<rdar://problem/56637250>
Reviewed by Devin Rousso.
Detect `color(display-p3 0 1 0)` as a color in the style editor.
* UserInterface/Models/Color.js:
(WI.Color):
(WI.Color.fromString):
(WI.Color.prototype.copy):
(WI.Color.prototype.toString):
(WI.Color.prototype.isKeyword):
(WI.Color.prototype._toFunctionString):
2019-11-01 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r249831): content view is empty if a breakpoint is hit in the main resource
https://bugs.webkit.org/show_bug.cgi?id=203722
<rdar://problem/56802409>
Reviewed by Joseph Pecoraro.
* UserInterface/Models/SourceCode.js:
(WI.SourceCode.prototype.get currentRevision):
(WI.SourceCode.prototype.revisionContentDidChange):
(WI.SourceCode.prototype._initializeCurrentRevisionIfNeeded):
(WI.SourceCode.prototype._processContent):
Don't wait to lazily clone the `originalRevision` and use it as the `currentRevision`. Some
listeners expect the `currentRevision` to already be set by the time this happens, so as
soon as the original revision's content is changed, clone it into the `currentRevision`.
2019-11-01 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: tab isn't visible after removal of Debugger Tab and Resources Tab
https://bugs.webkit.org/show_bug.cgi?id=203719
<rdar://problem/56802389>
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WI.loaded):
If the Debugger Tab identifier or Resources Tab identifier still exists in the list of open
tabs, remove both and replace the first one with the Sources Tab identifier.
2019-11-01 Devin Rousso <drousso@apple.com>
Web Inspector: make the default content of the Inspector Bootstrap Script a comment that explains how it works
https://bugs.webkit.org/show_bug.cgi?id=203704
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.async createBootstrapScript):
* Localizations/en.lproj/localizedStrings.js:
2019-11-01 Devin Rousso <drousso@apple.com>
Web Inspector: Settings: Blackbox: hide icon is missing
https://bugs.webkit.org/show_bug.cgi?id=203727
Reviewed by Timothy Hatcher.
* UserInterface/Images/Hide.svg:
`WI.ImageUtilities.useSVGSymbol` links directly to a specific part of the SVG resource based
on an `id` attribute (default to `#root` if not otherwise given). As a result, any `<style>`
that are not a child of that specific part won't be included, meaning that any CSS variables
used for controlling colors won't exist. Adding a fallback value to the `var()` for these
cases allows a specific part to be used without needing any surrounding styles.
* UserInterface/Views/BlackboxSettingsView.css:
(.settings-view.blackbox > p > .toggle-script-blackbox):
Slightly adjust the size and vertical alignment to better match the surrounding text.
2019-11-01 Devin Rousso <drousso@apple.com>
Web Inspector: enable line wrapping by default
https://bugs.webkit.org/show_bug.cgi?id=203726
Reviewed by Timothy Hatcher.
* UserInterface/Base/Setting.js:
2019-10-31 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Color picker: incorrect saturation when selecting color on color square
https://bugs.webkit.org/show_bug.cgi?id=203695
<rdar://problem/56793697>
Reviewed by Matt Baker.
The saturation component in HSV does NOT equal the saturation component in HSL.
Use the proper HSV to HSL conversion.
* UserInterface/Models/Color.js:
(WI.Color.hsv2hsl): Added.
* UserInterface/Views/ColorSquare.js:
(WI.ColorSquare.prototype.get tintedColor):
(WI.ColorSquare.prototype.get _lightness): Deleted.
2019-10-31 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r251038): Elements: Computed: variables are shown in the Properties section instead of in the Variables section
https://bugs.webkit.org/show_bug.cgi?id=203668
Reviewed by Matt Baker.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
* UserInterface/Views/ComputedStyleSection.js:
(WI.ComputedStyleSection):
(WI.ComputedStyleSection.prototype.set propertyVisibilityMode): Added.
(WI.ComputedStyleSection.prototype.get propertiesToRender):
Reintroduce the `propertyVisibilityMode` concept to `WI.ComputedStyleSection` so that the
Computed details panel can prevent CSS variables from being shown in the Properites section.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.get propertiesToRender):
Replace `variable` getter with `isVariable` to match r251038.
2019-10-31 Devin Rousso <drousso@apple.com>
Web Inspector: DOMDebugger: Node Removed breakpoints should fire whenever the node is removed from the main DOM tree, not just when it's removed from it's parent
https://bugs.webkit.org/show_bug.cgi?id=203349
Reviewed by Matt Baker.
Replace `targetNode` (which was a `Runtime.RemoteObject`) with a `targetNodeId` (which is a
`DOM.NodeId`) when dispatching `DOMDebugger` pauses. Additionally, include the ancestor's
`DOM.NodeId` as the `targetNodeId` whenever an ancestor is removed that has a descendant
with a node removed DOM breakpoint.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
* Localizations/en.lproj/localizedStrings.js:
2019-10-31 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: CONSOLE ERROR Shown panel style-rules must be visible
https://bugs.webkit.org/show_bug.cgi?id=203377
Reviewed by Devin Rousso.
Fix assertion failure when opening elements panel with hidden details sidebar.
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype.showDetailsSidebarPanels):
* UserInterface/Views/Sidebar.js:
(WI.Sidebar.prototype.set selectedSidebarPanel): Only call shown() if the Sidebar
is not collapsed. It will anyway be called when the Sidebar is expanded.
2019-10-30 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: track WI.Script unique display name numbers per Page target
https://bugs.webkit.org/show_bug.cgi?id=203427
Reviewed by Devin Rousso.
WI.Script now keeps track of last unique numbers via a static weak map keyed by
the Script's root target. So whenever new Page target is created all its scripts
will get unique display numbers from a new namespace.
Parent target is now passed to each target constructor and allow to find host
page target for nested targets. Among other things WorkerConnection and
TargetConnection use parentTarget for dispatching events instead of creating
extra copy of the same data that is already stored in Target.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.globalObjectCleared):
* UserInterface/Controllers/TargetManager.js:
(WI.TargetManager.prototype.targetCreated):
(WI.TargetManager.prototype.didCommitProvisionalTarget):
(WI.TargetManager.prototype.targetDestroyed):
(WI.TargetManager.prototype.dispatchMessageFromTarget):
(WI.TargetManager.prototype._connectToTarget):
(WI.TargetManager.prototype._createTarget):
* UserInterface/Controllers/WorkerManager.js:
(WI.WorkerManager.prototype.workerCreated):
* UserInterface/Models/Script.js:
(WI.Script):
(WI.Script.prototype.get displayName):
(WI.Script.prototype._nextUniqueDisplayNameNumber):
(WI.Script.prototype._nextUniqueConsoleDisplayNameNumber):
(WI.Script.prototype._uniqueDisplayNameNumbersForRootTarget):
* UserInterface/Protocol/Connection.js:
(InspectorBackend.WorkerConnection.prototype.sendMessageToBackend):
(InspectorBackend.WorkerConnection):
(InspectorBackend.TargetConnection.prototype.sendMessageToBackend):
(InspectorBackend.TargetConnection):
* UserInterface/Protocol/DirectBackendTarget.js:
(WI.DirectBackendTarget):
* UserInterface/Protocol/MultiplexingBackendTarget.js:
(WI.MultiplexingBackendTarget):
* UserInterface/Protocol/PageTarget.js:
(WI.PageTarget):
* UserInterface/Protocol/Target.js:
(WI.Target):
(WI.Target.prototype.get parentTarget):
(WI.Target.prototype.get rootTarget):
* UserInterface/Protocol/WorkerTarget.js:
(WI.WorkerTarget):
2019-10-30 Eike Rathke <erack@redhat.com>
Covscan: remove stray semicolon
https://bugs.webkit.org/show_bug.cgi?id=203622
Reviewed by Devin Rousso.
* UserInterface/Views/CheckboxNavigationItem.js:
(WI.CheckboxNavigationItem.prototype.set label):
2019-10-29 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Opacity slider background doesn't update when when hue slider moves
https://bugs.webkit.org/show_bug.cgi?id=203593
<rdar://problem/56723629>
Reviewed by Matt Baker.
* UserInterface/Views/ColorPicker.js:
(WI.ColorPicker.prototype.set color):
(WI.ColorPicker.prototype.colorSquareColorDidChange):
Remove unused function arguments.
(WI.ColorPicker.prototype.sliderValueDidChange):
Update the background of the opacity slider when the hue slider changes.
(WI.ColorPicker.prototype._updateOpacitySlider): Renamed from _updateSliders.
Drive-by: replace `var` with `let`.
2019-10-28 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Right-clicking in color picker should not select color
https://bugs.webkit.org/show_bug.cgi?id=203434
Reviewed by Devin Rousso.
* UserInterface/Views/ColorSquare.js:
(WI.ColorSquare.prototype._handleMousedown):
2019-10-28 Antoine Quint <graouts@apple.com>
CSS Transitions and CSS Animations properties should treat unitless 0 as an invalid value for times
https://bugs.webkit.org/show_bug.cgi?id=203484
Reviewed by Antti Koivisto.
Use 0s instead of 0 in places where unitless times were used but shouldn't have been.
* UserInterface/Views/FindBanner.css:
(.no-find-banner-transition:matches(.find-banner, .supports-find-banner)):
* UserInterface/Views/TabBar.css:
(.tab-bar > .item > .close):
2019-10-25 Devin Rousso <drousso@apple.com>
Web Inspector: Styles: un-experimentalize showing rule icons
https://bugs.webkit.org/show_bug.cgi?id=203308
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
2019-10-24 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: assertion failure at GeneralStyleDetailsSidebarPanel.js:34:23
https://bugs.webkit.org/show_bug.cgi?id=203376
Reviewed by Devin Rousso.
Use class's prototype instead of class itself when doing instanceof check.
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel):
2019-10-24 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: CONSOLE ERROR removeEventListener cannot remove blackboxed-urls-changed because it doesn't exist.
https://bugs.webkit.org/show_bug.cgi?id=203372
Reviewed by Devin Rousso.
Avoid console errors when opening source panel.
* UserInterface/Views/SourceCodeTreeElement.js:
(WI.SourceCodeTreeElement.prototype._updateSourceCode): Only remove listener if it has
been added before.
2019-10-23 Devin Rousso <drousso@apple.com>
Web Inspector: provide a way to inject "bootstrap" JavaScript into the page as the first script executed
https://bugs.webkit.org/show_bug.cgi?id=195847
<rdar://problem/48950551>
Reviewed by Joseph Pecoraro.
When debugging webpages, it's often useful to be able to swizzle various functions in order
to add extra logs for when they're called (e.g. `Event.prototype.preventDefault`). Sometimes
this can be difficult, such as if the page saves a copy of the function and references that
instead, in which case it would be helpful to have a way to guarantee that the swizzled code
is the first thing evaluated after the context is created.
This change adds support for that concept, which has been named Inspector Bootstrap Script.
Once created, it will be injected as the first user script to every new global object that
is created afterwards. Modifications to the Inspector Bootstrap Script take effect for all
new global objects created _after_ the modification happened.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager):
(WI.NetworkManager.supportsBootstrapScript): Added.
(WI.NetworkManager.get bootstrapScriptURL): Added.
(WI.NetworkManager.get bootstrapScriptSourceObjectStoreKey): Added.
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.get bootstrapScript): Added.
(WI.NetworkManager.prototype.get bootstrapScriptEnabled): Added.
(WI.NetworkManager.prototype.set bootstrapScriptEnabled): Added.
(WI.NetworkManager.prototype.async createBootstrapScript): Added.
(WI.NetworkManager.prototype.destroyBootstrapScript): Added.
(WI.NetworkManager.prototype._processServiceWorkerConfiguration):
(WI.NetworkManager.prototype._handleBootstrapScriptContentDidChange): Added.
* UserInterface/Models/LocalScript.js:
(WI.LocalScript):
(WI.LocalScript.prototype.get editable): Added.
(WI.LocalScript.prototype.get supportsScriptBlackboxing): Added.
(WI.LocalScript.prototype.requestContentFromBackend):
(WI.LocalScript.prototype.handleCurrentRevisionContentChange): Added.
* UserInterface/Views/ScriptContentView.js:
(WI.ScriptContentView):
(WI.ScriptContentView.prototype._contentWillPopulate):
(WI.ScriptContentView.prototype._contentDidPopulate):
(WI.ScriptContentView.prototype._handleTextEditorContentDidChange): Added.
Support editing of `WI.LocalScript` that are specifically marked as such.
* UserInterface/Models/Script.js:
(WI.Script):
(WI.Script.prototype.get displayName):
(WI.Script.prototype.get displayURL):
(WI.Script.prototype.isMainResource):
(WI.Script.prototype._resolveResource):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch):
(WI.SourceCodeTextEditor.prototype._createTypeTokenAnnotator):
(WI.SourceCodeTextEditor.prototype._createBasicBlockAnnotator):
Allow a `WI.Script` to not have an associated `WI.Target`, specifically for `WI.LocalScript`.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalOverride): Added.
(WI.SourcesNavigationSidebarPanel.prototype._removeResourceOverride): Added.
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._handleBootstrapScriptCreated): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleBootstrapScriptDestroyed): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalResourceOverride): Removed.
(WI.SourcesNavigationSidebarPanel.prototype._removeLocalResourceOverride): Removed.
Add an item in the create resource context menu for creating/focusing the bootstrap script.
* UserInterface/Views/ScriptTreeElement.js:
(WI.ScriptTreeElement):
* UserInterface/Views/BootstrapScriptTreeElement.js: Added.
(WI.BootstrapScriptTreeElement):
(WI.BootstrapScriptTreeElement.prototype.onattach):
(WI.BootstrapScriptTreeElement.prototype.ondetach):
(WI.BootstrapScriptTreeElement.prototype.ondelete):
(WI.BootstrapScriptTreeElement.prototype.onspace):
(WI.BootstrapScriptTreeElement.prototype.canSelectOnMouseDown):
(WI.BootstrapScriptTreeElement.prototype.populateContextMenu):
(WI.BootstrapScriptTreeElement.prototype.updateStatus):
(WI.BootstrapScriptTreeElement.prototype._handleNetworkManagerBootstrapScriptToggled):
* UserInterface/Views/BootstrapScriptTreeElement.css: Added.
(.item.script.bootstrap .status > input[type="checkbox"]):
* UserInterface/Views/LocalResourceOverrideTreeElement.css:
(.item.resource.override .status > input[type="checkbox"]): Added.
(.item.resource.override .status > div): Removed.
Don't show the full bootstrap script URL. Instead, show "Inspector Bootstrap Script".
* UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype.didPresentDialog):
Show the bootstrap script in the open resource dialog.
* UserInterface/Base/Utilities.js:
(isWebInspectorBootstrapScript): Added.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.scriptDidFail):
* UserInterface/Base/ObjectStore.js:
(WI.ObjectStore.static _open):
(WI.ObjectStore.prototype.async get): Added.
Add a generalized object store that can be used for one-off values that need the larger
storage capacity of `IndexedDB`.
* .eslintrc:
* Localizations/en.lproj/localizedStrings.js:
2019-10-23 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: notify inspector when provisional page is created, committed and destroyed
https://bugs.webkit.org/show_bug.cgi?id=202704
Reviewed by Devin Rousso.
Updated frontend code to understand provisional targets. For now there are
no changes frontend behavior, it will wait for the provisional target to commit
and will not send any commands to it before that.
* UserInterface/Base/Main.js: Moved a bunch of methods shared between Main.js and Test.js
to TargetManager.js to keep them in sync.
* UserInterface/Controllers/TargetManager.js:
(WI.TargetManager):
(WI.TargetManager.prototype.removeTarget):
(WI.TargetManager.prototype.createMultiplexingBackendTarget):
(WI.TargetManager.prototype.createDirectBackendTarget):
(WI.TargetManager.prototype.targetCreated):
(WI.TargetManager.prototype.didCommitProvisionalTarget):
(WI.TargetManager.prototype.targetDestroyed):
(WI.TargetManager.prototype.dispatchMessageFromTarget):
(WI.TargetManager.prototype._checkAndHandlePageTargetTransition):
(WI.TargetManager.prototype._checkAndHandlePageTargetTermination):
(WI.TargetManager.prototype._initializeBackendTarget):
(WI.TargetManager.prototype._initializePageTarget):
(WI.TargetManager.prototype._transitionPageTarget):
(WI.TargetManager.prototype._terminatePageTarget):
(WI.TargetManager.prototype._resetMainExecutionContext):
(WI.TargetManager.prototype._redirectGlobalAgentsToConnection):
* UserInterface/Protocol/Connection.js:
(InspectorBackend.WorkerConnection.sendMessageToBackend):
(InspectorBackend.WorkerConnection):
(InspectorBackend.TargetConnection.sendMessageToBackend):
(InspectorBackend.TargetConnection):
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.destroy): Mark target as destroyed to distinguish expected command errors from
genuine failures.
(WI.Target.prototype.isDestroyed):
* UserInterface/Protocol/TargetObserver.js: Since the front-end doesn't
send commands to the provisional targets yet, it has to ignore all activities
related to provisional pages. For that reason we need two sets to keep track of
- provisional pages that were destroyed and never committed
- old pages which were replaced by committed page and for which following targetDestroyed
event should be ignored
Better support for provisional targets will be added to frontend in a separate change.
(WI.TargetObserver):
(WI.TargetObserver.prototype.targetCreated):
(WI.TargetObserver.prototype.didCommitProvisionalTarget): For now convert the event into a subsequence
of targetDestroyed/targetCreated events which matches previous behavior.
(WI.TargetObserver.prototype.targetDestroyed):
(WI.TargetObserver.prototype.dispatchMessageFromTarget):
* UserInterface/Test/Test.js:
(WI.transitionPageTarget):
(WI.terminatePageTarget):
2019-10-23 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Replace color wheel with square HSB color picker
https://bugs.webkit.org/show_bug.cgi?id=203169
<rdar://problem/56449832>
Reviewed by Devin Rousso.
Replace the color wheel with a square HSB color picker.
The square HSB color picker provides more precision for choosing saturation,
and it's more familiar to most web developers.
* UserInterface/Main.html:
* UserInterface/Views/ColorPicker.css:
(.color-picker):
(.color-picker > .hue):
(body[dir=ltr] .color-picker > .hue):
(body[dir=rtl] .color-picker > .hue):
* UserInterface/Views/ColorPicker.js:
(WI.ColorPicker):
(WI.ColorPicker.prototype.get colorSquare):
(WI.ColorPicker.prototype.set color):
(WI.ColorPicker.prototype.colorSquareColorDidChange):
(WI.ColorPicker.prototype.sliderValueDidChange):
(WI.ColorPicker.prototype._updateColor):
(WI.ColorPicker.prototype._updateSliders):
Add a hue slider. The new color picker has the hue slider instead of the brightness slider.
* UserInterface/Views/ColorSquare.css: Renamed from Source/WebInspectorUI/UserInterface/Views/ColorWheel.css.
(.color-square):
(.color-square > .saturation-gradient):
(.color-square > .lightness-gradient):
(.color-square > .fill):
(.color-square > .crosshair):
* UserInterface/Views/ColorSquare.js: Added.
(WI.ColorSquare):
(WI.ColorSquare.prototype.get element):
(WI.ColorSquare.prototype.set dimension):
(WI.ColorSquare.prototype.get hue):
(WI.ColorSquare.prototype.set hue):
(WI.ColorSquare.prototype.get tintedColor):
(WI.ColorSquare.prototype.set tintedColor):
(WI.ColorSquare.prototype.get rawColor):
(WI.ColorSquare.prototype.handleEvent):
(WI.ColorSquare.prototype.get _saturation):
(WI.ColorSquare.prototype.get _brightness):
(WI.ColorSquare.prototype.get _lightness):
(WI.ColorSquare.prototype._handleMousedown):
(WI.ColorSquare.prototype._handleMousemove):
(WI.ColorSquare.prototype._handleMouseup):
(WI.ColorSquare.prototype._updateColorForMouseEvent):
(WI.ColorSquare.prototype._setCrosshairPosition):
(WI.ColorSquare.prototype._updateBaseColor):
* UserInterface/Views/ColorWheel.js: Removed.
* UserInterface/Views/GradientEditor.js:
(WI.GradientEditor):
2019-10-23 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: frontend tests should clear output before resending results
https://bugs.webkit.org/show_bug.cgi?id=203262
Reviewed by Devin Rousso.
Inspector front-end tests will clear output log before resending teset results. This avoids
race between InspectorTest.testPageDidLoad event and TestPage.addResult calls that may have
already be sent to the new page after navigation. The latter events otherwise would be added
twice.
* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness):
(FrontendTestHarness.prototype.testPageDidLoad):
(FrontendTestHarness.prototype.reloadPage):
(FrontendTestHarness.prototype.reportUnhandledRejection):
(FrontendTestHarness.prototype.reportUncaughtException):
(FrontendTestHarness.prototype._resendResults): Don't resend the results when the page is loaded
first time.
2019-10-22 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: keep the function/object name sticky in the object preview popover
https://bugs.webkit.org/show_bug.cgi?id=203259
Reviewed by Matt Baker.
* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content):
(.popover .debugger-popover-content.expandable): Added.
(.popover .debugger-popover-content > .title):
(.popover .debugger-popover-content > .body):
(.popover .debugger-popover-content.formatted): Added.
(.popover .expandable): Deleted.
Use flexbox to ensure that only the function/object body is scrollable.
Adjust the min/max width/height to take less space for smaller objects.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._showPopoverWithFormattedValue):
Wrap formatted values in a `<div>` so we can apply special styling to them.
2019-10-22 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: content of function definition popover sometimes cut off
https://bugs.webkit.org/show_bug.cgi?id=203258
Reviewed by Matt Baker.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
2019-10-22 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: Sources: when editing style sheets, the content is sometimes suddenly replaced with the original content of the resource
https://bugs.webkit.org/show_bug.cgi?id=203235
Reviewed by Timothy Hatcher.
Each `WI.CSSStyleSheet` manages it's own state about when it should ignore events from the
backend telling it that it was modified, such as if the frontend caused the update. In these
cases, the `WI.CSSStyleSheet` itself was early-returning, but the `WI.CSSManager` wasn't,
meaning that the `WI.CSSManager` would then override the content even though the specific
`WI.CSSStyleSheet` knows that its content shouldn't update. To compound this issue, the
`WI.CSSManager` updates any `WI.CSSStyleSheet` using a `Throttler`, so any updates would be
further delayed (first by the protocol travel time) by this, leading to the timing based
intermittent issue. `WI.CSSStyleSheet` already exposes when it should be updated or not via
`WI.CSSStyleSheet.prototype.noteContentDidChange`. Rather than have `WI.CSSManager` just
call that function, it should examine the returned boolean to see if it should continue to
process the update, or if the `WI.CSSStyleSheet` knows that it should be ignored.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype.styleSheetChanged):
2019-10-21 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r251227): Uncaught Exception: undefined is not an object (evaluating 'agent.enable')
https://bugs.webkit.org/show_bug.cgi?id=203208
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/AppController.js:
(WI.AppController.prototype.activateExtraDomains):
2019-10-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide a flag for technology preview builds
https://bugs.webkit.org/show_bug.cgi?id=203164
<rdar://problem/56202164>
Reviewed by Devin Rousso.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Test/Test.js:
* UserInterface/Base/Main.js:
* UserInterface/Base/Setting.js:
(WI.isTechnologyPreviewBuild):
(WI.arePreviewFeaturesEnabled):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
In non-TechnologyPreview builds, if there are Preview Features provide a
setting switch that can be used to match the TechnologyPreview features.
2019-10-21 Devin Rousso <drousso@apple.com>
Web Inspector: replace all uses of `window.*Agent` with a target-specific call
https://bugs.webkit.org/show_bug.cgi?id=201149
Reviewed by Matt Baker.
Most of these were changed in r251227, but a few appear to have slipped through the cracks.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.debuggerDidResume):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._createTypeTokenAnnotator):
(WI.SourceCodeTextEditor.prototype._createBasicBlockAnnotator):
2019-10-18 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: allow WebKit engineers to edit UserAgent shadow trees
https://bugs.webkit.org/show_bug.cgi?id=203159
Reviewed by Brian Burg.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.initializeTarget):
(WI.DOMManager.supportsEditingUserAgentShadowTrees): Added.
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get editable):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForDOMNode):
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.get editable):
(WI.DOMTreeElement.prototype._startEditingTarget):
(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel):
(WI.GeneralStyleDetailsSidebarPanel.prototype._showPanel):
(WI.GeneralStyleDetailsSidebarPanel.prototype._handleNodeChanged): Added.
* UserInterface/Views/StyleDetailsPanel.js:
(WI.StyleDetailsPanel.prototype.get supportsNewRule): Added.
(WI.StyleDetailsPanel.prototype.markAsNeedsRefresh):
(WI.StyleDetailsPanel.prototype.refresh):
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.get supportsNewRule): Added.
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.newRuleButtonClicked):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.newRuleButtonContextMenu):
Don't show the "Add Rule" button if the selected node is inside a UserAgent shadow tree.
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createEngineeringSettingsView):
2019-10-18 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: $0 is shown for the wrong node when selecting elements in a user agent shadow tree
https://bugs.webkit.org/show_bug.cgi?id=203155
Reviewed by Matt Baker.
Rather than naively using the last selected node (from `WI.TreeOutline`), we should wait
to see if the inspected page's DOM agent allows the selected node to be used as the
inspected node, and if so then to show the `$0`.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.setInspectedNode):
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype._handleInspectedNodeChanged): Added.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li.inspected-node > span::after): Added.
(.tree-outline.dom:focus li.inspected-node.selected > span::after): Added.
(.tree-outline.dom.show-last-selected li.last-selected > span::after): Deleted.
(.tree-outline.dom.show-last-selected:focus li.last-selected > span::after): Deleted.
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
2019-10-18 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r251254): Elements: forced pseudo-class indicator isn't visible for selected nodes
https://bugs.webkit.org/show_bug.cgi?id=203158
Reviewed by Matt Baker.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li > :not(.selection-area)): Added.
(.tree-outline.dom li > span): Deleted.
2019-10-17 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: selection shouldn't be dimmed by shadow trees
https://bugs.webkit.org/show_bug.cgi?id=203057
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li .selection-area):
(.tree-outline.dom li > span): Added.
Don't force the `.selection-area` to be behind (`z-index: -1;`) the rest of the content, as
that also puts it behind any `background-color`. Instead, we should make all the content in
every `WI.DOMTreeElement` be above (`z-index: 1;`) the rest of the content, including the
`.selection-area` and any parent's `background-color`.
2019-10-17 Devin Rousso <drousso@apple.com>
Web Inspector: Network: updates when toggling resource caching should be sent to every connected target
https://bugs.webkit.org/show_bug.cgi?id=203025
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WI._resourceCachingDisabledSettingChanged):
2019-10-17 Devin Rousso <drousso@apple.com>
Web Inspector: rework frontend agent construction to allow commands/events to be controlled by the related target's type
https://bugs.webkit.org/show_bug.cgi?id=200384
<rdar://problem/53850352>
Reviewed by Joseph Pecoraro.
`InspectorBackend.domains.${domain}` isn't a truly valid way to feature check, as it
indicates what's supported by the WebKit framework underlying whatever's currently being
inspected, not what the current inspection target supports.
As an example, inspecting an iOS `JSContext` will still show `InspectorBackend.domains.DOM`
as the `DOMAgent` is supported by WebKit, even though `JSContext`s have no concept of the
DOM. In this example, however, `window.DOMAgent` would NOT exist, as the `availability`
check for the `DOM` domain wouldn't pass, meaning that the agent never gets connected.
In order to do proper feature checking, `InspectorBackend.domains` needs to be accurate
depending on the debuggable type. Furthermore, each target underneath that debuggable needs
to be able to "choose" what commands/events are supported based on that target's type.
This patch modifies how InspectorBackendCommands.js ties into `InspectorBackend`. Rather
than directly creating an `InspectorBackend.Agent` for each domain, we now create more of a
"blueprint" of the domain, and wait to actually create an `InspectorBackend.Agent` until we
have a `WI.Target` (and therefore an `InspectorBackend.Connection`). Each "concept" of the
protocol now directly maps to an object.
- InspectorBackend.Domain
- InspectorBackend.Command
- InspectorBackend.Event
- InspectorBackend.Dispatcher
When a `WI.Target` is created, it gets the list of `InspectorBackend.Domain` that support
that `WI.Target`'s type (specified in the protocol JSON files) and generates an
`InspectorBackend.Agent` for each, which in turn generates an `InspectorBackend.Callable`
for each supported `InspectorBackend.Command` and instantiates `InspectorBackend.Dispatcher`.
Activating a `InspectorBackend.Domain` means it's visible for `InspectorBackend` feature
checking. This must be done this way for older ITML backends that will still appear as
"JSContext" targets and therefore go through the "extra domains" path. Ideally, the process
of registering a domain should be enough to activate it. <https://webkit.org/b/201150>
Feature checking can now only be done via `hasDomain`, `hasCommand`, and `hasEvent` on
`InspectorBackend` or a specific `WI.Target`, and there are different implications for each:
- `InspectorBackend.hasDomain(DOM)` asks whether the `DOM` domain is supported by the
current debuggable, but says nothing about whether any `WI.Target` support `DOM`.
- `target.hasDomain("DOM")` asks whether the given `target` supports `DOM`, which is
limited by `InspectorBackend.hasDomain("DOM")`.
Now that `InspectorBackend.Agent` is only created by a `WI.Target`, it's no longer valid to
write `window.DOMAgent`, as there is no "global" agent. All protocol logic _must_ go through
a `WI.Target`. <https://webkit.org/b/201149>
Debuggable Types:
- JavaScript (JSC::JSGlobalObject)
- Page (WebCore::Page)
- ServiceWorker (WebCore::ServiceWorkerThreadProxy)
- WebPage (WebKit::WebPageProxy)
Target Types:
- JavaScript (direct connection)
- Page (multi-target connection to any Worker)
- ServiceWorker (direct connection)
- WebPage (multi-target connection to 1+ Page)
- Worker (direct connection, only available for Page debuggables)
* UserInterface/Base/DebuggableType.js:
* UserInterface/Base/TargetType.js: Copied from Source/WebInspectorUI/UserInterface/Base/DebuggableType.js.
* UserInterface/Protocol/Connection.js:
* UserInterface/Protocol/InspectorBackend.js:
* UserInterface/Protocol/ApplicationCacheObserver.js:
* UserInterface/Protocol/CPUProfilerObserver.js:
* UserInterface/Protocol/CSSObserver.js:
* UserInterface/Protocol/CanvasObserver.js:
* UserInterface/Protocol/ConsoleObserver.js:
* UserInterface/Protocol/DOMObserver.js:
* UserInterface/Protocol/DOMStorageObserver.js:
* UserInterface/Protocol/DatabaseObserver.js:
* UserInterface/Protocol/DebuggerObserver.js:
* UserInterface/Protocol/HeapObserver.js:
* UserInterface/Protocol/InspectorObserver.js:
* UserInterface/Protocol/LayerTreeObserver.js:
* UserInterface/Protocol/MemoryObserver.js:
* UserInterface/Protocol/NetworkObserver.js:
* UserInterface/Protocol/PageObserver.js:
* UserInterface/Protocol/RuntimeObserver.js:
* UserInterface/Protocol/ScriptProfilerObserver.js:
* UserInterface/Protocol/TargetObserver.js:
* UserInterface/Protocol/TimelineObserver.js:
* UserInterface/Protocol/WorkerObserver.js:
All observers now extend from `InspectorBackend.Dispatcher` and have a separate instance for
each `InspectorBackend.Agent`, each having their own `_target`.
* UserInterface/Protocol/Target.js:
* UserInterface/Protocol/DirectBackendTarget.js:
* UserInterface/Protocol/JavaScriptContextTarget.js: Removed.
* UserInterface/Protocol/MultiplexingBackendTarget.js:
* UserInterface/Protocol/PageTarget.js:
* UserInterface/Protocol/WorkerTarget.js:
Agents are now created per-target instead of copied from the "global" list. This means that
agents can have a different set of commands/events depending on the associated target.
* UserInterface/Base/Main.js:
* UserInterface/Base/Utilities.js:
* UserInterface/Controllers/AppController.js:
* UserInterface/Controllers/AppControllerBase.js:
* UserInterface/Controllers/ApplicationCacheManager.js:
* UserInterface/Controllers/AuditManager.js:
* UserInterface/Controllers/BreakpointPopoverController.js:
* UserInterface/Controllers/CSSManager.js:
* UserInterface/Controllers/CanvasManager.js:
* UserInterface/Controllers/ConsoleManager.js:
* UserInterface/Controllers/DOMDebuggerManager.js:
* UserInterface/Controllers/DOMManager.js:
* UserInterface/Controllers/DOMStorageManager.js:
* UserInterface/Controllers/DatabaseManager.js:
* UserInterface/Controllers/DebuggerManager.js:
* UserInterface/Controllers/HeapManager.js:
* UserInterface/Controllers/IndexedDBManager.js:
* UserInterface/Controllers/JavaScriptLogViewController.js:
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
* UserInterface/Controllers/LayerTreeManager.js:
* UserInterface/Controllers/MemoryManager.js:
* UserInterface/Controllers/NetworkManager.js:
* UserInterface/Controllers/RuntimeManager.js:
* UserInterface/Controllers/TargetManager.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Controllers/WorkerManager.js:
* UserInterface/Main.html:
* UserInterface/Models/AuditTestBase.js:
* UserInterface/Models/AuditTestCase.js:
* UserInterface/Models/AuditTestCaseResult.js:
* UserInterface/Models/CPUInstrument.js:
* UserInterface/Models/CPUTimelineRecord.js:
* UserInterface/Models/CSSCompletions.js:
* UserInterface/Models/CSSStyleSheet.js:
* UserInterface/Models/Canvas.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Models/DOMNodeStyles.js:
* UserInterface/Models/DOMStorageObject.js:
* UserInterface/Models/DOMTree.js:
* UserInterface/Models/DatabaseObject.js:
* UserInterface/Models/FPSInstrument.js:
* UserInterface/Models/GarbageCollection.js:
* UserInterface/Models/HeapAllocationsInstrument.js:
* UserInterface/Models/Instrument.js:
* UserInterface/Models/MediaInstrument.js:
* UserInterface/Models/MemoryInstrument.js:
* UserInterface/Models/MemoryPressureEvent.js:
* UserInterface/Models/MemoryTimelineRecord.js:
* UserInterface/Models/Recording.js:
* UserInterface/Models/Resource.js:
* UserInterface/Models/ScriptInstrument.js:
* UserInterface/Models/ScriptSyntaxTree.js:
* UserInterface/Models/ScriptTimelineRecord.js:
* UserInterface/Models/ShaderProgram.js:
* UserInterface/Models/SourceMapResource.js:
* UserInterface/Models/TimelineRecording.js:
* UserInterface/Protocol/RemoteObject.js:
* UserInterface/Test.html:
* UserInterface/Test/FrontendTestHarness.js:
* UserInterface/Test/Test.js:
* UserInterface/Test/TestAppController.js:
* UserInterface/Views/AuditNavigationSidebarPanel.js:
* UserInterface/Views/AuditTabContentView.js:
* UserInterface/Views/CanvasTabContentView.js:
* UserInterface/Views/ContextMenuUtilities.js:
* UserInterface/Views/CookieStorageContentView.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
* UserInterface/Views/DOMTreeContentView.js:
* UserInterface/Views/ElementsTabContentView.js:
* UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js:
* UserInterface/Views/Layers3DContentView.js:
* UserInterface/Views/LayersTabContentView.js:
* UserInterface/Views/LayoutTimelineView.js:
* UserInterface/Views/LogContentView.js:
* UserInterface/Views/NetworkTabContentView.js:
* UserInterface/Views/NetworkTableContentView.js:
* UserInterface/Views/NetworkTimelineView.js:
* UserInterface/Views/ObjectTreeView.js:
* UserInterface/Views/QuickConsole.js:
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
* UserInterface/Views/ScriptClusterTimelineView.js:
* UserInterface/Views/ScriptDetailsTimelineView.js:
* UserInterface/Views/ScriptTreeElement.js:
* UserInterface/Views/SearchSidebarPanel.js:
* UserInterface/Views/SearchTabContentView.js:
* UserInterface/Views/SettingsTabContentView.js:
* UserInterface/Views/SourceCodeTextEditor.js:
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
* UserInterface/Views/SpreadsheetStyleProperty.js:
* UserInterface/Views/StorageTabContentView.js:
* UserInterface/Views/TimelineRecordingContentView.js:
* UserInterface/Views/TimelineTabContentView.js:
* UserInterface/Views/Toolbar.js:
* UserInterface/Views/WebSocketContentView.js:
* UserInterface/Views/WorkerTreeElement.js:
Replace all instances of `window.DomainAgent` with `target.DomainAgent`, where `target` is
either derived from an associated model object or `WI.assumingMainTarget()`.
Split the `WI.DebuggableType.Web` debuggable type into `WI.DebuggableType.Page` (WebCore::Page)
and `WI.DebuggableType.WebPage` (WebKit::WebPageProxy).
* UserInterface/Protocol/Legacy/*:
* Versions/*:
Update protocol files for older versions of iOS.
* .eslintrc:
* Localizations/en.lproj/localizedStrings.js:
2019-10-15 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: prevent source mapped resources from being blackboxed
https://bugs.webkit.org/show_bug.cgi?id=203007
Reviewed by Matt Baker.
Since source mapped resources are entirely a frontend concept, it doesn't make sense to
allow them to be blackboxed.
* UserInterface/Models/SourceMapResource.js:
(WI.SourceMapResource.prototype.get supportsScriptBlackboxing):
2019-10-15 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Convert CSSRule selectorText setter to setSelectorText method because it's asynchronous
https://bugs.webkit.org/show_bug.cgi?id=202840
Reviewed by Matt Baker.
* UserInterface/Models/CSSRule.js:
(WI.CSSRule.prototype.setSelectorText):
(WI.CSSRule.prototype._selectorRejected):
(WI.CSSRule.prototype._selectorResolved):
Remove WI.CSSRule.Event.SelectorChanged event and since it wasn't used anywhere else.
(WI.CSSRule):
(WI.CSSRule.prototype.set selectorText): Deleted.
(WI.CSSRule.prototype.setSelectorText): Added.
(WI.CSSRule.prototype._selectorRejected): Deleted.
(WI.CSSRule.Event.SelectorChanged): Deleted.
Remove `{valid: ...}` object since it wasn't used.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidCommit):
2019-10-15 Devin Rousso <drousso@apple.com>
Web Inspector: Local Resource Overrides: automatically create an image/font local override when dragging content over a non-overridden resource
https://bugs.webkit.org/show_bug.cgi?id=202957
Reviewed by Joseph Pecoraro.
Since non-text resources aren't editable, some users of local resource overrides kept trying
to drag image/font files over the actual resource content view (not the local override),
which didn't do anything. Rather than having to click "Create Local Override" and then do a
drag/drop, we should support the "shorter" workflow of drag/drop over the actual resource.
* UserInterface/Base/FileUtilities.js:
(WI.FileUtilities.import): Added.
(WI.FileUtilities.importText):
(WI.FileUtilities.importJSON):
(WI.FileUtilities.importData): Added.
(WI.FileUtilities.async readText):
(WI.FileUtilities.async readJSON):
(WI.FileUtilities.async readData): Added.
(WI.FileUtilities.async _read): Added.
Create utility functions for importing non-text content as data.
Drive-by: fix a bug in the `import*` functions where the `callback` would be bound on the
first call, meaning that since the `<input>` was cached for all calls, we'd only
ever use the first `callback` in subsequent calls.
* UserInterface/Views/DropZoneView.js:
(WI.DropZoneView):
(WI.DropZoneView.prototype.set text): Added.
Support the text content of the drop zone changing after it's initialized.
* UserInterface/Views/FontResourceContentView.js:
(WI.FontResourceContentView):
(WI.FontResourceContentView.prototype.contentAvailable):
(WI.FontResourceContentView.prototype.dropZoneHandleDragEnter): Added.
(WI.FontResourceContentView.prototype.dropZoneHandleDrop):
(WI.FontResourceContentView.prototype._handleLocalResourceContentDidChange): Added.
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView):
(WI.ImageResourceContentView.prototype.contentAvailable):
(WI.ImageResourceContentView.prototype.dropZoneHandleDragEnter): Added.
(WI.ImageResourceContentView.prototype.dropZoneHandleDrop):
(WI.ImageResourceContentView.prototype._handleLocalResourceContentDidChange): Added.
Support drag/drop on non-override image/font content views, which will create/update the
local resource override for that resource.
* UserInterface/Views/ResourceContentView.js:
(WI.ResourceContentView):
(WI.ResourceContentView.prototype.get navigationItems):
(WI.ResourceContentView.prototype._handleImportLocalResourceOverride): Added.
When viewing a local resource override, add an "Import" navigation item for non-drag/drop
updating of the contents of the local resource override. This is also exposed for text-based
local resource overrides, since drag/drop inserts the contents of the file (if it's text),
which attempts to determine whether the dropped file is text or data based on the MIME type.
* UserInterface/Views/AuditNavigationSidebarPanel.js:
(WI.AuditNavigationSidebarPanel.prototype._handleImportButtonNavigationItemClicked):
* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype._handleImportButtonNavigationItemClicked):
* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype._handleImportButtonNavigationItemClicked):
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._importHAR):
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype._importButtonNavigationItemClicked):
Explicitly allow multiple files to be imported at the same time.
* UserInterface/Base/BlobUtilities.js:
(WI.BlobUtilities.blobForContent):
Drive-by: remove extra `base64Encoded` argument when calling `decodeBase64ToBlob`, which
caused SVG-based image local resource overrides to show a broken image when
closing and reopening Web Inspector.
* Localizations/en.lproj/localizedStrings.js:
2019-10-14 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r250991): Sources: local resource overrides should be enabled when not in tests
https://bugs.webkit.org/show_bug.cgi?id=202944
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager):
2019-10-11 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: support pattern blackboxing
https://bugs.webkit.org/show_bug.cgi?id=198855
Reviewed by Timothy Hatcher.
Allow scripts to be blackboxed based on URL patterns (in addition to individual URLs) which
can be extremely useful when trying to step through unminified library/framework code.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):
(WI.DebuggerManager.prototype.initializeTarget):
(WI.DebuggerManager.prototype.blackboxTypeForSourceCode): Added.
(WI.DebuggerManager.prototype.get blackboxPatterns): Added.
(WI.DebuggerManager.prototype.setShouldBlackboxScript):
(WI.DebuggerManager.prototype.setShouldBlackboxPattern): Added.
(WI.DebuggerManager.prototype.isScriptBlackboxed): Deleted.
Provide a separate path for setting URL pattern blackboxes, rather than an exact/given URL.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView):
(WI.SettingsTabContentView.prototype.selectBlackboxPattern): Added.
(WI.SettingsTabContentView.prototype.initialLayout):
(WI.SettingsTabContentView.prototype._createSourcesSettingsView):
* UserInterface/Views/BlackboxSettingsView.js: Added.
(WI.BlackboxSettingsView):
(WI.BlackboxSettingsView.prototype.selectBlackboxPattern):
(WI.BlackboxSettingsView.prototype.initialLayout):
(WI.BlackboxSettingsView.prototype._addRow):
* UserInterface/Views/BlackboxSettingsView.css: Added.
(.settings-view.blackbox > :matches(p, table)):
(.settings-view.blackbox > p):
(.settings-view.blackbox > * + p):
(.settings-view.blackbox > p:last-child):
(.settings-view.blackbox > p > .toggle-script-blackbox):
(.settings-view.blackbox > table):
(.settings-view.blackbox > table > thead th):
(.settings-view.blackbox > table > tbody td):
(.settings-view.blackbox > table > tbody td:not(.remove-blackbox)):
(.settings-view.blackbox > table :matches(th, td).url):
(.settings-view.blackbox > table > tbody td.url > .CodeMirror):
(.settings-view.blackbox > table :matches(th, td):matches(.case-sensitive, .remove-blackbox)):
(.settings-view.blackbox > table > tbody > tr:not(:hover) > td.remove-blackbox):
(.settings-view.blackbox > table > tbody td.remove-blackbox > .remove-blackbox-button):
Add a "Blackbox" pane that contains an editable table of pattern blackboxes, each having its
own row (code mirror for the URL regular expression and a checkbox for case sensitivity).
* UserInterface/Views/SourceCodeTreeElement.js:
(WI.SourceCodeTreeElement.prototype.updateStatus):
(WI.SourceCodeTreeElement.prototype._updateSourceCode):
(WI.SourceCodeTreeElement.prototype._updateToggleBlackboxImageElementState):
(WI.SourceCodeTreeElement.prototype._handleToggleBlackboxedImageElementClicked):
* UserInterface/Views/SourceCodeTreeElement.css:
(.tree-outline .item .status > .toggle-script-blackbox, .tree-outline:focus .item.selected .status > .toggle-script-blackbox.pattern-blackboxed): Added.
(.tree-outline .item .status > .toggle-script-blackbox.pattern-blackboxed): Added.
(.tree-outline .item .status > .toggle-script-blackbox): Added.
(.tree-outline .item .status > .toggle-script-blackbox:not(.pattern-blackboxed)): Added.
(.tree-outline .item .status > .toggle-script-blackbox:not(.url-blackboxed, .pattern-blackboxed)): Added.
(.tree-outline:not(.navigation-sidebar-panel-content-tree-outline) .item .status > .toggle-script-blackbox, .tree-outline .item:not(:hover) .status > .toggle-script-blackbox:not(.pattern-blackboxed, .url-blackboxed)): Added.
(@media (prefers-color-scheme: dark) .tree-outline .item .status > .toggle-script-blackbox): Added.
(@media (prefers-color-scheme: dark) .tree-outline .item .status > .toggle-script-blackbox.pattern-blackboxed): Added.
(@media (prefers-color-scheme: dark) .tree-outline .item .status > .toggle-script-blackbox:not(.pattern-blackboxed)): Added.
(.tree-outline .item .status > .toggle-script-blackboxed): Deleted.
(.tree-outline:not(.navigation-sidebar-panel-content-tree-outline) .item .status > .toggle-script-blackboxed, .tree-outline .item:not(:hover) .status > .toggle-script-blackboxed:not(.blackboxed)): Deleted.
(.tree-outline:focus .item.selected .status > .toggle-script-blackboxed): Deleted.
(.tree-outline .item .status > .toggle-script-blackboxed.blackboxed): Deleted.
(@media (prefers-color-scheme: dark) .tree-outline .item .status > .toggle-script-blackboxed): Deleted.
* UserInterface/Views/ShaderProgramTreeElement.css:
(.tree-outline .item.shader-program .status > img):
(.tree-outline .item.shader-program:not(:hover, .disabled) .status > img): Added.
(.tree-outline .item.shader-program:not(.disabled) .status > img): Added.
(@media (prefers-color-scheme: dark) .tree-outline .item.shader-program .status > img):
(.tree-outline .item.shader-program:not(:hover, .selected, .disabled) .status > img): Deleted.
(.tree-outline:focus .item.shader-program.selected .status > img): Deleted.
(.tree-outline .item.shader-program.disabled .status > img): Deleted.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):
* UserInterface/Images/Hide.svg:
Use a slightly different style for the blackbox icon if the source code's URL matches a
blackbox pattern. Clicking on the blackbox icon in this state will show the Settings Tab.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI._handleSettingsKeyboardShortcut): Added.
(WI.showSettingsTab): Added.
(WI._showSettingsTab): Deleted.
* Localizations/en.lproj/localizedStrings.js:
2019-10-11 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Computed: show shorthand properties in addition to longhand ones
https://bugs.webkit.org/show_bug.cgi?id=200554
Reviewed by Matt Baker.
Replace the "Show All [ ]" checkbox header option in the "Properties" section with a filter
icon that controls both "Show All" and "Prefer Shorthands", the latter of which will cause
any longhand properties to be hidden and their respective shorthands to be shown.
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty):
(WI.CSSProperty.prototype.update):
(WI.CSSProperty.prototype.get isVariable): Added.
(WI.CSSProperty.prototype.get isShorthand): Added.
(WI.CSSProperty.prototype.get shorthandPropertyNames): Added.
(WI.CSSProperty.prototype.get variable): Deleted.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel):
(WI.ComputedStyleDetailsPanel.prototype.applyFilter):
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
(WI.ComputedStyleDetailsPanel.prototype._computedStyleShowAllCheckboxValueChanged): Deleted.
* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content > .computed > .details-section): Added.
(.sidebar > .panel.details.css-style > .content > .computed > .details-section > .content): Added.
(.sidebar > .panel.details.css-style > .content > .computed .spreadsheet-style-declaration-editor): Added.
(.sidebar > .panel.details.css-style > .content > .computed .property): Added.
(.sidebar > .panel.details.css-style > .content > .computed .property .go-to-arrow): Added.
(.sidebar > .panel.details.css-style > .content > .computed .property:not(:hover) .go-to-arrow): Added.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables)): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) .property): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) .property .go-to-arrow): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) .property:not(:hover) .go-to-arrow): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) > .content): Deleted.
* UserInterface/Views/ComputedStyleSection.js:
(WI.ComputedStyleSection):
(WI.ComputedStyleSection.prototype.set showsShorthandsInsteadOfLonghands): Added.
(WI.ComputedStyleSection.prototype.get propertiesToRender):
(WI.ComputedStyleSection.prototype.set propertyVisibilityMode): Deleted.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.update):
(WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens):
* Localizations/en.lproj/localizedStrings.js:
2019-10-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Local Resource Overrides: UI for overriding image and font resource content
https://bugs.webkit.org/show_bug.cgi?id=202016
<rdar://problem/55541475>
Reviewed by Devin Rousso.
Extend SourceCodeRevision to be a (content, base64Encoded, mimeType) tuple and
make clients update the revision content more explicitly (`updateRevisionContent`).
This also includes `blobContent` as a more explicit way to get the content as
a Blob, which may not always be desired.
Switch LocalResource use the originalRevision / currentRevision instead of
keeping its own localContent / localContentIsBase64Encoded properties.
Introduce a `DropZoneView` to simplify handling of presenting a drop zone
over a specific element. And use it for the ImageResourceContentView for local
resource overrides to accept new content.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and resources.
* .eslintrc:
* UserInterface/Base/BlobUtilities.js: Added.
(WI.BlobUtilities.blobForContent):
(WI.BlobUtilities.decodeBase64ToBlob):
(WI.BlobUtilities.textToBlob):
(WI.BlobUtilities.blobAsText):
(WI.BlobUtilities):
* UserInterface/Base/FileUtilities.js:
(WI.FileUtilities.async.readDataURL):
(WI.FileUtilities):
* UserInterface/Base/MIMETypeUtilities.js:
(WI.fileExtensionForFilename):
(WI.fileExtensionForURL):
* UserInterface/Base/Utilities.js:
Move around or introduce some minor utilities.
* UserInterface/Models/SourceCodeRevision.js:
(WI.SourceCodeRevision):
(WI.SourceCodeRevision.prototype.get sourceCode):
(WI.SourceCodeRevision.prototype.get content):
(WI.SourceCodeRevision.prototype.get base64Encoded):
(WI.SourceCodeRevision.prototype.get mimeType):
(WI.SourceCodeRevision.prototype.get blobContent):
(WI.SourceCodeRevision.prototype.updateRevisionContent):
(WI.SourceCodeRevision.prototype.copy):
(WI.SourceCodeRevision.prototype.set content): Deleted.
Data is now a (content, base64Encoded, mimeType) tuple.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.responseIntercepted):
(WI.NetworkManager.prototype._handleResourceContentDidChange):
(WI.NetworkManager.prototype._persistLocalResourceOverrideSoonAfterContentChange): Deleted.
This is now a unified resource content change path without anything special for
local resource overrides.
* UserInterface/Models/LocalResource.js:
(WI.LocalResource.prototype.toJSON):
(WI.LocalResource.prototype.requestContentFromBackend):
(WI.LocalResource.prototype.handleCurrentRevisionContentChange):
(WI.LocalResource):
(WI.LocalResource.prototype.get localContent): Deleted.
(WI.LocalResource.prototype.get localContentIsBase64Encoded): Deleted.
(WI.LocalResource.prototype.hasContent): Deleted.
(WI.LocalResource.prototype.setContent): Deleted.
(WI.LocalResource.prototype.updateOverrideContent): Deleted.
Use originalRevision / currentRevision as appropriate.
* UserInterface/Views/DropZoneView.css: Added.
(.drop-zone):
(.drop-zone.visible):
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/DropZoneView.js: Added.
(WI.DropZoneView):
(WI.DropZoneView.prototype.get delegate):
(WI.DropZoneView.prototype.get targetElement):
(WI.DropZoneView.prototype.set targetElement):
(WI.DropZoneView.prototype.initialLayout):
(WI.DropZoneView.prototype._startActiveDrag):
(WI.DropZoneView.prototype._stopActiveDrag):
(WI.DropZoneView.prototype._handleDragEnter):
(WI.DropZoneView.prototype._handleDragLeave):
(WI.DropZoneView.prototype._handleDragOver):
(WI.DropZoneView.prototype._handleDrop):
Simplified handling of a drop zone.
* UserInterface/Views/ResourceContentView.js:
(WI.ResourceContentView.prototype.removeLoadingIndicator):
More safely remove children and subviews.
(WI.ResourceContentView):
(WI.ResourceContentView.prototype.get resource):
(WI.ResourceContentView.prototype.get navigationItems):
(WI.ResourceContentView.prototype.localResourceOverrideInitialContent):
(WI.ResourceContentView.prototype.closed):
(WI.ResourceContentView.prototype.removeLoadingIndicator):
(WI.ResourceContentView.prototype._contentAvailable):
(WI.ResourceContentView.prototype._issueWasAdded):
(WI.ResourceContentView.prototype.async._handleCreateLocalResourceOverride):
(WI.ResourceContentView.prototype._handleRemoveLocalResourceOverride):
(WI.ResourceContentView.prototype._handleLocalResourceOverrideChanged):
(WI.ResourceContentView.prototype._mouseWasClicked):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView):
(WI.TextResourceContentView.prototype.get navigationItems):
(WI.TextResourceContentView.prototype.localResourceOverrideInitialContent):
(WI.TextResourceContentView.prototype._contentWillPopulate):
(WI.TextResourceContentView.prototype._contentDidPopulate):
(WI.TextResourceContentView.prototype._textEditorContentDidChange):
(WI.TextResourceContentView.prototype._shouldBeEditable):
(WI.TextResourceContentView.prototype.async._handleCreateLocalResourceOverride): Deleted.
(WI.TextResourceContentView.prototype._handleRemoveLocalResourceOverride): Deleted.
(WI.TextResourceContentView.prototype._handleLocalResourceOverrideChanged): Deleted.
Extract generalized local resource override properties into the ResourceContentView base class.
* UserInterface/Views/FontResourceContentView.css:
(.content-view.resource.font):
(.content-view.resource.font > .drop-zone):
(.content-view.resource.font > .preview-container):
(.content-view.resource.font .preview):
* UserInterface/Views/FontResourceContentView.js:
(WI.FontResourceContentView):
(WI.FontResourceContentView.prototype.contentAvailable):
(WI.FontResourceContentView.prototype.shown):
(WI.FontResourceContentView.prototype.hidden):
(WI.FontResourceContentView.prototype.closed):
(WI.FontResourceContentView.prototype.layout):
(WI.FontResourceContentView.prototype._updatePreviewElement.createMetricElement):
(WI.FontResourceContentView.prototype._updatePreviewElement):
(WI.FontResourceContentView.prototype.dropZoneShouldAppearForDragEvent):
(WI.FontResourceContentView.prototype.dropZoneHandleDrop):
Create a drop zone that will update the font local resource override content.
* UserInterface/Views/ImageResourceContentView.css:
(.content-view.resource.image):
(.content-view.resource.image > .drop-zone):
(.content-view.resource.image > .img-container):
(.content-view.resource.image img):
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView):
(WI.ImageResourceContentView.prototype.get navigationItems):
(WI.ImageResourceContentView.prototype.contentAvailable):
(WI.ImageResourceContentView.prototype.closed):
(WI.ImageResourceContentView.prototype.dropZoneShouldAppearForDragEvent):
(WI.ImageResourceContentView.prototype.dropZoneHandleDrop):
Create a drop zone that will update the image local resource override content.
* UserInterface/Models/Script.js:
(WI.Script.prototype.get mimeType):
Seems like this should have a default value given there may not be a resource.
* UserInterface/Views/LocalResourceOverridePopover.js:
(WI.LocalResourceOverridePopover.prototype.show):
Better handling here, since the utilities expects a number not a string.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.createObjectURL):
* UserInterface/Views/LocalResourceOverrideTreeElement.js:
(WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover):
Use currentRevision more appropriately.
* UserInterface/Models/SourceCode.js:
(WI.SourceCode.prototype._processContent):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype._textEditorContentDidChange):
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
(WI.CSSManager.prototype._resourceContentDidChange.applyStyleSheetChanges):
(WI.CSSManager.prototype._resourceContentDidChange):
(WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
Update revision content more explicitly.
2019-10-10 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: enable tab by default
https://bugs.webkit.org/show_bug.cgi?id=202341
Reviewed by Joseph Pecoraro.
The experimental Sources Tab has progressed enough that it can be enabled by default. There
are some new features that are only available in the Sources Tab that are also ready to be
used (e.g. local resource overrides).
* UserInterface/Main.html:
* UserInterface/Base/Main.js:
(WI.loaded):
* UserInterface/Base/Setting.js:
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showResources):
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager):
(WI.NetworkManager.supportsLocalResourceOverrides):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForURL):
* UserInterface/Views/DefaultDashboardView.js:
(WI.DefaultDashboardView.prototype._resourcesItemWasClicked):
* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement.prototype.populateContextMenu):
* UserInterface/Views/SearchResultTreeElement.js:
(WI.SearchResultTreeElement.prototype.populateContextMenu):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.isTabAllowed): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.css: Removed.
* UserInterface/Views/DebuggerSidebarPanel.js: Removed.
* UserInterface/Views/DebuggerTabContentView.js: Removed.
* UserInterface/Views/ResourceSidebarPanel.css: Removed.
* UserInterface/Views/ResourceSidebarPanel.js: Removed.
* UserInterface/Views/ResourcesTabContentView.js: Removed.
Remove the experimental setting, as well as code for the Resources Tab and the Debugger Tab.
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
2019-10-09 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r250948): Web Inspector: Styles: CSS selector becomes gray after stopping editing without modifying it
https://bugs.webkit.org/show_bug.cgi?id=202781
Reviewed by Matt Baker.
When not editing, CSS selectors that match the selected node are highlighted (black in the light mode,
white in the dark mode). When editing starts, span elements that provide highlighting get removed.
When editing stops, active selectors should get highlighted.
r250948 stopped calling `_renderSelector` when selector wasn't modified.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidCommit):
* UserInterface/Views/SpreadsheetSelectorField.js:
(WI.SpreadsheetSelectorField.prototype._handleBlur):
2019-10-09 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Modifying CSS selector by pressing Enter or Tab causes 2 CSS.setRuleSelector backend calls
https://bugs.webkit.org/show_bug.cgi?id=202769
<rdar://problem/56132166>
Reviewed by Matt Baker.
Previously, spreadsheetSelectorFieldDidChange would get called twice:
1. On Enter or Tab key press.
2. On blur event.
With this patch, it only gets called on blur event.
* UserInterface/Models/CSSRule.js:
(WI.CSSRule.prototype.set selectorText):
Remove dead code. Calling `_selectorResolved(true)` would cause an uncaught exception.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange): Removed.
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidCommit): Added.
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldWillNavigate): Added.
Split spreadsheetSelectorFieldDidChange into spreadsheetSelectorFieldDidCommit and spreadsheetSelectorFieldWillNavigate.
* UserInterface/Views/SpreadsheetSelectorField.js:
(WI.SpreadsheetSelectorField):
(WI.SpreadsheetSelectorField.prototype.startEditing):
(WI.SpreadsheetSelectorField.prototype.stopEditing):
(WI.SpreadsheetSelectorField.prototype._handleBlur):
(WI.SpreadsheetSelectorField.prototype._handleKeyDown):
Add `_valueBeforeEditing` to check if the value was modified before the blur event.
Similar logic exists in SpreadsheetTextField.
2019-10-08 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: modifications to shader modules can be shared between vertex/fragment shaders
https://bugs.webkit.org/show_bug.cgi?id=202031
Reviewed by Dean Jackson.
If the vertex and fragment shaders share the same source module for a WebGPU shader pipeline,
only display a single editable content view for that shader pipeline in the Canvas Tab.
* UserInterface/Models/ShaderProgram.js:
(WI.ShaderProgram):
(WI.ShaderProgram.prototype.get sharesVertexFragmentShader): Added.
* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.programCreated):
* UserInterface/Protocol/CanvasObserver.js:
(WI.CanvasObserver.prototype.programCreated):
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView):
(WI.ShaderProgramContentView.prototype.shown):
(WI.ShaderProgramContentView.prototype.hidden):
(WI.ShaderProgramContentView.prototype._refreshContent):
* UserInterface/Views/ShaderProgramContentView.css:
(.content-view.shader-program > .shader.compute, .content-view.shader-program > .shader.vertex.shares-vertex-fragment-shader): Added.
(body[dir=ltr] .content-view.shader-program > .shader.vertex:not(.shares-vertex-fragment-shader), body[dir=rtl] .content-view.shader-program > .shader.fragment): Added.
(body[dir=ltr] .content-view.shader-program > .shader.fragment, body[dir=rtl] .content-view.shader-program > .shader.vertex:not(.shares-vertex-fragment-shader)): Added.
(.content-view.shader-program > .shader.compute): Deleted.
(body[dir=ltr] .content-view.shader-program > .shader.vertex, body[dir=rtl] .content-view.shader-program > .shader.fragment): Deleted.
(body[dir=ltr] .content-view.shader-program > .shader.fragment, body[dir=rtl] .content-view.shader-program > .shader.vertex): Deleted.
* UserInterface/Views/CodeMirrorAdditions.js:
Replace the vertex/fragment specific MIME types with a more general "render" MIME type.
* Localizations/en.lproj/localizedStrings.js:
2019-10-08 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: make it more obvious that the cards in the overview are clickable
https://bugs.webkit.org/show_bug.cgi?id=202680
Reviewed by Matt Baker.
Add a slight darkening (or lightening when in dark mode) of the background behind the
content preview in the overview.
* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview .content-view.canvas):
(.content-view.canvas-overview .content-view.canvas, .content-view.canvas-overview .content-view.canvas > .preview > img): Added.
(.content-view.canvas-overview .content-view.canvas.recording-active > .progress-view, .content-view.canvas-overview .content-view.canvas > .preview):
(.content-view.canvas-overview .content-view.canvas.recording-active > .progress-view:hover, .content-view.canvas-overview .content-view.canvas > .preview:hover): Added.
(@media (prefers-color-scheme: dark) .content-view.canvas-overview .content-view.canvas, .content-view.canvas-overview .content-view.canvas > .preview > img): Added.
(@media (prefers-color-scheme: dark) .content-view.canvas-overview .content-view.canvas.recording-active > .progress-view:hover, .content-view.canvas-overview .content-view.canvas > .preview:hover): Added.
2019-10-08 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: don't show an empty preview for WebGPU devices
https://bugs.webkit.org/show_bug.cgi?id=202679
Reviewed by Matt Baker.
`HTMLCanvasElement.prototype.toDataURL` hasn't been hooked up for `GPUCanvasContext` yet, so
calling `Canvas.requestContent` with a `WebGPUDevice` won't give us any good results.
As such, the Web Inspector frontend should show something slightly more actionable, such as
a more generic non-error "No Preview Available" message.
* UserInterface/Models/Canvas.js:
(WI.Canvas.supportsRequestContentForContextType): Added.
(WI.Canvas.prototype.requestContent):
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype._showError):
2019-10-08 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: unable to click on overview path component when jumping directly to a shader
https://bugs.webkit.org/show_bug.cgi?id=202682
Reviewed by Matt Baker.
* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView):
The `WI.TreeOutline` used for the hierarchical path components is actually held by the
Canvas Tab, not the Canvas navigation sidebar panel. As a result, if the hierarchical path
is changed by anything other than the hierarchical path itself (e.g. a selection in the
navigation sidebar, or clicking on the [gl] shader or [o_o] recording buttons in the
overview preview tile), the selection state of the `WI.TreeOutline` can get out of sync. In
this case, the `WI.TreeOutline` still thinks that "Overview" is selected because the change
in content view was triggered by something unrelated to the `WI.TreeOutline` (see above for
specific examples). The simple solution is to just allow repeat selection, as this is only
an issue here because the canvas navigation sidebar isn't always visible, as well as to
allow the "Overview" to be listed as the root path item.
* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype.updateRepresentedObjects):
If a `WI.Canvas` is one of the current represented objects, attempt to select it, even if
it matches the currently shown `WI.Canvas`. This covers the situation where the `WI.Canvas`
is selected via its hierarchical path component, ensuring that the selected item in the
navigation sidebar always matches the hierarchical path components.
2019-10-08 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: the navigation sidebar icon isn't inverted in dark mode
https://bugs.webkit.org/show_bug.cgi?id=202681
Reviewed by Matt Baker.
* UserInterface/Views/CanvasSidebarPanel.css:
(@media (prefers-color-scheme: dark) .sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas .icon): Added.
* UserInterface/Views/CanvasTabContentView.css:
(@media (prefers-color-scheme: dark) .content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon):
Drive-by: slightly darken the Canvas Overview hierarchical path component icon so it better
matches the colors of the nearby canvas icons.
2019-10-07 Devin Rousso <drousso@apple.com>
Web Inspector: Settings: enable the image transparency grid by default and create a checkbox for it
https://bugs.webkit.org/show_bug.cgi?id=202678
Reviewed by Matt Baker.
* UserInterface/Base/Setting.js:
Enable the "Show transparency grid" setting by default.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createSourcesSettingsView):
Add a checkbox for "Show transparency grid" in the "Sources" pane.
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView):
* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView):
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView):
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView):
* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView):
* Localizations/en.lproj/localizedStrings.js:
Unify the tooltip string for all of the "Show transparency grid" navigation items.
2019-10-07 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: don't allow blackboxing of scripts that aren't finished loading or failed to load
https://bugs.webkit.org/show_bug.cgi?id=202376
Reviewed by Matt Baker.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.get supportsScriptBlackboxing):
* UserInterface/Views/SourceCodeTreeElement.js:
(WI.SourceCodeTreeElement.prototype.updateStatus):
2019-10-02 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Styles: for rules that don't match selected node, property values always show as invalid
https://bugs.webkit.org/show_bug.cgi?id=201571
Reviewed by Matt Baker.
The gist of the bug:
- WI.CSSProperty is instantiated with `valid` false.
- CSSAgent.getMatchedStylesForNode never updates WI.CSSProperty instances because
the edited style does not in fact match the selected DOM node. A valid CSS property
is shown as invalid.
To resolve this, WI.CSSProperty instances are now updated after editing
in the callback of `CSSAgent.setStyleText`.
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype.changeStyleText):
(WI.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
Don't store `style` in `this._stylesMap` of WI.DOMNodeStyles when the style doesn't match the selected node.
2019-10-02 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r250149): changing CSS via the Styles details sidebar panel doesn't update the associated resource
https://bugs.webkit.org/show_bug.cgi?id=202446
Reviewed by Joseph Pecoraro.
When updating the text of a `WI.CSSProperty` (or the selector of a `WI.CSSRule`) is updated,
Web Inspector will update the backend style sheet, which will notify the `WI.CSSManager` of
the change, without ever going through the associated `WI.SourceCode`. `WI.CSSManager` then
updates the content of the `WI.SourceCode` to reflect these changes, but at that point the
`WI.SourceCode` hadn't yet "moved" it's `currentRevision` forward of it's `originalRevision`
which means it would get overridden the first time the `WI.SourceCode` updates itself.
Modify `WI.SourceCode` such that every path to get the `currentRevision` ensures that it is
"moved" forward before the `WI.SourceCodeRevision` value is returned.
* UserInterface/Models/SourceCode.js:
(WI.SourceCode.prototype.get currentRevision):
(WI.SourceCode.prototype.get content):
(WI.SourceCode.prototype.revisionContentDidChange):
(WI.SourceCode.prototype._initializeCurrentRevisionIfNeeded): Added.
(WI.SourceCode.prototype._processContent):
2019-10-01 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: clicking on a breakpoint changes the path components to not match the script's path
https://bugs.webkit.org/show_bug.cgi?id=196450
<rdar://problem/49488100>
Reviewed by Matt Baker.
When selecting any tree element that isn't in the resources tree outline, attempt to find
the corresponding tree element in the resources tree outline and silently select that as
well so that the hierarchical path component shows the right breadcrumb trail.
If the tree element is for a `WI.Script` which has a corresponding `WI.Resource`, use the
`WI.Resource` instead.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
2019-09-30 Devin Rousso <drousso@apple.com>
Web Inspector: JS Formatter: unexpected newlines added inside template string expression
https://bugs.webkit.org/show_bug.cgi?id=202374
Reviewed by Joseph Pecoraro.
Wrap every "add newline" with a check to see if the current node is inside a template
literal node. If so (and we aren't forcibly adding a newline), prevent the newline from
being added.
* UserInterface/Workers/Formatter/JSFormatter.js:
(JSFormatter.prototype._appendNewline): Added.
(JSFormatter.prototype._insertNewlinesBeforeToken):
(JSFormatter.prototype._insertComment):
(JSFormatter.prototype._insertSameLineTrailingComments):
(JSFormatter.prototype._insertCommentsAndNewlines):
(JSFormatter.prototype._before):
(JSFormatter.prototype._after):
(JSFormatter.prototype._handleTokenAtNode):
(JSFormatter.prototype._exitNode):
(JSFormatter.prototype._afterProgram):
2019-09-30 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: shader type header is white in dark mode
https://bugs.webkit.org/show_bug.cgi?id=202253
Reviewed by Matt Baker.
* UserInterface/Views/ShaderProgramContentView.css:
(.content-view.shader-program > .shader > header > .shader-type):
(@media (prefers-color-scheme: dark) .content-view.shader-program > .shader > header > .shader-type): Added.
(@media (prefers-color-scheme: dark) .content-view.shader-program > .shader > header): Deleted.
(.content-view.shader-program > .shader > header > *): Deleted.
2019-09-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Include LocalResourceOverrides in the Open Resource dialog
https://bugs.webkit.org/show_bug.cgi?id=202023
Reviewed by Devin Rousso.
* UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype._addScriptsForTarget):
Also walk the extraScriptCollection. Some Worker resource loads never
fully become resources.
(WI.OpenResourceDialog.prototype.didPresentDialog):
(WI.OpenResourceDialog.prototype._addLocalResourceOverrides):
Include local resource override resources.
(WI.OpenResourceDialog.prototype._populateResourceTreeOutline):
* Localizations/en.lproj/localizedStrings.js:
Include a subtitle for local resource overrides.
* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog .tree-outline.large .item .titles .subtitle):
Improved subtitle styling.
2019-09-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION: Elements detail sidebar sometimes starts collapsed
https://bugs.webkit.org/show_bug.cgi?id=202057
<rdar://problem/55572345>
Reviewed by Devin Rousso.
* UserInterface/Views/ElementsTabContentView.js:
(WI.ElementsTabContentView.prototype.get detailsSidebarExpandedByDefault):
Default the Elements tab detail sidebar to be shown, not collapsed.
* UserInterface/Views/TabContentView.js:
(WI.TabContentView):
(WI.TabContentView.prototype.get detailsSidebarExpandedByDefault):
Allow classes to specify whether or not their detail sidebar should
be expanded by default.
2019-09-25 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'WI.showDebugUISetting.addEventListener')
https://bugs.webkit.org/show_bug.cgi?id=202220
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype.initialLayout):
2019-09-23 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: WebGPU compute shaders aren't syntax highlighted
https://bugs.webkit.org/show_bug.cgi?id=202030
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CodeMirrorAdditions.js:
`CodeMirror.defineMIME` expects a "spec" object, which can't just be another MIME type.
Instead, get the "spec" of the defined "x-shader/x-vertex" and "x-shader/x-fragment" modes
and use that when defining MIMEs for the WebGPU shader pipeline modes.
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView):
Get the `contextType` off of the shader's canvas, which is where it actually lives.
2019-09-23 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: show WebGPU shader pipelines
https://bugs.webkit.org/show_bug.cgi?id=201675
<rdar://problem/55543450>
Reviewed by Joseph Pecoraro.
Show WebGPU shader pipelines ("programs") underneath each corresponding WebGPU device.
Allow editing of attached shader modules for each WebGPU shader pipeline, but don't allow
highlighting/disabling, as WebGPU pipelines don't have those capabilities/concepts yet.
* UserInterface/Protocol/CanvasObserver.js:
(WI.CanvasObserver.prototype.programCreated):
* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.programCreated):
* UserInterface/Models/Canvas.js:
(WI.Canvas.prototype.nextShaderProgramDisplayNumberForProgramType): Added.
(WI.Canvas.prototype.nextShaderProgramDisplayNumber): Deleted.
* UserInterface/Models/ShaderProgram.js:
(WI.ShaderProgram):
(WI.ShaderProgram.contextTypeSupportsProgramType): Added.
(WI.ShaderProgram.programTypeSupportsShaderType): Added.
(WI.ShaderProgram.prototype.get programType): Added.
(WI.ShaderProgram.prototype.get displayName):
(WI.ShaderProgram.prototype.set disabled):
(WI.ShaderProgram.prototype.requestShaderSource):
(WI.ShaderProgram.prototype.updateShader):
(WI.ShaderProgram.prototype.showHighlight):
(WI.ShaderProgram.prototype.hideHighlight):
(WI.ShaderProgram.prototype.requestVertexShaderSource): Deleted.
(WI.ShaderProgram.prototype.requestFragmentShaderSource): Deleted.
(WI.ShaderProgram.prototype.updateVertexShader): Deleted.
(WI.ShaderProgram.prototype.updateFragmentShader): Deleted.
(WI.ShaderProgram.prototype._requestShaderSource): Deleted.
(WI.ShaderProgram.prototype._updateShader): Deleted.
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView):
(WI.ShaderProgramContentView.prototype.get navigationItems): Added.
(WI.ShaderProgramContentView.prototype.shown):
(WI.ShaderProgramContentView.prototype.hidden):
(WI.ShaderProgramContentView.prototype.get saveData):
(WI.ShaderProgramContentView.prototype._refreshContent):
(WI.ShaderProgramContentView.prototype._updateShader):
(WI.ShaderProgramContentView.prototype._contentDidChange):
* UserInterface/Views/ShaderProgramContentView.css:
(.content-view.shader-program > .shader): Added.
(.content-view.shader-program > .shader.compute): Added.
(body[dir=ltr] .content-view.shader-program > .shader.vertex,): Added.
(body[dir=ltr] .content-view.shader-program > .shader.fragment,): Added.
(.content-view.shader-program > .shader + .shader): Added.
(.content-view.shader-program > .shader > header > *): Added.
(.content-view.shader-program > .shader > header > .shader-type): Added.
(@media (prefers-color-scheme: dark) .content-view.shader-program > .shader > header): Added.
(.content-view.shader-program > .text-editor.shader): Deleted.
(body[dir=ltr] .content-view.shader-program > .text-editor.shader.vertex,): Deleted.
(body[dir=ltr] .content-view.shader-program > .text-editor.shader.fragment,): Deleted.
(body[dir=ltr] .content-view.shader-program > .text-editor.shader + .text-editor.shader): Deleted.
(body[dir=rtl] .content-view.shader-program > .text-editor.shader + .text-editor.shader): Deleted.
(.content-view.shader-program > .text-editor.shader > .type-title): Deleted.
(.content-view.shader-program > .text-editor.shader > .CodeMirror): Deleted.
* UserInterface/Views/CodeMirrorAdditions.js:
* UserInterface/Views/ShaderProgramTreeElement.js:
(WI.ShaderProgramTreeElement):
(WI.ShaderProgramTreeElement.prototype.onattach):
(WI.ShaderProgramTreeElement.prototype.ondetach):
(WI.ShaderProgramTreeElement.prototype.canSelectOnMouseDown):
(WI.ShaderProgramTreeElement.prototype.populateContextMenu):
* Localizations/en.lproj/localizedStrings.js:
2019-09-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve the Uncaught Exception View file a bug link
https://bugs.webkit.org/show_bug.cgi?id=201717
Reviewed by Devin Rousso.
* UserInterface/Debug/UncaughtExceptionReporter.js:
Allow the link to be clicked. Use openInNewTab on click to also
bring the new tab to the foreground. Also update the content.
2019-09-20 Devin Rousso <drousso@apple.com>
Web Inspector: HTML Formatter - better indentation/newline handling for self closing tags
https://bugs.webkit.org/show_bug.cgi?id=202036
Reviewed by Joseph Pecoraro.
* UserInterface/Workers/Formatter/HTMLFormatter.js:
(HTMLFormatter.prototype._before):
2019-09-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove BranchManager in favor of just using currentRevision
https://bugs.webkit.org/show_bug.cgi?id=202000
Reviewed by Devin Rousso.
Remove BranchManager. The Branch concept never got fleshed out, and would
likely be too complex for the average case. Local Overrides are simpler.
In the interest of expanding Local Overrides to more content lets simply
by removing Branches.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WI.loaded):
* UserInterface/Controllers/BranchManager.js: Removed.
* 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/Main.html:
* UserInterface/Models/Branch.js: Removed.
* UserInterface/Models/SourceCode.js:
(WI.SourceCode.prototype._processContent):
(WI.SourceCode):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype._textEditorContentDidChange):
2019-09-20 Truitt Savell <tsavell@apple.com>
Unreviewed, rolling out r250114.
Broke ~16 webgpu/ tests on Mojave wk2
Reverted changeset:
"Web Inspector: Canvas: show WebGPU shader pipelines"
https://bugs.webkit.org/show_bug.cgi?id=201675
https://trac.webkit.org/changeset/250114
2019-09-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: searching in overrides doesn't work
https://bugs.webkit.org/show_bug.cgi?id=202020
Reviewed by Devin Rousso.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch):
Do not go to agents for a local resource. Search locally in the TextEditor.
2019-09-19 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: show WebGPU shader pipelines
https://bugs.webkit.org/show_bug.cgi?id=201675
Reviewed by Joseph Pecoraro.
Show WebGPU shader pipelines ("programs") underneath each corresponding WebGPU device.
Allow editing of attached shader modules for each WebGPU shader pipeline, but don't allow
highlighting/disabling, as WebGPU pipelines don't have those capabilities/concepts yet.
* UserInterface/Protocol/CanvasObserver.js:
(WI.CanvasObserver.prototype.programCreated):
* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.programCreated):
* UserInterface/Models/Canvas.js:
(WI.Canvas.prototype.nextShaderProgramDisplayNumberForProgramType): Added.
(WI.Canvas.prototype.nextShaderProgramDisplayNumber): Deleted.
* UserInterface/Models/ShaderProgram.js:
(WI.ShaderProgram):
(WI.ShaderProgram.contextTypeSupportsProgramType): Added.
(WI.ShaderProgram.programTypeSupportsShaderType): Added.
(WI.ShaderProgram.prototype.get programType): Added.
(WI.ShaderProgram.prototype.get displayName):
(WI.ShaderProgram.prototype.set disabled):
(WI.ShaderProgram.prototype.requestShaderSource):
(WI.ShaderProgram.prototype.updateShader):
(WI.ShaderProgram.prototype.showHighlight):
(WI.ShaderProgram.prototype.hideHighlight):
(WI.ShaderProgram.prototype.requestVertexShaderSource): Deleted.
(WI.ShaderProgram.prototype.requestFragmentShaderSource): Deleted.
(WI.ShaderProgram.prototype.updateVertexShader): Deleted.
(WI.ShaderProgram.prototype.updateFragmentShader): Deleted.
(WI.ShaderProgram.prototype._requestShaderSource): Deleted.
(WI.ShaderProgram.prototype._updateShader): Deleted.
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView):
(WI.ShaderProgramContentView.prototype.get navigationItems): Added.
(WI.ShaderProgramContentView.prototype.shown):
(WI.ShaderProgramContentView.prototype.hidden):
(WI.ShaderProgramContentView.prototype.get saveData):
(WI.ShaderProgramContentView.prototype._refreshContent):
(WI.ShaderProgramContentView.prototype._updateShader):
(WI.ShaderProgramContentView.prototype._contentDidChange):
* UserInterface/Views/ShaderProgramContentView.css:
(.content-view.shader-program > .shader): Added.
(.content-view.shader-program > .shader.compute): Added.
(body[dir=ltr] .content-view.shader-program > .shader.vertex,): Added.
(body[dir=ltr] .content-view.shader-program > .shader.fragment,): Added.
(.content-view.shader-program > .shader + .shader): Added.
(.content-view.shader-program > .shader > header > *): Added.
(.content-view.shader-program > .shader > header > .shader-type): Added.
(@media (prefers-color-scheme: dark) .content-view.shader-program > .shader > header): Added.
(.content-view.shader-program > .text-editor.shader): Deleted.
(body[dir=ltr] .content-view.shader-program > .text-editor.shader.vertex,): Deleted.
(body[dir=ltr] .content-view.shader-program > .text-editor.shader.fragment,): Deleted.
(body[dir=ltr] .content-view.shader-program > .text-editor.shader + .text-editor.shader): Deleted.
(body[dir=rtl] .content-view.shader-program > .text-editor.shader + .text-editor.shader): Deleted.
(.content-view.shader-program > .text-editor.shader > .type-title): Deleted.
(.content-view.shader-program > .text-editor.shader > .CodeMirror): Deleted.
* UserInterface/Views/CodeMirrorAdditions.js:
* UserInterface/Views/ShaderProgramTreeElement.js:
(WI.ShaderProgramTreeElement):
(WI.ShaderProgramTreeElement.prototype.onattach):
(WI.ShaderProgramTreeElement.prototype.ondetach):
(WI.ShaderProgramTreeElement.prototype.canSelectOnMouseDown):
(WI.ShaderProgramTreeElement.prototype.populateContextMenu):
* Localizations/en.lproj/localizedStrings.js:
2019-09-18 Devin Rousso <drousso@apple.com>
Web Inspector: Better handling for large arrays and collections in Object Trees
https://bugs.webkit.org/show_bug.cgi?id=143589
<rdar://problem/16135388>
Reviewed by Joseph Pecoraro.
Adds two buttons before the "Prototype" item in expanded object/collection previews:
- Show %d More
- Show All (%d More)
The default `fetchCount` increment is `100`. The first button will only be shown if there
are more than `100` items remaining (haven't been shown).
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype.getPropertyDescriptors):
(WI.RemoteObject.prototype.getDisplayablePropertyDescriptors):
(WI.RemoteObject.prototype.getCollectionEntries):
(WI.RemoteObject.prototype.getOwnPropertyDescriptor.wrappedCallback):
(WI.RemoteObject.prototype._getProperties): Added.
(WI.RemoteObject.prototype._getDisplayableProperties): Added.
* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView):
(WI.ObjectTreeView.showMoreFetchCount): Added.
(WI.ObjectTreeView.addShowMoreIfNeeded): Added.
(WI.ObjectTreeView.prototype.update):
(WI.ObjectTreeView.prototype._updateChildren):
(WI.ObjectTreeView.prototype._updateEntries):
(WI.ObjectTreeView.prototype._updateProperties):
* UserInterface/Views/ObjectTreeView.css:
(.tree-outline.object li > button[disabled] + .indeterminate-progress-spinner): Added.
Avoid duplicating the button creation logic in `WI.ObjectTreePropertyTreeElement` by using a
`static` function. This expects the existence of and requires access to "private" values.
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WI.ObjectTreePropertyTreeElement):
(WI.ObjectTreePropertyTreeElement.prototype.onpopulate):
(WI.ObjectTreePropertyTreeElement.prototype._updateChildren):
(WI.ObjectTreePropertyTreeElement.prototype._updateEntries):
(WI.ObjectTreePropertyTreeElement.prototype._updateProperties):
(WI.ObjectTreePropertyTreeElement.prototype._updateChildrenInternal): Deleted.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedArrayPropertyNames): Deleted.
* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype.getPropertiesForRemoteObject): Deleted.
Remove unused function.
* Localizations/en.lproj/localizedStrings.js:
2019-09-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: console assertion when pressing up/down in empty console log view
https://bugs.webkit.org/show_bug.cgi?id=201948
Reviewed by Devin Rousso.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._upArrowWasPressed):
(WI.LogContentView.prototype._downArrowWasPressed):
Ensure that a message exists before calling `_updateMessagesSelection`, which
would assert if given a bad message. Additionally, only perform preventDefault
when selecting a message. This allows us to fall back to a system beep if
this key event does nothing.
2019-09-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: HTML Formatter - better handling for HTML specific tag cases (<p>/<li>)
https://bugs.webkit.org/show_bug.cgi?id=201757
<rdar://problem/55409987>
Reviewed by Devin Rousso.
* UserInterface/Workers/Formatter/HTMLFormatter.js:
(HTMLFormatter.prototype._after):
Handle a closing tag with different text than the opening tag.
* UserInterface/Workers/Formatter/HTMLTreeBuilderFormatter.js:
(HTMLTreeBuilderFormatter.prototype._pushParserNodeTopLevel):
(HTMLTreeBuilderFormatter.prototype._pushParserNodeStack):
(HTMLTreeBuilderFormatter.prototype._implicitlyCloseHTMLNodesForOpenTag):
(HTMLTreeBuilderFormatter.prototype._implicitlyCloseTagNamesInsideParentTagNames):
(HTMLTreeBuilderFormatter.prototype._indexOfStackNodeMatchingTagNames):
Generalize the implicit closing a bit. Allow open tags to implicitly
close certain other open tags in the stack.
2019-09-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: HTML Formatter - XML mode
https://bugs.webkit.org/show_bug.cgi?id=201758
Reviewed by Devin Rousso.
* Tools/HTMLFormatter/index.html:
* Tools/SourceMaps/index.html:
Update Tools to more easily test XML.
* UserInterface/Proxies/FormatterWorkerProxy.js:
(WI.FormatterWorkerProxy.prototype.formatXML):
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype.hasFormatter):
(WI.TextEditor.prototype._startWorkerPrettyPrint):
Allow formatting XML content.
* UserInterface/Workers/Formatter/FormatterWorker.js:
(FormatterWorker.prototype.formatHTML):
(FormatterWorker.prototype.formatXML):
Expose "formatXML".
* UserInterface/Workers/Formatter/HTMLFormatter.js:
(HTMLFormatter.let.dom):
(HTMLFormatter):
(HTMLFormatter.prototype._shouldHaveNoChildren):
(HTMLFormatter.prototype._before):
(HTMLFormatter.prototype._after):
* UserInterface/Workers/Formatter/HTMLParser.js:
(HTMLParser.prototype.parseDocument):
* UserInterface/Workers/Formatter/HTMLTreeBuilderFormatter.js:
(HTMLTreeBuilderFormatter.prototype._isEmptyNode):
Give the HTMLFormatter and related classes an XML mode that
has less of the smarts of XML.
2019-09-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: HTML Formatting: Handle infinite loop for incomplete script data
https://bugs.webkit.org/show_bug.cgi?id=201769
Reviewed by Devin Rousso.
* UserInterface/Workers/Formatter/HTMLParser.js:
(HTMLParser):
Handle EOF in the script data's loop.
Better handle EOF at the end of text data.
2019-09-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Improve auto completion typing performance by avoiding global forced layouts
https://bugs.webkit.org/show_bug.cgi?id=201735
Reviewed by Devin Rousso.
* UserInterface/Views/Main.css:
(#layout-measurement-container):
* UserInterface/Base/Main.js:
(WI.measureElement):
Provide a helper for measuring an element in a hidden container
that helps avoid more global layout.
* UserInterface/Views/CompletionSuggestionsView.js:
(WI.CompletionSuggestionsView.prototype.show):
Use measure element to avoid a global forced layout.
2019-09-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Tighter autocomplete bubbles
https://bugs.webkit.org/show_bug.cgi?id=201742
Reviewed by Timothy Hatcher.
* UserInterface/Views/CompletionSuggestionsView.js:
(WI.CompletionSuggestionsView.prototype.show):
Eliminate the trailing space. Use bounding client rect to get
fractional widths and raise the value so we are at an even number.
2019-09-13 Joseph Pecoraro <pecoraro@apple.com>
REGRESSION: Web Inspector: Layout Timeline View does not show popover for initiator data
https://bugs.webkit.org/show_bug.cgi?id=201732
<rdar://problem/55312339>
Reviewed by Devin Rousso.
* UserInterface/Views/LayoutTimelineDataGrid.js:
(WI.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
(WI.LayoutTimelineDataGrid.prototype.shouldShowCallFramePopover):
The column name was incorrect.
2019-09-13 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: null is not an object (evaluating 'Object.keys(propertyNames)​')​ (at JavaScriptRuntimeCompletionProvider.js:​244:​57)​
https://bugs.webkit.org/show_bug.cgi?id=201729
Reviewed by Devin Rousso.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
Don't clear the completion object group until all ongoing requests have completed.
Percision for the lifetime of the object group objects is not important, but we
surely don't want to delete an object too soon.
2019-09-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Formatter: Pretty Print HTML resources (including inline <script>/<style>)
https://bugs.webkit.org/show_bug.cgi?id=201535
<rdar://problem/29119232>
Reviewed by Devin Rousso.
Introduce HTMLFormatter, HTMLParser, and HTMLTreeBuilderFormatter.
- HTMLParser tokenizes HTML content and passes it to a tree builder.
- HTMLTreeBuilderFormatter uses those tokens to create a formatted dom tree of fake nodes.
- HTMLFormatter then builds formatted content and a FormatterSourceMap from that DOM tree.
The output of HTMLFormatter is intended to just modify whitespace. So it won't be a
100% compatible DOM, but will be useful for debugging and reading inline <style>
and <script>, which is a more common debugging scenario. It also maintains original
author attribute quotations or lack therefore, because again it tries to only
change whitespace. A separate tree builder could be used for tidying content.
This introduces a few tools for working with formatting:
- Tools/HTMLFormatter - debug the parser, tree builder, and output format
- Tools/SourceMaps - debug formatted content and source mappings
This also:
- renames "EsprimaFormatter" to "JSFormatter"
- eliminates an extra trailing newline in CSSFormatter output
* Tools/HTMLFormatter/HTMLTreeBuilderDebug.js: Added.
* Tools/HTMLFormatter/index.html: Added.
* Tools/HTMLFormatter/styles.css: Added.
Tool for debugging the HTML formatter components.
* Tools/SourceMaps/.gitignore: Added.
* Tools/SourceMaps/index.html: Added.
* Tools/SourceMaps/setup.sh: Added.
* Tools/SourceMaps/styles.css: Added.
Tool for debugging Formatter generated Source Maps.
* Tools/JSFormatter/JSFormatterDebug.js: Renamed from Source/WebInspectorUI/Tools/Formatting/EsprimaFormatterDebug.js.
* Tools/JSFormatter/codemirror-additions.css: Renamed from Source/WebInspectorUI/Tools/Formatting/codemirror-additions.css.
* Tools/JSFormatter/index.html: Renamed from Source/WebInspectorUI/Tools/Formatting/index.html.
Renamed this tool. EsprimaFormatter => JSFormatter.
* UserInterface/Controllers/FormatterSourceMap.js:
(WI.FormatterSourceMap.prototype.originalPositionToFormattedPosition):
(WI.FormatterSourceMap.prototype.formattedPositionToOriginalPosition):
New APIs used by tools and tests for translating "position" offsets and not line/columns.
* UserInterface/Workers/Formatter/JSFormatter.js: Renamed from Source/WebInspectorUI/UserInterface/Workers/Formatter/EsprimaFormatter.js.
(JSFormatter):
* UserInterface/Workers/Formatter/CSSFormatter.js:
(CSSFormatter):
Allow using a supplied builder, which is useful when formatting
inline content from HTMLFormatter (<style> / <script>).
* UserInterface/Workers/Formatter/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype.get indentString):
(FormatterContentBuilder.prototype.get originalContent):
(FormatterContentBuilder.prototype.get indentLevel):
(FormatterContentBuilder.prototype.get originalOffset):
(FormatterContentBuilder.prototype.set originalOffset):
(FormatterContentBuilder.prototype.appendNonToken):
(FormatterContentBuilder.prototype.appendToken):
(FormatterContentBuilder.prototype.appendTokenWithPossibleNewlines):
(FormatterContentBuilder.prototype.appendMapping):
(FormatterContentBuilder.prototype.indentToLevel):
(FormatterContentBuilder.prototype.finish):
Provide API for getting / setting the original offset and indent level.
This is useful when the HTMLFormatter runs the CSSFormatter/JSFormatter
in a nested context (<style> / <script>). Add a few more APIs for
conveniences when appending tokens or important positions.
* UserInterface/Workers/Formatter/HTMLParser.js: Added.
(HTMLParser.prototype.parseDocument):
(HTMLParser.prototype._isEOF):
(HTMLParser.prototype._peek):
(HTMLParser.prototype._peekCharacterRegex):
(HTMLParser.prototype._peekString):
(HTMLParser.prototype._peekCaseInsensitiveString):
(HTMLParser.prototype._consumeWhitespace):
(HTMLParser.prototype._consumeUntilString):
(HTMLParser.prototype._consumeUntilRegex):
(HTMLParser.prototype._consumeDoubleQuotedString):
(HTMLParser):
Tokenize HTML content into nodes.
* UserInterface/Workers/Formatter/HTMLTreeBuilderFormatter.js: Added.
(HTMLTreeBuilderFormatter.prototype.get dom):
(HTMLTreeBuilderFormatter.prototype.begin):
(HTMLTreeBuilderFormatter.prototype.pushParserNode):
(HTMLTreeBuilderFormatter.prototype.end):
(HTMLTreeBuilderFormatter.prototype._pushParserNodeTopLevel):
(HTMLTreeBuilderFormatter.prototype._pushParserNodeStack):
(HTMLTreeBuilderFormatter.prototype._isEmptyNode):
(HTMLTreeBuilderFormatter.prototype._buildDOMNodeFromOpenTag):
(HTMLTreeBuilderFormatter.prototype._buildErrorNodeFromCloseTag):
(HTMLTreeBuilderFormatter.prototype._buildSimpleNodeFromParserNode):
(HTMLTreeBuilderFormatter):
Build a simple DOM tree from parser nodes.
* UserInterface/Workers/Formatter/HTMLFormatter.js: Added.
(HTMLFormatter.let.dom):
(HTMLFormatter):
(HTMLFormatter.prototype.get success):
(HTMLFormatter.prototype.get formattedText):
(HTMLFormatter.prototype.get sourceMapData):
(HTMLFormatter.prototype._walk):
(HTMLFormatter.prototype._walkChildren):
(HTMLFormatter.prototype._isNodeSelfClosing):
(HTMLFormatter.prototype._shouldHaveInlineContent):
(HTMLFormatter.prototype._hasMultipleNewLines):
(HTMLFormatter.prototype._buildAttributeString):
(HTMLFormatter.prototype._before):
(HTMLFormatter.prototype._after):
(HTMLFormatter.prototype._formatWithNestedFormatter):
(HTMLFormatter.prototype._formatScript):
(HTMLFormatter.prototype._formatStyle):
Output pretty printed text from a HTMLTreeBuilderFormatter dom tree.
* UserInterface/Proxies/FormatterWorkerProxy.js:
(WI.FormatterWorkerProxy.prototype.formatHTML):
* UserInterface/Workers/Formatter/FormatterWorker.js:
(FormatterWorker.prototype.formatJavaScript):
(FormatterWorker.prototype.formatCSS):
(FormatterWorker.prototype.formatHTML):
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype.hasFormatter):
(WI.TextEditor.prototype._canUseFormatterWorker):
(WI.TextEditor.prototype._startWorkerPrettyPrint):
Allow pretty printing HTML resources.
* UserInterface/Main.html:
* UserInterface/Test.html:
New resources.
2019-09-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: [Overrides] Command-Z doesn't undo changes after page reload
https://bugs.webkit.org/show_bug.cgi?id=201698
<rdar://problem/55276645>
Reviewed by Devin Rousso.
* UserInterface/Views/ContentViewContainer.js:
(WI.ContentViewContainer.prototype.closeAllContentViews):
Provide a filter to opt out of closing some content views.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._closeContentViewsFilter):
(WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
Avoid closing ContentViews for local resource overrides. This keeps the
SourceCodeTextEditor around and thus its undo/redo stack.
2019-09-12 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: TypeError: null is not an object (evaluating 'selectedTreeElement.representedObject')
https://bugs.webkit.org/show_bug.cgi?id=201716
<rdar://problem/55292615>
Reviewed by Devin Rousso.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
If a breakpoint was removed without a selection in the breakpoint tree outline
then there may be no selected tree element.
2019-09-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION: Inspector Timeline always starts at about 500ms mark on a reload
https://bugs.webkit.org/show_bug.cgi?id=200637
<rdar://problem/54218967>
Reviewed by Devin Rousso.
The Timeline was getting a startTime value from before the user started
the timeline recording because of artificial adjustments that were made
to CPUTimelineRecords. Ignore adjusted values when updating the Timeline's
start and end times.
* UserInterface/Models/Timeline.js:
(WI.Timeline.prototype._updateTimesIfNeeded):
Use unadjusted times, which should fall in the user started / stopped
timeline range.
* UserInterface/Models/TimelineRecord.js:
(WI.TimelineRecord.prototype.get unadjustedStartTime):
(WI.TimelineRecord.prototype.get unadjustedEndTime):
Default implementation uses startTime/endTime.
* UserInterface/Models/CPUTimelineRecord.js:
(WI.CPUTimelineRecord.prototype.get unadjustedStartTime):
* UserInterface/Models/MemoryTimelineRecord.js:
(WI.MemoryTimelineRecord.prototype.get unadjustedStartTime):
Each of these adjusted their startTime.
2019-09-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: REGRESSION: CPU: Overlay Markers for Thread views are off by 500ms
https://bugs.webkit.org/show_bug.cgi?id=201709
<rdar://problem/55289279>
Reviewed by Devin Rousso.
* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype.layout):
Use the CPUTimelineRecord's timestamp (same as the record's endTime) as the
point when the CPU sample is taken. This aligns with the rest of the UI that
assumes that the 500ms before the sample point leads up to the sample value.
2019-09-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Do not show override actions unless Sources tab is enabled
https://bugs.webkit.org/show_bug.cgi?id=201708
Reviewed by Devin Rousso.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.supportsLocalResourceOverrides):
2019-09-11 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: checkerboard has too much contrast in dark mode
https://bugs.webkit.org/show_bug.cgi?id=201670
Reviewed by Timothy Hatcher.
* UserInterface/Views/CanvasTabContentView.css:
(.content-view.canvas > .preview > img, .content-view.canvas .preview-container > canvas): Deleted.
Don't force a `background-color: white;` in dark mode.
2019-09-11 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Elements: don't show Changes panel when selecting text node
https://bugs.webkit.org/show_bug.cgi?id=201669
Reviewed by Joseph Pecoraro.
Show Changes panel only for elements regardless of "Show only for selected node" setting.
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
(WI.ChangesDetailsSidebarPanel.prototype.supportsDOMNode):
(WI.ChangesDetailsSidebarPanel.prototype.inspect): Deleted.
2019-09-11 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: instrument WebGPUDevice instead of GPUCanvasContext
https://bugs.webkit.org/show_bug.cgi?id=201650
Reviewed by Joseph Pecoraro.
Most of the actual "work" done with Web GPU actually uses a `WebGPUDevice`.
A `GPUCanvasContext` is basically just a display "client" of the device, and isn't even
required (e.g. compute pipeline). We should treat the `GPUCanvasContext` almost like a
`-webkit-canvas` client of a `WebGPUDevice`.
* UserInterface/Protocol/CanvasObserver.js:
(WI.CanvasObserver.prototype.clientNodesChanged): Added.
(WI.CanvasObserver.prototype.cssCanvasClientNodesChanged):
* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.clientNodesChanged): Added.
(WI.CanvasManager.prototype.cssCanvasClientNodesChanged): Deleted.
* UserInterface/Models/Canvas.js:
(WI.Canvas.resetUniqueDisplayNameNumbers):
(WI.Canvas.prototype.get displayName):
(WI.Canvas.prototype.requestNode):
(WI.Canvas.prototype.requestClientNodes): Added.
(WI.Canvas.prototype.requestSize):
(WI.Canvas.prototype.clientNodesChanged): Added.
(WI.Canvas.prototype.requestCSSCanvasClientNodes): Deleted.
(WI.Canvas.prototype.cssCanvasClientNodesChanged): Deleted.
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.resolveCanvasContext):
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.attached):
(WI.CanvasContentView.prototype._refreshPixelSize):
* UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WI.CanvasDetailsSidebarPanel.prototype.set canvas):
(WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WI.CanvasDetailsSidebarPanel.prototype.layout):
(WI.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):
(WI.CanvasDetailsSidebarPanel.prototype._refreshClientsSection): Added.
(WI.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection): Deleted.
* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype._contentViewMouseEnter):
* UserInterface/Views/CanvasTreeElement.js:
(WI.CanvasTreeElement.prototype._handleMouseOver):
* Localizations/en.lproj/localizedStrings.js:
2019-09-11 Truitt Savell <tsavell@apple.com>
Unreviewed, rolling out r249753.
caused inspector/canvas/shaderProgram-add-remove-webgl.html to
crash on all Mac platforms.
Reverted changeset:
"Web Inspector: Canvas: instrument WebGPUDevice instead of
GPUCanvasContext"
https://bugs.webkit.org/show_bug.cgi?id=201650
https://trac.webkit.org/changeset/249753
2019-09-10 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: instrument WebGPUDevice instead of GPUCanvasContext
https://bugs.webkit.org/show_bug.cgi?id=201650
Reviewed by Joseph Pecoraro.
Most of the actual "work" done with Web GPU actually uses a `WebGPUDevice`.
A `GPUCanvasContext` is basically just a display "client" of the device, and isn't even
required (e.g. compute pipeline). We should treat the `GPUCanvasContext` almost like a
`-webkit-canvas` client of a `WebGPUDevice`.
* UserInterface/Protocol/CanvasObserver.js:
(WI.CanvasObserver.prototype.clientNodesChanged): Added.
(WI.CanvasObserver.prototype.cssCanvasClientNodesChanged):
* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.clientNodesChanged): Added.
(WI.CanvasManager.prototype.cssCanvasClientNodesChanged): Deleted.
* UserInterface/Models/Canvas.js:
(WI.Canvas.resetUniqueDisplayNameNumbers):
(WI.Canvas.prototype.get displayName):
(WI.Canvas.prototype.requestNode):
(WI.Canvas.prototype.requestClientNodes): Added.
(WI.Canvas.prototype.requestSize):
(WI.Canvas.prototype.clientNodesChanged): Added.
(WI.Canvas.prototype.requestCSSCanvasClientNodes): Deleted.
(WI.Canvas.prototype.cssCanvasClientNodesChanged): Deleted.
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.resolveCanvasContext):
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.attached):
(WI.CanvasContentView.prototype._refreshPixelSize):
* UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WI.CanvasDetailsSidebarPanel.prototype.set canvas):
(WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WI.CanvasDetailsSidebarPanel.prototype.layout):
(WI.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):
(WI.CanvasDetailsSidebarPanel.prototype._refreshClientsSection): Added.
(WI.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection): Deleted.
* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype._contentViewMouseEnter):
* UserInterface/Views/CanvasTreeElement.js:
(WI.CanvasTreeElement.prototype._handleMouseOver):
* Localizations/en.lproj/localizedStrings.js:
2019-09-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove legacy CodeMirror based pretty printers
https://bugs.webkit.org/show_bug.cgi?id=201624
Reviewed by Devin Rousso.
* Tools/PrettyPrinting/FormatterDebug.js: Removed.
* Tools/PrettyPrinting/Utilities.js: Removed.
* Tools/PrettyPrinting/codemirror-additions.css: Removed.
* Tools/PrettyPrinting/index.html: Removed.
* Tools/PrettyPrinting/populate/apple.css: Removed.
* UserInterface/Controllers/Formatter.js: Removed.
* UserInterface/Main.html:
* UserInterface/Test.html:
* UserInterface/Views/CodeMirrorFormatters.js: Removed.
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype.prettyPrint):
(WI.TextEditor.prototype._canUseFormatterWorker): Deleted.
(WI.TextEditor.prototype._startCodeMirrorPrettyPrint): Deleted.
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
2019-09-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Dark Mode: Overview Timeline View has jarring white box-shadows in dark mode
https://bugs.webkit.org/show_bug.cgi?id=201442
<rdar://problem/54999794>
Reviewed by Devin Rousso.
* UserInterface/Views/DataGrid.css:
(.data-grid:not(.variable-height-rows) table.data):
(.data-grid:not(.variable-height-rows) table.data.even-first-zebra-stripe):
(.data-grid.variable-height-rows.even-first-zebra-stripe table.data tr:nth-child(odd)):
(.data-grid.variable-height-rows.even-first-zebra-stripe table.data tr:nth-child(even)):
(.data-grid:not(.variable-height-rows) table.data.odd-first-zebra-stripe): Deleted.
(.data-grid.variable-height-rows.odd-first-zebra-stripe table.data tr:nth-child(odd)): Deleted.
(.data-grid.variable-height-rows.odd-first-zebra-stripe table.data tr:nth-child(even)): Deleted.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.updateVisibleRows):
* UserInterface/Views/Table.css:
(.table > .data-container > .data-list):
(.table > .data-container > .data-list.even-first-zebra-stripe):
(.table > .data-container > .data-list.odd-first-zebra-stripe): Deleted.
* UserInterface/Views/Table.js:
In the gradients "even" was mistakenly first. Fix these so that "odd" is first and the
unusual case would be having "even" first. This allows us to line up with `nth-of-type(even)`.
* UserInterface/Views/Main.css:
(:root):
(@media (prefers-color-scheme: dark)):
Flip even and odd so we maintain the same styles for gradients.
* UserInterface/Views/OverviewTimelineView.css:
(.timeline-view.overview > .data-grid tr):
(.timeline-view.overview > .data-grid tr:nth-child(even)):
(.timeline-view.overview > .data-grid tr.parent:not(.expanded) td.graph-column .timeline-record-bar:not(.has-inactive-segment) > .segment):
(.timeline-view.overview > .data-grid tr.parent:not(.expanded).selected td.graph-column .timeline-record-bar:not(.has-inactive-segment) > .segment):
(.timeline-view.overview > .data-grid tr.parent:not(.expanded) td.graph-column .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(.timeline-view.overview > .data-grid tr.parent:not(.expanded).selected td.graph-column .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(@media (prefers-color-scheme: dark)):
(WI.Table.prototype._updateVisibleRows):
* UserInterface/Views/Variables.css:
2019-09-06 Devin Rousso <drousso@apple.com>
Web Inspector: CSS Formatter: the closing } of nested @media aren't indented
https://bugs.webkit.org/show_bug.cgi?id=201560
Reviewed by Joseph Pecoraro.
* UserInterface/Workers/Formatter/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype.removeLastNewline):
It's possible that there were multiple newlines in a row, so we should update `_startOfLine`
to be `true` if the previous line was empty.
2019-09-06 Devin Rousso <drousso@apple.com>
Web Inspector: CSS Formatter: links to CSS resources don't map to the right line after pretty printing if the line is after a multiline comment
https://bugs.webkit.org/show_bug.cgi?id=201559
Reviewed by Joseph Pecoraro.
Newlines in multiline comments weren't added as line endings, so they weren't considered
when a source code location updated after pretty printing.
* UserInterface/Workers/Formatter/CSSFormatter.js:
(CSSFormatter.prototype._format):
2019-09-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Better position for Sources tab when enabling the experimental setting
https://bugs.webkit.org/show_bug.cgi?id=201539
Reviewed by Devin Rousso.
* UserInterface/Views/SettingsTabContentView.js:
Place the Sources tab where the Debugger tab was.
2019-09-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Network: Error response headers summary has wrong color border
https://bugs.webkit.org/show_bug.cgi?id=201538
<rdar://problem/55104469>
Reviewed by Devin Rousso.
* UserInterface/Views/ResourceHeadersContentView.css:
(body[dir] .resource-headers > section.error > .details):
Re-apply an error style for resource-header sections.
2019-09-04 Devin Rousso <drousso@apple.com>
Web Inspector: unify the interaction of show/hide status icons in Sources and Canvas
https://bugs.webkit.org/show_bug.cgi?id=201470
Reviewed by Joseph Pecoraro.
Rather than "fading" the tree element's text when the underlying represented object is
disabled/blackboxed, we should just "fade" the icon. The "fade" shouldn't change when the
tree element is selected. The image of the status eye also shouldn't change depending on
whether the underlying represented object is disabled/blackboxed, as it being visible (even
if it's "faded") is already enough of an indicator.
It should also be possible to toggle the disabled/blackboxed state via the context menu.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):
* UserInterface/Views/SourceCodeTreeElement.css:
(.tree-outline:not(.navigation-sidebar-panel-content-tree-outline) .item .status > .toggle-script-blackboxed, .tree-outline .item:not(:hover) .status > .toggle-script-blackboxed:not(.blackboxed)): Added.
(.tree-outline:not(.navigation-sidebar-panel-content-tree-outline) .item .status > .toggle-script-blackboxed, .tree-outline .item:not(:hover, .selected) .status > .toggle-script-blackboxed:not(.blackboxed)): Deleted.
* UserInterface/Models/ShaderProgram.js:
(WI.ShaderProgram):
(WI.ShaderProgram.prototype.get disabled): Added.
(WI.ShaderProgram.prototype.set disabled): Added.
(WI.ShaderProgram.prototype.toggleDisabled): Deleted.
* UserInterface/Views/ShaderProgramTreeElement.js:
(WI.ShaderProgramTreeElement.prototype.onattach):
(WI.ShaderProgramTreeElement.prototype.ondetach): Added.
(WI.ShaderProgramTreeElement.prototype.canSelectOnMouseDown):
(WI.ShaderProgramTreeElement.prototype.populateContextMenu): Added.
(WI.ShaderProgramTreeElement.prototype._disabledImageElementClicked):
(WI.ShaderProgramTreeElement.prototype._handleShaderProgramDisabledChanged): Added.
* UserInterface/Views/ShaderProgramTreeElement.css:
(.tree-outline .item.shader-program .status > img): Added.
(.tree-outline .item.shader-program:not(:hover, .selected, .disabled) .status > img): Added.
(.tree-outline .item.shader-program.disabled .status > img): Added.
(@media (prefers-color-scheme: dark) .tree-outline .item.shader-program .status > img): Added.
(.item.shader-program .status > img): Deleted.
(.item.shader-program.disabled:hover .status > img): Deleted.
(.item.shader-program:not(:hover, .selected, .disabled) .status > img): Deleted.
(.item.shader-program.disabled > :not(.status)): Deleted.
(@media (prefers-color-scheme: dark) .item.shader-program .status > img): Deleted.
2019-09-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Local Overrides - Provide substitution content for resource loads (URL based)
https://bugs.webkit.org/show_bug.cgi?id=201262
<rdar://problem/13108764>
Reviewed by Devin Rousso.
This adds a new "Local Overrides" section to the Sources tab sidebar
which will allow users to provide their own resource content for text
resources. Users can clone a resource, and provide their own content
(by editing in Web Inspector) and new requests for those particular
URLs will get the substitute content.
Overrides are based on a particular URL (ignoring fragment). They
can override: status code, status text, response headers, content,
and MIME Type (Content-Type).
* Tools/CodeMirrorModes/index.html: Added.
* Tools/CodeMirrorModes/styles.css: Added.
Debug tool for CodeMirror editors and our custom CodeMirror modes.
* UserInterface/Main.html:
* UserInterface/Test.html:
* Localizations/en.lproj/localizedStrings.js:
New files and strings.
* UserInterface/Base/HTTPUtilities.js: Added.
(WI.httpStatusTextForStatusCode):
Translate between typical status codes and status text.
* UserInterface/Base/ObjectStore.js:
(WI.ObjectStore._open):
New persistent store for local resource overrides.
* UserInterface/Base/Main.js:
(WI.showLocalResourceOverride):
Convenience for showing an override file.
* UserInterface/Base/URLUtilities.js:
(parseURL):
Avoid uncaught exceptions with the URL constructor for common WebKit internal sourceURL strings.
(WI.urlWithoutFragment):
Strip a fragment from a URL.
* UserInterface/Controllers/HARBuilder.js:
(WI.HARBuilder.fetchType):
(WI.HARBuilder.responseSourceFromHARFetchType):
Handle new custom response types.
* UserInterface/Protocol/NetworkObserver.js:
(WI.NetworkObserver.prototype.responseIntercepted):
(WI.NetworkObserver):
New events.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager):
(WI.NetworkManager.supportsLocalResourceOverrides):
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.get localResourceOverrides):
(WI.NetworkManager.prototype.get interceptionEnabled):
(WI.NetworkManager.prototype.set interceptionEnabled):
(WI.NetworkManager.prototype.addLocalResourceOverride):
(WI.NetworkManager.prototype.removeLocalResourceOverride):
(WI.NetworkManager.prototype.localResourceOverrideForURL):
(WI.NetworkManager.prototype.canBeOverridden):
(WI.NetworkManager.prototype.responseIntercepted):
(WI.NetworkManager.prototype._handleResourceContentDidChange):
(WI.NetworkManager.prototype._persistLocalResourceOverrideSoonAfterContentChange):
(WI.NetworkManager.prototype._saveLocalResourceOverrides):
(WI.NetworkManager.prototype._extraDomainsActivated):
(WI.NetworkManager.prototype.localResourceForURL): Deleted.
Handle saving and restoring local resource overrides.
Handle responding to a `responseIntercepted` Network protocol event.
* UserInterface/Models/LocalResource.js:
(WI.LocalResource.fromJSON):
(WI.LocalResource.prototype.toJSON):
(WI.LocalResource.prototype.get localContent):
(WI.LocalResource.prototype.get localContentIsBase64Encoded):
(WI.LocalResource.prototype.isLocalResourceOverride):
(WI.LocalResource.prototype.updateOverrideContent):
Allow a LocalResource to identify itself as an "override".
* UserInterface/Models/LocalResourceOverride.js: Added.
(WI.LocalResourceOverride.prototype.create):
(WI.LocalResourceOverride.fromJSON):
(WI.LocalResourceOverride.prototype.toJSON):
(WI.LocalResourceOverride.prototype.get url):
(WI.LocalResourceOverride.prototype.get localResource):
(WI.LocalResourceOverride.prototype.get disabled):
(WI.LocalResourceOverride.prototype.set disabled):
(WI.LocalResourceOverride.prototype.saveIdentityToCookie):
(WI.LocalResourceOverride):
Model object for a LocalResourceOverride. This has LocalResource content
and an enabled/disabled state.
* UserInterface/Models/Resource.js:
(WI.Resource.classNamesForResource):
(WI.Resource.responseSourceFromPayload):
(WI.Resource.prototype.isLocalResourceOverride):
(WI.Resource.prototype.async.createLocalResourceOverride):
(WI.Resource.classNameForResource): Deleted.
Convenience functions and icon updates.
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.prototype.canShowRepresentedObject):
* UserInterface/Views/ContentView.js:
(WI.ContentView.createFromRepresentedObject):
(WI.ContentView.resolvedRepresentedObjectForRepresentedObject):
(WI.ContentView.isViewable):
Handle new represented object type.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissLocalOverridePopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissEventBreakpointPopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissURLBreakpointPopover):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalResourceOverride):
(WI.SourcesNavigationSidebarPanel.prototype._removeLocalResourceOverride):
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideRemoved):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .warning-banner):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container, .local-overrides)):
(.sidebar > .panel.navigation.sources > .content > .local-overrides):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
Hide and show Local Overrides section.
* UserInterface/Views/LocalResourceOverrideTreeElement.css:
(.item.resource.override .status > div):
* UserInterface/Views/LocalResourceOverrideTreeElement.js: Added.
(WI.LocalResourceOverrideTreeElement):
(WI.LocalResourceOverrideTreeElement.prototype.canSelectOnMouseDown):
(WI.LocalResourceOverrideTreeElement.prototype.populateContextMenu):
(WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover):
TreeElement for a Local Resource Override.
* UserInterface/Views/CodeMirrorLocalOverrideURLMode.css:
(.cm-s-default .cm-local-override-url-bad-scheme):
(.cm-s-default .cm-local-override-url-fragment):
* UserInterface/Views/CodeMirrorLocalOverrideURLMode.js: Added.
(tokenBase):
(return.startState):
(return.token):
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
* UserInterface/Views/ContextMenu.js:
(WI.ContextMenu.prototype._itemSelected):
(WI.ContextMenu):
Better debugging for exceptions in context menu handlers.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):
(WI.appendContextMenuItemsForURL):
Context menu items for Local Resource Overrides.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.startEditingNode):
(WI.DataGrid.prototype._startEditingNodeAtColumnIndex):
(WI.DataGrid.prototype._startEditing):
(WI.DataGrid.prototype._contextMenuInDataTable):
* UserInterface/Views/DataGridNode.js:
(WI.DataGridNode):
(WI.DataGridNode.prototype.get editable):
(WI.DataGridNode.prototype.set editable):
Improve DataGrid editing functionality.
Allow a node to not be editable.
Allow adding a new node and starting to edit in one action.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject):
Do not provide overrides in the Debugger tab.
* UserInterface/Views/LocalResourceOverrideLabelView.css:
(.local-resource-override-label-view):
(.local-resource-override-label-view > div):
(.local-resource-override-label-view > div > .label):
(.local-resource-override-label-view > div > .url):
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/LocalResourceOverrideLabelView.js:
(WI.LocalResourceOverrideLabelView):
(WI.LocalResourceOverrideLabelView.prototype.initialLayout):
* UserInterface/Views/LocalResourceOverridePopover.css: Added.
(.popover .local-resource-override-popover-content):
(.popover .local-resource-override-popover-content > label.toggle):
(.popover .local-resource-override-popover-content > table):
(.popover .local-resource-override-popover-content > table > tr > th):
(.popover .local-resource-override-popover-content > table > tr > td):
(.popover .local-resource-override-popover-content .editor):
(.popover .local-resource-override-popover-content .editor > .CodeMirror):
(.popover .local-resource-override-popover-content .editor.url):
(.popover .local-resource-override-popover-content .editor.mime):
(.popover .local-resource-override-popover-content .editor.status):
(.popover .local-resource-override-popover-content .editor.status-text):
(.popover .local-resource-override-popover-content .add-header):
(@media (prefers-color-scheme: dark)):
New banner view for a local resource override itself.
Shows the URL being overriden.
* UserInterface/Views/LocalResourceOverrideWarningView.css:
(.local-resource-override-warning-view):
(.local-resource-override-warning-view[hidden]):
(.local-resource-override-warning-view > div):
(.local-resource-override-warning-view > div > button):
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/LocalResourceOverrideWarningView.js: Added.
(WI.LocalResourceOverrideWarningView):
(WI.LocalResourceOverrideWarningView.prototype.attached):
(WI.LocalResourceOverrideWarningView.prototype.detached):
(WI.LocalResourceOverrideWarningView.prototype._updateContent):
(WI.LocalResourceOverrideWarningView.prototype._handleLocalResourceOverrideChanged):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.pruneStaleResourceTreeElements):
New banner view for a resource that has been overridden.
Allows jumping to the override itself.
* UserInterface/Views/LocalResourceOverridePopover.js: Added.
(WI.LocalResourceOverridePopover):
(WI.LocalResourceOverridePopover.prototype.get serializedData):
(WI.LocalResourceOverridePopover.prototype.show.addDataGridNodeForHeader):
(WI.LocalResourceOverridePopover.prototype.show):
(WI.LocalResourceOverridePopover.prototype._createEditor):
(WI.LocalResourceOverridePopover.prototype._defaultURL):
(WI.LocalResourceOverridePopover.prototype._presentOverTargetElement):
New popover for creating or editing a Local Resource Override.
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch):
Consider searching overrides.
* UserInterface/Views/Variables.css:
(:root):
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search.changed > .banner):
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .warning-banner):
* UserInterface/Views/ConsoleMessageView.css:
(.console-warning-level):
Use a new variable for a common warning color.
* UserInterface/Images/NavigationItemNetworkOverride.svg: Added.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.canBeFormatted):
(WI.SourceCodeTextEditor.prototype.get _supportsDebugging):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .warning-banner):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container, .local-overrides)):
(.sidebar > .panel.navigation.sources > .content > .local-overrides):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
* UserInterface/Views/TextEditor.css:
(.text-editor):
* UserInterface/Views/TextResourceContentView.css:
(.content-view.resource.text):
(.content-view.resource.text > .text-editor):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView):
(WI.TextResourceContentView.prototype.get navigationItems):
(WI.TextResourceContentView.prototype.closed):
(WI.TextResourceContentView.prototype._contentWillPopulate):
(WI.TextResourceContentView.prototype._contentDidPopulate):
(WI.TextResourceContentView.prototype.async._handleCreateLocalResourceOverride):
(WI.TextResourceContentView.prototype._handleRemoveLocalResourceOverride):
(WI.TextResourceContentView.prototype._handleLocalResourceOverrideChanged):
(WI.TextResourceContentView.prototype._textEditorContentDidChange):
(WI.TextResourceContentView.prototype._shouldBeEditable):
Allow Text resources to create a local resource override.
Support for Image resources will come separately.
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._responseSourceDisplayString):
Handle new response type.
* UserInterface/Controllers/CSSManager.js:
Avoid extra handling for Local Resource Overrides.
* UserInterface/Views/ResourceIcons.css:
(.resource-icon.override .icon):
* UserInterface/Views/ResourceSizesContentView.js:
(WI.ResourceSizesContentView.prototype.initialLayout):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WI.ResourceTimelineDataGridNode.prototype.iconClassNames):
* UserInterface/Views/ResourceTreeElement.js:
(WI.ResourceTreeElement.prototype._updateResource):
(WI.ResourceTreeElement.prototype._updateIcon):
(WI.ResourceTreeElement.prototype._responseReceived):
(WI.ResourceTreeElement):
* UserInterface/Views/TimelineDataGridNode.js:
(WI.TimelineDataGridNode.prototype.createCellContent):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._populateNameCell):
(WI.NetworkTableContentView.prototype._populateTransferSizeCell):
(WI.NetworkTableContentView.prototype._generateSortComparator):
Better Resource icons all over for overrides.
* UserInterface/Views/URLBreakpointPopover.js:
(WI.URLBreakpointPopover.prototype._createEditor):
Code cleanup.
2019-09-03 Devin Rousso <drousso@apple.com>
Web Inspector: provide a way to view XML/HTML/SVG resource responses as a DOM tree
https://bugs.webkit.org/show_bug.cgi?id=201046
<rdar://problem/54446087>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView):
(WI.ResourceClusterContentView.prototype.showRequest):
(WI.ResourceClusterContentView.prototype.showResponse):
(WI.ResourceClusterContentView.prototype.get customRequestDOMContentView): Added.
(WI.ResourceClusterContentView.prototype.get customRequestJSONContentView): Added.
(WI.ResourceClusterContentView.prototype.get customResponseDOMContentView): Added.
(WI.ResourceClusterContentView.prototype.get customResponseJSONContentView): Added.
(WI.ResourceClusterContentView.prototype.get customResponseTextContentView): Added.
(WI.ResourceClusterContentView.prototype._createPathComponent): Added.
(WI.ResourceClusterContentView.prototype._canShowCustomRequestContentView):
(WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
(WI.ResourceClusterContentView.prototype._contentViewForResourceType):
(WI.ResourceClusterContentView.prototype._pathComponentForContentView):
(WI.ResourceClusterContentView.prototype._identifierForContentView):
(WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
(WI.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
(WI.ResourceClusterContentView.prototype._canUseDOMContentViewForContent): Added.
(WI.ResourceClusterContentView.prototype._normalizeMIMETypeForDOM): Added.
(WI.ResourceClusterContentView.prototype._tryEnableCustomRequestContentViews): Added.
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentViews): Added.
(WI.ResourceClusterContentView.createPathComponent): Deleted.
(WI.ResourceClusterContentView.prototype._tryEnableCustomRequestContentView): Deleted.
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView): Deleted.
* UserInterface/Base/Main.js:
(WI.showResourceRequest):
* UserInterface/Views/PathComponentIcons.css:
(.object-icon .icon): Added.
* UserInterface/Main.html:
* UserInterface/Views/SVGImageResourceClusterContentView.js: Removed.
Reworked to allow more than one custom request/response content view at the same time. As
such, merge the `WI.SVGImageResourceClusterContentView` into this class.
* UserInterface/Views/LocalRemoteObjectContentView.js: Added.
(WI.LocalRemoteObjectContentView):
(WI.LocalRemoteObjectContentView.prototype.get expression):
(WI.LocalRemoteObjectContentView.prototype.renderRemoteObject):
(WI.LocalRemoteObjectContentView.prototype.initialLayout):
(WI.LocalRemoteObjectContentView.prototype.attached):
(WI.LocalRemoteObjectContentView.prototype.closed):
* UserInterface/Views/LocalRemoteObjectContentView.css: Added.
(.content-view.local-remote-object):
* UserInterface/Views/LocalDOMContentView.js: Added.
(WI.LocalDOMContentView):
(WI.LocalDOMContentView.prototype.get expression):
(WI.LocalDOMContentView.prototype.renderRemoteObject):
* UserInterface/Views/LocalJSONContentView.js: Added.
(WI.LocalJSONContentView):
(WI.LocalJSONContentView.prototype.get expression):
(WI.LocalJSONContentView.prototype.renderRemoteObject):
* UserInterface/Views/JSONContentView.js: Removed.
* UserInterface/Views/JSONContentView.css: Removed.
Rework `WI.JSONContentView` into a more generic set of classes that render an object we send
to the inspected page for instrumentation.
* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype.populateContextMenu):
(WI.DOMTreeOutline.prototype._onmousemove):
(WI.DOMTreeOutline.prototype._onmouseout):
(WI.DOMTreeOutline.prototype._ondragstart):
(WI.DOMTreeOutline.prototype._ondragover):
(WI.DOMTreeOutline.prototype._ondragleave):
(WI.DOMTreeOutline.prototype._ondragend):
(WI.DOMTreeOutline.prototype._hideElements):
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForDOMNode):
Ensure that interactions that would modify the DOM tree only happen when editable. If the
`WI.DOMTreeOutline` represents a "local" `WI.DOMNode` (one that's been sent to the inspected
page for instrumentation, and shouldn't be part of the main #document), don't allow any
editing actions to be performed.
* UserInterface/Views/TextContentView.js:
(WI.TextContentView):
Allow a `representedObject` object to be provided and used instead of the given `string`.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/Object.svg: Added.
2019-09-03 Devin Rousso <drousso@apple.com>
Web Inspector: implement blackboxing of script resources
https://bugs.webkit.org/show_bug.cgi?id=17240
<rdar://problem/5732847>
Reviewed by Joseph Pecoraro.
When a script is blackboxed and the debugger attempts to pause in that script, the pause
reason/data will be saved and execution will continue until it has left the blackboxed
script. Once outside, execution is paused with the saved reason/data.
This is especially useful when debugging issues using libraries/frameworks, as it allows the
developer to "skip" the internal logic of the library/framework and instead focus only on
how they're using it.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):
(WI.DebuggerManager.prototype.initializeTarget):
(WI.DebuggerManager.supportsBlackboxingScripts): Added.
(WI.DebuggerManager.pauseReasonFromPayload): Added.
(WI.DebuggerManager.prototype.isScriptBlackboxed): Added.
(WI.DebuggerManager.prototype.setShouldBlackboxScript): Added.
(WI.DebuggerManager.prototype._pauseReasonFromPayload):
(WI.DebuggerManager.prototype._pauseReasonFromPayload): Deleted.
* UserInterface/Models/SourceCode.js:
(WI.SourceCode.prototype.get isScript): Added.
(WI.SourceCode.prototype.get supportsScriptBlackboxing): Added.
* UserInterface/Models/Script.js:
(WI.Script.prototype.get isScript): Added.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.get isScript): Added.
Provide a more straightforward way of determining if a `WI.SourceCode` is a script.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._updatePauseReason):
(WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReason):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
Display the original pause reason and breakpoint (if applicable) when pausing after leaving
a blackboxed script.
* UserInterface/Views/SourceCodeTreeElement.js:
(WI.SourceCodeTreeElement.prototype.canSelectOnMouseDown): Added.
(WI.SourceCodeTreeElement.prototype.updateStatus): Added.
(WI.SourceCodeTreeElement.prototype._updateSourceCode):
(WI.SourceCodeTreeElement.prototype._updateToggleBlackboxImageElementState): Added.
(WI.SourceCodeTreeElement.prototype._handleToggleBlackboxedImageElementClick): Added.
* UserInterface/Views/SourceCodeTreeElement.css: Added.
(.tree-outline .item .status > .toggle-script-blackboxed):
(.tree-outline:not(.navigation-sidebar-panel-content-tree-outline) .item .status > .toggle-script-blackboxed,):
(.tree-outline:focus .item.selected .status > .toggle-script-blackboxed):
(.tree-outline .item .status > .toggle-script-blackboxed.blackboxed):
(@media (prefers-color-scheme: dark) .tree-outline .item .status > .toggle-script-blackboxed):
* UserInterface/Views/ResourceTreeElement.js:
(WI.ResourceTreeElement.prototype._updateResource):
(WI.ResourceTreeElement.prototype.updateStatus): Added.
(WI.ResourceTreeElement.prototype._updateStatus): Deleted.
Make sure that the loading indicator doesn't override the blackbox toggle.
* UserInterface/Base/Setting.js:
(WI.Setting.prototype.set value):
(WI.Setting.prototype.save): Added.
When modifying an array value, that doesn't go through `WI.Setting.prototype.set value`, so
we need a more "manual" way of saving the new value.
* UserInterface/Main.html:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.newline): Added.
(TestHarness.prototype.expectException):
Add a special case for logging error message objects when running protocol tests.
2019-08-29 Keith Rollin <krollin@apple.com>
Update .xcconfig symbols to reflect the current set of past and future product versions.
https://bugs.webkit.org/show_bug.cgi?id=200720
<rdar://problem/54305032>
Reviewed by Alex Christensen.
Remove version symbols related to old OS's we no longer support,
ensure that version symbols are defined for OS's we do support.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
2019-08-29 Devin Rousso <drousso@apple.com>
Web Inspector: DOMDebugger: support event breakpoints in Worker contexts
https://bugs.webkit.org/show_bug.cgi?id=200651
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
Add assertions when adding/removing DOM breakpoints or animation frame event breakpoints if
the target is a `WI.WorkerTarget`, as neither are supported by `Worker`s.
2019-08-29 Devin Rousso <drousso@apple.com>
Web Inspector: replace uses of `Array.prototype.concat` with `Array.prototype.push`
https://bugs.webkit.org/show_bug.cgi?id=201082
Reviewed by Joseph Pecoraro.
`x = x.concat(y)` is very slow, as `x` has to be fully copied in order to add `y` to it.
Introduce `Array.prototype.pushIterable`, which iterates the given `iterable` and adds each
item to the `this` array.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype.get domBreakpoints):
(WI.DOMDebuggerManager.prototype.domBreakpointsInSubtree):
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
* UserInterface/Models/CSSCompletions.js:
(WI.CSSCompletions):
* UserInterface/Models/CSSKeywordCompletions.js:
(WI.CSSKeywordCompletions.forProperty):
(WI.CSSKeywordCompletions.forProperty.addKeywordsForName):
(WI.CSSKeywordCompletions.forFunction):
* UserInterface/Models/Canvas.js:
(WI.Canvas.prototype.recordingProgress):
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._updateStyleCascade):
(WI.DOMNodeStyles.prototype._collectStylesInCascadeOrder):
* UserInterface/Models/TimelineRecording.js:
(WI.TimelineRecording.prototype.get sourceCodeTimelines):
(WI.TimelineRecording.prototype.initializeCallingContextTrees):
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype._getPropertyDescriptorsResolver):
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser.prototype.get currentRepresentedObjects):
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype._visibleChildren):
* UserInterface/Views/DataGridNode.js:
(WI.DataGridNode.prototype.get filterableData):
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WI.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WI.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData.processEntries):
* UserInterface/Views/NavigationItem.js:
(WI.NavigationItem.prototype.get _classNames):
* UserInterface/Views/ObjectTreeView.js:
(WI.ObjectTreeView.prototype._updateProperties):
* UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype._addResourcesForFrame):
* UserInterface/Views/OverviewTimelineView.js:
(WI.OverviewTimelineView.prototype._loadExistingRecords):
* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView.prototype.get navigationItems):
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
* UserInterface/Views/ResourceSecurityContentView.js:
(WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
* UserInterface/Views/ScriptClusterTimelineView.js:
(WI.ScriptClusterTimelineView.prototype.get selectionPathComponents):
* UserInterface/Views/ScrubberNavigationItem.js:
(WI.ScrubberNavigationItem.prototype.get additionalClassNames):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
(WI.SpreadsheetStyleProperty.prototype._addColorTokens.pushPossibleColorToken):
(WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
(WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype.selfOrDescendant):
* UserInterface/Views/View.js:
(WI.View._visitViewTreeForLayout):
2019-08-29 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION (r248873): Debugger: pressing delete on a breakpoint will also delete any resource/element parent immediately before it in the list
https://bugs.webkit.org/show_bug.cgi?id=200939
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
(WI.DebuggerSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement.checkIfSelectionAdjustmentNeeded): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.SourcesNavigationSidebarPanel.this._breakpointsTreeOutline.ondelete.checkIfSelectionAdjustmentNeeded): Deleted.
When the `WI.TreeOutline`'s own `ondelete` is called, that means we must be handling a
delete that was _not_ handled by a `WI.TreeElement`. This means that the `selectedTreeElement`
has to be a resource/script, the `window` object, or one of the non-deletable breakpoints.
In the case of a non-deletable breakpoint, since they're never removed from their parent
`WI.TreeOutline`, we just shift the selection to the next selectable `WI.TreeElement`.
Otherwise, wait for the `WI.TreeOutline.Event.ElementRemoved` event to be fired, and adjust
the selection then based on whether the new `selectedTreeElement` is one of the "top" items,
namely the "All Exceptions", "Uncaught Exceptions", and "Assertion Failures" breakpoints.
* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.ondelete):
* UserInterface/Views/DOMBreakpointTreeElement.js:
(WI.DOMBreakpointTreeElement.prototype.ondelete):
* UserInterface/Views/DOMNodeTreeElement.js:
(WI.DOMNodeTreeElement.prototype.ondelete):
* UserInterface/Views/EventBreakpointTreeElement.js:
(WI.EventBreakpointTreeElement.prototype.ondelete):
* UserInterface/Views/URLBreakpointTreeElement.js:
(WI.URLBreakpointTreeElement.prototype.ondelete):
Add `return true;` to let the parent `WI.TreeOutline` know that the delete event was handled.
This prevents the parent `WI.TreeOutline`'s own `ondelete` from being called, which would
cause a double-delete as there would be a different `selectedTreeElement`.
2019-08-29 Keith Rollin <krollin@apple.com>
Remove support for macOS < 10.13 (part 3)
https://bugs.webkit.org/show_bug.cgi?id=201224
<rdar://problem/54795934>
Reviewed by Darin Adler.
Remove symbols in WebKitTargetConditionals.xcconfig related to macOS
10.13, including WK_MACOS_1013 and WK_MACOS_BEFORE_1013, and suffixes
like _MACOS_SINCE_1013.
Also added some macOS target numbers.
* Configurations/WebKitTargetConditionals.xcconfig:
2019-08-29 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Import file pickers sometimes do not import
https://bugs.webkit.org/show_bug.cgi?id=201290
<rdar://problem/54826117>
Reviewed by Devin Rousso.
* UserInterface/Base/FileUtilities.js:
(WI.FileUtilities.importText):
(WI.FileUtilities.importJSON):
Keep the input element alive so it doesn't get garbage collected,
which makes the file chooser do nothing.
(WI.FileUtilities.save):
(WI.FileUtilities.async.readText):
Place read operations after event handlers are setup in case the
read operations can happen synchronously and events may not fire.
2019-08-28 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r249078): JavaScript autocomplete doesn't work when evaluating properties of values
https://bugs.webkit.org/show_bug.cgi?id=201226
Reviewed by Joseph Pecoraro.
r249078 modified `WI.JavaScriptRuntimeCompletionProvider` to use arrays of property names
instead of objects for completion, but a few code paths were missed.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNamesFromEvaluate):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedObjectPropertyNames): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedArrayPropertyNames):
* UserInterface/Models/CallFrame.js:
(WI.CallFrame.prototype.collectScopeChainVariableNames):
(WI.CallFrame.prototype.collectScopeChainVariableNames.propertiesCollected):
2019-08-27 Devin Rousso <drousso@apple.com>
Web Inspector: replace uses of added utility `Array.prototype.keySet` with an actual `Set`
https://bugs.webkit.org/show_bug.cgi?id=201194
Reviewed by Ross Kirsling.
They both have basically the same functionality, with one difference being that a `Set` can
work with arrays that have non-string values.
* UserInterface/Base/Utilities.js:
(Array.prototype.keySet): Deleted.
* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WI.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
(WI.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchKeywords):
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
2019-08-27 Devin Rousso <drousso@apple.com>
Web Inspector: change the styling of the special log "bubble" to match WI.ScopeBar
https://bugs.webkit.org/show_bug.cgi?id=201152
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ConsoleMessageView.css:
(.console-user-command.special-user-log > .console-message-body):
2019-08-26 Devin Rousso <drousso@apple.com>
Web Inspector: decrease horizontal padding of `WI.ScopeBar` to have more room
https://bugs.webkit.org/show_bug.cgi?id=201090
Reviewed by Joseph Pecoraro.
There's a lot of "wasted" padding space around each item that we could reuse (or "move") for
other navigation items.
* UserInterface/Views/FilterBar.css:
(.filter-bar > .navigation-bar > .item.scope-bar):
* UserInterface/Views/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only):
* UserInterface/Views/ScopeBar.css:
(.scope-bar):
(body[dir=ltr] .scope-bar > li.multiple > select):
(body[dir=rtl] .scope-bar > li.multiple > select):
(.scope-bar > li.multiple > .arrows):
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem):
(WI.RadioButtonNavigationItem.prototype.update): Deleted.
There's no reason to forcibly set the `min-width` since all instances are just text.
* UserInterface/Views/AuditTestGroupContentView.js:
(WI.AuditTestGroupContentView.prototype.initialLayout):
* UserInterface/Views/AuditTestGroupContentView.css:
(.content-view.audit-test-group > header > nav:not(:empty):before): Deleted.
Remove the unnecessary "Showing: " prefix before the `WI.ScopeBar`.
* UserInterface/Views/ScopeRadioButtonNavigationItem.js: Removed.
* UserInterface/Views/ScopeRadioButtonNavigationItem.css: Removed.
These classes were never used.
* Localizations/en.lproj/localizedStrings.js:
2019-08-24 Devin Rousso <drousso@apple.com>
Web Inspector: "Copy Rule" menu item does not propagate comments properly
https://bugs.webkit.org/show_bug.cgi?id=201095
Reviewed by Joseph Pecoraro.
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype.commentOut):
(WI.CSSProperty.prototype.get formattedText):
Wrap the `text` in `/* ${text} */` if the `WI.CSSProperty` isn't `enabled` (e.g. commented out).
2019-08-23 Devin Rousso <drousso@apple.com>
Web Inspector: create additional command line api functions for other console methods
https://bugs.webkit.org/show_bug.cgi?id=200971
Reviewed by Joseph Pecoraro.
Expose all `console.*` functions in the command line API, since they're all already able to
be referenced via the `console` object.
Provide a simpler interface for other injected scripts to modify the command line API.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.prototype.get _commandLineAPIKeys): Added.
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.updateLastPropertyNames):
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):
2019-08-23 Devin Rousso <drousso@apple.com>
Web Inspector: transparency checkerboard is too bright in dark mode
https://bugs.webkit.org/show_bug.cgi?id=201067
Reviewed by Joseph Pecoraro.
* UserInterface/Views/Main.css:
(@media (prefers-color-scheme: dark) :matches(img, canvas).show-grid):
* UserInterface/Views/ConsoleMessageView.css:
(.console-message-body > .show-grid):
2019-08-22 Devin Rousso <drousso@apple.com>
Web Inspector: Console: automatically select the "Evaluations" filter whenever running commands
https://bugs.webkit.org/show_bug.cgi?id=201060
Reviewed by Timothy Hatcher.
If the Console is actively being filtered (e.g. not "All"), it can be confusing to run a
command, only to not see any results. We should automatically enable the "Evaluations"
filter in addition to any other existing filters in these cases.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.didAppendConsoleMessageView):
* UserInterface/Views/ScopeBarItem.js:
(WI.ScopeBarItem.prototype.set selected):
(WI.ScopeBarItem.prototype.toggle): Added.
2019-08-22 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r248485): stack overflow when viewing a source map generated from inline content
https://bugs.webkit.org/show_bug.cgi?id=201042
<rdar://problem/54509750>
Reviewed by Antoine Quint.
In r248485, `WI.ResourceClusterContentView` was changed to `requestContent` whenever the
given resource finished loading (by listening for `WI.Resource.Event.LoadingDidFinish`).
Even though retrieving a source map's contents uses `Promise`s, in the case that the content
was inlined in the "original" source code, the code path would mark the source map as being
finished (which would fire a `WI.Resource.Event.LoadingDidFinish`) _before_ it could return
a `Promise`, which would've been cached (`WI.SourceCode.prototype.requestContent`) and
preventend any reentrancy.
Wrapping the inline code path in a `Promise.resolve()` gives the `WI.SourceCode` a chance to
cache the `Promise` before any events are fired.
* UserInterface/Models/SourceMapResource.js:
(WI.SourceMapResource.prototype.requestContentFromBackend):
2019-08-22 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: console.dir should expand objects
https://bugs.webkit.org/show_bug.cgi?id=152039
<rdar://problem/23816853>
Reviewed by Joseph Pecoraro.
Expand objects logged by console.dir but keep them collapsed when logged by console.log.
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype.render):
2019-08-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Cleanup some unused code
https://bugs.webkit.org/show_bug.cgi?id=201041
Reviewed by Alex Christensen.
* UserInterface/Views/CPUUsageCombinedView.css:
(.cpu-usage-combined-view > .graph > .stacked-area-chart):
* UserInterface/Views/CPUUsageCombinedView.js:
(WI.CPUUsageCombinedView):
* UserInterface/Views/MediaTimelineOverviewGraph.js:
(WI.MediaTimelineOverviewGraph):
2019-08-22 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide an engineering option to log protocol traffic as text
https://bugs.webkit.org/show_bug.cgi?id=200969
Reviewed by Devin Rousso.
* UserInterface/Base/Setting.js:
* UserInterface/Protocol/LoggingProtocolTracer.js:
(WI.LoggingProtocolTracer.prototype._processEntry):
(WI.LoggingProtocolTracer):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createDebugSettingsView):
2019-08-21 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: RTL: DOM outline in Elements tab should be LTR
https://bugs.webkit.org/show_bug.cgi?id=200601
Reviewed by Timothy Hatcher.
Make DOM outlines in Console and Elements tab always LTR,
and unsure that Left and Right arrow keys continue working correctly.
* UserInterface/Base/Main.js:
(WI.resolveLayoutDirectionForElement): Added.
The existing WI.resolvedLayoutDirection function returns the value of the root DOM element.
The newly added resolveLayoutDirectionForElement function returns the correct value for any element,
including elements with `dir=ltr` inside of `<body dir=rtl>`.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
(.tree-outline.dom li:not(.editing)):
(.tree-outline.dom li.editing):
(.tree-outline.dom li .pseudo-class-indicator):
(.tree-outline.dom.single-node li):
(.tree-outline.dom li.parent):
(.tree-outline.dom li .html-tag.close):
(.tree-outline.dom li.parent::before):
(.tree-outline.dom li.parent.shadow::after):
Remove RTL logic.
* UserInterface/Views/DOMTreeOutline.js:
* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype._treeKeyDown):
Make Left and Right arrow keys work correctly for LTR DOM outlines inside of the global RTL.
2019-08-21 Devin Rousso <drousso@apple.com>
Web Inspector: Page: re-add enable/disable after r248454
https://bugs.webkit.org/show_bug.cgi?id=200947
Reviewed by Joseph Pecoraro.
We shouldn't design the agent system with only Web Inspector in mind. Other clients may want
to have different functionality, not being told about frames creation/updates/destruction.
In these cases, we should have graceful error message failures for other agents that rely on
the Page agent.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.initializeTarget):
2019-08-21 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: increase the filter bar's width when it's focused if a resource type filter is active
https://bugs.webkit.org/show_bug.cgi?id=200940
Reviewed by Joseph Pecoraro.
* UserInterface/Views/FilterBar.js:
(WI.FilterBar.prototype._handleFilterChanged):
(WI.FilterBar.prototype.get indicatingProgress): Deleted.
(WI.FilterBar.prototype.set indicatingProgress): Deleted.
(WI.FilterBar.prototype.get indicatingActive): Deleted.
(WI.FilterBar.prototype.set indicatingActive): Deleted.
If escape is pressed when the <input> is empty, unfocus (blur) the <input>.
Drive-by: remove unused/unnecessary functions.
* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]):
(:matches(.filter-bar, .search-bar) > input[type="search"]): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]:matches(:focus, :not(:placeholder-shown))): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]::-webkit-search-decoration): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]::-webkit-search-results-button): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]::placeholder): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]:matches(:not(:focus), :placeholder-shown)::-webkit-search-cancel-button): Added.
(:matches(.filter-bar, .search-bar) > .navigation-bar + input[type="search"]): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]:focus): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"] + :empty): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"]:focus ~ *): Added.
(:matches(.filter-bar, .search-bar) > input[type="search"] + .navigation-bar > .item.scope-bar:last-child): Added.
(.filter-bar > input[type="search"] + .navigation-bar > .item.scope-bar:last-child): Deleted.
(.filter-bar > .navigation-bar + input[type="search"]): Deleted.
(.filter-bar > input[type="search"]::placeholder): Deleted.
(.filter-bar > input[type="search"]:focus): Deleted.
(.filter-bar > input[type="search"]::-webkit-search-decoration): Deleted.
(.filter-bar.active > input[type="search"]::-webkit-search-decoration): Deleted.
(.filter-bar.indicating-progress > input[type="search"]::-webkit-search-decoration): Deleted.
(.filter-bar > input[type="search"] + .navigation-bar:empty): Deleted.
When the <input> is `:focus`, hide the following `WI.NavigationBar` (if it's being used) so
that there's more room to show the filter text.
Drive-by: fix background, border, and text color styling when `:focus`.
* UserInterface/Views/SearchBar.css:
(.search-bar > input[type="search"]):
(.search-bar > input[type="search"]::placeholder): Deleted.
(.search-bar > input[type="search"]:focus): Deleted.
(.search-bar > input[type="search"]:not(:placeholder-shown)): Deleted.
(.search-bar > input[type="search"]:placeholder-shown::-webkit-search-cancel-button): Deleted.
(@media (prefers-color-scheme: dark)): Deleted.
(:matches(.search-bar, .filter-bar) > input[type="search"],): Deleted.
(:matches(.search-bar, .filter-bar) > input[type="search"]::placeholder): Deleted.
(:matches(.search-bar, .filter-bar) > input[type="search"]:focus): Deleted.
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search > .search-bar):
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
(.sidebar > .panel.navigation.search > .search-bar > .search-settings): Added.
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]::-webkit-search-results-button): Deleted.
* UserInterface/Views/Toolbar.css:
(.toolbar .search-bar > input[type="search"]::-webkit-textfield-decoration-container): Deleted.
Move shared styles to FilterBar.css as `WI.FilterBar` are more common.
* UserInterface/Views/Variables.css:
(:root):
(@media (prefers-color-scheme: dark) :root):
Expose some CSS variables in light mode that were previously only defined in dark mode.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._updateFilteredEntries):
(WI.NetworkTableContentView.prototype._updateURLFilterActiveIndicator): Deleted.
* UserInterface/Images/FilterFieldActiveGlyph.svg: Removed.
2019-08-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unnecessary properties on SVGs
https://bugs.webkit.org/show_bug.cgi?id=200968
Reviewed by Devin Rousso.
* UserInterface/Images/EventPause.svg:
* UserInterface/Images/EventPlay.svg:
* UserInterface/Images/EventProcessing.svg:
* UserInterface/Images/EventStop.svg:
* UserInterface/Images/MediaInstrument.svg:
2019-08-20 Devin Rousso <drousso@apple.com>
Web Inspector: Implement `queryHolders` Command Line API
https://bugs.webkit.org/show_bug.cgi?id=200458
Reviewed by Joseph Pecoraro.
Call `queryHolders(object)` from the Console to return an array of objects that strongly
reference the given `object`. This could be very useful for finding JavaScript "leaks".
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2019-08-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Address a few Esprima issues preventing pretty printing of resources
https://bugs.webkit.org/show_bug.cgi?id=200935
Reviewed by Timothy Hatcher.
Address a few Esprima issues:
Issue #1991 - Failure to parse template literal with destructuring assignment expression
https://github.com/jquery/esprima/issues/1991
Issue #1920 - Invalid Left Hand Side in for-in
https://github.com/jquery/esprima/issues/1920
* UserInterface/External/Esprima/esprima.js:
2019-08-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update CodeMirror to support numeric separators in JavaScript numbers
https://bugs.webkit.org/show_bug.cgi?id=200942
Cherry-pick a few CodeMirror changes:
[javascript mode] Support numeric separators
https://github.com/codemirror/CodeMirror/commit/beab8ed123683416bfec934df73d13401ec086b5#diff-9812850bb71d31e8dd60b476abb2bae8
[javascript mode] fix tokenizing of underscore properties
https://github.com/codemirror/CodeMirror/commit/463ea2c34ab442c0cae1d9732305219ca9b04dfe#diff-9812850bb71d31e8dd60b476abb2bae8
Reviewed by Timothy Hatcher.
* UserInterface/External/CodeMirror/javascript.js:
2019-08-20 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: move the resource type scope bar to be next to the filter
https://bugs.webkit.org/show_bug.cgi?id=200891
Reviewed by Joseph Pecoraro.
It's odd to have UI for controlling the active filters in two different places. Move the
resource type `WI.ScopeBar` to the filter bar area, and "promote" the resource grouping mode
items from a context menu to an always visible `WI.ScopeBar` in the space left by the
resource type `WI.ScopeBar` (switching between grouping modes quickly is a useful workflow).
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.hasCustomFilters):
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeScopeBarSelectionChanged): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
(WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu.addOption): Deleted.
(WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .filter-bar .sources-resource-type-scope-bar.default-item-selected:not(:hover)): Added.
(.sidebar > .panel.navigation.sources > .filter-bar .sources-resource-type-scope-bar.default-item-selected:hover): Added.
* UserInterface/Views/FilterBar.js:
(WI.FilterBar.prototype.addFilterNavigationItem): Added.
(WI.FilterBar.prototype.addFilterBarButton):
* UserInterface/Views/FilterBar.css:
(.filter-bar > .navigation-bar > .item):
(.filter-bar > .navigation-bar > .item.button): Added.
(.filter-bar > .navigation-bar > .item.scope-bar): Added.
(.filter-bar > input[type="search"] + .navigation-bar > .item.scope-bar:last-child): Added.
Provide a way to add arbitrary `WI.NavigationItem` to the contained `WI.NavigationBar`.
Slightly adjust the spacing of the items (depending on their type) in the `WI.NavigationBar`
so they are all centered.
* UserInterface/Views/ScopeBar.css:
(.scope-bar):
(.scope-bar > li):
(.scope-bar > li::after):
(.scope-bar > li:not(.selected):hover): Added.
(body[dir=ltr] .scope-bar > li.multiple > select):
(body[dir=rtl] .scope-bar > li.multiple > select):
(.scope-bar > li:not(.selected):hover::after): Added.
Introduce CSS variables for `margin`, `padding`, and `opacity` that callers can override to
customize the appearance of the `WI.ScopeBar`.
* Localizations/en.lproj/localizedStrings.js:
2019-08-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Sources: Give Origins their own icon in the Sources sidebar
https://bugs.webkit.org/show_bug.cgi?id=200683
<rdar://problem/54269044>
Reviewed by Devin Rousso.
* UserInterface/Images/Origin.svg: Added.
* UserInterface/Main.html:
New resources.
* UserInterface/Views/FolderIcon.css:
(.origin-icon .icon):
Light and Dark appearances for Origin icons.
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/OriginTreeElement.js:
(WI.OriginTreeElement):
Very much like a folder with different classes.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
Use OriginTreeElement in a few places.
2019-08-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Support for JavaScript BigInt
https://bugs.webkit.org/show_bug.cgi?id=180731
<rdar://problem/36298748>
Reviewed by Devin Rousso.
* UserInterface/External/CodeMirror/javascript.js:
(expressionAllowed):
Cherry-pick BigInt JavaScript mode support from CodeMirror:
https://github.com/codemirror/CodeMirror/pull/5411
* UserInterface/Images/TypeBigInt.svg: Added.
* UserInterface/Views/Variables.css:
(:root):
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/CodeMirrorAdditions.js:
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
(.cm-s-default .cm-number.cm-bigint,):
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property.bigint > .icon):
* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot .icon.bigint):
Style BigInt similiar but different from numbers but with
a [B] icon instead of [N].
* UserInterface/Views/FormattedValue.css:
(.formatted-bigint):
* UserInterface/Views/FormattedValue.js:
(WI.FormattedValue.hasSimpleDisplay):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
(WI.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
Simple value formatting for the new type.
* UserInterface/Models/TypeSet.js:
(WI.TypeSet):
(WI.TypeSet.prototype.get primitiveTypeNames):
* UserInterface/Views/TypeTokenView.css:
(.type-token-bigint):
* UserInterface/Views/TypeTokenView.js:
(WI.TypeTokenView.prototype._displayTypeName):
(WI.TypeTokenView):
New type handling for the Type profiler.
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject):
(WI.RemoteObject.createBigIntFromDescriptionString):
* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WI.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WI.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
BigInt values are not tied to a GlobalObject, so do some special casing
in the Heap output (like Strings) so we get a preview.
2019-08-20 Devin Rousso <drousso@apple.com>
Web Inspector: Use URL constructor to better handle all kinds of URLs
https://bugs.webkit.org/show_bug.cgi?id=165155
Reviewed by Joseph Pecoraro.
* UserInterface/Base/URLUtilities.js:
(parseURL):
2019-08-19 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: add a global breakpoint for pausing in the next microtask
https://bugs.webkit.org/show_bug.cgi?id=200652
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):
(WI.DebuggerManager.prototype.initializeTarget):
(WI.DebuggerManager.prototype.get allMicrotasksBreakpoint): ADded.
(WI.DebuggerManager.prototype.isBreakpointSpecial):
(WI.DebuggerManager.prototype._pauseReasonFromPayload):
(WI.DebuggerManager.prototype._breakpointDisabledStateDidChange):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel):
(WI.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
(WI.DebuggerSidebarPanel.prototype._addBreakpoint):
(WI.DebuggerSidebarPanel.prototype._addTreeElement):
(WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
(WI.DebuggerSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
* UserInterface/Views/BreakpointTreeElement.css:
(.breakpoint-microtask-icon .icon): Added.
* UserInterface/Images/Microtask.svg: Added.
* UserInterface/Base/Setting.js:
* Localizations/en.lproj/localizedStrings.js:
2019-08-19 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r248682): Elements: Computed: go-to arrows in the Variables section are misaligned
https://bugs.webkit.org/show_bug.cgi?id=200841
Reviewed by Joseph Pecoraro.
The Variables section uses a different CSS class since it's identifier changed in r248682.
* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables)): Added.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) .property): Added.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) .property .go-to-arrow): Added.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) .property:not(:hover) .go-to-arrow): Added.
(.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property .go-to-arrow): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property:hover .go-to-arrow): Deleted.
2019-08-19 Devin Rousso <drousso@apple.com>
Web Inspector: have more aggressive checks for dataURLs provided to `console.screenshot`
https://bugs.webkit.org/show_bug.cgi?id=200747
Reviewed by Joseph Pecoraro.
Always send any /data:*+/ strings to the frontend and have it render there. If that doesn't
work, have the frontend "spoof" an error message look and feel.
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
* Localizations/en.lproj/localizedStrings.js:
2019-08-19 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: RTL: Network headers values should be preserved
https://bugs.webkit.org/show_bug.cgi?id=200873
Reviewed by Joseph Pecoraro.
Replace spans with bdi elements, which have `unicode-bidi: isolate` User Agent style.
This works well with both LTR and RTL values.
* UserInterface/Views/ResourceDetailsSection.js:
(WI.ResourceDetailsSection.prototype.appendKeyValuePair):
Drive-by: remove unnecessary if/else statement and use `append` instead.
2019-08-19 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: Debugger: pressing delete when the all/uncaught exceptions breakpoint is selected should select the next tree element
https://bugs.webkit.org/show_bug.cgi?id=200876
Reviewed by Joseph Pecoraro.
Removing the `return true;` from the various `WI.TreeElement` breakpoint classes allows the
owner `WI.TreeOutline` to also handle the delete event. In the Debugger/Sources navigation
sidebar, the owner `WI.TreeOutline` checks to see if the currently selected `WI.TreeElement`
is one of the "top" items ("All Exceptions", "Uncaught Exceptions", "Assertion Failures")
and if so, select the next tree element (if able) instead of the previous one.
This is a preferred experience because the "top" items can only be disabled, not deleted, so
trying to delete them wouldn't actually change the selection. They should only ever be
selected if there's nothing else that can be selected.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
(WI.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement.checkIfSelectionAdjustmentNeeded): Added.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.checkIfSelectionAdjustmentNeeded): Added.
* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.ondelete):
* UserInterface/Views/DOMBreakpointTreeElement.js:
(WI.DOMBreakpointTreeElement.prototype.ondelete):
* UserInterface/Views/DOMNodeTreeElement.js:
(WI.DOMNodeTreeElement.prototype.ondelete):
* UserInterface/Views/EventBreakpointTreeElement.js:
(WI.EventBreakpointTreeElement.prototype.ondelete):
* UserInterface/Views/URLBreakpointTreeElement.js:
(WI.URLBreakpointTreeElement.prototype.ondelete):
2019-08-19 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: don't show the All Requests breakpoint by default
https://bugs.webkit.org/show_bug.cgi?id=200892
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Setting.js:
2019-08-17 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: gear icons moves to 2nd line when sidebar is narrow
https://bugs.webkit.org/show_bug.cgi?id=198017
Reviewed by Joseph Pecoraro.
* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar):
(WI.NavigationBar.prototype.layout):
(WI.NavigationBar.prototype.layout.forceItemHidden): Added.
(WI.NavigationBar.prototype.layout.isDivider): Added.
(WI.NavigationBar.prototype.layout.calculateVisibleItemWidth): Added.
(WI.NavigationBar.prototype.needsLayout): Deleted.
(WI.NavigationBar.prototype.sizeDidChange): Deleted.
(WI.NavigationBar.prototype._updateContent): Deleted.
(WI.NavigationBar.prototype._updateContent.forceItemHidden): Deleted.
(WI.NavigationBar.prototype._updateContent.isDivider): Deleted.
(WI.NavigationBar.prototype._updateContent.calculateVisibleItemWidth): Deleted.
Reset the cached `_minimumWidth` whenever updating in `layout()`.
* UserInterface/Views/NavigationItem.js:
(WI.NavigationItem.prototype.get width):
(WI.NavigationItem.prototype.update): Added.
(WI.NavigationItem.prototype.updateLayout): Deleted.
(WI.NavigationItem.prototype.get totalMargin): Added.
* UserInterface/Views/ButtonNavigationItem.js:
(WI.ButtonNavigationItem.prototype.get totalMargin): Added.
* UserInterface/Views/ButtonNavigationItem.css:
* UserInterface/Views/TextNavigationItem.js:
(WI.TextNavigationItem.prototype.get totalMargin): Added.
* UserInterface/Views/TextNavigationItem.css:
`Element.prototype.getBoundingClientRect` doesn't include the `margin` box of an element.
Rather than create a CSS variable and parse a computed style, save the total `margin` amount
to a getter that can then be added when computing the minimum width.
* UserInterface/Views/Sidebar.js:
(WI.Sidebar):
(WI.Sidebar.prototype._recalculateWidth):
* UserInterface/Views/FlexibleSpaceNavigationItem.js:
(WI.FlexibleSpaceNavigationItem.prototype.update): Added.
(WI.FlexibleSpaceNavigationItem.prototype.updateLayout): Deleted.
* UserInterface/Views/GroupNavigationItem.js:
(WI.GroupNavigationItem.prototype.update): Added.
(WI.GroupNavigationItem.prototype.updateLayout): Deleted.
* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WI.HierarchicalPathNavigationItem.prototype.update): Added.
(WI.HierarchicalPathNavigationItem.prototype.updateLayout): Deleted.
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem.prototype.update): Added.
(WI.RadioButtonNavigationItem.prototype.updateLayout): Deleted.
Rename `updateLayout` to `update` so it doesn't clash with `WI.View` naming.
* UserInterface/Views/SidebarNavigationBar.js: Removed.
* UserInterface/Main.html:
* UserInterface/Views/NavigationBar.css:
(.navigation-bar .item): Added.
(.navigation-bar .item, .sidebar-navigation-bar > .holder .item): Deleted.
(.sidebar-navigation-bar): Deleted.
(.sidebar-navigation-bar .holder): Deleted.
Remove unnecessary class.
2019-08-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Syntax Highlight more CSS media queries
https://bugs.webkit.org/show_bug.cgi?id=200824
Reviewed by Devin Rousso.
* UserInterface/Views/CodeMirrorAdditions.js:
Special case CSS "error" tokenized values from CodeMirror inside @ rules
to treat some as properties.
2019-08-16 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: JavaScript formatting of single statement arrow function can be poor
https://bugs.webkit.org/show_bug.cgi?id=200800
Reviewed by Ross Kirsling.
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._isLikelyToHaveNewline):
(EsprimaFormatter.prototype._handleTokenAtNode):
Better heuristic for single statement arrow functions.
2019-08-16 Devin Rousso <drousso@apple.com>
Web Inspector: there should be an opposite icon for Eye.svg when we want to hide things instead of showing them
https://bugs.webkit.org/show_bug.cgi?id=200736
Reviewed by Joseph Pecoraro.
We currently use Eye.svg for disabling, or turning "off", Shader Programs, but it's not very
clear that clicking on the eye (which looks like "show me this", not "hide this") will do
that. Furthermore, a greyed out version also isn't clear that the Shader Program is disabled,
instead making the user think that the disable toggle is somehow "not working".
The new hide icon is clearer, as it uses a strikethrough, rather than some shading/greying.
* UserInterface/Views/ShaderProgramTreeElement.css:
(.item.shader-program .status > img):
(.item.shader-program.disabled:matches:hover .status > img): Added.
(.item.shader-program.disabled > :not(.status)): Added.
(.item.shader-program.disabled > *): Deleted.
* UserInterface/Images/Hide.svg: Added.
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property .getter):
* UserInterface/Images/Show.svg: Renamed from UserInterface/Images/Eye.svg.
2019-08-16 Devin Rousso <drousso@apple.com>
Web Inspector: rename "Invalid Characters" to "Invisible Characters" for clarity
https://bugs.webkit.org/show_bug.cgi?id=200808
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
* UserInterface/Base/Main.js:
(setInvisibleCharacterClassName): Added.
(setInvalidCharacterClassName): Deleted.
* UserInterface/Views/CodeMirrorOverrides.css:
(.show-invisible-characters .CodeMirror .cm-invalidchar): Added.
(.show-invalid-characters .CodeMirror .cm-invalidchar): Deleted.
* Localizations/en.lproj/localizedStrings.js:
2019-08-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: RTL: Console should be always LTR
https://bugs.webkit.org/show_bug.cgi?id=200482
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ConsoleCommandView.js:
(WI.ConsoleCommandView.prototype.render):
* UserInterface/Views/ConsoleMessageView.css:
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype.render):
Make console messages always LTR.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._keyDown):
Since the console is always LTR now, we can remove code that flips left and right
arrow keys.
* UserInterface/Views/ObjectTreeView.css:
JS objects should always be LTR.
* UserInterface/Views/TreeElement.js:
Look at "direction" CSS property because Element's text direction can be LTR even
when `WI.resolvedLayoutDirection()` is RTL.
(WI.TreeElement.prototype.isEventWithinDisclosureTriangle):
* UserInterface/Views/TreeOutline.css:
(body[dir=ltr] .tree-outline .item :matches(.disclosure-button, .icon),):
(body[dir=rtl] [dir=ltr] .tree-outline .item .disclosure-button):
2019-08-16 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: setting a breakpoint on a specific listener should enable the event listener
https://bugs.webkit.org/show_bug.cgi?id=200551
Reviewed by Joseph Pecoraro.
* UserInterface/Views/EventListenerSectionGroup.js:
(WI.EventListenerSectionGroup):
2019-08-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update Esprima to support modern JavaScript language features
https://bugs.webkit.org/show_bug.cgi?id=200796
Reviewed by Ross Kirsling.
Use a fork of Esprima to support modern JavaScript language features
while going through the process to upstream support:
ES2018 Feature: Async Iteration (for-await-of)
https://github.com/jquery/esprima/issues/1990
ES2019 Feature: Numeric Separator
https://github.com/jquery/esprima/issues/1989
ES2019 Feature: Optional catch binding
https://github.com/jquery/esprima/issues/1953
ES2020 Feature: BigInt
https://github.com/jquery/esprima/issues/1988
ESTree compatible AST changes are summarized as:
- CatchClause `param` property is now nullable
- ForOfStatement now has a boolean `await` property
- Literal can be a `"bigint"` type (works if the environment has BigInt or not)
The pretty printer only needed to have additional handling for `for-await-of`.
* UserInterface/External/Esprima/esprima.js:
New version. Typescript output expects a modern JavaScript environment
instead of just ES6.
* Tools/Formatting/index.html:
Update the formatting tool for easier use in case of errors.
* UserInterface/Models/ScriptSyntaxTree.js:
(WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.passOrFail):
Convenience for pass/fail with the same message based on a condition.
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
Ensure a space after `await` in `for await` syntax.
2019-08-15 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r244268): "Show Scope Chain on pause" setting has no effect
https://bugs.webkit.org/show_bug.cgi?id=200797
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DebuggerTabContentView.js:
(WI.DebuggerTabContentView.prototype.showDetailsSidebarPanels):
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.prototype.showDetailsSidebarPanels):
When the sidebar panel isn't visible `parentSidebar` is `null`. Use `WI.DetailsSidebar` instead.
2019-08-15 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._resource.initiatorSourceCodeLocation')
https://bugs.webkit.org/show_bug.cgi?id=200798
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype.set resource):
(WI.ResourceDetailsSidebarPanel.prototype.layout):
Cancel the `Throttler` whenever the `_resource` is updated, as otherwise the `Throttler` may
fire later on with an unset `_resource`.
2019-08-15 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: provide a way to create an arbitrary Inspector Style Sheet
https://bugs.webkit.org/show_bug.cgi?id=200425
Reviewed by Joseph Pecoraro.
Right now, the only way to create an Inspector Style Sheet is by creating a new rule in the
Styles sidebar of the Elements Tab. This is unnecessarily restrictive, especially for those
who don't use the Elements tab.
Add a + button after the filter bar in the Navigation sidebar. Clicking on the + button will
show a menu with the following (more likely to be added later):
- Inspector Style Sheet
- Frames (if there are subframes)
- (name of subframe)
- Inspector Style Sheet
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject): Added.
(WI.SourcesNavigationSidebarPanel.prototype._filterByResourcesWithIssues): Added.
(WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addResource):
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
(WI.SourcesNavigationSidebarPanel.prototype._handleFrameWasAdded): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange): Deleted.
* UserInterface/Views/GeneralTreeElement.js:
(WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath):
Drive-by: sort `WI.ResourceTreeElement`s alongside `WI.FolderTreeElement`s for easier readability.
* UserInterface/Views/FrameTreeElement.js:
(WI.FrameTreeElement.prototype.onpopulate):
Add all `inspectorStyleSheetsForFrame` instead of just the preferred one so that they all
are visible/selectable for editing.
* UserInterface/Views/FilterBar.js:
(WI.FilterBar):
* UserInterface/Views/FilterBar.css:
(.filter-bar > .navigation-bar > .item):
(.filter-bar > input[type="search"]):
(.filter-bar > .navigation-bar + input[type="search"]): Added.
(.filter-bar > input[type="search"] + .navigation-bar:empty): Added.
Move the position of the filter bar buttons to be after the filter bar itself, so that other
parents can add action items before the filter bar to keep a consistent positioning.
- to the left of the filter bar are action items (e.g. "+")
- the filter bar itself
- to the right of the filter bar are filter buttons (e.g. "filter by resoure with issue")
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.get frames):
Drive-by: use `Array.from`, instead of `[...map.values()]`.
* UserInterface/Models/Frame.js:
(WI.Frame.prototype.get url):
(WI.Frame.prototype.get urlComponents): Added.
* UserInterface/Base/URLUtilities.js.js:
(parseURL):
Calculate and include the `origin` string with the output.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
Remove `doNotCreateIfMissing` now that the last caller has been removed.
* Localizations/en.lproj/localizedStrings.js:
2019-08-15 Devin Rousso <drousso@apple.com>
Web Inspector: CodeMirror still inserts a tab even when "Prefer indent using" is set to "Spaces"
https://bugs.webkit.org/show_bug.cgi?id=200770
Reviewed by Ross Kirsling.
* UserInterface/Views/CodeMirrorAdditions.js:
Remap the `insertTab` command to use `insertSoftTab` when "Prefer indent using" is set to
"Spaces" so that CodeMirror inserts the number of spaces that would match a tab ("\t") being
inserted at the same spot.
2019-08-15 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: the "No Filter Results" message sits on top of all of the content, preventing any interaction
https://bugs.webkit.org/show_bug.cgi?id=200755
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .resources-container): Added.
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Added.
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .call-stack-container):
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .breakpoints-container):
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .resources-container): Added.
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources)): Deleted.
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .resources): Deleted.
Wrap the resources `WI.TreeOutline` in a <div> so the empty message placeholder that gets
inserted after it can be constrained to the size of the `WI.TreeOutline`.
2019-08-15 Devin Rousso <drousso@apple.com>
Web Inspector: Layers: background of 3D area doesn't update when transitioning to/from Dark mode
https://bugs.webkit.org/show_bug.cgi?id=200775
Reviewed by Ross Kirsling.
* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView.prototype.initialLayout):
Add a `matchMedia` listener for `(prefers-color-scheme: dark)` and update the clear color
of the WebGL renderer whenever it changes.
* UserInterface/Views/ErrorObjectView.css:
(@media (prefers-color-scheme: dark)): Added.
(@media (prefers-dark-interface)): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(@media (prefers-color-scheme: dark)): Added.
(@media (prefers-dark-interface)): Deleted.
Drive-by: replace older `prefers-dark-interface` with modern `prefers-color-scheme: dark`.
2019-08-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update Esprima to trunk (minor fixes)
https://bugs.webkit.org/show_bug.cgi?id=200691
<rdar://problem/54276170>
Rubber-stamped by Devin Rousso.
* UserInterface/External/Esprima/esprima.js:
Updated to jquery/esprima@5e55171feb5adbc2b1d28ef4b2628d5ea9af0848.
* UserInterface/Models/ScriptSyntaxTree.js:
(WI.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
(WI.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
(WI.ScriptSyntaxTree.prototype._recurse):
(WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WI.ScriptSyntaxTree):
* UserInterface/Workers/Formatter/ESTreeWalker.js:
(ESTreeWalker.prototype._walkChildren):
(ESTreeWalker):
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
- SpreadProperty => SpreadElement.
- RestProperty => RestElement.
2019-08-15 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: Content request failed.
https://bugs.webkit.org/show_bug.cgi?id=200704
<rdar://problem/54279372>
Reviewed by Brian Burg.
* UserInterface/Models/WebSocketResource.js:
(WI.WebSocketResource.prototype.requestContentFromBackend): Added.
Add an "assert not reached", as WebSocket resources don't really have "content", instead
having a list of send/receive frames.
* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
Don't attempt to request the content of any `WI.WebSocketResource` for the reason above.
2019-08-14 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Computed: move the Box Model section to the top
https://bugs.webkit.org/show_bug.cgi?id=200555
Reviewed by Joseph Pecoraro.
For nodes that use a lot of different CSS properties, having the Box Model section all the
way at the bottom isn't as useful for taking a quick glance at the node's box model data.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
2019-08-14 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Computed: the collapsed state of the Variables section should be separate from the collapsed state of the Properties section
https://bugs.webkit.org/show_bug.cgi?id=200725
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
Use a different identifier string for the Variable section so it preserves its own collapsed
collapsed state independent of the Properties section.
2019-08-14 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Computed: the background of the Properties/Variables sections should match the Box Model section when expanded
https://bugs.webkit.org/show_bug.cgi?id=200724
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content > .computed > .details-section:not(.collapsed) > :matches(.header, .content)): Added.
(.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties): Added.
(.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property .go-to-arrow): Added.
(.sidebar > .panel.details.css-style > .content > .computed .computed-style-properties .property:hover .go-to-arrow): Added.
(.sidebar > .panel.details.css-style > .content > .computed .details-section:matches(.computed-style-properties, .computed-style-variables) > .content): Added.
(.details-section:matches(.computed-style-properties, .computed-style-box-model):not(.collapsed) > :matches(.header, .content)): Deleted.
(.computed-style-properties): Deleted.
(.computed-style-properties .property .go-to-arrow): Deleted.
(.computed-style-properties .property:hover .go-to-arrow): Deleted.
(.details-section.computed-style-properties:not(.collapsed) > :matches(.header, .content)): Deleted.
(.details-section.computed-style-properties > .content): Deleted.
(@media (prefers-color-scheme: dark)): Deleted.
Use more specific selectors to match overall Web Inspector style.
* UserInterface/Views/ComputedStyleSection.css:
(.computed-style-section .computed-property-item.expanded):
Darken the background of any expanded computed property in light mode.
2019-08-13 Joseph Pecoraro <pecoraro@apple.com>
Uncaught Exception: content.isJSON is not a function selecting image resource
https://bugs.webkit.org/show_bug.cgi?id=200680
Reviewed by Devin Rousso.
* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype._canUseJSONContentViewForContent):
Protect against non-string data, such as Blob response content.
2019-08-13 Devin Rousso <drousso@apple.com>
Web Inspector: Styles: show @supports CSS groupings
https://bugs.webkit.org/show_bug.cgi?id=200419
<rdar://problem/53971948>
Reviewed by Joseph Pecoraro.
* UserInterface/Models/CSSGrouping.js: Renamed from Source/WebInspectorUI/UserInterface/Models/CSSMedia.js.
(WI.CSSGrouping):
(WI.CSSGrouping.prototype.get type):
(WI.CSSGrouping.prototype.get text):
(WI.CSSGrouping.prototype.get sourceCodeLocation):
(WI.CSSGrouping.prototype.get isMedia): Added.
(WI.CSSGrouping.prototype.get isSupports): Added.
(WI.CSSGrouping.prototype.get prefix): Added.
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get groupings): Added.
(WI.CSSStyleDeclaration.prototype.generateCSSRuleString):
(WI.CSSStyleDeclaration.prototype.get mediaList): Deleted.
* UserInterface/Models/CSSRule.js:
(WI.CSSRule):
(WI.CSSRule.prototype.get groupings): Added.
(WI.CSSRule.prototype.update):
(WI.CSSRule.prototype._selectorResolved):
(WI.CSSRule.prototype.get mediaList): Deleted.
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._parseRulePayload):
(WI.DOMNodeStyles.prototype.rulesForSelector): Deleted.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader): Deleted.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration :matches(.header, .header-groupings)): Added.
(.spreadsheet-css-declaration :matches(.header, .header-groupings):first-child): Added.
(.spreadsheet-css-declaration .header-groupings > .grouping): Added.
(.spreadsheet-css-declaration :matches(.header, .header-media)): Deleted.
(.spreadsheet-css-declaration :matches(.header, .header-media):first-child): Deleted.
(.spreadsheet-css-declaration .media-label): Deleted.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.protocolGroupingTypeToEnum): Added.
(WI.CSSManager.protocolMediaSourceToEnum): Deleted.
* UserInterface/Main.html:
* UserInterface/Test.html:
2019-08-12 Devin Rousso <drousso@apple.com>
REGRESSION(r248391): Web Inspector: changing Layout Direction Debug setting no longer adds dir="ltr" to body element
https://bugs.webkit.org/show_bug.cgi?id=200564
Reviewed by Joseph Pecoraro.
`WI.resolvedLayoutDirection` was called before `WI.runBootstrapOperations`, which is what
instantiates `WI.showDebugUISetting`. Without it, `WI.resolvedLayoutDirection` will ignore
the value of `WI.settings.debugLayoutDirection` and instead use the system.
Moving the instantiation of `WI.showDebugUISetting` outside `WI.runBootstrapOperations`
allows the setting to be created when the Bootstrap.js script is loaded, rather than after
the `DOMContentLoaded` event is fired. This means that it's guaranteed to exist before any
interface/view code runs.
* UserInterface/Debug/Bootstrap.js:
(WI.runBootstrapOperations):
2019-08-12 Devin Rousso <drousso@apple.com>
Web Inspector: remove WI.DeprecatedRemoteObjectProperty
https://bugs.webkit.org/show_bug.cgi?id=200549
Reviewed by Joseph Pecoraro.
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype.deprecatedGetOwnProperties): Deleted.
(WI.RemoteObject.prototype.deprecatedGetAllProperties): Deleted.
(WI.RemoteObject.prototype.deprecatedGetDisplayableProperties): Deleted.
(WI.RemoteObject.prototype._deprecatedGetProperties): Deleted.
(WI.RemoteObject.prototype._deprecatedGetPropertiesResolver): Deleted.
(WI.DeprecatedRemoteObjectProperty): Deleted.
(WI.DeprecatedRemoteObjectProperty.prototype.fromPrimitiveValue): Deleted.
* UserInterface/Models/CallFrame.js:
(WI.CallFrame.prototype.collectScopeChainVariableNames):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
2019-08-12 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r248201): DOMDebugger: unable to add event breakpoint when All Events breakpoint is enabled
https://bugs.webkit.org/show_bug.cgi?id=200561
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype.addEventBreakpoint):
(WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
2019-08-12 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: DOMDebugger: breakpoints are forcibly enabled when resolving DOM breakpoints for newly added nodes
https://bugs.webkit.org/show_bug.cgi?id=200639
Reviewed by Joseph Pecoraro.
Since DOM breakpoints revolve around a given DOM node, we attempt to restore DOM breakpoints
whenever new nodes are added by matching them to the path of the DOM breakpoint. When doing
so, we should be in a "temporarily restoring breakpoints" mode so that we don't forcibly
enable all breakpoints.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
(WI.DOMDebuggerManager.prototype._nodeInserted):
2019-08-12 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Styles: add space between media query and style icon
https://bugs.webkit.org/show_bug.cgi?id=200623
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration .header:not(:first-child), .spreadsheet-css-declaration .header:not(.editing-selector) .selector, .spreadsheet-css-declaration.has-icon .header.editing-selector .selector): Added.
(.spreadsheet-css-declaration .header.editing-selector .selector): Deleted.
Ensure the selector field doesn't shift vertically when entering/exiting editing mode.
2019-08-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Address some ESLint warnings
https://bugs.webkit.org/show_bug.cgi?id=200598
Reviewed by Devin Rousso.
* UserInterface/Base/Utilities.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Models/DOMNodeStyles.js:
* UserInterface/Models/LayoutTimelineRecord.js:
* UserInterface/Models/ServerTimingEntry.js:
* UserInterface/Models/TimelineRecording.js:
* UserInterface/Protocol/RemoteObject.js:
* UserInterface/Test/FrontendTestHarness.js:
* UserInterface/Test/Test.js:
* UserInterface/Views/CPUTimelineView.js:
* UserInterface/Views/CPUUsageCombinedView.js:
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
* UserInterface/Views/DOMTreeContentView.js:
* UserInterface/Views/DOMTreeElement.js:
* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/NetworkTableContentView.js:
* UserInterface/Views/ResourceTimingBreakdownView.js:
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
* UserInterface/Views/TreeOutline.js:
2019-08-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Better organize manager / observer API groups
https://bugs.webkit.org/show_bug.cgi?id=200594
Reviewed by Devin Rousso.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.globalObjectCleared):
(WI.DebuggerManager.prototype.reset): Deleted.
Renamed.
* UserInterface/Protocol/DebuggerObserver.js:
(WI.DebuggerObserver.prototype.globalObjectCleared):
* UserInterface/Controllers/CSSManager.js:
* UserInterface/Controllers/CanvasManager.js:
* UserInterface/Controllers/ConsoleManager.js:
* UserInterface/Controllers/DOMManager.js:
* UserInterface/Controllers/DOMStorageManager.js:
* UserInterface/Controllers/LayerTreeManager.js:
* UserInterface/Controllers/NetworkManager.js:
* UserInterface/Controllers/TargetManager.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Controllers/WorkerManager.js:
2019-08-10 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r248454): WK1 inspector frontend client doesn't queue messages to the frontend before it's loaded
https://bugs.webkit.org/show_bug.cgi?id=200587
Reviewed by Joseph Pecoraro.
WK1 inspector sends messages to the frontend using `WebCore::InspectorClient::doDispatchMessageOnFrontendPage`,
which does not do any sort of queueing to wait until the frontend is loaded (`InspectorFrontendHost.loaded()`).
Now that we are sending messages immediately, we should always queue.
* UserInterface/Test/TestStub.js:
(InspectorFrontendAPI.dispatch): Added.
* UserInterface/Models/Frame.js:
(WI.Frame.prototype.markDOMContentReadyEvent):
(WI.Frame.prototype.markLoadEvent):
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
(WI.TimelineManager.prototype.pageLoadEventFired):
2019-08-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Node details sidebar sections have unclear delineation in Dark Mode
https://bugs.webkit.org/show_bug.cgi?id=200603
<rdar://problem/54146925>
Reviewed by Devin Rousso.
* UserInterface/Views/DetailsSection.css:
(@media (prefers-color-scheme: dark)):
(.details-section .details-section,):
Give a details section header a different color than a normal sidebar header.
2019-08-09 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r248480): Sources: the Pause Reason section takes the entire vertical space when there are few breakpoints/resources
https://bugs.webkit.org/show_bug.cgi?id=200597
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .pause-reason-container): Deleted.
Don't `flex-grow` or `flex-shrink` the Pause Reason section so it always displays its full
content. The rest of the sections can grow/shrink as needed.
2019-08-09 Devin Rousso <drousso@apple.com>
REGRESSION (Safari 6): Web Inspector: JSON may not be pretty printed if served as text/html
https://bugs.webkit.org/show_bug.cgi?id=122898
<rdar://problem/15241419>
Reviewed by Joseph Pecoraro.
Check the request/response data to see if it's JSON parsable. If so, allow the user to elect
to view the request/response as a JSON preview instead of raw (or pretty printed) text.
Prefer the JSON view wherever possible.
* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView):
(WI.ResourceClusterContentView.prototype.get requestContentView):
(WI.ResourceClusterContentView.prototype.get customRequestContentView): Added.
(WI.ResourceClusterContentView.prototype.get customResponseContentView):
(WI.ResourceClusterContentView.prototype.get selectionPathComponents):
(WI.ResourceClusterContentView.prototype.showRequest):
(WI.ResourceClusterContentView.prototype._canShowCustomRequestContentView): Added.
(WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
(WI.ResourceClusterContentView.prototype._contentViewForResourceType):
(WI.ResourceClusterContentView.prototype._pathComponentForContentView):
(WI.ResourceClusterContentView.prototype._identifierForContentView):
(WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
(WI.ResourceClusterContentView.prototype._canUseJSONContentViewForContent): Added.
(WI.ResourceClusterContentView.prototype._tryEnableCustomRequestContentView): Added.
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
(WI.ResourceClusterContentView.prototype.saveToCookie): Deleted.
(WI.ResourceClusterContentView.prototype._customContentViewConstructorForResource): Deleted.
Since the current view is already saved in a `WI.Setting`, there's no need to save that
state to a cookie, as it'll be restored elsewhere.
* UserInterface/Base/Main.js:
(WI.showResourceRequest):
* UserInterface/Main.html:
* UserInterface/Views/JSONContentView.js: Added.
(WI.JSONContentView):
(WI.JSONContentView.prototype.initialLayout):
(WI.JSONContentView.prototype.attached):
(WI.JSONContentView.prototype.closed):
* UserInterface/Views/JSONContentView.css: Added.
(.content-view.json):
* Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.js: Deleted.
* Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.css: Deleted.
Create a more generic content view that shows a preview for the given JSON parsable string.
* UserInterface/Base/Utilities.js:
(String.prototype.isJSON): Added.
* UserInterface/Views/WebSocketDataGridNode.js:
(WI.WebSocketDataGridNode.prototype.appendContextMenuItems):
Utility function for checking if a string is JSON parsable.
* Localizations/en.lproj/localizedStrings.js:
2019-08-09 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: increase the vertical space allocated to the call stack when paused
https://bugs.webkit.org/show_bug.cgi?id=200236
Reviewed by Joseph Pecoraro.
Rather than uniformly constrict the height of the Call Stack and Breakpoints sections, they
should "flex" based on their importance, which can likely be derived from the current state.
This way, it's possible to see information from each section at the same time, but still
have enough space in each section to be able to do something useful.
When paused, the most useful data is the call stack, so give the Call Stack section the most
vertical space (the Pause Reason is also important, but it usually needs very little space).
When not paused, it's likely that the user cares more about the resources with breakpoints
than those without, so favor the Breakpoints section.
Each section will only expand to fit it's maximum content height.
If the inspector window becomes too short, remove the "flex" entirely and have all the
content be part of a single scroll area instead.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
(WI.SourcesNavigationSidebarPanel.prototype._handleCallStackElementAddedOrRemoved): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Added.
(.sidebar > .panel.navigation.sources > .content .details-section): Added.
(.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .header > .options, .sidebar > .panel.navigation.sources > .content .details-section:not(.collapsed) > .content, .sidebar > .panel.navigation.sources > .content .details-section:not(.collapsed) > .content > .group): Added.
(.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Added.
(.sidebar > .panel.navigation.sources > .content > .navigation-bar): Added.
(@media (min-height: 650px)): Added.
(.sidebar > .panel.navigation.sources > .content > .pause-reason-container): Added.
(.sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources)): Added.
(.sidebar > .panel.navigation.sources > .content > .call-stack-container): Added.
(.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Added.
(.sidebar > .panel.navigation.sources > .content > .resources): Added.
(.sidebar > .panel.navigation.sources > .content > .breakpoints-container .tree-outline .item.event-target-window .icon): Added.
(.sidebar > .panel.navigation.sources > .content > .details-section): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoints).collapsed > .header > .options,): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.pause-reason, .call-stack, .breakpoints) > .content,): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints) > .content): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.call-stack): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .create-breakpoint): Deleted.
(@media (min-height: 600px)): Deleted.
(.sidebar > .panel.navigation.sources > .content > .pause-reason): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content,): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .tree-outline .item.event-target-window .icon): Deleted.
Wrap the Pause Reason, Call Stack, and Breakpoints `WI.DetailsSection`s in a container
element so that the styling of the sticky header doesn't get affected by the clamping of the
container's height.
* UserInterface/Views/DetailsSection.css:
(.details-section):
(.details-section > .header):
Create CSS variables for styles that will be overridden by the Sources navigation sidebar.
2019-08-08 Devin Rousso <drousso@apple.com>
Web Inspector: Page: don't allow the domain to be disabled
https://bugs.webkit.org/show_bug.cgi?id=200109
Reviewed by Brian Burg.
The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
sense to support the ability to "disable" (as well as "enable") the agent.
When the first frontend connects, we should treat the `PageAgent` as active and available.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.initializeTarget):
* Test/Test.js:
(WI.loaded):
(WI.initializeBackendTarget):
(WI.contentLoaded):
(WI.targetsAvailable): Added.
(WI.whenTargetsAvailable): Added.
* Test/TestStub.js:
Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
messages being sent to the frontend are batched.
2019-08-08 Devin Rousso <drousso@apple.com>
Web Inspector: rename `queryObjects` to `queryInstances` for clarity
https://bugs.webkit.org/show_bug.cgi?id=200520
Reviewed by Brian Burg.
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2019-08-07 Devin Rousso <drousso@apple.com>
Fix construction of `WI.EventBreakpoint` after r248201
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.setBreakpointForEventListener):
2019-08-07 Devin Rousso <drousso@apple.com>
Web Inspector: Settings: add an Engineering pane to expose useful settings for other WebKit engineers
https://bugs.webkit.org/show_bug.cgi?id=200492
Reviewed by Joseph Pecoraro.
Other WebKit engineers might find being able to see internal objects or pause in internal
scripts useful, so we should allow them to do so without having to enable Web Inspector's
debug "mode".
A new "Engineering" pane is added to the Settings Tab:
- Debugging
- Show WebKit-internal scripts
- Pause in WebKit-internal scripts
- Heap Snapshot
- Show Internal Objects
- Show Private Symbols
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype.initialLayout):
(WI.SettingsTabContentView.prototype._createEngineeringSettingsView): Added.
(WI.SettingsTabContentView.prototype._createDebugSettingsView):
* UserInterface/Base/Main.js:
(WI.resolvedLayoutDirection):
(WI.setLayoutDirection):
* UserInterface/Base/Object.js:
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
(InspectorBackendClass.prototype.set dumpInspectorTimeStats):
(InspectorBackendClass.prototype.get dumpInspectorTimeStats):
(InspectorBackendClass.prototype.set filterMultiplexingBackendInspectorProtocolMessages):
(InspectorBackendClass.prototype.get filterMultiplexingBackendInspectorProtocolMessages):
* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
* UserInterface/Debug/Bootstrap.js:
(WI.runBootstrapOperations):
* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleUncaughtExceptionRecord):
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype._updateOwnerStyleText):
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.update):
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):
(WI.DebuggerManager.prototype.initializeTarget):
(WI.DebuggerManager.prototype.get knownNonResourceScripts):
(WI.DebuggerManager.prototype.debuggerDidPause):
(WI.DebuggerManager.prototype.scriptDidParse):
(WI.DebuggerManager.prototype._handleEngineeringShowInternalScriptsSettingChanged): Added.
(WI.DebuggerManager.prototype._handleEngineeringPauseForInternalScriptsSettingChanged): Added.
(WI.DebuggerManager.prototype._pauseForInternalScriptsDidChange): Deleted.
(WI.DebuggerManager.prototype._debugUIEnabledDidChange): Deleted.
* 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):
2019-08-07 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: RTL: content of Variables section should always be LTR
https://bugs.webkit.org/show_bug.cgi?id=200481
Reviewed by Devin Rousso.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
2019-08-07 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: TimelineAgent already enabled
https://bugs.webkit.org/show_bug.cgi?id=200513
Reviewed by Joseph Pecoraro.
Update some incorrect compatibility comments from r248286.
* UserInterface/Protocol/InspectorFrontendAPI.js:
* UserInterface/Controllers/TimelineManager.js:
2019-08-06 Devin Rousso <drousso@apple.com>
Web Inspector: Show radius values in box model metrics view
https://bugs.webkit.org/show_bug.cgi?id=160993
<rdar://problem/27919035>
Reviewed by Brian Burg.
* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WI.BoxModelDetailsSectionRow.prototype._getPropertyValue): Added.
(WI.BoxModelDetailsSectionRow.prototype._getPropertyValueAsPx):
(WI.BoxModelDetailsSectionRow.prototype._getBox):
(WI.BoxModelDetailsSectionRow.prototype._getComponentPrefix): Added.
(WI.BoxModelDetailsSectionRow.prototype._getComponentSuffix):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
(WI.BoxModelDetailsSectionRow.prototype._applyUserInput):
(WI.BoxModelDetailsSectionRow.prototype._applyUserInput.inspectedPage_node_toggleInlineStyleProperty):
* UserInterface/Views/BoxModelDetailsSectionRow.css:
(.details-section .row.box-model .box): Added.
(.details-section .row.box-model .box > .label): Added.
(.details-section .row.box-model .box.position): Added.
(.details-section .row.box-model .box.margin): Added.
(.details-section .row.box-model:not(.hovered) .box.margin, .details-section .row.box-model .box.margin.active): Added.
(.details-section .row.box-model .box.border): Added.
(.details-section .row.box-model:not(.hovered) .box.border, .details-section .row.box-model .box.border.active): Added.
(.details-section .row.box-model .box.border > .label): Added.
(.details-section .row.box-model .box.border.has-top-left-radius, .details-section .row.box-model .box.border.has-top-left-radius .box): Added.
(.details-section .row.box-model .box.border.has-top-right-radius, .details-section .row.box-model .box.border.has-top-right-radius .box): Added.
(.details-section .row.box-model .box.border.has-bottom-right-radius, .details-section .row.box-model .box.border.has-bottom-right-radius .box): Added.
(.details-section .row.box-model .box.border.has-bottom-left-radius, .details-section .row.box-model .box.border.has-bottom-left-radius .box): Added.
(.details-section .row.box-model .box.padding): Added.
(.details-section .row.box-model:not(.hovered) .box.padding, .details-section .row.box-model .box.padding.active): Added.
(.details-section .row.box-model .box.content): Added.
(.details-section .row.box-model:not(.hovered) .box.content, .details-section .row.box-model .box.content.active): Added.
(.details-section .row.box-model :matches(.top, .right, .bottom, .left)): Added.
(.details-section .row.box-model :matches(.top, .right, .bottom, .left):not(.editing), .details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
(.details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
(.details-section .row.box-model :matches(.top-left, .top-right)): Added.
(.details-section .row.box-model :matches(.bottom-left, .bottom-right):not(.editing)): Added.
(.details-section .row.box-model :matches(.bottom-left, .bottom-right).editing): Added.
(.details-section .row.box-model :matches(.top-left, .bottom-left):not(.editing)): Added.
(.details-section .row.box-model :matches(.top-left, .bottom-left).editing): Added.
(.details-section .row.box-model :matches(.top-right, .bottom-right):not(.editing)): Added.
(.details-section .row.box-model :matches(.top-right, .bottom-right).editing): Added.
(@media (prefers-color-scheme: dark) .details-section .row.box-model .box): Added.
(@media (prefers-color-scheme: dark) .details-section .row.box-model:not(.hovered) .box:matches(.margin, .border, .padding, .content), .details-section .row.box-model .box.active:matches(.margin, .border, .padding, .content)): Added.
(@media (prefers-color-scheme: dark) .details-section .row.box-model .box.margin): Added.
(@media (prefers-color-scheme: dark) .details-section .row.box-model .box.border): Added.
(.details-section .row.box-model :matches(.position, .margin, .border, .padding, .content)): Deleted.
(.details-section .row.box-model .position): Deleted.
(.details-section .row.box-model .margin): Deleted.
(.details-section .row.box-model:not(.hovered) .margin, .details-section .row.box-model .margin.active): Deleted.
(.details-section .row.box-model .border): Deleted.
(.details-section .row.box-model:not(.hovered) .border, .details-section .row.box-model .border.active): Deleted.
(.details-section .row.box-model .padding): Deleted.
(.details-section .row.box-model:not(.hovered) .padding, .details-section .row.box-model .padding.active): Deleted.
(.details-section .row.box-model .content): Deleted.
(.details-section .row.box-model:not(.hovered) .content, .details-section .row.box-model .content.active): Deleted.
(.details-section .row.box-model :matches(.content span, .top, .right, .bottom, .left)): Deleted.
(.details-section .row.box-model :matches(.right, .left)): Deleted.
(.details-section .row.box-model:not(.hovered) :matches(.margin, .border, .padding, .content), .details-section .row.box-model .active:matches(.margin, .border, .padding, .content)): Deleted.
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype.update):
Ensure that the `_value` is updated whenever the `_rawValue` is updated.
2019-08-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r248289.
https://bugs.webkit.org/show_bug.cgi?id=200488
Broke internal builds (Requested by drousso on #webkit).
Reverted changeset:
"Web Inspector: Styles: show @supports CSS groupings"
https://bugs.webkit.org/show_bug.cgi?id=200419
https://trac.webkit.org/changeset/248289
2019-08-06 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: RTL: go-to arrows and expand triangles in Computed panel should match their context
https://bugs.webkit.org/show_bug.cgi?id=200449
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ComputedStyleSection.css:
(body[dir=rtl] .computed-style-section .computed-property-item .disclosure-button): Deleted.
* UserInterface/Views/Main.css:
(body[dir=rtl] [dir=ltr] .go-to-arrow): Added.
In the RTL mode, LTR "islands" should have their contents to be still LTR.
2019-08-05 Devin Rousso <drousso@apple.com>
Web Inspector: Styles: show @supports CSS groupings
https://bugs.webkit.org/show_bug.cgi?id=200419
Reviewed by Joseph Pecoraro.
* UserInterface/Models/CSSGrouping.js: Renamed from Source/WebInspectorUI/UserInterface/Models/CSSMedia.js.
(WI.CSSGrouping):
(WI.CSSGrouping.prototype.get type):
(WI.CSSGrouping.prototype.get text):
(WI.CSSGrouping.prototype.get sourceCodeLocation):
(WI.CSSGrouping.prototype.get isMedia): Added.
(WI.CSSGrouping.prototype.get isSupports): Added.
(WI.CSSGrouping.prototype.get prefix): Added.
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get groupings): Added.
(WI.CSSStyleDeclaration.prototype.generateCSSRuleString):
(WI.CSSStyleDeclaration.prototype.get mediaList): Deleted.
* UserInterface/Models/CSSRule.js:
(WI.CSSRule):
(WI.CSSRule.prototype.get groupings): Added.
(WI.CSSRule.prototype.update):
(WI.CSSRule.prototype._selectorResolved):
(WI.CSSRule.prototype.get mediaList): Deleted.
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._parseRulePayload):
(WI.DOMNodeStyles.prototype.rulesForSelector): Deleted.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader): Deleted.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration :matches(.header, .header-groupings)): Added.
(.spreadsheet-css-declaration :matches(.header, .header-groupings):first-child): Added.
(.spreadsheet-css-declaration .header-groupings > .grouping): Added.
(.spreadsheet-css-declaration .header-groupings + .header > .selector > .icon): Added.
(.spreadsheet-css-declaration :matches(.header, .header-media)): Deleted.
(.spreadsheet-css-declaration :matches(.header, .header-media):first-child): Deleted.
(.spreadsheet-css-declaration .media-label): Deleted.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.protocolGroupingTypeToEnum): Added.
(WI.CSSManager.protocolMediaSourceToEnum): Deleted.
* UserInterface/Main.html:
* UserInterface/Test.html:
2019-08-05 Devin Rousso <drousso@apple.com>
Can't use $0, $1 etc when inspecting Google Docs pages because the content uses these for function names
https://bugs.webkit.org/show_bug.cgi?id=195834
Reviewed by Joseph Pecoraro.
Allow the user to alias saved results by providing a different prefix (e.g. "$") from within
Web Inspector. When changing the alias, all existing saved results will update to be
reference-able from the new alias.
* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager):
(WI.RuntimeManager.preferredSavedResultPrefix): Added.
(WI.RuntimeManager.prototype.initializeTarget):
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
* UserInterface/Base/Setting.js:
* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI.contentLoaded.updateConsoleSavedResultPrefixCSSVariable): Added.
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype.toClipboardString):
(WI.ConsoleMessageView.prototype.removeEventListeners): Added.
(WI.ConsoleMessageView.prototype._appendSavedResultIndex):
(WI.ConsoleMessageView.prototype._appendSavedResultIndex.updateSavedVariableText): Added.
(WI.ConsoleMessageView.prototype._rootPropertyPathForObject):
(WI.ConsoleMessageView.prototype._rootPropertyPathForObject.prefixSavedResultIndex): Added.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._sessionStarted):
(WI.LogContentView.prototype._logCleared):
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom.show-last-selected li.last-selected > span::after):
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole):
(WI.QuickConsole.prototype.closed):
(WI.QuickConsole.prototype._updateAutomaticExecutionContextPathComponentTooltip): Added.
Listen for changes to the setting that holds the current saved result alias and update any
related UI accordingly.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createConsoleSettingsView):
* UserInterface/Views/SettingsTabContentView.css:
(.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Added.
* UserInterface/Views/SettingsGroup.js:
(WI.SettingsGroup.prototype.addCustomEditor): Added.
Add an input to the Settings tab that controls the saved result prefix alias. Only allow
[a-zA-Z0-9_$] as values (but [0-9] cannot be used as the start).
* UserInterface/Models/PropertyPath.js:
(WI.PropertyPath.prototype.set pathComponent): Added.
Miscellaneous getters/setters.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.newline): Added.
Convenience function for adding newlines to test results.
2019-08-05 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: disable related agents when the tab is closed
https://bugs.webkit.org/show_bug.cgi?id=200118
Reviewed by Joseph Pecoraro.
Rework how `enable`/`disable` is used for timeline-related agents so that events are not sent
and data isn't kept alive when the Timelines tab isn't enabled.
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager):
(WI.TimelineManager.prototype.get domains): Added.
(WI.TimelineManager.prototype.activateExtraDomain): Added.
(WI.TimelineManager.prototype.initializeTarget):
(WI.TimelineManager.prototype.reset):
(WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
(WI.TimelineManager.prototype.enable): Added.
(WI.TimelineManager.prototype.disable): Added.
(WI.TimelineManager.prototype.startCapturing):
(WI.TimelineManager.prototype.stopCapturing):
(WI.TimelineManager.prototype.async processJSON):
(WI.TimelineManager.prototype.capturingStarted):
(WI.TimelineManager.prototype.capturingStopped):
(WI.TimelineManager.prototype.autoCaptureStarted):
(WI.TimelineManager.prototype.eventRecorded):
(WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
(WI.TimelineManager.prototype.pageLoadEventFired):
(WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
(WI.TimelineManager.prototype.memoryTrackingUpdated):
(WI.TimelineManager.prototype.heapTrackingStarted):
(WI.TimelineManager.prototype.heapTrackingCompleted):
(WI.TimelineManager.prototype.heapSnapshotAdded):
(WI.TimelineManager.prototype._loadNewRecording):
(WI.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
(WI.TimelineManager.prototype._provisionalLoadStarted):
(WI.TimelineManager.prototype._mainResourceDidChange):
(WI.TimelineManager.prototype._resourceWasAdded):
(WI.TimelineManager.prototype._garbageCollected):
(WI.TimelineManager.prototype._memoryPressure):
(WI.TimelineManager.prototype.scriptProfilerTrackingUpdated):
(WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
(WI.TimelineManager.prototype._updateAutoCaptureInstruments):
(WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
(WI.TimelineManager.prototype._handleDOMNodePowerEfficientPlaybackStateChanged):
* UserInterface/Models/Instrument.js:
(WI.Instrument.startLegacyTimelineAgent):
(WI.Instrument.stopLegacyTimelineAgent):
* UserInterface/Controllers/HeapManager.js:
(WI.HeapManager): Added.
(WI.HeapManager.prototype.get domains): Added.
(WI.HeapManager.prototype.activateExtraDomain): Added.
(WI.HeapManager.prototype.initializeTarget):
(WI.HeapManager.prototype.enable): Added.
(WI.HeapManager.prototype.disable): Added.
(WI.HeapManager.prototype.snapshot): Added.
(WI.HeapManager.prototype.getPreview): Added.
(WI.HeapManager.prototype.getRemoteObject): Added.
(WI.HeapManager.prototype.garbageCollected):
* UserInterface/Controllers/MemoryManager.js:
(WI.MemoryManager): Added.
(WI.MemoryManager.prototype.get domains): Added.
(WI.MemoryManager.prototype.activateExtraDomain): Added.
(WI.MemoryManager.prototype.initializeTarget):
(WI.MemoryManager.prototype.enable): Added.
(WI.MemoryManager.prototype.disable): Added.
(WI.MemoryManager.prototype.memoryPressure):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
(WI.TimelineTabContentView.prototype.closed):
* UserInterface/Models/HeapAllocationsInstrument.js:
(WI.HeapAllocationsInstrument):
(WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WI.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
(WI.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
(WI.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
Go through the `HeapManager` for `HeapAgent` commands so it can better manage state.
* UserInterface/Test/Test.js:
(WI.contentLoaded):
2019-08-05 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: brotli-compressed resources have "Compressed: No" in Resources details sidebar
https://bugs.webkit.org/show_bug.cgi?id=200452
Reviewed by Joseph Pecoraro.
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.get compressed):
Add "br" - Brotli content encoding.
2019-08-05 Devin Rousso <drousso@apple.com>
Web Inspector: Styles: variable swatch not shown for var() with a fallback
https://bugs.webkit.org/show_bug.cgi?id=200237
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
(WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens): Added.
(WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):
(WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
(WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
Check to see if there's a fallback value in the `var()` and tokenize it if there is. Mark
the property as invalid if the `var()` doesn't end up resolving to anything.
* UserInterface/Views/InlineSwatch.js:
(WI.InlineSwatch):
(WI.InlineSwatch.prototype.get value):
(WI.InlineSwatch.prototype._updateSwatch):
(WI.InlineSwatch.prototype._handleContextMenuEvent):
(WI.InlineSwatch.prototype._getNextValidHEXFormat.hexMatchesCurrentColor):
(WI.InlineSwatch.prototype._getNextValidHEXFormat):
Allow the `value` to be a function. In that case, use the getter `this.value` instead of the
value `this._value` directly so that the function is invoked.
This is needed for variable swatches because the fallback value could change after the
swatch has been created (e.g. another swatch in a CSS property value that just modifies the
text, rather than re-renders the entire CSS property value).
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.resolveVariableValue): Added.
Follow the variable chain until an ultimate value is reached.
* UserInterface/Models/CSSKeywordCompletions.js:
(WI.CSSKeywordCompletions.isColorAwareProperty):
(WI.CSSKeywordCompletions.isTimingFunctionAwareProperty): Added.
Limit `cubic-bezier` and `spring` tokens to only be shown for timing function properties.
2019-08-05 Devin Rousso <drousso@apple.com>
Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
https://bugs.webkit.org/show_bug.cgi?id=200422
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype._resourceAdded):
(WI.CSSManager.prototype._resourceTypeDidChange):
(WI.CSSManager.prototype._clearStyleSheetsForResource):
(WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
* UserInterface/Models/CSSStyleSheet.js:
(WI.CSSStyleSheet.prototype.get displayName):
* UserInterface/Models/CollectionTypes.js:
(WI.CSSStyleSheetCollection.prototype.get displayName):
* UserInterface/Models/Resource.js:
(WI.Resource.displayNameForType):
(WI.Resource.prototype.get syntheticMIMEType):
* UserInterface/Models/ResourceCollection.js:
(WI.ResourceCollection.prototype.objectIsRequiredType):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
(WI.NetworkTableContentView.shortDisplayNameForResourceType):
* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype._contentViewForResourceType):
* UserInterface/Views/ResourceSidebarPanel.js:
(WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._save):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):
* UserInterface/Views/StyleOriginView.js:
(WI.StyleOriginView.prototype.update):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype._shouldBeEditable):
* UserInterface/Views/CSSStyleSheetTreeElement.js:
(WI.CSSStyleSheetTreeElement):
* UserInterface/Views/ResourceIcons.css:
(:matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
(.source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
(.large :matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
(.large .source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
(:matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
(.source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.
(.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
(.large .source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.
2019-08-03 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Styles: move psuedo-selector rules before inherited rules
https://bugs.webkit.org/show_bug.cgi?id=199950
Reviewed by Joseph Pecoraro.
Since pseudo-selector rules (usually) affect the selected element, or are related to its
content, it's more useful to have them near that element's rules instead of after all of
it's inherited rules.
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
2019-08-03 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: Styles: add icons for various CSS rule types
https://bugs.webkit.org/show_bug.cgi?id=199946
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.displayNameForPseudoId):
Add hardcoded pseudo-selector identifiers for older backends.
* UserInterface/Models/CSSSelector.js:
(WI.CSSSelector.prototype.isPseudoSelector): Added.
(WI.CSSSelector.prototype.isPseudoElementSelector): Deleted.
There are more types of pseudo-selectors than just `:{before|after}`.
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.generateCSSRuleString): Added.
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionAddNewRule): Added.
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
Provide a delegate method for adding a new rule, so the `WI.SpreadsheetRulesStyleDetailsPanel`
can know what selector to focus once the new rule gets added.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu): Added.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration .header.editing-selector .selector): Added.
(.spreadsheet-css-declaration .selector > .icon): Added.
(.spreadsheet-css-declaration .selector > .icon + *): Added.
(.spreadsheet-css-declaration .selector.style-attribute > span): Added.
When "mousedown" (or "contextmenu") on the icon, show a context menu with helpful actions:
- Copy Rule
- {Disable|Enable} Rule
- Duplicate Selector
- Add :{active|focus|hover|visited} Rule
- Create ::{before|after} Rule
- Reveal in {Resources Tab|Sources Tab|Stylesheet}
Drive-by: add an extra 0.5px of initial margin before the Style Attribute selector (which is
sans-serif) so it properly aligns with the other selectors (which are monospaced).
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor:empty): Added.
(.spreadsheet-style-declaration-editor.no-properties): Deleted.
Add some extra space when there's no inline style so it looks a bit less cramped.
* UserInterface/Main.html:
* UserInterface/Views/StyleRuleIcons.css: Added.
(.author-style-rule-icon .icon):
(.author-style-rule-icon.pseudo-selector .icon):
(.user-style-rule-icon .icon):
(.user-style-rule-icon.pseudo-selector .icon):
(.user-agent-style-rule-icon .icon):
(.user-agent-style-rule-icon.pseudo-selector .icon):
(.inspector-style-rule-icon .icon):
(.inspector-style-rule-icon.pseudo-selector .icon):
(.inherited-style-rule-icon .icon):
(.inherited-element-style-rule-icon .icon):
* UserInterface/Images/StyleRule.svg: Added.
* UserInterface/Images/StyleRuleInheritedElement.svg: Added.
* UserInterface/Images/StyleRulePseudo.svg: Added.
Add generic icon classes for style rule icons.
* UserInterface/Base/Setting.js:
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
Add experimental setting.
* Localizations/en.lproj/localizedStrings.js:
2019-08-03 Devin Rousso <drousso@apple.com>
Web Inspector: DOM: add a special breakpoint for "All Events"
https://bugs.webkit.org/show_bug.cgi?id=200285
Reviewed by Joseph Pecoraro.
Similar to the existing "All Requests" breakpoint, there should be a way to set a breakpoint
that would pause for any DOM event, regardless of the event's name. This is useful for
situations where the event name isn't known, or where one simply want's to pause on the next
entry to the event loop.
Along these lines, make the "requestAnimationFrame", "setTimeout", and "setInterval"
event breakpoints into special breakpoints that can be added/removed via the create
breakpoint context menu. This simplifies the process for setting these breakpoints, and also
makes them more discoverable (most people wouldn't consider them to be "events").
* UserInterface/Models/EventBreakpoint.js:
(WI.EventBreakpoint):
(WI.EventBreakpoint.deserialize):
(WI.EventBreakpoint.prototype.saveIdentityToCookie):
(WI.EventBreakpoint.prototype.toJSON):
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype._pauseReasonFromPayload):
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager):
(WI.DOMDebuggerManager.prototype.initializeTarget):
(WI.DOMDebuggerManager.supportsDOMBreakpoints): Added.
(WI.DOMDebuggerManager.supportsEventBreakpoints):
(WI.DOMDebuggerManager.supportsEventListenerBreakpoints): Added.
(WI.DOMDebuggerManager.supportsURLBreakpoints):
(WI.DOMDebuggerManager.supportsXHRBreakpoints): Added.
(WI.DOMDebuggerManager.supportsAllListenersBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get allAnimationFramesBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get allIntervalsBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get allListenersBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get allTimeoutsBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.get listenerBreakpoints): Added.
(WI.DOMDebuggerManager.prototype.isBreakpointSpecial):
(WI.DOMDebuggerManager.prototype.listenerBreakpointForEventName): Added.
(WI.DOMDebuggerManager.prototype.addEventBreakpoint):
(WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
(WI.DOMDebuggerManager.prototype.addURLBreakpoint):
(WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
(WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype.get eventBreakpoints): Deleted.
(WI.DOMDebuggerManager.prototype.eventBreakpointForTypeAndEventName): Deleted.
Add additional target compatibility checks.
* UserInterface/Views/EventBreakpointPopover.js:
(WI.EventBreakpointPopover.prototype.show):
(WI.EventBreakpointPopover.prototype.dismiss):
(WI.EventBreakpointPopover.prototype._handleTypeSelectChange): Deleted.
* UserInterface/Views/EventBreakpointPopover.css:
(.popover .event-breakpoint-content > input): Added.
(.popover .event-breakpoint-content > input::placeholder): Added.
(.popover .event-breakpoint-content > .event-type): Deleted.
(.popover .event-breakpoint-content > .event-type > input): Deleted.
(.popover .event-breakpoint-content > .event-type > input::placeholder): Deleted.
* UserInterface/Views/EventBreakpointTreeElement.css:
(.breakpoint.event.breakpoint-for-interval:not(.breakpoint-paused-icon) .icon): Added.
(.breakpoint.event.breakpoint-for-timeout:not(.breakpoint-paused-icon) .icon): Added.
(.breakpoint.event.breakpoint-for-timer:not(.breakpoint-paused-icon) .icon): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel):
(WI.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
(WI.DebuggerSidebarPanel.prototype._addBreakpoint):
(WI.DebuggerSidebarPanel.prototype._addTreeElement):
(WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
(WI.DebuggerSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint): Added.
(WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
(WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint): Added.
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
Add create breakpoint context menu items (also sort the breakpoints in this order):
- "All Animation Frames" => [A] All Animation Frames
- "All Timeouts" => [T] All Timeouts
- "All Intervals" => [I] All Intervals
- "All Events" => [E] All Events
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
* UserInterface/Base/Setting.js:
* UserInterface/Images/EventBreakpointInterval.svg: Added.
* UserInterface/Images/EventBreakpointTimeout.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/EventBreakpointTimer.svg.
* Localizations/en.lproj/localizedStrings.js:
2019-08-03 Devin Rousso <drousso@apple.com>
Web Inspector: Heap Snapshot Views should be searchable
https://bugs.webkit.org/show_bug.cgi?id=157582
<rdar://problem/26228629>
Reviewed by Joseph Pecoraro.
Without the ability to filter/search, it's far more difficult to find objects of interest.
Rather than spending time scrolling through the entire heap snapshot or sorting by "Name",
a simple filter/search (which also uses the global search settings) is almost instant.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WI.HeapAllocationsTimelineView.prototype.updateFilter): Addded.
(WI.HeapAllocationsTimelineView.prototype.get showsFilterBar): Deleted.
* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WI.HeapSnapshotClusterContentView.prototype.updateFilter): Added.
* UserInterface/Views/HeapSnapshotContentView.js:
(WI.HeapSnapshotContentView):
(WI.HeapSnapshotContentView.prototype.updateFilter): Added.
(WI.HeapSnapshotContentView.prototype.dataGridMatchNodeAgainstCustomFilters): Added.
(WI.HeapSnapshotContentView.prototype.dataGridMatchShouldPopulateWhenFilteringNode): Added.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
Don't attempt to populate each heap snapshot `WI.DataGridNode` when filtering, as that can
quickly exhaust memory due to the sheer size of a heap snapshot.
* UserInterface/Base/Main.js:
(WI._find):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.prototype.get canHandleFindEvent): Added.
(WI.TimelineTabContentView.prototype.handleFindEvent): Added.
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype.get canFocusFilterBar): Added.
(WI.TimelineRecordingContentView.prototype.focusFilterBar): Added.
* UserInterface/Views/FilterBar.js:
(WI.FilterBar.prototype.focus): Added.
Allow the current tab to intercept the find shortcut and do something custom. In the case
of a `WI.TimelineTabContentView`, declare that it can handle the find event if the displayed
content view (`WI.TimelineRecordingContentView`) can focus it's filter bar. If so, when the
find shortcut is triggered, focus the filter bar.
2019-08-03 Devin Rousso <drousso@apple.com>
Web Inspector: CSS Formatter: comments with an escape character aren't formatted
https://bugs.webkit.org/show_bug.cgi?id=200168
Reviewed by Joseph Pecoraro.
Don't allow escaping of the "*" in CSS comments (e.g. `\*/`).
Add additional pretty printing rules for comments so that there's always some space between
them and the surrounding text. This ensures that they don't interfere with readability.
* UserInterface/Workers/Formatter/CSSFormatter.js:
(CSSFormatter.prototype._format):
* UserInterface/Workers/Formatter/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype.get indented): Added.
2019-08-03 Devin Rousso <drousso@apple.com>
Web Inspector: Console: execution context picker doesn't update when switching to the inferred context from auto
https://bugs.webkit.org/show_bug.cgi?id=200279
Reviewed by Joseph Pecoraro.
The `representedObject` of the "auto" execution context path component is shared with that
execution context's actual path component, meaning that if the user switches from "auto" to
that execution context's path component, the underlying `representedObject` wouldn't change,
and therfore the `RuntimeManager.Event.ActiveExecutionContextChanged` wouldn't fire. In this
case, update the visible ("selected") execution context path component manually.
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype._selectExecutionContext):
(WI.QuickConsole.prototype._pathComponentSelected):
2019-08-02 Devin Rousso <drousso@apple.com>
Web Inspector: Console: all navigation items should be shown in the split console
https://bugs.webkit.org/show_bug.cgi?id=200280
Reviewed by Joseph Pecoraro.
* UserInterface/Views/LogContentView.js:
(WI.LogContentView):
(WI.LogContentView.prototype.get navigationItems):
Adjust the `visibilityPriority` of each `navigationItems` so that the filter/scope bars are
kept visible for longer than the "Preserve Log"/"Emulate User Gesture" toggles.
* UserInterface/Views/FindBanner.js:
(WI.FindBanner):
* UserInterface/Views/FindBanner.css:
(.find-banner.console-find-banner > input[type="search"]):
(.find-banner.console-find-banner > :matches(input[type="search"], button)):
(.find-banner.console-find-banner > input[type="search"]:focus, .find-banner.console-find-banner > input[type="search"]:focus ~ button, .find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown), .find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown) ~ button ): Added.
(.find-banner.console-find-banner > input[type="search"]::placeholder): Deleted.
(.find-banner.console-find-banner > input[type="search"]:focus): Deleted.
(.find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown)): Deleted.
(@media (prefers-color-scheme: dark) .find-banner.console-find-banner > input[type=search]:not(:placeholder-shown)): Deleted.
Make the `WI.FindBanner` blend in with the surrounding content when it's not focused or has
no content.
2019-08-02 Devin Rousso <drousso@apple.com>
Web Inspector: Storage: disable related agents when the tab is closed
https://bugs.webkit.org/show_bug.cgi?id=200117
Reviewed by Joseph Pecoraro.
Rework how `enable`/`disable` is used for storage-related agents so that events are not sent
and data isn't kept alive when the Storage tab isn't enabled.
* UserInterface/Controllers/ApplicationCacheManager.js:
(WI.ApplicationCacheManager):
(WI.ApplicationCacheManage.prototype.get domains): Added.
(WI.ApplicationCacheManage.prototype.activateExtraDomain): Added.
(WI.ApplicationCacheManager.prototype.initializeTarget):
(WI.ApplicationCacheManager.prototype.enable): Added.
(WI.ApplicationCacheManager.prototype.disable): Added.
(WI.ApplicationCacheManager.prototype.networkStateUpdated):
(WI.ApplicationCacheManager.prototype.applicationCacheStatusUpdated):
(WI.ApplicationCacheManager.prototype._reset): Added.
(WI.ApplicationCacheManager.prototype._mainResourceDidChange):
(WI.ApplicationCacheManager.prototype._manifestForFrameLoaded):
(WI.ApplicationCacheManager.prototype._framesWithManifestsLoaded):
(WI.ApplicationCacheManager.prototype.initialize): Deleted.
* UserInterface/Controllers/DOMStorageManager.js:
(WI.DOMStorageManager):
(WI.DOMStorageManager.prototype.get domains): Added.
(WI.DOMStorageManager.prototype.activateExtraDomain): Added.
(WI.DOMStorageManager.prototype.initializeTarget):
(WI.DOMStorageManager.prototype.enable): Added.
(WI.DOMStorageManager.prototype.disable): Added.
(WI.DOMStorageManager.prototype.itemsCleared):
(WI.DOMStorageManager.prototype.itemRemoved):
(WI.DOMStorageManager.prototype.itemAdded):
(WI.DOMStorageManager.prototype.itemUpdated):
(WI.DOMStorageManager.prototype.inspectDOMStorage):
(WI.DOMStorageManager.prototype._reset): Added.
(WI.DOMStorageManager.prototype._addDOMStorageIfNeeded):
(WI.DOMStorageManager.prototype._addCookieStorageIfNeeded):
(WI.DOMStorageManager.prototype._mainResourceDidChange):
(WI.DOMStorageManager.prototype.initialize): Deleted.
(WI.DOMStorageManager.prototype.domStorageWasAdded): Deleted.
* UserInterface/Controllers/DatabaseManager.js:
(WI.DatabaseManager):
(WI.DatabaseManager.prototype.get domains): Added.
(WI.DatabaseManager.prototype.activateExtraDomain): Added.
(WI.DatabaseManager.prototype.initializeTarget):
(WI.DatabaseManager.prototype.enable): Added.
(WI.DatabaseManager.prototype.disable): Added.
(WI.DatabaseManager.prototype.databaseWasAdded):
(WI.DatabaseManager.prototype.inspectDatabase):
(WI.DatabaseManager.prototype._reset): Added.
(WI.DatabaseManager.prototype._mainResourceDidChange):
(WI.DatabaseManager.prototype.initialize): Deleted.
* UserInterface/Controllers/IndexedDBManager.js:
(WI.IndexedDBManager):
(WI.IndexedDBManager.prototype.get domains): Added.
(WI.IndexedDBManager.prototype.activateExtraDomain): Added.
(WI.IndexedDBManager.prototype.initializeTarget):
(WI.IndexedDBManager.prototype.enable): Added.
(WI.IndexedDBManager.prototype.disable): Added.
(WI.IndexedDBManager.prototype.clearObjectStore):
(WI.IndexedDBManager.prototype._reset): Added.
(WI.IndexedDBManager.prototype._mainResourceDidChange):
(WI.IndexedDBManager.prototype.initialize): Deleted.
* UserInterface/Controllers/AppController.js:
(WI.AppController.prototype.activateExtraDomains):
* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.get domains): Added.
(WI.CanvasManager.prototype.activateExtraDomain): Added.
Only call `enable` on any extra agents if the domain is not controlled by a manager.
* UserInterface/Views/StorageTabContentView.js:
(WI.StorageTabContentView):
(WI.StorageTabContentView.static isTabAllowed):
(WI.StorageTabContentView.prototype.canShowRepresentedObject):
(WI.StorageTabContentView.prototype.closed): Added.
* UserInterface/Test.html:
* UserInterface/Test/Test.js:
(WI.loaded):
(WI.contentLoaded):
2019-08-02 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: Develop > Start Timeline Recording doesn't work when focused on a detached inspector window
https://bugs.webkit.org/show_bug.cgi?id=200125
<rdar://problem/53543008>
Reviewed by Brian Burg.
Always show the Timelines tab in Web Inspector whenever timeline recording starts/stops.
Notify the UIProcess whenever the timeline recording state changes.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled):
2019-08-02 Devin Rousso <drousso@apple.com>
Web Inspector: "Inspector.initialized" happens before breakpoints are set
https://bugs.webkit.org/show_bug.cgi?id=200364
Reviewed by Joseph Pecoraro.
Allow managers to register a promise that will delay `Inspector.initialized`. This is needed
when restoring breakpoints so that "Automatically Show Web Inspector for JSContexts" can set
them before any scripts have evaluated, ensuring that no breakpoints are "skipped".
* UserInterface/Protocol/Target.js:
(WI.Target.prototype.initialize):
(WI.Target.registerInitializationPromise): Added.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager):
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):
2019-08-01 Devin Rousso <drousso@apple.com>
Unreviewed, remove `emulateUserGesture` parameter from `Debugger.evaluateOnCallFrame` for iOS 13
Rubber-stamped by Joseph Pecoraro.
* UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-13.0.json:
The iOS 13 protocol has already been decided, so these shouldn't have been added unless they
were cherry-picked in.
2019-07-31 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: support emulateUserGesture parameter in Debugger.evaluateOnCallFrame
https://bugs.webkit.org/show_bug.cgi?id=200272
Reviewed by Joseph Pecoraro.
When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.
* UserInterface/Controllers/RuntimeManager.js:
(WI.RuntimeManager.prototype.evaluateInInspectedWindow):
* UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-13.0.json:
2019-07-31 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'issueMessage.sourceCodeLocation.sourceCode')
https://bugs.webkit.org/show_bug.cgi?id=200296
Reviewed by Joseph Pecoraro.
When fetching all `WI.IssueMessage`s for a given `WI.SourceCode`, the `WI.IssueMessage` may
be associated in a different way (e.g. by url, instead of `WI.SourceCodeLocation`). As such,
we should pass the `WI.SourceCode` along, and use it when adding the `WI.IssueTreeElement`.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._addIssuesForSourceCode):
(WI.DebuggerSidebarPanel.prototype._addIssue):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addIssue):
(WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
2019-07-31 Devin Rousso <drousso@apple.com>
Web Inspector: DOM: provide a way to disable/breakpoint all event listeners for a given DOM node or event type
https://bugs.webkit.org/show_bug.cgi?id=200233
Reviewed by Joseph Pecoraro.
Often, when trying to debug issues with DOM events, it's extremely tedious to have to go
through event listeners one by one and disable them (or set a breakpoint). This patch adds
a way of performing these "state modifications" in batch operations, based on the current
grouping method of the Event Listeners section.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.supportsDisablingEventListeners): Added.
(WI.DOMManager.supportsEventListenerBreakpoints): Added.
Common convenience functions for checking for protocol support.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.createEventListenerSection):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners .details-section.event-listener-section > .header > .event-listener-options): Added.
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners .details-section.event-listener-section:hover > .header > .event-listener-options): Added.
Add an options element that shows a context menu:
- "Disable Event Listeners"/"Enable Event Listeners"
- "Add Breakpoints"/"Delete Breakpoints"
Each action applies the corresponding state to all event listeners in that section.
* UserInterface/Views/EventListenerSectionGroup.js:
(WI.EventListenerSectionGroup):
(WI.EventListenerSectionGroup.prototype.get supportsStateModification): Added.
(WI.EventListenerSectionGroup.prototype.get isEventListenerDisabled): Added.
(WI.EventListenerSectionGroup.prototype.set isEventListenerDisabled): Added.
(WI.EventListenerSectionGroup.prototype.get hasEventListenerBreakpoint): Added.
(WI.EventListenerSectionGroup.prototype.set hasEventListenerBreakpoint): Added.
(WI.EventListenerSectionGroup.prototype._updateDisabledToggle): Added.
(WI.EventListenerSectionGroup.prototype._updateBreakpointToggle): Added.
(WI.EventListenerSectionGroup.prototype._createDisabledToggleRow): Deleted.
(WI.EventListenerSectionGroup.prototype._createBreakpointToggleRow): Deleted.
Expose a way to modify the event listener's state so that the UI (e.g. checkbox and title)
also get's updated.
* Localizations/en.lproj/localizedStrings.js:
2019-07-30 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Resources: Display outline around images when viewing image collections
https://bugs.webkit.org/show_bug.cgi?id=200212
Reviewed by Devin Rousso.
* UserInterface/Views/CollectionContentView.css:
(.content-view.collection .resource.image img):
(.content-view.collection .resource.image img:hover):
2019-07-29 Devin Rousso <drousso@apple.com>
Web Inspector: Resources: add a "Show Grid" navigation item for the Images collection
https://bugs.webkit.org/show_bug.cgi?id=200260
Reviewed by Joseph Pecoraro.
Each subview `WI.ImageResourceContentView` already listens for changes to the underlying
`WI.settings.showImageGrid` and adds the `.show-grid` class if enabled. As such, this change
just adds a `WI.ButtonNavigationItem` for toggling `WI.settings.showImageGrid` from the
Images "folder".
* UserInterface/Views/ResourceCollectionContentView.js:
(WI.ResourceCollectionContentView):
(WI.ResourceCollectionContentView.prototype.get navigationItems):
(WI.ResourceCollectionContentView.prototype.attached): Added.
(WI.ResourceCollectionContentView.prototype.detached): Added.
(WI.ResourceCollectionContentView.prototype._updateImageTypeScopeBar):
Drive-by: hide the image type `WI.ScopeBar` if there's only one type of image.
(WI.ResourceCollectionContentView.prototype._handleShowGridButtonClicked): Added.
(WI.ResourceCollectionContentView.prototype._handleShowImageGridSettingChanged): Added.
2019-07-29 Devin Rousso <drousso@apple.com>
Web Inspector: add -webkit-* keywords for *-height CSS properties
https://bugs.webkit.org/show_bug.cgi?id=200240
Reviewed by Joseph Pecoraro.
* UserInterface/Models/CSSKeywordCompletions.js:
* UserInterface/Views/Main.css:
(.message-text-view):
* UserInterface/Views/Toolbar.css:
(.toolbar .control-section):
(.toolbar .item-section):
Replace `-webkit-min-content` with `min-content`.
2019-07-26 Greg Doolittle <gr3g@apple.com>
Web Inspector: AXI: Audit: Typo of "some" as "somee"
https://bugs.webkit.org/show_bug.cgi?id=200166
Reviewed by Devin Rousso.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager):
2019-07-24 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: no context menu items work when context menu clicking on "Add Breakpoint"
https://bugs.webkit.org/show_bug.cgi?id=199953
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.addMouseDownContextMenuHandlers): Added.
Create a helper function for managing elements that show a context menu on "mousedown".
* UserInterface/Base/SearchUtilities.js:
(WI.SearchUtilities.createSettingsButton):
* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype._populateCanvasElementButtonContextMenu): Added.
(WI.CanvasContentView.prototype._populateViewShaderButtonContextMenu): Added.
(WI.CanvasContentView.prototype._populateViewRecordingButtonContextMenu): Added.
(WI.CanvasContentView.prototype._handleCanvasElementButtonMouseDown): Deleted.
(WI.CanvasContentView.prototype._handleViewShaderButtonMouseDown): Deleted.
(WI.CanvasContentView.prototype._handleViewRecordingButtonMouseDown): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel):
(WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu): Added.
(WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu): Added.
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown): Deleted.
(WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): Deleted.
* UserInterface/Views/TabBar.js:
(WI.TabBar):
(WI.TabBar.prototype._handleTabPickerTabContextMenu): Deleted.
* UserInterface/Views/LegacyTabBar.js:
(WI.LegacyTabBar):
(WI.LegacyTabBar.prototype._handleTabPickerTabContextMenu): Deleted.
Remove the "contextmenu" handler on the tab picker, as that's already used by the entire
tab bar to show/hide tabs.
2019-07-24 Devin Rousso <drousso@apple.com>
Web Inspector: print the target of `console.screenshot` last so the target is the closest item to the image
https://bugs.webkit.org/show_bug.cgi?id=199308
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype.render):
(WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
(WI.ConsoleMessageView.prototype._handleContextMenu):
* UserInterface/Views/ConsoleMessageView.css:
(.console-image > .console-message-body > :matches(hr, img)): Added.
(.console-image > .console-message-body > hr): Added.
(.console-image > .console-message-body > img): Added.
(.console-log-level.console-image::before): Added.
(.console-message-body > .console-image): Deleted.
(.console-log-level.console-image-container::before): Deleted.
Allow `ConsoleMessage.MessageType.Image` to be an `ConsoleMessage.MessageLevel.Error`, and
print the message (and extra parameters) in that case.
Drive-by: reorganize the switch-case so all paths have the same `default` case.
* Localizations/en.lproj/localizedStrings.js:
2019-07-23 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Styles: Command-X should cut selected properties
https://bugs.webkit.org/show_bug.cgi?id=199341
Reviewed by Devin Rousso.
Implement cutting of selected CSS properties in the style editor.
Unify cutting and copying logic wherever possible.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.placeTextCaretInFocusedProperty): Added.
Cut/copy events could only fire on SpreadsheetCSSStyleDeclarationEditor element if it
has selection inside of it. Placing text caret at the beginning of the focused property
ensures that.
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyCopy): Deleted.
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._copySelectedProperties): Added.
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._removeSelectedProperties): Added.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
* UserInterface/Views/SpreadsheetStyleProperty.js:
Remove old copying logic.
2019-07-23 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Display "Resource has no content" for about:blank iframes instead of an error
https://bugs.webkit.org/show_bug.cgi?id=198029
Reviewed by Devin Rousso.
Display "about:blank" in the middle of the content view when selecting "about:blank" resources.
Previoulsly, we showed a misleading "An error occurred trying to load the resource" error
message.
* UserInterface/Models/CSSStyleSheet.js:
(WI.CSSStyleSheet.prototype.requestContentFromBackend):
* UserInterface/Models/Resource.js:
(WI.Resource.prototype.requestContentFromBackend):
* UserInterface/Models/Script.js:
(WI.Script.prototype.requestContentFromBackend):
* UserInterface/Models/SourceCode.js:
(WI.SourceCode.generateSpecialContentForURL):
(WI.SourceCode.prototype._processContent):
(WI.SourceCode):
* UserInterface/Views/ResourceContentView.js:
(WI.ResourceContentView.prototype._contentAvailable):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype._contentAvailable):
(WI.SourceCodeTextEditor.prototype._showMessage):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype._contentDidPopulate):
Display empty text editor when it has no content instead of "Resource has no content" message.
2019-07-22 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: Breakpoint at specified location already exists.
https://bugs.webkit.org/show_bug.cgi?id=197034
<rdar://problem/50049004>
Reviewed by Joseph Pecoraro.
When "adjusting" a `WI.Breakpoint` (e.g. removing and then re-adding with a different
configuration), make sure to only re-add the `WI.Breakpoint` to the `WI.Target` it was just
removed from, rather to all `WI.targets`.
Since we iterate over `WI.targets` in both `WI.DebuggerManager.prototype._setBreakpoint` and
`WI.DebuggerManager.prototype._removeBreakpoint`, we ended up iterating `WI.targets` twice.
Each time the `WI.Breakpoint` is removed from a `WI.Target`, pass the `WI.Target` to the
`callback` given to `WI.DebuggerManager.prototype._removeBreakpoint`, so that the eventual
call to `WI.DebuggerManager.prototype._setBreakpoint` can reuse it as the `specificTarget`,
instead of iterating `WI.targets` (meaning we only iterate it once).
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.addBreakpoint):
(WI.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
(WI.DebuggerManager.prototype._breakpointDisplayLocationDidChange):
(WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
2019-07-22 Devin Rousso <drousso@apple.com>
Localization: change fps to FPS
<rdar://problem/53342508>
Rubber-stamped by Joseph Pecoraro.
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WI.RenderingFrameTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition):
* Localizations/en.lproj/localizedStrings.js:
2019-07-19 Devin Rousso <drousso@apple.com>
Web Inspector: Issues toggling multiple breakpoints on one line
https://bugs.webkit.org/show_bug.cgi?id=199918
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor):
(WI.SourceCodeTextEditor.prototype.close):
(WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
(WI.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
(WI.SourceCodeTextEditor.prototype._handleFormatterDidChange): Added.
Listen for `WI.SourceCode.Event.FormatterDidChange` events as there may be multiple content
views for the same `WI.SourceCode`. Previously, if there were, only the active one would
properly update it's "line -> column -> breakpoint" mapping, causing an error to be thrown
when the non-active content views tried to retrieve the breakpoint for the new line/column.
2019-07-17 Olivier Blin <olivier.blin@softathome.com>
Web Inspector: application/xml content not shown
https://bugs.webkit.org/show_bug.cgi?id=199861
Reviewed by Devin Rousso.
application/xml content from XHR requests was not shown in the
inspector, an error message was displayed instead.
application/xml content should be treated as text, since
application/xml is the standard mimetype for XML content.
Apache serves XML content with the application/xml mimetype by
default.
* UserInterface/Base/MIMETypeUtilities.js:
(WI.fileExtensionForMIMEType):
Report "xml" extension for "application/xml" mimetype.
(WI.shouldTreatMIMETypeAsText):
Treat XML files as text.
2019-07-16 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Changes panel should be strictly LTR
https://bugs.webkit.org/show_bug.cgi?id=199767
Reviewed by Joseph Pecoraro.
Changes panel is primarily CSS code and CSS is strictly LTR.
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
(WI.ChangesDetailsSidebarPanel):
2019-07-15 Youenn Fablet <youenn@apple.com>
Enable a debug WebRTC mode without any encryption
https://bugs.webkit.org/show_bug.cgi?id=199177
<rdar://problem/52074986>
Reviewed by Eric Carlson.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
2019-07-15 Greg Doolittle <gr3g@apple.com>
Web Inspector: AXI: Audit: Typos in Accessibility audits
https://bugs.webkit.org/show_bug.cgi?id=199716
<rdar://problem/52721711>
Reviewed by Devin Rousso.
* UserInterface/Controllers/AuditManager.js:
2019-07-15 Devin Rousso <drousso@apple.com>
Web Inspector: Device Settings: update Safari user agent from 12.2 to 13.0
https://bugs.webkit.org/show_bug.cgi?id=199758
Reviewed by Maciej Stachowiak.
* UserInterface/Base/Main.js:
(WI._handleDeviceSettingsToolbarButtonClicked):
2019-07-12 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Changes: dismissing a blank property makes style rule to show in Changes panel
https://bugs.webkit.org/show_bug.cgi?id=199760
Reviewed by Devin Rousso.
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype._updateOwnerStyleText):
Call updatePropertiesModifiedState even when _updateOwnerStyleText returns early.
2019-07-12 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: always show all navigation bar items, but disable those that wouldn't work
https://bugs.webkit.org/show_bug.cgi?id=199594
Reviewed by Ross Kirsling.
Reorder the navigation items of the Elements tab (left to right):
- Show rulers
- Force print media styles
- Force Dark Appearance / Force Light Appearance
- Show compositing borders
- Enable paint flashing
- Show shadow DOM nodes
This way, "related" (e.g. print styles and dark/light appearance both relate to CSS media)
toggles are grouped closer together.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype.get navigationItems):
(WI.DOMTreeContentView.prototype._defaultAppearanceDidChange):
(WI.DOMTreeContentView.prototype._toggleAppearance):
* Localizations/en.lproj/localizedStrings.js:
2019-07-11 Devin Rousso <drousso@apple.com>
Web Inspector: Layers: Uncaught Exception: Request with id = 2 failed. {"code":-32601,"message":"'Page' domain was not found","data":[{"code":-32601,"message":"'Page' domain was not found"}]}
https://bugs.webkit.org/show_bug.cgi?id=199555
Reviewed by Joseph Pecoraro.
Use modern inspected target support checking, and defer agent commands until a target is
available.
* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView):
(WI.Layers3DContentView.prototype._showPaintRectsSettingChanged):
(WI.Layers3DContentView.prototype._updateCompositingBordersButtonState):
(WI.Layers3DContentView.prototype._toggleCompositingBorders):
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype._toggleCompositingBorders):
(WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
(WI.DOMTreeContentView.prototype._showPaintRectsSettingChanged):
(WI.DOMTreeContentView.prototype._showPrintStylesChanged):
(WI.DOMTreeContentView.prototype._showRulersChanged):
Drive-by: apply the same changes to the Elements tab for when the Layers tab isn't enabled.
2019-07-09 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: replace WTF::Vector with std::initializer_list in CallTracer to avoid dynamic allocations
https://bugs.webkit.org/show_bug.cgi?id=199611
Reviewed by Joseph Pecoraro.
* UserInterface/Models/Recording.js:
(WI.Recording.prototype.async swizzle):
Drive-by: handle the situation where a parameter is an array of deduplicated strings, which
would otherwise be treated as an array of numbers.
2019-07-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add another Protocol Version (iOS 13.0)
https://bugs.webkit.org/show_bug.cgi?id=199631
<rdar://problem/47538193>
Reviewed by Devin Rousso.
* UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js: Added.
* Versions/Inspector-iOS-13.0.json: Added.
2019-07-08 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: special breakpoints and event targets should be sorted into separate "areas"
https://bugs.webkit.org/show_bug.cgi?id=199554
Reviewed by Joseph Pecoraro.
Move the special All Requests breakpoint down to be right above all other URL breakpoints.
Move the `window` object tree element below other DOM node tree elements.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._addTreeElement):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
2019-07-08 Devin Rousso <drousso@apple.com>
Web Inspector: DOM Debugger: there should be different icons for each type of DOM breakpoint
https://bugs.webkit.org/show_bug.cgi?id=199552
Reviewed by Joseph Pecoraro.
[S] for Subtree Modified
[A] for Attribute Modified
[R] for Node Removed
* UserInterface/Views/DOMBreakpointTreeElement.js:
(WI.DOMBreakpointTreeElement):
* UserInterface/Views/DOMBreakpointTreeElement.css: Added.
(.breakpoint.dom.breakpoint-for-subtree-modified:not(.breakpoint-paused-icon) .icon):
(.breakpoint.dom.breakpoint-for-attribute-modified:not(.breakpoint-paused-icon) .icon):
(.breakpoint.dom.breakpoint-for-node-removed:not(.breakpoint-paused-icon) .icon):
* UserInterface/Main.html:
* UserInterface/Images/DOMBreakpointAttributeModified.svg: Added.
* UserInterface/Images/DOMBreakpointNodeRemoved.svg: Added.
* UserInterface/Images/DOMBreakpointSubtreeModified.svg: Added.
2019-07-08 Devin Rousso <drousso@apple.com>
Uncaught Exception: Unexpected enum value: CPU
https://bugs.webkit.org/show_bug.cgi?id=199564
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype._updateAutoCaptureInstruments):
Filter the list of auto-capture instruments based on what's actually supported, instead of
directly using the saved list from the `WI.Setting`.
2019-07-08 Devin Rousso <drousso@apple.com>
Enabling the Layers tab hides the paint flashing button
https://bugs.webkit.org/show_bug.cgi?id=199549
Reviewed by Joseph Pecoraro.
Still show the Compositing Borders and Paint Flashing navigation items in the Elements tab
even when the Layers tab is enabled (just like the Layers details sidebar).
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype.get navigationItems):
(WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
2019-07-08 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: Elements: pasting in the Styles sidebar adds a text node to the DOM tree
https://bugs.webkit.org/show_bug.cgi?id=199588
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WI._paste):
Bail if `event.defaultPrevented`, as that means that something else has handled (and likely
overrode) this event.
2019-07-08 Devin Rousso <drousso@apple.com>
Web Inspector: the "x" in the Exception icon overlaps the border
https://bugs.webkit.org/show_bug.cgi?id=199553
Reviewed by Joseph Pecoraro.
* UserInterface/Images/Exception.svg:
* UserInterface/Images/Function.svg:
* UserInterface/Images/TailDeletedFunction.svg:
2019-07-08 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: there should be a different icon for URL breakpoints
https://bugs.webkit.org/show_bug.cgi?id=199550
Reviewed by Joseph Pecoraro.
Use the same (down|up) arrow icon for the Network Tab and the Network timeline.
* UserInterface/Views/URLBreakpointTreeElement.js:
(WI.URLBreakpointTreeElement):
* UserInterface/Views/URLBreakpointTreeElement.css:
(.breakpoint.url:not(.breakpoint-paused-icon) .icon): Added.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._addBreakpoint):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
* UserInterface/Images/URLBreakpoint.svg: Added.
2019-07-08 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: CPU: the Duration string isn't localized
https://bugs.webkit.org/show_bug.cgi?id=199582
<rdar://problem/51698165>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype._layoutEnergyChart):
* Localizations/en.lproj/localizedStrings.js:
2019-07-06 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values
https://bugs.webkit.org/show_bug.cgi?id=199090
<rdar://problem/51965431>
Reviewed by Devin Rousso.
`}` gets added by WI.tokenizeCSSValue (called by SpreadsheetStyleProperty.prototype._renderValue)
when it encounters unbalanced quotes. Fix unbalanced quotes by re-rendering the value from the model,
not the DOM content.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
For consistency, render property name from the model as well.
2019-07-05 Devin Rousso <drousso@apple.com>
Web Inspector: current call frame indicator not visible in dark mode
https://bugs.webkit.org/show_bug.cgi?id=199047
<rdar://problem/51922895>
Reviewed by Timothy Hatcher.
* UserInterface/Views/CallFrameTreeElement.css:
(.tree-outline .item.call-frame .status > .status-image):
(.tree-outline .item.call-frame.selected .status > .status-image):
Replace the CSS variables used for `fill` with their actual color value (in `light` mode),
as the semantic "name" of the variable doesn't really match its usage. As an example, the
current call frame shouldn't rely on the value of `--border-color`, as it's not a "border".
2019-07-05 Matt Baker <mattbaker@apple.com>
Web Inspector: Elements: use a CSS transition when showing/hiding DOM breakpoint gutter
https://bugs.webkit.org/show_bug.cgi?id=199411
Reviewed by Devin Rousso.
* UserInterface/Views/DOMTreeContentView.css:
(.content-view.dom-tree .tree-outline.dom):
2019-07-02 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: allow nodes to be copied and pasted
https://bugs.webkit.org/show_bug.cgi?id=199182
Reviewed by Matt Baker.
Copy is already supported, so there's nothing that needs to be done there.
Pasting is as simple as calling `insertAdjacentHTML("afterend", ...)` on the selected node.
* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI._paste): Added.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype.handlePasteEvent): Added.
2019-07-02 Devin Rousso <drousso@apple.com>
Web Inspector: DOM Debugger: descendant breakpoints should be able to be enabled/disabled/deleted from a collapsed parent
https://bugs.webkit.org/show_bug.cgi?id=199332
Reviewed by Matt Baker.
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype.get domBreakpoints):
(WI.DOMDebuggerManager.prototype.domBreakpointsForNode):
(WI.DOMDebuggerManager.prototype.domBreakpointsInSubtree): Added.
(WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._detachDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._detachBreakpointsForFrame):
(WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
(WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
Provide a way of getting a "summary" array of `DOMBreakpoint`s for all descendant nodes.
Rework the data structure for holding `DOMBreakpoint`s to use a `Multimap` so no duplicates
can be added (it uses a `Set` instead of an `Array`).
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement):
(WI.DOMTreeElement.prototype.get hasBreakpoint):
(WI.DOMTreeElement.prototype.set breakpointStatus):
(WI.DOMTreeElement.prototype.bindRevealDescendantBreakpointsMenuItemHandler): Added.
(WI.DOMTreeElement.prototype._subtreeBreakpointChanged): Added.
(WI.DOMTreeElement.prototype._updateBreakpointStatus):
(WI.DOMTreeElement.prototype._statusImageContextmenu):
(WI.DOMTreeElement.prototype.subtreeBreakpointCountDidChange): Deleted.
* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype.populateContextMenu):
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForDOMNode):
(WI.appendContextMenuItemsForDOMNodeBreakpoints):
Keep track of the actual descendant `DOMNodeTreeElement` that have breakpoints, rather than
just a count, so that the "Reveal Descendant Breakpoints" action is able to access them.
Change "Reveal Descendant Breakpoints" to reveal and select all descendant breakpoints
instead of just the first one.
Drive-by: don't remove specific (event) listener breakpoints when invoking the
"Delete Descendant Breakpoints" action, as that's not obvious from the UI.
* UserInterface/Controllers/BreakpointPopoverController.js:
(WI.BreakpointPopoverController.prototype.appendContextMenuItems):
* UserInterface/Views/DOMBreakpointTreeElement.js:
(WI.DOMBreakpointTreeElement.prototype.populateContextMenu):
* UserInterface/Views/DOMNodeTreeElement.js:
(WI.DOMNodeTreeElement.prototype.populateContextMenu):
* UserInterface/Views/EventBreakpointTreeElement.js:
(WI.EventBreakpointTreeElement.prototype.populateContextMenu):
* UserInterface/Views/URLBreakpointTreeElement.js:
(WI.URLBreakpointTreeElement.prototype.populateContextMenu):
Remove the separator before "Delete Breakpoint" so all breakpoint actions are in the same section.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Multimap.js:
(Multimap.prototype.get size): Added.
2019-07-02 Matt Baker <mattbaker@apple.com>
REGRESSION (r238563): Web Inspector: Selection is erratic when holding Up/Down on Network Table
https://bugs.webkit.org/show_bug.cgi?id=193841
<rdar://problem/47559124>
Reviewed by Devin Rousso.
Selecting and revealing a row after reloading Table data, but before the
layout that populates visible rows, could cause the Table to always be
scrolled so that the revealed row is first.
This patch fixes `revealRow` by calculating the position of the row being
revealed in the absence of its DOM element, so that the Table is only
scrolled when necessary.
* UserInterface/Views/Table.js:
(WI.Table.prototype.revealRow):
(WI.Table.prototype._resizeColumnsAndFiller):
Drive-by fix: use realOffsetWidth for consistency.
(WI.Table.prototype._updateVisibleRows):
(WI.Table.prototype._calculateOffsetHeight):
(WI.Table.prototype._calculateScrollTop):
2019-07-02 Devin Rousso <drousso@apple.com>
Web Inspector: Debug: "Reset Web Inspector" should also clear the saved window size and attachment side
https://bugs.webkit.org/show_bug.cgi?id=198956
Reviewed by Matt Baker.
* UserInterface/Base/Main.js:
(WI.reset): Added.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createDebugSettingsView):
2019-07-02 Devin Rousso <drousso@apple.com>
Web Inspector: Audit: missing demo audits for WebInspectorAudit functions
https://bugs.webkit.org/show_bug.cgi?id=198719
Reviewed by Matt Baker.
Other than the LayoutTests, there's no way to see an example of the functionality of many of
the exposed `WebInspectorAudit` functions. There should be a demo audit for every exposed
function so they're more discoverable.
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype._addDefaultTests):
(WI.AuditManager.prototype._addDefaultTests.removeWhitespace): Added.
Move all demo audit test functions to be actual JavaScript functions, which are then
stringified and stripped of unnecessary white-space.
* Localizations/en.lproj/localizedStrings.js:
2019-07-01 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r245498): Timelines: CPU: discontinuities are filled in by the next record
https://bugs.webkit.org/show_bug.cgi?id=198927
Reviewed by Matt Baker.
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.capturingStarted):
(WI.TimelineManager.prototype.capturingStopped):
* UserInterface/Models/TimelineRecording.js:
(WI.TimelineRecording):
(WI.TimelineRecording.prototype.start):
(WI.TimelineRecording.prototype.capturingStarted): Added.
(WI.TimelineRecording.prototype.capturingStopped): Added.
(WI.TimelineRecording.prototype.reset):
(WI.TimelineRecording.prototype.addRecord):
(WI.TimelineRecording.prototype.discontinuitiesInTimeRange):
(WI.TimelineRecording.prototype.addDiscontinuity): Deleted.
Notify the `TimelineRecording` when capturing has started/stopped.
Adjust the first record after a discontinuity to have it's `startTime` match the `endTime`
of the most recent discontinuity.
* UserInterface/Models/Timeline.js:
(WI.Timeline.prototype.addRecord):
* UserInterface/Models/CPUTimeline.js:
(WI.CPUTimeline.prototype.addRecord):
* UserInterface/Models/CPUTimelineRecord.js:
(WI.CPUTimelineRecord.prototype.adjustStartTime): Added.
(WI.CPUTimelineRecord.prototype.adjustStartTimeToLastRecord): Deleted.
* UserInterface/Models/MemoryTimeline.js:
(WI.MemoryTimeline.prototype.addRecord):
* UserInterface/Models/MemoryTimelineRecord.js:
(WI.MemoryTimelineRecord.prototype.adjustStartTime): Added.
(WI.MemoryTimelineRecord.prototype.adjustStartTimeToLastRecord): Deleted.
* UserInterface/Models/NetworkTimeline.js:
(WI.NetworkTimeline.prototype.addRecord):
* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype.layout):
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WI.MemoryTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/MemoryTimelineView.js:
(WI.MemoryTimelineView.prototype.layout):
Include discontinuities that exactly match the start/end time of the record immediately
before/after the discontinuity.
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView):
(WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged):
(WI.TimelineRecordingContentView.prototype._recordingReset):
Move the logic for handling discontinuity start/end times to the `TimelineRecording`.
* UserInterface/Base/Utilities.js:
2019-06-29 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Remove trailing white-space
https://bugs.webkit.org/show_bug.cgi?id=199346
Reviewed by Matt Baker.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype._initiatorCallFramesFromPayload):
* UserInterface/Images/Import.svg:
* UserInterface/Views/CanvasOverviewContentView.css:
(.navigation-bar > .item.canvas-recording-auto-capture > label > input):
* UserInterface/Views/DataGrid.css:
(.data-grid .resizer):
* UserInterface/Views/DatabaseContentView.css:
(.storage-view):
* UserInterface/Views/GoToLineDialog.css:
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/GradientSlider.css:
(.gradient-slider > .add-area):
(.gradient-slider-knob > :matches(img, div)):
* UserInterface/Views/ResourceDetailsSection.css:
* UserInterface/Views/ScrubberNavigationItem.css:
(.navigation-bar .item.scrubber > input[disabled]):
* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .expandable):
* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment,):
* UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
(HeapSnapshotWorker.prototype.createSnapshot):
2019-06-29 Nikita Vasilyev <nvasilyev@apple.com>
Remove duplicate "Private" section and fix white space
Unreviewed code style fix.
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
2019-06-27 Beth Dakin <bdakin@apple.com>
Upstream use of MACCATALYST
https://bugs.webkit.org/show_bug.cgi?id=199245
rdar://problem/51687723
Reviewed by Tim Horton.
* Configurations/Base.xcconfig:
* Configurations/SDKVariant.xcconfig:
2019-06-27 Devin Rousso <drousso@apple.com>
Web Inspector: throw an error if console.count/console.countReset is called with an object that throws an error from toString
https://bugs.webkit.org/show_bug.cgi?id=199252
Reviewed by Joseph Pecoraro.
Add entries for `console.countReset` and `console.timeLog`.
Rename `title` to `label` for `console.time`, `console.timeLog`, and `console.timeEnd` to
better match the spec.
* UserInterface/Models/NativeFunctionParameters.js:
2019-06-26 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update legacy backend commands after enum name change
https://bugs.webkit.org/show_bug.cgi?id=199250
Reviewed by Devin Rousso.
* UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
2019-06-26 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: Elements: the forced pseudo-class indicator isn't visible when hovering
https://bugs.webkit.org/show_bug.cgi?id=199166
Reviewed by Matt Baker.
Make the pseudo-class indicator into its own element instead of being a `::before`.
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement):
(WI.DOMTreeElement.prototype.updateSelectionArea):
(WI.DOMTreeElement.prototype.updateTitle):
(WI.DOMTreeElement.prototype._updatePseudoClassIndicator): Added.
(WI.DOMTreeElement.prototype.get pseudoClassesEnabled): Deleted.
(WI.DOMTreeElement.prototype._nodePseudoClassesDidChange): Deleted.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom):
(.tree-outline.dom li .pseudo-class-indicator): Added.
(body[dir=ltr] .tree-outline.dom li .pseudo-class-indicator): Added.
(body[dir=rtl] .tree-outline.dom li .pseudo-class-indicator): Added.
(.tree-outline.dom:focus li.selected .pseudo-class-indicator): Added.
(.tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted.
(body[dir=ltr] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted.
(body[dir=rtl] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted.
(.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before): Deleted.
* UserInterface/Views/FormattedValue.css:
(.formatted-node > .tree-outline.dom):
Adjust the indent of any `DOMTreeOutline` so there's more room for the pseudo-class
indicator, such as in the Console.
2019-06-25 Matt Baker <mattbaker@apple.com>
Web Inspector: Elements: show shadow DOM by default
https://bugs.webkit.org/show_bug.cgi?id=199128
Reviewed by Devin Rousso.
* UserInterface/Base/Setting.js:
* UserInterface/Test/Test.js:
(WI.loaded):
Overriding the default value isn't necessary since the default is now true.
2019-06-25 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r246621): Web Inspector: Styles: property may get removed when editing after deleting value
https://bugs.webkit.org/show_bug.cgi?id=199143
<rdar://problem/52042815>
Reviewed by Matt Baker.
r246621 affected when WI.CSSStyleDeclaration.Event.PropertiesChanged event is fired, which caused
SpreadsheetCSSStyleDeclarationEditor to possibly enter a state when `focused` property is
incorrectly set to false.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved): Removed.
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyWillRemove): Added.
Renamed from "removed" to "willRemove" since we need to call it before the property DOM element
is detached from the document.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.remove):
Don't set focused to false when the removed property wasn't focused.
This code need to exist because removing focused element from the DOM doesn't trigger blur event.
2019-06-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Implement console.timeLog
https://bugs.webkit.org/show_bug.cgi?id=199184
Reviewed by Devin Rousso.
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
Time messages (like timeLog) do not include their messageText
in their parameters list. So to behave more like normal logs
build a parameter list that includes it at the front.
2019-06-23 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r246684): Dark Mode: dashboard buttons should have no background
https://bugs.webkit.org/show_bug.cgi?id=199136
<rdar://problem/52035798>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DefaultDashboardView.css:
(@media (prefers-color-scheme: dark)):
(.toolbar .dashboard .item.button,):
2019-06-23 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Styles: show green highlight for newly added properties only when name and value are present
https://bugs.webkit.org/show_bug.cgi?id=199131
Reviewed by Matt Baker.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.updateStatus):
2019-06-22 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r241980): Web Inspector: Styles: Pressing Tab/Enter on last property no longer focuses on selector on next rule
https://bugs.webkit.org/show_bug.cgi?id=199125
<rdar://problem/52011182>
Reviewed by Matt Baker.
Since SpreadsheetSelectorField's focus handler was removed in r241980, focusing on the selector element
doesn't start editing it.
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
2019-06-22 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values
https://bugs.webkit.org/show_bug.cgi?id=199090
<rdar://problem/51965431>
Reviewed by Matt Baker.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
Unbalanced quotes and parenthesis are fixed inside of CSSProperty's rawValue setter.
Render the value from the model, not the view.
2019-06-21 Matt Baker <mattbaker@apple.com>
Web Inspector: remove unused DataGrid style .force-focus
https://bugs.webkit.org/show_bug.cgi?id=199112
<rdar://problem/51993412>
Reviewed by Timothy Hatcher.
* UserInterface/Views/HeapAllocationsTimelineView.css:
(.timeline-view.heap-allocations > .data-grid:not(:focus) tr.selected.invalid):
(.timeline-view.heap-allocations > .data-grid:not(:focus, .force-focus) tr.selected.invalid): Deleted.
* UserInterface/Views/ResourceTreeElement.css:
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.open,):
(.item.resource.resource-type-websocket:not(.selected) .status .ready-state.connecting,):
Missed in https://bugs.webkit.org/show_bug.cgi?id=190480.
2019-06-21 Matt Baker <mattbaker@apple.com>
Web Inspector: remove .legacy-mac/.latest-mac CSS classes, standardize on .latest-mac UI
https://bugs.webkit.org/show_bug.cgi?id=199109
<rdar://problem/51991129>
Reviewed by Timothy Hatcher.
Drop legacy macOS version support from Web Inspector UI.
* UserInterface/Base/Main.js:
* UserInterface/Views/DefaultDashboardView.css:
(@media (prefers-color-scheme: dark)):
(body.latest-mac .toolbar .dashboard .item.button): Deleted.
* UserInterface/Views/Toolbar.css:
(.toolbar):
(.toolbar .item.button,):
(.toolbar .search-bar > input[type="search"]):
(.toolbar .search-bar > input[type="search"]:focus):
(@media (-webkit-min-device-pixel-ratio: 2)):
(.toolbar .item.button:active):
(body.window-inactive .toolbar .item.button,):
(@media (prefers-color-scheme: dark)):
(.toolbar .search-bar > input[type="search"]::placeholder):
(body.window-inactive .toolbar .search-bar > input[type="search"]::placeholder):
(body.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button):
(.toolbar .dashboard-container):
(body .toolbar): Deleted.
(body.legacy-mac .toolbar .item.button,): Deleted.
(body.legacy-mac .toolbar .search-bar > input[type="search"]): Deleted.
(body.legacy-mac .toolbar .search-bar > input[type="search"]:focus): Deleted.
(body.legacy-mac .toolbar .item.button:active): Deleted.
(body.window-inactive.legacy-mac .toolbar .item.button,): Deleted.
(body.latest-mac .toolbar .item.button,): Deleted.
(body.latest-mac .toolbar .search-bar > input[type="search"]): Deleted.
(body.latest-mac .toolbar .search-bar > input[type="search"]:focus): Deleted.
(body.latest-mac .toolbar .item.button:active): Deleted.
(body.latest-mac.window-inactive .toolbar .item.button,): Deleted.
(body.latest-mac .toolbar .search-bar > input[type="search"]::placeholder): Deleted.
(body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::placeholder): Deleted.
(body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button): Deleted.
(body.latest-mac .toolbar .dashboard-container): Deleted.
2019-06-20 Matt Baker <mattbaker@apple.com>
Web Inspector: rename shadowRootPushed parameter to match protocol
https://bugs.webkit.org/show_bug.cgi?id=199098
Reviewed by Devin Rousso.
* UserInterface/Protocol/DOMObserver.js:
(WI.DOMObserver.prototype.shadowRootPushed):
2019-06-20 Devin Rousso <drousso@apple.com>
Web Inspector: Error "null is not an object (evaluating 'syntaxTree.containersOfPosition')" when setting a breakpoint
https://bugs.webkit.org/show_bug.cgi?id=199082
Reviewed by Matt Baker.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
The script syntax tree may be fetched even if the resource hasn't finished parsing (or had
a syntax error), so it's possible for it to be `null`.
2019-06-20 Devin Rousso <drousso@apple.com>
Web Inspector: Dark Mode: inactive tab bar item should get darker on hover
https://bugs.webkit.org/show_bug.cgi?id=199022
Reviewed by Darin Adler.
* UserInterface/Views/TabBar.css:
(.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover):
(@media not (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
(@media (prefers-color-scheme: dark) .tab-bar):
(@media (prefers-color-scheme: dark) .tab-bar > .item):
(@media (prefers-color-scheme: dark) .tab-bar > .item:not(.disabled).selected):
(@media (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected):hover):
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar):
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item):
(@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item.selected):
* UserInterface/Views/Toolbar.css:
(@media (prefers-color-scheme: dark) body .toolbar):
2019-06-20 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: setting a breakpoint on a non-JavaScript line should immediately show as unresolved
https://bugs.webkit.org/show_bug.cgi?id=199033
Reviewed by Matt Baker.
Remove the `shouldSpeculativelyResolve` parameter, as it was resolving breakpoints even in
the case that there were no resolved locations for the given breakpoint.
In the case that there are resolved locations, the breakpoint would've already been resolved
by the time that `shouldSpeculativelyResolve` would've taken effect, so it's unnecessary.
This parameter was only used when setting a breakpoint from a `SourceCodeTextEditor` gutter.
* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.addBreakpoint):
(WI.DebuggerManager.prototype._setBreakpoint):
(WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
2019-06-20 Devin Rousso <drousso@apple.com>
Web Inspector: Edit -> Tag doesn't do anything for html, head, and body elements
https://bugs.webkit.org/show_bug.cgi?id=199052
<rdar://problem/51923906>
Reviewed by Matt Baker.
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
- Don't show an "Edit > Tag" for <html>, <head>, and <body> nodes
- Disable any "Edit" submenu item if it's target is already being edited
- Prevent "Add" submenu items from being shown for text nodes
2019-06-19 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: Debugger: current call frame indicator isn't vertically centered
https://bugs.webkit.org/show_bug.cgi?id=199015
Reviewed by Matt Baker.
* UserInterface/Views/CallFrameTreeElement.css:
(.tree-outline .item.call-frame .status):
2019-06-19 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues
https://bugs.webkit.org/show_bug.cgi?id=198505
<rdar://problem/51374780>
Reviewed by Matt Baker.
Since r240946, setting WI.CSSStyleDeclaration.prototype.text updates the text immediately.
When WI.CSSStyleDeclaration.prototype.update gets called after setting text, it exits early
without firing WI.CSSStyleDeclaration.Event.PropertiesChanged.
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.set text):
2019-06-19 Matt Baker <mattbaker@apple.com>
Web Inspector: Remove unused _pendingFilter from NetworkTableContentView
https://bugs.webkit.org/show_bug.cgi?id=199026
Reviewed by Devin Rousso.
This flag is no longer set as of https://trac.webkit.org/changeset/225895.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype._processPendingEntries):
2019-06-19 Devin Rousso <drousso@apple.com>
Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'sourceCodePosition.lineNumber')
https://bugs.webkit.org/show_bug.cgi?id=199019
Reviewed by Matt Baker.
* UserInterface/Base/Main.js:
(WI.linkifyLocation):
2019-06-19 Zhifei Fang <zhifei_fang@apple.com>
Correct the error object link color in dark mode.
https://bugs.webkit.org/show_bug.cgi?id=198033
Reviewed by Devin Rousso.
* UserInterface/Views/ErrorObjectView.css:
(@media (prefers-dark-interface)):
(.error-object-link-container):
2019-06-18 Devin Rousso <drousso@apple.com>
Web Inspector: Network: detail view shouldn't stay open when the related entry is removed
https://bugs.webkit.org/show_bug.cgi?id=198951
Reviewed by Joseph Pecoraro.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._mainResourceDidChange):
Hide the detail view if the main resource changes and we aren't preserving the log.
* UserInterface/Views/Table.js:
(WI.Table.prototype.reloadVisibleColumnCells):
Only attempt to populate cells for rows that the `_dataSource` actually has. Without this,
the `_delegate` may be asked to populate a cell for a row it doesn't have, which would error.
2019-06-18 Devin Rousso <drousso@apple.com>
Web Inspector: parseQueryParameters fails to successfully parse query parameter values that contain "="
https://bugs.webkit.org/show_bug.cgi?id=198971
<rdar://problem/51852782>
Reviewed by Joseph Pecoraro.
* UserInterface/Base/URLUtilities.js:
(parseQueryString):
2019-06-18 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: Heap: subsequent snapshots taken manually don't appear in the list
https://bugs.webkit.org/show_bug.cgi?id=198941
Reviewed by Joseph Pecoraro.
Since heap snapshot records can be added at any time, including when not actively recording,
when the "Entire Recording" range is selected, make sure to set the `filterEndTime` to be an
effectively infinite number so that records added later aren't filtered out.
This isn't done for other timeline views as they may have graphs that don't expect to render
from time 0 till infinity, not to mention being unable to add records when not recording.
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
2019-06-18 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION: Canvas: cannot select saved recordings
https://bugs.webkit.org/show_bug.cgi?id=198953
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TreeElement.js:
(WI.TreeElement.treeElementToggled):
Don't early return if the `TreeElement` isn't `selectable` as the owner `TreeOutline` may
want to dispatch an event that it was clicked.
2019-06-18 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: the initial state should be selected when processing a new/imported recording if the navigation sidebar is collapsed
https://bugs.webkit.org/show_bug.cgi?id=198952
Reviewed by Joseph Pecoraro.
Prevent any content from being generated until `initialLayout` is called, as otherwise it's
possible for the `CanvasNavigationSidebar` to update the current action index before the
preview element has been created, which would throw an error.
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.initialLayout):
(WI.RecordingContentView.prototype._updateSliderValue):
(WI.RecordingContentView.prototype._handleRecordingProcessedAction):
Drive-by: update the slider max each time the selected action index is changed.
2019-06-18 Devin Rousso <drousso@apple.com>
Web Inspector: Canvas: imported recordings aren't selectable from the overview if there are no canvases in the page
https://bugs.webkit.org/show_bug.cgi?id=198955
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype._addSavedRecording):
Hide the content placeholder when a recording is imported. It won't be shown again because
the `subviews` list will never be empty, as there's no way to remove an imported recording.
* UserInterface/Views/CollectionContentView.js:
(WI.CollectionContentView.prototype.addContentViewForItem):
(WI.CollectionContentView.prototype.removeContentViewForItem):
(WI.CollectionContentView.prototype.showContentPlaceholder): Added.
(WI.CollectionContentView.prototype.hideContentPlaceholder): Added.
(WI.CollectionContentView.prototype.initialLayout):
(WI.CollectionContentView.prototype._selectItem):
(WI.CollectionContentView.prototype._showContentPlaceholder): Deleted.
(WI.CollectionContentView.prototype._hideContentPlaceholder): Deleted.
Make `showContentPlaceholder`/`hideContentPlaceholder` protected for any subclasses to call.
2019-06-17 Matt Baker <mattbaker@apple.com>
Web Inspector: Elements: remove ellipses from "Break on" context menu item title
https://bugs.webkit.org/show_bug.cgi?id=198944
Reviewed by Devin Rousso.
Update context menu title to comply with Apple HI guidelines.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ContextMenuUtilities.js:
2019-06-17 Devin Rousso <drousso@apple.com>
Web Inspector: Debugger: adding a DOM/Event/URL breakpoint should enable breakpoints
https://bugs.webkit.org/show_bug.cgi?id=198932
Reviewed by Matt Baker.
Match the behavior of JavaScript breakpoints, which enable breakpoints globally when a new
breakpoint is set or an existing breakpoint is enabled.
This avoids the situation where setting a DOM breakpoint or a specific event listener
breakpoint appears to not "work" because breakpoints are globally disabled. There is no
"breakpoints disabled" banner in the Elements tab, so the user could be completely unaware
of this, and therefore be confused as to why these breakpoints aren't being hit.
* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype._updateEventBreakpoint):
* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
(WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
(WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
2019-06-17 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: remove extra space above Breakpoints section when breakpoints are disabled
https://bugs.webkit.org/show_bug.cgi?id=198933
Reviewed by Matt Baker.
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .warning-banner):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .warning-banner):
2019-06-17 Devin Rousso <drousso@apple.com>
Web Inspector: Settings: split the General panel into sub panels so it's less crowded
https://bugs.webkit.org/show_bug.cgi?id=198803
Reviewed by Timothy Hatcher.
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype.initialLayout):
(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
Many of the settings in General only affect a specific part of Web Inspector, and therefore
aren't really "general".
(WI.SettingsTabContentView.prototype._createElementsSettingsView): Added.
- Element Selection
- CSS Changes
(WI.SettingsTabContentView.prototype._createSourcesSettingsView): Added.
- Debugger
- Source Maps
(WI.SettingsTabContentView.prototype._createConsoleSettingsView): Added.
- Traces (renamed from "Console")
- WebRTC Logging
- Media Logging
- MSE Logging
* Localizations/en.lproj/localizedStrings.js:
2019-06-17 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: the Inspector Style Sheet is missing when grouped by path
https://bugs.webkit.org/show_bug.cgi?id=198860
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager.prototype.get styleSheets):
(WI.CSSManager.prototype.inspectorStyleSheetsForFrame):
(WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
(WI.CSSManager.prototype._inspectorStyleSheetsForFrame): Deleted.
Expose a way to fetch all inspector stylesheets for a given frame.
Make sure to associate inspector stylesheets with their frame.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
(WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
Add paths for inspector stylesheet creation/fetching when grouping by path.
Sort inspector stylesheets as the first item of an origin/frame when grouping by path.
2019-06-17 Jamal Nasser <jamaln@mail.com>
Web Inspector: Go To Line dialog is white when in Dark Mode
https://bugs.webkit.org/show_bug.cgi?id=198596
Reviewed by Timothy Hatcher.
* UserInterface/Views/GoToLineDialog.css:
(@media (prefers-color-scheme: dark)):
(.go-to-line-dialog):
(.go-to-line-dialog > div > input):
(.go-to-line-dialog > div > input::placeholder):
(.go-to-line-dialog > div::before):
2019-06-17 Devin Rousso <drousso@apple.com>
Web Inspector: Sources: searching doesn't use the case sensitive or regex global settings
https://bugs.webkit.org/show_bug.cgi?id=198897
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch):
2019-06-13 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r246178): extra spaces added in at-rules when formatting CSS
https://bugs.webkit.org/show_bug.cgi?id=198806
Reviewed by Joseph Pecoraro.
* UserInterface/Workers/Formatter/CSSFormatter.js:
(CSSFormatter.prototype._format):
Add more specific tests for at-rules, and add/remove whitespace depending on the type of
at-rule (e.g. `@supports` vs `@media`), as well as where the scanner is in the parameters of
the at at-rule (e.g. `@supports |` vs `@media (|`).
* UserInterface/Workers/Formatter/FormatterContentBuilder.js:
(FormatterContentBuilder):
(FormatterContentBuilder.prototype.get lastToken): Added.
(FormatterContentBuilder.prototype.get currentLine):
(FormatterContentBuilder.prototype.removeLastNewline):
(FormatterContentBuilder.prototype.removeLastWhitespace):
(FormatterContentBuilder.prototype._popFormattedContent):
(FormatterContentBuilder.prototype._append):
Update `lastTokenWasNewline` and `lastTokenWasWhitespace` when removing newlines/whitespace.
Memoize the `currentLine` so it's less expensive to re-fetch.
2019-06-13 Devin Rousso <drousso@apple.com>
Web Inspector: Settings: indent type and size settings aren't respected everywhere
https://bugs.webkit.org/show_bug.cgi?id=198804
Reviewed by Timothy Hatcher.
* UserInterface/Views/CodeMirrorEditor.js:
(WI.CodeMirrorEditor.create):
When creating a `CodeMirror` instance, default to using the global `Setting`s as the options.
If an override is specified in `options`, it will take precedence and the `CodeMirror` will
ignore any changes to the `Setting` as well.
* UserInterface/Views/TextEditor.js:
(WI.TextEditor):
(WI.TextEditor.prototype.close): Deleted.
* UserInterface/Views/AuditTestCaseContentView.js:
(WI.AuditTestCaseContentView.prototype.layout):
* UserInterface/Views/BreakpointActionView.js:
(WI.BreakpointActionView.prototype._updateBody):
* UserInterface/Views/ConsolePrompt.js:
(WI.ConsolePrompt):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WI.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
Remove overrides that aren't necessary for `CodeMirror` to fit in the container element:
- `showWhitespaceCharacters`
- `indentWithTabs`
- `indentUnit`
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.close):
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView.prototype.closed): Deleted.
* UserInterface/Views/TextContentView.js:
(WI.TextContentView.prototype.closed): Deleted.
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype.closed):
Delete the logic for removing event listeners from global `Setting`, as it didn't work
anyways, since none of the event listeners were added using a `thisObject`.
2019-06-13 Devin Rousso <drousso@apple.com>
Web Inspector: Settings: sticky header disappears when over scrolling
https://bugs.webkit.org/show_bug.cgi?id=198833
Reviewed by Joseph Pecoraro.
* UserInterface/Views/SettingsTabContentView.css:
(.content-view.settings .navigation-bar):
(.content-view.settings > .settings-view): Added.
(.content-view.settings): Deleted.
2019-06-10 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: imported recordings do not have JavaScript call trees
https://bugs.webkit.org/show_bug.cgi?id=197490
<rdar://problem/50589158>
Reviewed by Joseph Pecoraro.
* UserInterface/Models/TimelineRecording.js:
(WI.TimelineRecording.prototype.initializeCallingContextTrees):
Make sure to actually save the provided stack traces and samples in the export data.
* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord.fromJSON):
(WI.ScriptTimelineRecord.prototype.toJSON):
Drive-by: include `extraDetails`, which contains useful information like "default prevented".
2019-06-10 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION(r244268): Web Inspector: Styles: navigating from Computed to Styles doesn't work
https://bugs.webkit.org/show_bug.cgi?id=198508
<rdar://problem/51375503>
Reviewed by Matt Baker.
It didn't work because the detached sidebar panel tried to access its parent view (this.parentSidebar).
* UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
(WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Added.
(WI.ComputedStyleDetailsSidebarPanel):
* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Deleted.
Move computedStyleDetailsPanelShowProperty to ComputedStyleDetailsSidebarPanel since it's the only
panel where it's needed.
2019-06-10 Alexey Shvayka <shvaikalesh@gmail.com>
Web Inspector: "Copy Path to Property" doesn't work with multiline keys
https://bugs.webkit.org/show_bug.cgi?id=198691
Reviewed by Matt Baker.
Correctly escape line terminators to prevent doubleQuotedString from returning malformed strings.
* UserInterface/Base/Utilities.js: Use JSON.stringify.
2019-06-10 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r246025): prototypes in object previews are visible even when setting `showOnlyJSON`
https://bugs.webkit.org/show_bug.cgi?id=198721
Reviewed by Joseph Pecoraro.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree.properties-only.json-only .object-tree-property.prototype-property): Added.
(.object-tree.properties-only.json-only .object-tree-property .prototype-property): Deleted.
2019-06-07 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: longhand CSS properties overridden by shorthands miss strikethrough
https://bugs.webkit.org/show_bug.cgi?id=198629
<rdar://problem/51504160>
Reviewed by Devin Rousso.
Longhand CSS properties (e.g. "font-size") overriden by shorthands (e.g. "font") now have strikethroughs.
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype.set overridingProperty):
(WI.CSSProperty):
* UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._updateStyleCascade):
Call _associateRelatedProperties before _markOverriddenProperties because
_associateRelatedProperties sets relatedShorthandProperty property, which
is now used by _markOverriddenProperties.
(WI.DOMNodeStyles.prototype._markOverriddenProperties.isOverriddenBy):
(WI.DOMNodeStyles.prototype._markOverriddenProperties):
2019-06-06 Devin Rousso <drousso@apple.com>
Web Inspector: Timelines: remove always disabled details sidebar navigation item
https://bugs.webkit.org/show_bug.cgi?id=198393
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
2019-06-06 Devin Rousso <drousso@apple.com>
Web Inspector: REGRESSION(r245833): Timelines: CPU: JavaScript label is missing and JavaScript section of pie chart is black
https://bugs.webkit.org/show_bug.cgi?id=198627
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.displayNameForSampleType):
* UserInterface/Views/CPUTimelineView.css:
(.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-javascript):
(.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-javascript): Added.
(.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script): Deleted.
* UserInterface/Views/CPUUsageCombinedView.css:
(.cpu-usage-combined-view > .graph > .range-chart .sample-type-javascript): Added.
(.cpu-usage-combined-view > .graph > .range-chart .sample-type-script): Deleted.
Use the enum string added in r245833 (`sample-type-javascript`) instead of what was there
before (`sample-type-script`).
* UserInterface/Views/Variables.css:
(:root):
Rename `--cpu-script-*` to `--cpu-javascript-*`.
2019-06-06 Devin Rousso <drousso@apple.com>
Web Inspector: Formatter: pretty-print CSS using a Worker
https://bugs.webkit.org/show_bug.cgi?id=197829
<rdar://problem/36891532>
Reviewed by Timothy Hatcher.
* UserInterface/Proxies/FormatterWorkerProxy.js:
(WI.FormatterWorkerProxy.prototype.formatCSS): Added.
* UserInterface/Workers/Formatter/FormatterWorker.js:
(FormatterWorker.prototype.formatCSS): Added.
* UserInterface/Workers/Formatter/CSSFormatter.js: Added.
(CSSFormatter):
(CSSFormatter.prototype.get success):
(CSSFormatter.prototype.get formattedText):
(CSSFormatter.prototype.get sourceMapData):
(CSSFormatter.prototype._format):
* UserInterface/Workers/Formatter/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype.get currentLine): Added.
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype._canUseFormatterWorker):
(WI.TextEditor.prototype._startWorkerPrettyPrint):
* .eslintrc:
2019-06-06 Devin Rousso <drousso@apple.com>
Web Inspector: Elements: print/rulers/compositing/paint navigation items shouldn't be visible if the inspected target doesn't have a PageAgent
https://bugs.webkit.org/show_bug.cgi?id=198410
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype.get navigationItems):
(WI.DOMTreeContentView.prototype._showRulersChanged):
== Rolled over to ChangeLog-2019-06-05 ==