Title: [246555] trunk/Source/WebInspectorUI
- Revision
- 246555
- Author
- drou...@apple.com
- Date
- 2019-06-18 12:09:37 -0700 (Tue, 18 Jun 2019)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (246554 => 246555)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-06-18 19:01:46 UTC (rev 246554)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-06-18 19:09:37 UTC (rev 246555)
@@ -1,3 +1,26 @@
+2019-06-18 Devin Rousso <drou...@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 <mattba...@apple.com>
Web Inspector: Elements: remove ellipses from "Break on" context menu item title
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js (246554 => 246555)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js 2019-06-18 19:01:46 UTC (rev 246554)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js 2019-06-18 19:09:37 UTC (rev 246555)
@@ -290,6 +290,8 @@
let header = this._savedRecordingsContentView.element.appendChild(document.createElement("header"));
header.textContent = WI.UIString("Saved Recordings");
+
+ this.hideContentPlaceholder();
}
if (!this._savedRecordingsTreeOutline) {
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js (246554 => 246555)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js 2019-06-18 19:01:46 UTC (rev 246554)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js 2019-06-18 19:09:37 UTC (rev 246555)
@@ -109,7 +109,7 @@
return;
}
- this._hideContentPlaceholder();
+ this.hideContentPlaceholder();
let contentView = new this._contentViewConstructor(item);
console.assert(contentView instanceof WI.ContentView);
@@ -171,7 +171,7 @@
}
if (!this.subviews.length)
- this._showContentPlaceholder();
+ this.showContentPlaceholder();
}
contentViewAdded(contentView)
@@ -184,10 +184,29 @@
// Implemented by subclasses.
}
+ showContentPlaceholder()
+ {
+ if (!this._contentPlaceholderElement) {
+ if (typeof this._contentPlaceholder === "string")
+ this._contentPlaceholderElement = WI.createMessageTextView(this._contentPlaceholder);
+ else if (this._contentPlaceholder instanceof HTMLElement)
+ this._contentPlaceholderElement = this._contentPlaceholder;
+ }
+
+ if (!this._contentPlaceholderElement.parentNode)
+ this.element.appendChild(this._contentPlaceholderElement);
+ }
+
+ hideContentPlaceholder()
+ {
+ if (this._contentPlaceholderElement)
+ this._contentPlaceholderElement.remove();
+ }
+
initialLayout()
{
if (!this.representedObject.size || !this._contentViewConstructor) {
- this._showContentPlaceholder();
+ this.showContentPlaceholder();
return;
}
}
@@ -268,23 +287,4 @@
this.dispatchEventToListeners(WI.ContentView.Event.SupplementalRepresentedObjectsDidChange);
}
-
- _showContentPlaceholder()
- {
- if (!this._contentPlaceholderElement) {
- if (typeof this._contentPlaceholder === "string")
- this._contentPlaceholderElement = WI.createMessageTextView(this._contentPlaceholder);
- else if (this._contentPlaceholder instanceof HTMLElement)
- this._contentPlaceholderElement = this._contentPlaceholder;
- }
-
- if (!this._contentPlaceholderElement.parentNode)
- this.element.appendChild(this._contentPlaceholderElement);
- }
-
- _hideContentPlaceholder()
- {
- if (this._contentPlaceholderElement)
- this._contentPlaceholderElement.remove();
- }
};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes