Title: [243300] trunk/Source/WebInspectorUI
- Revision
- 243300
- Author
- [email protected]
- Date
- 2019-03-21 11:00:43 -0700 (Thu, 21 Mar 2019)
Log Message
Web Inspector: Sources: the name of the file should not be used as a folder
https://bugs.webkit.org/show_bug.cgi?id=196064
<rdar://problem/49097710>
Reviewed by Timothy Hatcher.
* UserInterface/Views/GeneralTreeElement.js:
(WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath):
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel.prototype._addResource):
Drive-by: sort resources in each folder by name when grouping by path.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (243299 => 243300)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-03-21 17:42:41 UTC (rev 243299)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-03-21 18:00:43 UTC (rev 243300)
@@ -1,3 +1,18 @@
+2019-03-21 Devin Rousso <[email protected]>
+
+ Web Inspector: Sources: the name of the file should not be used as a folder
+ https://bugs.webkit.org/show_bug.cgi?id=196064
+ <rdar://problem/49097710>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/GeneralTreeElement.js:
+ (WI.GeneralTreeElement.prototype.createFoldersAsNeededForSubpath):
+
+ * UserInterface/Views/SourcesNavigationSidebarPanel.js:
+ (WI.SourcesNavigationSidebarPanel.prototype._addResource):
+ Drive-by: sort resources in each folder by name when grouping by path.
+
2019-03-20 Devin Rousso <[email protected]>
Web Inspector: Canvas: rework how Canvas.enable/Canvas.disable is used so that events are not sent when the Canvas tab isn't enabled
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js (243299 => 243300)
--- trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js 2019-03-21 17:42:41 UTC (rev 243299)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTreeElement.js 2019-03-21 18:00:43 UTC (rev 243300)
@@ -207,6 +207,9 @@
let currentFolderTreeElement = this;
for (let component of components) {
+ if (component === components.lastValue)
+ break;
+
if (currentPath)
currentPath += "/";
currentPath += component;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js (243299 => 243300)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js 2019-03-21 17:42:41 UTC (rev 243299)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js 2019-03-21 18:00:43 UTC (rev 243300)
@@ -682,15 +682,19 @@
this._resourcesTreeOutline.insertChild(frameTreeElement, index);
}
+ let resourceTreeElement = null;
+ if (resource instanceof WI.CSSStyleSheet)
+ resourceTreeElement = new WI.CSSStyleSheetTreeElement(resource);
+ else
+ resourceTreeElement = new WI.ResourceTreeElement(resource, resource, {allowDirectoryAsName: true, hideOrigin: true});
+
let subpath = resource.urlComponents.path;
if (subpath && subpath[0] === "/")
subpath = subpath.substring(1);
let parent = frameTreeElement.createFoldersAsNeededForSubpath(subpath);
- if (resource instanceof WI.CSSStyleSheet)
- parent.appendChild(new WI.CSSStyleSheetTreeElement(resource));
- else
- parent.appendChild(new WI.ResourceTreeElement(resource, resource, {allowDirectoryAsName: true, hideOrigin: true}));
+ let index = insertionIndexForObjectInListSortedByFunction(resourceTreeElement, parent.children, this._boundCompareTreeElements);
+ parent.insertChild(resourceTreeElement, index);
}
if (resource.type === WI.Resource.Type.Document || resource.type === WI.Resource.Type.Script) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes