Changeset 231391 in webkit
- Timestamp:
- May 4, 2018 4:56:10 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 43 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r231388 r231391 1 2018-05-04 Devin Rousso <webkit@devinrousso.com> 2 3 Web Inspector: simplify the WI.Collection interface 4 https://bugs.webkit.org/show_bug.cgi?id=185187 5 6 Reviewed by Brian Burg. 7 8 * http/tests/inspector/dom/cross-domain-inspected-node-access.html: 9 * http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html: 10 * http/tests/inspector/network/har/har-page.html: 11 * http/tests/inspector/network/har/har-page-expected.txt: 12 * http/tests/inspector/network/resource-response-source-memory-cache-revalidate-expired-only.html: 13 * http/tests/inspector/network/resource-response-source-memory-cache.html: 14 * http/tests/inspector/network/resource-sizes-memory-cache.html: 15 * http/tests/inspector/network/set-resource-caching-disabled-memory-cache.html: 16 * http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts.html: 17 * http/tests/websocket/tests/hybi/inspector/before-load.html: 18 * inspector/canvas/resources/recording-utilities.js: 19 * inspector/css/manager-preferredInspectorStyleSheetForFrame.html: 20 * inspector/debugger/resources/log-pause-location.js: 21 (TestPage.registerInitializer.window.findScript): 22 * inspector/dom/highlightFrame.html: 23 * inspector/dom/highlightNode.html: 24 * inspector/dom/highlightNodeList.html: 25 * inspector/dom/highlightSelector.html: 26 * inspector/model/frame-extra-scripts.html: 27 * inspector/page/empty-or-missing-resources.html: 28 * inspector/unit-tests/resource-collection.html: 29 * inspector/worker/resources-in-worker.html: 30 1 31 2018-05-04 Youenn Fablet <youenn@apple.com> 2 32 -
trunk/LayoutTests/http/tests/inspector/dom/cross-domain-inspected-node-access.html
r222486 r231391 9 9 10 10 let mainFrame = WI.frameResourceManager.mainFrame; 11 let childFrames = mainFrame.childFrameCollection.toArray();11 let childFrames = Array.from(mainFrame.childFrameCollection); 12 12 InspectorTest.expectEqual(childFrames.length, 1, "Page should have a subframe."); 13 13 -
trunk/LayoutTests/http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html
r220119 r231391 31 31 32 32 // Force creation of child DOM trees. 33 let childrenLevel1 = mainFrame.childFrameCollection.toArray();33 let childrenLevel1 = Array.from(mainFrame.childFrameCollection); 34 34 childrenLevel1[0].domTree; 35 35 36 let childrenLevel2 = childrenLevel1[0].childFrameCollection.toArray();36 let childrenLevel2 = Array.from(childrenLevel1[0].childFrameCollection); 37 37 childrenLevel2[0].domTree; 38 38 39 let childrenLevel3 = childrenLevel2[0].childFrameCollection.toArray();39 let childrenLevel3 = Array.from(childrenLevel2[0].childFrameCollection); 40 40 childrenLevel3[0].domTree; 41 41 -
trunk/LayoutTests/http/tests/inspector/network/har/har-page-expected.txt
r229027 r231391 44 44 "headers": "<filtered>", 45 45 "content": { 46 "size": 3042,46 "size": "<filtered>", 47 47 "compression": 0, 48 48 "mimeType": "text/html", 49 "text": "<filtered text (3042)>"49 "text": "<filtered>" 50 50 }, 51 51 "redirectURL": "", … … 85 85 "headers": "<filtered>", 86 86 "content": { 87 "size": 0,87 "size": "<filtered>", 88 88 "compression": 0, 89 89 "mimeType": "application/x-javascript", 90 "text": "<filtered text (7039)>"90 "text": "<filtered>" 91 91 }, 92 92 "redirectURL": "", -
trunk/LayoutTests/http/tests/inspector/network/har/har-page.html
r229027 r231391 36 36 return "<filtered>"; 37 37 38 // If any files are modified, we'd need to update the test without this filter. 39 if (key == "size") 40 return "<filtered>"; 41 38 42 // Size data may or may not be available, but could change based on headers. 39 43 if (key.endsWith("Size")) … … 41 45 42 46 // Reduce the file contents. 43 if (key === "text") 44 return "<filtered text (" + value.length + ")>"; 47 if (key === "text") { 48 InspectorTest.assert(value.length > 0, "The file should have contents."); 49 return "<filtered>"; 50 } 45 51 46 52 // Since cache may or may not be used, timing data may be variable. … … 73 79 await InspectorTest.awaitEvent("LoadComplete"); 74 80 75 let resources = []; 76 resources.push(WI.frameResourceManager.mainFrame.mainResource); 77 for (let resource of WI.frameResourceManager.mainFrame.resourceCollection.items) 78 resources.push(resource); 79 81 let resources = [WI.frameResourceManager.mainFrame.mainResource, ...WI.frameResourceManager.mainFrame.resourceCollection]; 80 82 let har = await WI.HARBuilder.buildArchive(resources); 81 83 InspectorTest.json(har, HARJSONFilter); -
trunk/LayoutTests/http/tests/inspector/network/resource-response-source-memory-cache-revalidate-expired-only.html
r225007 r231391 19 19 InspectorTest.awaitEvent("LoadComplete").then((event) => { 20 20 let resource = null; 21 for (let item of WI.frameResourceManager.mainFrame.resourceCollection .items) {21 for (let item of WI.frameResourceManager.mainFrame.resourceCollection) { 22 22 if (pattern.test(item.url)) { 23 23 resource = item; -
trunk/LayoutTests/http/tests/inspector/network/resource-response-source-memory-cache.html
r225007 r231391 19 19 InspectorTest.awaitEvent("LoadComplete").then((event) => { 20 20 let resource = null; 21 for (let item of WI.frameResourceManager.mainFrame.resourceCollection .items) {21 for (let item of WI.frameResourceManager.mainFrame.resourceCollection) { 22 22 if (pattern.test(item.url)) { 23 23 resource = item; -
trunk/LayoutTests/http/tests/inspector/network/resource-sizes-memory-cache.html
r220119 r231391 30 30 return InspectorTest.awaitEvent("LoadComplete").then((event) => { 31 31 let resource = null; 32 for (let item of WI.frameResourceManager.mainFrame.resourceCollection .items) {32 for (let item of WI.frameResourceManager.mainFrame.resourceCollection) { 33 33 if (pattern.test(item.url)) { 34 34 resource = item; -
trunk/LayoutTests/http/tests/inspector/network/set-resource-caching-disabled-memory-cache.html
r225007 r231391 22 22 InspectorTest.awaitEvent("LoadComplete").then((event) => { 23 23 let resource = null; 24 for (let item of WI.frameResourceManager.mainFrame.resourceCollection .items) {24 for (let item of WI.frameResourceManager.mainFrame.resourceCollection) { 25 25 if (pattern.test(item.url)) { 26 26 resource = item; -
trunk/LayoutTests/http/tests/inspector/worker/blob-script-with-cross-domain-imported-scripts.html
r220119 r231391 47 47 InspectorTest.log("RESOURCES:"); 48 48 let urls = []; 49 for (let resource of workerTarget.resourceCollection .items)49 for (let resource of workerTarget.resourceCollection) 50 50 urls.push(sanitizeURL(resource.url)); 51 51 dumpURLs(urls); -
trunk/LayoutTests/http/tests/websocket/tests/hybi/inspector/before-load.html
r220119 r231391 47 47 const url = "ws://127.0.0.1:8880/websocket/tests/hybi/inspector/echo"; 48 48 let webSocketResources = WI.frameResourceManager.mainFrame.resourceCollectionForType(WI.Resource.Type.WebSocket); 49 InspectorTest.expectEqual(webSocketResources. items.size, 1, "Should have 1 WebSocketResource");49 InspectorTest.expectEqual(webSocketResources.size, 1, "Should have 1 WebSocketResource"); 50 50 51 let webSocketResource = webSocketResources.toArray()[0];51 let webSocketResource = Array.from(webSocketResources)[0]; 52 52 if (!webSocketResource) { 53 53 reject("Missing WebSocket resource."); -
trunk/LayoutTests/inspector/canvas/resources/recording-utilities.js
r231218 r231391 122 122 InspectorTest.assert(recording.source === canvas, "Recording should be of the given canvas."); 123 123 InspectorTest.assert(recording.source.contextType === type, `Recording should be of a canvas with type "${type}".`); 124 InspectorTest.assert(recording.source.recordingCollection. items.has(recording), "Recording should be in the canvas' list of recordings.");124 InspectorTest.assert(recording.source.recordingCollection.has(recording), "Recording should be in the canvas' list of recordings."); 125 125 InspectorTest.assert(recording.frames.length === frameCount, `Recording should have ${frameCount} frames.`) 126 126 -
trunk/LayoutTests/inspector/css/manager-preferredInspectorStyleSheetForFrame.html
r220119 r231391 7 7 { 8 8 let mainFrame = WI.frameResourceManager.mainFrame; 9 let childFrames = mainFrame.childFrameCollection.toArray();9 let childFrames = Array.from(mainFrame.childFrameCollection); 10 10 InspectorTest.expectEqual(childFrames.length, 1, "Page should have a subframe."); 11 11 -
trunk/LayoutTests/inspector/debugger/resources/log-pause-location.js
r220119 r231391 8 8 9 9 window.findScript = function(regex) { 10 let resources = WI.frameResourceManager.mainFrame.resourceCollection.items; 11 for (let resource of resources) { 10 for (let resource of WI.frameResourceManager.mainFrame.resourceCollection) { 12 11 if (regex.test(resource.url)) 13 12 return resource.scripts[0]; -
trunk/LayoutTests/inspector/dom/highlightFrame.html
r225950 r231391 9 9 10 10 let mainFrame = WI.frameResourceManager.mainFrame; 11 let childFrames = mainFrame.childFrameCollection.toArray();11 let childFrames = Array.from(mainFrame.childFrameCollection); 12 12 InspectorTest.expectEqual(childFrames.length, 2, "Page should have subframes."); 13 13 -
trunk/LayoutTests/inspector/dom/highlightNode.html
r225950 r231391 9 9 10 10 let mainFrame = WI.frameResourceManager.mainFrame; 11 let childFrames = mainFrame.childFrameCollection.toArray();11 let childFrames = Array.from(mainFrame.childFrameCollection); 12 12 InspectorTest.expectEqual(childFrames.length, 1, "Page should have a subframe."); 13 13 -
trunk/LayoutTests/inspector/dom/highlightNodeList.html
r225950 r231391 9 9 10 10 let mainFrame = WI.frameResourceManager.mainFrame; 11 let childFrames = mainFrame.childFrameCollection.toArray();11 let childFrames = Array.from(mainFrame.childFrameCollection); 12 12 InspectorTest.expectEqual(childFrames.length, 1, "Page should have a subframe."); 13 13 -
trunk/LayoutTests/inspector/dom/highlightSelector.html
r225950 r231391 9 9 10 10 let mainFrame = WI.frameResourceManager.mainFrame; 11 let childFrames = mainFrame.childFrameCollection.toArray();11 let childFrames = Array.from(mainFrame.childFrameCollection); 12 12 InspectorTest.expectEqual(childFrames.length, 1, "Page should have a subframe."); 13 13 -
trunk/LayoutTests/inspector/model/frame-extra-scripts.html
r220119 r231391 20 20 description: "No extra scripts yet.", 21 21 test(resolve, reject) { 22 InspectorTest.expectEqual(mainFrame.extraScriptCollection. items.size, 0, "Main frame should have no dynamic scripts.");22 InspectorTest.expectEqual(mainFrame.extraScriptCollection.size, 0, "Main frame should have no dynamic scripts."); 23 23 resolve(); 24 24 } … … 33 33 InspectorTest.pass("ExtraScriptAdded event fired."); 34 34 InspectorTest.expectThat(event.data.script.dynamicallyAddedScriptElement, "Script should identify as dynamic."); 35 InspectorTest.expectEqual(mainFrame.extraScriptCollection. items.size, 1, "Main frame should have 1 dynamic script.");35 InspectorTest.expectEqual(mainFrame.extraScriptCollection.size, 1, "Main frame should have 1 dynamic script."); 36 36 }) 37 37 .then(resolve, reject); -
trunk/LayoutTests/inspector/page/empty-or-missing-resources.html
r225892 r231391 16 16 description: "Should not crash if there are empty or missing resources.", 17 17 async test(resolve, reject) { 18 let resources = [...WI.frameResourceManager.mainFrame.resourceCollection.items];18 let resources = Array.from(WI.frameResourceManager.mainFrame.resourceCollection); 19 19 let resourceURLs = resources.map(x => x.url).filter(x => /(empty|missing)/.test(x)).sort(); 20 20 for (let url of resourceURLs) -
trunk/LayoutTests/inspector/unit-tests/resource-collection.html
r220119 r231391 13 13 14 14 function logResourceNames(collection) { 15 let items = Array.from(collection.items); 16 InspectorTest.log(items.map((resource) => resource.displayName)); 15 InspectorTest.log(Array.from(collection).map((resource) => resource.displayName)); 17 16 } 18 17 -
trunk/LayoutTests/inspector/worker/resources-in-worker.html
r225892 r231391 42 42 function dumpWorkerResources() { 43 43 InspectorTest.log("RESOURCES:"); 44 for (let resource of workerTarget.resourceCollection .items)44 for (let resource of workerTarget.resourceCollection) 45 45 InspectorTest.log(sanitizeURL(resource.url)); 46 if (!workerTarget.resourceCollection. items.size)46 if (!workerTarget.resourceCollection.size) 47 47 InspectorTest.log("-- No Resources --"); 48 48 } … … 72 72 description: "Worker XHRs are tied to the Worker Target.", 73 73 test(resolve, reject) { 74 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 1, "Worker Target should have 1 resource.");74 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 1, "Worker Target should have 1 resource."); 75 75 InspectorTest.evaluateInPage("triggerWorkerResourceLoadXHR()"); 76 76 workerTarget.awaitEvent(WI.Target.Event.ResourceAdded) … … 81 81 InspectorTest.expectEqual(resource.target, workerTarget, "Resource should be tied to the Worker Target."); 82 82 InspectorTest.expectNull(resource.parentFrame, "Resource has no parent frame."); 83 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 2, "Worker Target should have 2 resources.");83 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 2, "Worker Target should have 2 resources."); 84 84 dumpWorkerResources(); 85 85 resolve(); … … 93 93 test(resolve, reject) { 94 94 InspectorTest.evaluateInPage("triggerMainResourceLoadXHR()"); 95 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 2, "Worker Target should still have 2 resources.");95 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 2, "Worker Target should still have 2 resources."); 96 96 WI.Frame.awaitEvent(WI.Frame.Event.ResourceWasAdded) 97 97 .then((event) => { … … 101 101 InspectorTest.expectEqual(resource.target, mainTarget, "Resource should be tied to the Main Target."); 102 102 InspectorTest.expectEqual(resource.parentFrame, WI.frameResourceManager.mainFrame, "Resource parentFrame is the main frame."); 103 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 2, "Worker Target should still have 2 resources.");103 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 2, "Worker Target should still have 2 resources."); 104 104 dumpWorkerResources(); 105 105 resolve(); … … 112 112 description: "Worker fetch requests are tied to the Worker Target.", 113 113 test(resolve, reject) { 114 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 2, "Worker Target should have 2 resources.");114 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 2, "Worker Target should have 2 resources."); 115 115 InspectorTest.evaluateInPage("triggerWorkerResourceLoadFetch()"); 116 116 workerTarget.awaitEvent(WI.Target.Event.ResourceAdded) … … 121 121 InspectorTest.expectEqual(resource.target, workerTarget, "Resource should be tied to the Worker Target."); 122 122 InspectorTest.expectNull(resource.parentFrame, "Resource has no parent frame."); 123 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 3, "Worker Target should have 3 resources.");123 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 3, "Worker Target should have 3 resources."); 124 124 dumpWorkerResources(); 125 125 resolve(); … … 133 133 test(resolve, reject) { 134 134 InspectorTest.evaluateInPage("triggerMainResourceLoadFetch()"); 135 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 3, "Worker Target should still have 3 resources.");135 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 3, "Worker Target should still have 3 resources."); 136 136 WI.Frame.awaitEvent(WI.Frame.Event.ResourceWasAdded) 137 137 .then((event) => { … … 141 141 InspectorTest.expectEqual(resource.target, mainTarget, "Resource should be tied to the Main Target."); 142 142 InspectorTest.expectEqual(resource.parentFrame, WI.frameResourceManager.mainFrame, "Resource parentFrame is the main frame."); 143 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 3, "Worker Target should still have 3 resources.");143 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 3, "Worker Target should still have 3 resources."); 144 144 dumpWorkerResources(); 145 145 resolve(); … … 152 152 description: "Worker imported scripts are Resources tied to the Worker Target.", 153 153 test(resolve, reject) { 154 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 3, "Worker Target should still have 3 resources.");154 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 3, "Worker Target should still have 3 resources."); 155 155 InspectorTest.evaluateInPage("triggerWorkerImportScript()"); 156 156 workerTarget.awaitEvent(WI.Target.Event.ResourceAdded) … … 161 161 InspectorTest.expectEqual(resource.target, workerTarget, "Resource should be tied to the Worker Target."); 162 162 InspectorTest.expectNull(resource.parentFrame, "Resource has no parent frame."); 163 InspectorTest.expectEqual(workerTarget.resourceCollection. items.size, 4, "Worker Target should have 4 resources.");163 InspectorTest.expectEqual(workerTarget.resourceCollection.size, 4, "Worker Target should have 4 resources."); 164 164 dumpWorkerResources(); 165 165 resolve(); -
trunk/Source/WebInspectorUI/ChangeLog
r231377 r231391 1 2018-05-04 Devin Rousso <webkit@devinrousso.com> 2 3 Web Inspector: simplify the WI.Collection interface 4 https://bugs.webkit.org/show_bug.cgi?id=185187 5 6 Reviewed by Brian Burg. 7 8 * UserInterface/Models/Collection.js: 9 (WI.Collection.prototype.get size): Added. 10 (WI.Collection.prototype.has): Added. 11 (WI.Collection.prototype.toJSON): 12 (WI.Collection.prototype.[Symbol.iterator]): Added. 13 (WI.Collection.prototype.get items): Deleted. 14 (WI.Collection.prototype.toArray): Deleted. 15 16 * UserInterface/Controllers/CanvasManager.js: 17 (WI.CanvasManager.prototype._removeCanvas): 18 * UserInterface/Controllers/DOMDebuggerManager.js: 19 (WebInspector.DOMDebuggerManager.prototype.get domBreakpoints): 20 * UserInterface/Models/Frame.js: 21 (WI.Frame.prototype.removeAllChildFrames): 22 (WI.Frame.prototype.resourceForURL): 23 (WI.Frame.prototype.removeAllResources): 24 * UserInterface/Models/Script.js: 25 (WI.Script): 26 * UserInterface/Views/CanvasContentView.js: 27 (WI.CanvasContentView.prototype.initialLayout): 28 * UserInterface/Views/CanvasOverviewContentView.js: 29 (WI.CanvasOverviewContentView.prototype._updateNavigationItems): 30 * UserInterface/Views/CanvasSidebarPanel.js: 31 (WI.CanvasSidebarPanel.prototype._recordingRemoved): 32 (WI.CanvasSidebarPanel.prototype._canvasChanged): 33 (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar): 34 * UserInterface/Views/CanvasTabContentView.js: 35 (WI.CanvasTabContentView.prototype.attached): 36 (WI.CanvasTabContentView.prototype._addCanvas): 37 (WI.CanvasTabContentView.prototype._removeCanvas): 38 * UserInterface/Views/CanvasTreeElement.js: 39 (WI.CanvasTreeElement.prototype.onpopulate): 40 * UserInterface/Views/CollectionContentView.js: 41 (WI.CollectionContentView.prototype.initialLayout): 42 (WI.CollectionContentView.prototype.attached): 43 * UserInterface/Views/CookieStorageContentView.js: 44 (WI.CookieStorageContentView.prototype._filterCookies): 45 * UserInterface/Views/DebuggerSidebarPanel.js: 46 (WI.DebuggerSidebarPanel.prototype._addResourcesRecursivelyForFrame): 47 * UserInterface/Views/FolderizedTreeElement.js: 48 (WI.FolderizedTreeElement.prototype.updateParentStatus): 49 (WI.FolderizedTreeElement.prototype._shouldGroupIntoFolders): 50 * UserInterface/Views/FrameTreeElement.js: 51 (WI.FrameTreeElement.prototype.onpopulate): 52 * UserInterface/Views/NavigationSidebarPanel.js: 53 (WI.NavigationSidebarPanel.prototype.get contentTreeOutlines): 54 * UserInterface/Views/NetworkTableContentView.js: 55 (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded): 56 * UserInterface/Views/OpenResourceDialog.js: 57 (WI.OpenResourceDialog.prototype._addResourcesForFrame): 58 (WI.OpenResourceDialog.prototype._addResourcesForTarget): 59 * UserInterface/Views/TreeOutlineGroup.js: 60 (WI.TreeOutlineGroup.prototype.get selectedTreeElement): 61 (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections): 62 * UserInterface/Views/WorkerTreeElement.js: 63 (WI.WorkerTreeElement.prototype.onpopulate): 64 1 65 2018-05-04 Nikita Vasilyev <nvasilyev@apple.com> 2 66 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/CanvasManager.js
r229620 r231391 269 269 _removeCanvas(canvas) 270 270 { 271 for (let program of canvas.shaderProgramCollection .items) {271 for (let program of canvas.shaderProgramCollection) { 272 272 this._shaderProgramIdentifierMap.delete(program.identifier); 273 273 this._dispatchShaderProgramRemoved(program); -
trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMDebuggerManager.js
r223308 r231391 97 97 } 98 98 99 frames = frames.concat(frame.childFrameCollection.toArray());99 frames.push(...frame.childFrameCollection); 100 100 } 101 101 -
trunk/Source/WebInspectorUI/UserInterface/Models/Collection.js
r223997 r231391 38 38 // Public 39 39 40 get items() { return this._items; } 40 get size() 41 { 42 return this._items.size; 43 } 41 44 42 45 get displayName() … … 75 78 } 76 79 80 has(...args) 81 { 82 return this._items.has(...args); 83 } 84 77 85 clear() 78 86 { … … 87 95 } 88 96 89 to Array()97 toJSON() 90 98 { 91 return Array.from(this ._items);99 return Array.from(this); 92 100 } 93 101 94 toJSON()102 [Symbol.iterator]() 95 103 { 96 return this. toArray();104 return this._items[Symbol.iterator](); 97 105 } 98 106 -
trunk/Source/WebInspectorUI/UserInterface/Models/Frame.js
r223997 r231391 342 342 this._detachFromParentFrame(); 343 343 344 for (let childFrame of this._childFrameCollection .items)344 for (let childFrame of this._childFrameCollection) 345 345 childFrame.removeAllChildFrames(); 346 346 … … 358 358 359 359 // Check the main resources of the child frames for the requested URL. 360 for (let childFrame of this._childFrameCollection .items) {360 for (let childFrame of this._childFrameCollection) { 361 361 resource = childFrame.mainResource; 362 362 if (resource.url === url) … … 368 368 369 369 // Recursively search resources of child frames. 370 for (let childFrame of this._childFrameCollection .items) {370 for (let childFrame of this._childFrameCollection) { 371 371 resource = childFrame.resourceForURL(url, true); 372 372 if (resource) … … 420 420 // This does not remove provisional resources, use clearProvisionalLoad for that. 421 421 422 let resources = this._resourceCollection.items; 423 if (!resources.size) 424 return; 425 426 for (let resource of resources) 422 if (!this._resourceCollection.size) 423 return; 424 425 for (let resource of this._resourceCollection) 427 426 this._disassociateWithResource(resource); 428 427 -
trunk/Source/WebInspectorUI/UserInterface/Models/Script.js
r223308 r231391 56 56 this._dynamicallyAddedScriptElement = true; 57 57 documentResource.parentFrame.addExtraScript(this); 58 this._dynamicallyAddedScriptElementNumber = documentResource.parentFrame.extraScriptCollection. items.size;58 this._dynamicallyAddedScriptElementNumber = documentResource.parentFrame.extraScriptCollection.size; 59 59 } else if (this._resource) 60 60 this._resource.associateWithScript(this); -
trunk/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js
r229044 r231391 136 136 this._recordingSelectElement.addEventListener("change", this._handleRecordingSelectElementChange.bind(this)); 137 137 138 for (let recording of this.representedObject.recordingCollection .items)138 for (let recording of this.representedObject.recordingCollection) 139 139 this._addRecording(recording); 140 140 -
trunk/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js
r228301 r231391 122 122 _updateNavigationItems() 123 123 { 124 let hasItems = !!this.representedObject. items.size;124 let hasItems = !!this.representedObject.size; 125 125 this._refreshButtonNavigationItem.enabled = hasItems; 126 126 this._showGridButtonNavigationItem.enabled = hasItems; -
trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js
r231218 r231391 214 214 let recording = event.data.item; 215 215 if (recording === this.recording) 216 this.recording = this._canvas ? this._canvas.recordingCollection.toArray().lastValue : null;216 this.recording = this._canvas ? Array.from(this._canvas.recordingCollection).lastValue : null; 217 217 218 218 this._updateRecordingScopeBar(); … … 318 318 319 319 let defaultSelectedRecording = null; 320 if (this._canvas.recordingCollection. items.size)321 defaultSelectedRecording = this._canvas.recordingCollection.toArray().lastValue;320 if (this._canvas.recordingCollection.size) 321 defaultSelectedRecording = Array.from(this._canvas.recordingCollection).lastValue; 322 322 323 323 this.recording = defaultSelectedRecording; … … 416 416 let scopeBarItems = []; 417 417 let selectedScopeBarItem = null; 418 for (let recording of this._canvas.recordingCollection .items) {418 for (let recording of this._canvas.recordingCollection) { 419 419 let scopeBarItem = new WI.ScopeBarItem(recording.displayName, recording.displayName); 420 420 if (recording === this._recording) -
trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js
r228722 r231391 128 128 WI.canvasManager.addEventListener(WI.CanvasManager.Event.RecordingStopped, this._recordingImportedOrStopped, this); 129 129 130 let canvases = new Set( Array.from(this._canvasCollection.items).concat(WI.canvasManager.canvases));131 132 for (let canvas of this._canvasCollection .items) {130 let canvases = new Set([...this._canvasCollection, ...WI.canvasManager.canvases]); 131 132 for (let canvas of this._canvasCollection) { 133 133 if (!canvases.has(canvas)) 134 134 this._removeCanvas(canvas); … … 136 136 137 137 for (let canvas of canvases) { 138 if (!this._canvasCollection. items.has(canvas))138 if (!this._canvasCollection.has(canvas)) 139 139 this._addCanvas(canvas); 140 140 } … … 156 156 this._canvasCollection.add(canvas); 157 157 158 for (let recording of canvas.recordingCollection .items)158 for (let recording of canvas.recordingCollection) 159 159 this._recordingAdded(recording, {suppressShowRecording: true}); 160 160 } … … 170 170 171 171 let currentContentView = this.contentBrowser.currentContentView; 172 if (currentContentView instanceof WI.RecordingContentView && canvas.recordingCollection. items.has(currentContentView.representedObject))172 if (currentContentView instanceof WI.RecordingContentView && canvas.recordingCollection.has(currentContentView.representedObject)) 173 173 this.contentBrowser.updateHierarchicalPathForCurrentContentView(); 174 174 } -
trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTreeElement.js
r228301 r231391 76 76 this.removeChildren(); 77 77 78 for (let program of this.representedObject.shaderProgramCollection .items)78 for (let program of this.representedObject.shaderProgramCollection) 79 79 this.addChildForRepresentedObject(program); 80 80 81 81 if (this._showRecordings) { 82 for (let recording of this.representedObject.recordingCollection .items)82 for (let recording of this.representedObject.recordingCollection) 83 83 this.addChildForRepresentedObject(recording); 84 84 } -
trunk/Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js
r228362 r231391 187 187 initialLayout() 188 188 { 189 let items = this.representedObject.items; 190 if (!items.size || !this._contentViewConstructor) { 189 if (!this.representedObject.size || !this._contentViewConstructor) { 191 190 this._showContentPlaceholder(); 192 191 return; … … 202 201 203 202 for (let item of this._contentViewMap.keys()) { 204 if (this.representedObject. items.has(item))203 if (this.representedObject.has(item)) 205 204 continue; 206 205 … … 210 209 } 211 210 212 for (let item of this.representedObject .items) {211 for (let item of this.representedObject) { 213 212 if (!this._contentViewMap.has(item)) 214 213 this.addContentViewForItem(item); -
trunk/Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js
r222001 r231391 159 159 for (let frame of WI.frameResourceManager.frames) { 160 160 // The main resource isn't in the list of resources, so add it as a candidate. 161 allResources.push(frame.mainResource); 162 allResources = allResources.concat(frame.resourceCollection.toArray()); 161 allResources.push(frame.mainResource, ...frame.resourceCollection); 163 162 } 164 163 -
trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js
r226768 r231391 496 496 this._addResource(frame.mainResource); 497 497 498 for (let resource of frame.resourceCollection .items)498 for (let resource of frame.resourceCollection) 499 499 this._addResource(resource); 500 500 501 for (let childFrame of frame.childFrameCollection .items)501 for (let childFrame of frame.childFrameCollection) 502 502 this._addResourcesRecursivelyForFrame(childFrame); 503 503 } -
trunk/Source/WebInspectorUI/UserInterface/Views/FolderizedTreeElement.js
r223997 r231391 149 149 let hasChildren = false; 150 150 for (let settings of this._folderizeSettingsMap.values()) { 151 if (settings.representedObject. items.size) {151 if (settings.representedObject.size) { 152 152 hasChildren = true; 153 153 break; … … 381 381 // Iterate over all the available child object types. 382 382 for (var settings of this._folderizeSettingsMap.values()) { 383 if (pushCategory(settings.representedObject. items.size))383 if (pushCategory(settings.representedObject.size)) 384 384 return true; 385 385 } -
trunk/Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js
r223920 r231391 161 161 this.prepareToPopulate(); 162 162 163 for (let frame of this._frame.childFrameCollection .items)163 for (let frame of this._frame.childFrameCollection) 164 164 this.addChildForRepresentedObject(frame); 165 165 166 for (let resource of this._frame.resourceCollection .items)166 for (let resource of this._frame.resourceCollection) 167 167 this.addChildForRepresentedObject(resource); 168 168 … … 174 174 } 175 175 176 for (let extraScript of this._frame.extraScriptCollection .items) {176 for (let extraScript of this._frame.extraScriptCollection) { 177 177 if (extraScript.sourceURL || extraScript.sourceMappingURL) 178 178 this.addChildForRepresentedObject(extraScript); -
trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js
r228722 r231391 96 96 get contentTreeOutlines() 97 97 { 98 return this._contentTreeOutlineGroup.items;98 return Array.from(this._contentTreeOutlineGroup); 99 99 } 100 100 -
trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
r230618 r231391 882 882 this._pendingInsertions.push(frame.mainResource); 883 883 884 for (let resource of frame.resourceCollection .items)884 for (let resource of frame.resourceCollection) 885 885 this._pendingInsertions.push(resource); 886 886 887 for (let childFrame of frame.childFrameCollection .items)887 for (let childFrame of frame.childFrameCollection) 888 888 populateResourcesForFrame(childFrame); 889 889 }; … … 892 892 if (target.mainResource instanceof WI.Resource) 893 893 this._pendingInsertions.push(target.mainResource); 894 for (let resource of target.resourceCollection .items)894 for (let resource of target.resourceCollection) 895 895 this._pendingInsertions.push(resource); 896 896 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js
r223164 r231391 286 286 while (frames.length) { 287 287 let currentFrame = frames.shift(); 288 let resources = [currentFrame.mainResource].concat(Array.from(currentFrame.resourceCollection.items));289 for (let resource of resources)288 this._addResource(currentFrame.mainResource, suppressFilterUpdate); 289 for (let resource of currentFrame.resourceCollection) 290 290 this._addResource(resource, suppressFilterUpdate); 291 291 292 frames = frames.concat(currentFrame.childFrameCollection.toArray());292 frames.push(...currentFrame.childFrameCollection); 293 293 } 294 294 } … … 300 300 this._addResource(target.mainResource); 301 301 302 for (let resource of target.resourceCollection .items)302 for (let resource of target.resourceCollection) 303 303 this._addResource(resource, suppressFilterUpdate); 304 304 -
trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutlineGroup.js
r223997 r231391 42 42 get selectedTreeElement() 43 43 { 44 for (let treeOutline of this .items) {44 for (let treeOutline of this) { 45 45 if (treeOutline.selectedTreeElement) 46 46 return treeOutline.selectedTreeElement; … … 84 84 console.assert(selectedTreeOutline, "Should have a parent tree outline."); 85 85 86 for (let treeOutline of this .items) {86 for (let treeOutline of this) { 87 87 if (selectedTreeOutline === treeOutline) 88 88 continue; -
trunk/Source/WebInspectorUI/UserInterface/Views/WorkerTreeElement.js
r225244 r231391 88 88 this.prepareToPopulate(); 89 89 90 for (let resource of this._target.resourceCollection .items)90 for (let resource of this._target.resourceCollection) 91 91 this.addChildForRepresentedObject(resource); 92 92 93 for (let script of this._target.extraScriptCollection .items)93 for (let script of this._target.extraScriptCollection) 94 94 this.addChildForRepresentedObject(script); 95 95
Note: See TracChangeset
for help on using the changeset viewer.