Web Inspector: Sources: provide option to group by path
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2019 23:35:20 +0000 (23:35 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2019 23:35:20 +0000 (23:35 +0000)
commitcc691b0327c935f2cbaba1b40966543033a06d3f
treefa2d253a6dbce18c8ce83f0831d281e5e97b1899
parent15be59bafdeeab89800d990dd25e82dffb2176ea
Web Inspector: Sources: provide option to group by path
https://bugs.webkit.org/show_bug.cgi?id=195203
<rdar://problem/27340680>

Reviewed by Timothy Hatcher.

Create top-level folders for each origin and nest all resources (in a folder chain) underneath.

* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.closed):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.searchTreeOutline): Added.
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
(WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
(WI.SourcesNavigationSidebarPanel.prototype._updateMainFrameTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addResource):
(WI.SourcesNavigationSidebarPanel.prototype._addScript):
(WI.SourcesNavigationSidebarPanel.prototype._addWorkerTargetWithMainResource):
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown.addOption): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeChanged):
(WI.SourcesNavigationSidebarPanel.prototype._handleFrameMainResourceDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._handleMainFrameDidChange):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content):
(.sidebar > .panel.navigation.sources > .content > .details-section.paused-reason.collapsed > .header > .options,):
(.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Added.
(.sidebar > .panel.navigation.sources > .content > .resources): Added.
(.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread): Added.
(.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread > .item.thread): Added.
(.sidebar > .panel.navigation.sources > .content > .details-section.scripts:not(.collapsed)): Deleted.
(.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread): Deleted.
(.sidebar > .panel.navigation.sources > .content > .tree-outline.single-thread > .item.thread): Deleted.
Drive-by: fix "No Filter Results" message view to not overlap eachother.
Drive-by: try to be more smart about what tree we focus when selecting a represented object.
* UserInterface/Views/ResourceTreeElement.js:
(WI.ResourceTreeElement):
(WI.ResourceTreeElement.prototype.get mainTitleText):
(WI.ResourceTreeElement.prototype._updateTitles):
* UserInterface/Base/URLUtilities.js:
(WI.displayNameForURL):
Provide a way for the display name to use a directory "/" instead of the last path component.
This is needed in cases where the loaded resource is an implicit "index.*".

* UserInterface/Views/GeneralTreeElement.js:
(WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath): Added.
* UserInterface/Views/SourceCodeTreeElement.js:
(WI.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath): Deleted.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/Resource.js:

* UserInterface/Views/DetailsSection.css:
(.details-section > .header .go-to-arrow):
Drive-by: vertically center go-to-arrow.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.contextMenuItemSelected):

* UserInterface/Base/Setting.js:
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype.get filterNavigationItems):
(WI.NetworkTableContentView.prototype._populateNameCell):
(WI.NetworkTableContentView.prototype._generateSortComparator):
(WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
(WI.NetworkTableContentView.prototype._updateFilteredEntries):
(WI.NetworkTableContentView.prototype._handleGroupMediaRequestsByDOMNodeCheckedDidChange): Added.
(WI.NetworkTableContentView.prototype._handleGroupByDOMNodeCheckedDidChange): Deleted.
Rename the `groupByNode` setting to be more specific.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Source/WebInspectorUI/UserInterface/Base/Setting.js
Source/WebInspectorUI/UserInterface/Base/URLUtilities.js
Source/WebInspectorUI/UserInterface/Models/Resource.js
Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js
Source/WebInspectorUI/UserInterface/Views/DetailsSection.css
Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js
Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js
Source/WebInspectorUI/UserInterface/Views/SourceCodeTreeElement.js
Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.css
Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js