Title: [244268] trunk/Source/WebInspectorUI
- Revision
- 244268
- Author
- [email protected]
- Date
- 2019-04-15 10:27:27 -0700 (Mon, 15 Apr 2019)
Log Message
Web Inspector: sidebar panels shouldn't be added as subviews unless visible
https://bugs.webkit.org/show_bug.cgi?id=196888
<rdar://problem/49870659>
Reviewed by Timothy Hatcher.
* UserInterface/Views/Sidebar.js:
(WI.Sidebar.prototype.insertSidebarPanel):
(WI.Sidebar.prototype.removeSidebarPanel):
(WI.Sidebar.prototype.set selectedSidebarPanel):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (244267 => 244268)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-04-15 17:26:39 UTC (rev 244267)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-04-15 17:27:27 UTC (rev 244268)
@@ -1,5 +1,18 @@
2019-04-15 Devin Rousso <[email protected]>
+ Web Inspector: sidebar panels shouldn't be added as subviews unless visible
+ https://bugs.webkit.org/show_bug.cgi?id=196888
+ <rdar://problem/49870659>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/Sidebar.js:
+ (WI.Sidebar.prototype.insertSidebarPanel):
+ (WI.Sidebar.prototype.removeSidebarPanel):
+ (WI.Sidebar.prototype.set selectedSidebarPanel):
+
+2019-04-15 Devin Rousso <[email protected]>
+
Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
https://bugs.webkit.org/show_bug.cgi?id=196887
<rdar://problem/49870627>
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js (244267 => 244268)
--- trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js 2019-04-15 17:26:39 UTC (rev 244267)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js 2019-04-15 17:27:27 UTC (rev 244268)
@@ -78,9 +78,6 @@
console.assert(index >= 0 && index <= this._sidebarPanels.length);
this._sidebarPanels.splice(index, 0, sidebarPanel);
- let referenceView = this._sidebarPanels[index + 1] || null;
- this.insertSubviewBefore(sidebarPanel, referenceView);
-
if (this._navigationBar) {
console.assert(sidebarPanel.navigationItem);
this._navigationBar.insertNavigationItem(sidebarPanel.navigationItem, index);
@@ -106,7 +103,6 @@
}
this._sidebarPanels.remove(sidebarPanel);
- this.removeSubview(sidebarPanel);
if (this._navigationBar) {
console.assert(sidebarPanel.navigationItem);
@@ -126,12 +122,10 @@
return;
if (this._selectedSidebarPanel) {
- if (this._selectedSidebarPanel.visible) {
- this._selectedSidebarPanel.hidden();
- this._selectedSidebarPanel.visibilityDidChange();
- }
-
+ this._selectedSidebarPanel.hidden();
+ this._selectedSidebarPanel.visibilityDidChange();
this._selectedSidebarPanel.selected = false;
+ this.removeSubview(this._selectedSidebarPanel);
}
this._selectedSidebarPanel = sidebarPanel || null;
@@ -140,12 +134,10 @@
this._navigationBar.selectedNavigationItem = sidebarPanel ? sidebarPanel.navigationItem : null;
if (this._selectedSidebarPanel) {
+ this.addSubview(this._selectedSidebarPanel);
this._selectedSidebarPanel.selected = true;
-
- if (this._selectedSidebarPanel.visible) {
- this._selectedSidebarPanel.shown();
- this._selectedSidebarPanel.visibilityDidChange();
- }
+ this._selectedSidebarPanel.shown();
+ this._selectedSidebarPanel.visibilityDidChange();
}
this.dispatchEventToListeners(WI.Sidebar.Event.SidebarPanelSelected);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes