Title: [188372] trunk/Source/WebInspectorUI
- Revision
- 188372
- Author
- drou...@apple.com
- Date
- 2015-08-12 19:08:47 -0700 (Wed, 12 Aug 2015)
Log Message
Web Inspector: Opening the Elements tab without a selected sidebar panel causes a crash
https://bugs.webkit.org/show_bug.cgi?id=147965
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
If the saved setting for the selectedPanel does not exist, default to the rules panel.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
Only save the new navigationItem info if the selectedPanel exists.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (188371 => 188372)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-08-13 01:38:43 UTC (rev 188371)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-08-13 02:08:47 UTC (rev 188372)
@@ -1,3 +1,17 @@
+2015-08-12 Devin Rousso <drou...@apple.com>
+
+ Web Inspector: Opening the Elements tab without a selected sidebar panel causes a crash
+ https://bugs.webkit.org/show_bug.cgi?id=147965
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
+ (WebInspector.CSSStyleDetailsSidebarPanel):
+ If the saved setting for the selectedPanel does not exist, default to the rules panel.
+
+ (WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
+ Only save the new navigationItem info if the selectedPanel exists.
+
2015-08-12 Matt Baker <mattba...@apple.com>
Web Inspector: Remove clamp and adopt Number.constrain
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js (188371 => 188372)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js 2015-08-13 01:38:43 UTC (rev 188371)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDetailsSidebarPanel.js 2015-08-13 02:08:47 UTC (rev 188372)
@@ -77,7 +77,10 @@
this._lastSelectedSectionSetting = new WebInspector.Setting("last-selected-style-details-panel", this._rulesStyleDetailsPanel.navigationInfo.identifier);
- var selectedPanel = this._panelMatchingIdentifier(this._lastSelectedSectionSetting.value);
+ let selectedPanel = this._panelMatchingIdentifier(this._lastSelectedSectionSetting.value);
+ if (!selectedPanel)
+ selectedPanel = this._rulesStyleDetailsPanel;
+
this._switchPanels(selectedPanel);
this._navigationItem = new WebInspector.ScopeRadioButtonNavigationItem(this._identifier, this._displayName, this._panelNavigationInfo, selectedPanel.navigationInfo);
@@ -241,9 +244,9 @@
this.contentElement.classList.toggle("supports-new-rule", typeof this._selectedPanel.newRuleButtonClicked === "function");
this._selectedPanel.shown();
+
+ this._lastSelectedSectionSetting.value = selectedPanel.navigationInfo.identifier;
}
-
- this._lastSelectedSectionSetting.value = selectedPanel.navigationInfo.identifier;
}
_forcedPseudoClassCheckboxChanged(pseudoClass, event)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes