WebKit Bugzilla
Attachment 360142 Details for
Bug 193833
: Web Inspector: Uncaught Exception: No node with given id found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193833-20190125120751.patch (text/plain), 12.68 KB, created by
Devin Rousso
on 2019-01-25 12:07:52 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-01-25 12:07:52 PST
Size:
12.68 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 1aadbdeb19807321e0bd7438b5255ca64d18153e..ca74ac1abe763c0fa1fdfb413649eefb5546968b 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,21 @@ >+2019-01-25 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Uncaught Exception: No node with given id found >+ https://bugs.webkit.org/show_bug.cgi?id=193833 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Views/CanvasContentView.js: >+ (WI.CanvasContentView): >+ (WI.CanvasContentView.prototype.initialLayout): >+ (WI.CanvasContentView.prototype.layout): >+ (WI.CanvasContentView.prototype._refreshPixelSize): >+ Drive-by: show the refresh button when viewing a specific canvas. >+ >+ * UserInterface/Views/CanvasTabContentView.js: >+ (WI.CanvasTabContentView.prototype._removeCanvas): >+ Reset to the overview if the canvas is removed. >+ > 2019-01-25 Devin Rousso <drousso@apple.com> > > Web Inspector: improve invalid Audit/Recording JSON error messages >diff --git a/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js b/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js >index e839da704b1b2a4532fa55a1a9b9197a14ad9e0f..062efcc4a1f6de42e9645f6b01fa754476f2930e 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js >@@ -43,18 +43,6 @@ WI.CanvasContentView = class CanvasContentView extends WI.ContentView > this._pixelSizeElement = null; > this._canvasNode = null; > >- if (this.representedObject.contextType === WI.Canvas.ContextType.Canvas2D || this.representedObject.contextType === WI.Canvas.ContextType.BitmapRenderer || this.representedObject.contextType === WI.Canvas.ContextType.WebGL) { >- const toolTip = WI.UIString("Start recording canvas actions.\nShift-click to record a single frame."); >- const altToolTip = WI.UIString("Stop recording canvas actions"); >- this._recordButtonNavigationItem = new WI.ToggleButtonNavigationItem("record-start-stop", toolTip, altToolTip, "Images/Record.svg", "Images/Stop.svg", 13, 13); >- this._recordButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.High; >- this._recordButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._toggleRecording, this); >- } >- >- this._canvasElementButtonNavigationItem = new WI.ButtonNavigationItem("canvas-element", WI.UIString("Canvas Element"), "Images/Markup.svg", 16, 16); >- this._canvasElementButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low; >- this._canvasElementButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._canvasElementButtonClicked, this); >- > this._refreshButtonNavigationItem = new WI.ButtonNavigationItem("refresh", WI.UIString("Refresh"), "Images/ReloadFull.svg", 13, 13); > this._refreshButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low; > this._refreshButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this.refresh, this); >@@ -95,62 +83,86 @@ WI.CanvasContentView = class CanvasContentView extends WI.ContentView > { > super.initialLayout(); > >- let header = this.element.appendChild(document.createElement("header")); >- header.addEventListener("click", (event) => { event.stopPropagation(); }); >+ let isCard = !this._refreshButtonNavigationItem.parentNavigationBar; > >- let titles = header.appendChild(document.createElement("div")); >- titles.className = "titles"; >+ if (isCard) { >+ let header = this.element.appendChild(document.createElement("header")); >+ header.addEventListener("click", (event) => { event.stopPropagation(); }); > >- let title = titles.appendChild(document.createElement("span")); >- title.className = "title"; >- title.textContent = this.representedObject.displayName; >+ let titles = header.appendChild(document.createElement("div")); >+ titles.className = "titles"; > >- let subtitle = titles.appendChild(document.createElement("span")); >- subtitle.className = "subtitle"; >- subtitle.textContent = WI.Canvas.displayNameForContextType(this.representedObject.contextType); >+ let title = titles.appendChild(document.createElement("span")); >+ title.className = "title"; >+ title.textContent = this.representedObject.displayName; > >- let navigationBar = new WI.NavigationBar; >- if (this._recordButtonNavigationItem) >- navigationBar.addNavigationItem(this._recordButtonNavigationItem); >- navigationBar.addNavigationItem(this._canvasElementButtonNavigationItem); >- navigationBar.addNavigationItem(this._refreshButtonNavigationItem); >+ let subtitle = titles.appendChild(document.createElement("span")); >+ subtitle.className = "subtitle"; >+ subtitle.textContent = WI.Canvas.displayNameForContextType(this.representedObject.contextType); > >- header.append(navigationBar.element); >+ let navigationBar = new WI.NavigationBar; >+ >+ if (this.representedObject.contextType === WI.Canvas.ContextType.Canvas2D || this.representedObject.contextType === WI.Canvas.ContextType.BitmapRenderer || this.representedObject.contextType === WI.Canvas.ContextType.WebGL) { >+ const toolTip = WI.UIString("Start recording canvas actions.\nShift-click to record a single frame."); >+ const altToolTip = WI.UIString("Stop recording canvas actions"); >+ this._recordButtonNavigationItem = new WI.ToggleButtonNavigationItem("record-start-stop", toolTip, altToolTip, "Images/Record.svg", "Images/Stop.svg", 13, 13); >+ this._recordButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.High; >+ this._recordButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._toggleRecording, this); >+ navigationBar.addNavigationItem(this._recordButtonNavigationItem); >+ } >+ >+ let canvasElementButtonNavigationItem = new WI.ButtonNavigationItem("canvas-element", WI.UIString("Canvas Element"), "Images/Markup.svg", 16, 16); >+ canvasElementButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low; >+ canvasElementButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._canvasElementButtonClicked, this); >+ navigationBar.addNavigationItem(canvasElementButtonNavigationItem); >+ >+ navigationBar.addNavigationItem(this._refreshButtonNavigationItem); >+ >+ header.append(navigationBar.element); >+ } > > this._previewContainerElement = this.element.appendChild(document.createElement("div")); > this._previewContainerElement.className = "preview"; > >- let footer = this.element.appendChild(document.createElement("footer")); >- footer.addEventListener("click", (event) => { event.stopPropagation(); }); >+ if (isCard) { >+ let footer = this.element.appendChild(document.createElement("footer")); >+ footer.addEventListener("click", (event) => { event.stopPropagation(); }); > >- this._viewRelatedItemsContainer = footer.appendChild(document.createElement("div")); >- this._viewRelatedItemsContainer.classList.add("view-related-items"); >+ this._viewRelatedItemsContainer = footer.appendChild(document.createElement("div")); >+ this._viewRelatedItemsContainer.classList.add("view-related-items"); > >- this._viewShaderButton = document.createElement("img"); >- this._viewShaderButton.classList.add("view-shader"); >- this._viewShaderButton.title = WI.UIString("View Shader"); >- this._viewShaderButton.addEventListener("click", this._handleViewShaderButtonClicked.bind(this)); >+ this._viewShaderButton = document.createElement("img"); >+ this._viewShaderButton.classList.add("view-shader"); >+ this._viewShaderButton.title = WI.UIString("View Shader"); >+ this._viewShaderButton.addEventListener("click", this._handleViewShaderButtonClicked.bind(this)); > >- this._viewRecordingButton = document.createElement("img"); >- this._viewRecordingButton.classList.add("view-recording"); >- this._viewRecordingButton.title = WI.UIString("View Recording"); >- this._viewRecordingButton.addEventListener("click", this._handleViewRecordingButtonClicked.bind(this)); >+ this._viewRecordingButton = document.createElement("img"); >+ this._viewRecordingButton.classList.add("view-recording"); >+ this._viewRecordingButton.title = WI.UIString("View Recording"); >+ this._viewRecordingButton.addEventListener("click", this._handleViewRecordingButtonClicked.bind(this)); > >- this._updateViewRelatedItems(); >+ this._updateViewRelatedItems(); > >- let flexibleSpaceElement = footer.appendChild(document.createElement("div")); >- flexibleSpaceElement.className = "flexible-space"; >+ let flexibleSpaceElement = footer.appendChild(document.createElement("div")); >+ flexibleSpaceElement.className = "flexible-space"; > >- let metrics = footer.appendChild(document.createElement("div")); >- this._pixelSizeElement = metrics.appendChild(document.createElement("span")); >- this._pixelSizeElement.className = "pixel-size"; >- this._memoryCostElement = metrics.appendChild(document.createElement("span")); >- this._memoryCostElement.className = "memory-cost"; >+ let metrics = footer.appendChild(document.createElement("div")); >+ >+ this._pixelSizeElement = metrics.appendChild(document.createElement("span")); >+ this._pixelSizeElement.className = "pixel-size"; >+ >+ this._memoryCostElement = metrics.appendChild(document.createElement("span")); >+ this._memoryCostElement.className = "memory-cost"; >+ } > > if (this._errorElement) > this._showError(); > >- this._updateProgressView(); >+ if (isCard) { >+ this._refreshPixelSize(); >+ this._updateMemoryCost(); >+ this._updateProgressView(); >+ } > } > > layout() >@@ -177,9 +189,6 @@ WI.CanvasContentView = class CanvasContentView extends WI.ContentView > this._previewContainerElement.appendChild(this._previewImageElement); > > this._updateImageGrid(); >- >- this._refreshPixelSize(); >- this._updateMemoryCost(); > } > > shown() >@@ -288,7 +297,7 @@ WI.CanvasContentView = class CanvasContentView extends WI.ContentView > _refreshPixelSize() > { > let updatePixelSize = (size) => { >- if (this._pixelSize && size.width === this._pixelSize.width && size.height === this._pixelSize.height) >+ if (Object.shallowEqual(this._pixelSize, size)) > return; > > this._pixelSize = size; >diff --git a/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js >index d3bc9c4bed8c55fd0c65b8d2484e7fc6b6998cd2..f0071ed524ce1fe9ab419dd80f99d63f8fce7f2a 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js >@@ -195,7 +195,11 @@ WI.CanvasTabContentView = class CanvasTabContentView extends WI.ContentBrowserTa > { > let treeElement = this._canvasTreeOutline.findTreeElement(canvas); > console.assert(treeElement, "Missing tree element for canvas.", canvas); >+ >+ const suppressNotification = true; >+ treeElement.deselect(suppressNotification); > this._overviewTreeElement.removeChild(treeElement); >+ > this._canvasCollection.remove(canvas); > > const options = { >@@ -206,7 +210,9 @@ WI.CanvasTabContentView = class CanvasTabContentView extends WI.ContentBrowserTa > this._addRecording(recording, options); > > let currentContentView = this.contentBrowser.currentContentView; >- if (currentContentView instanceof WI.RecordingContentView && canvas.recordingCollection.has(currentContentView.representedObject)) >+ if (currentContentView instanceof WI.CanvasContentView) >+ WI.showRepresentedObject(this._canvasCollection); >+ else if (currentContentView instanceof WI.RecordingContentView && canvas.recordingCollection.has(currentContentView.representedObject)) > this.contentBrowser.updateHierarchicalPathForCurrentContentView(); > > let navigationSidebarPanel = this.navigationSidebarPanel;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193833
: 360142