Title: [196968] trunk/Source/WebInspectorUI
- Revision
- 196968
- Author
- [email protected]
- Date
- 2016-02-22 18:31:02 -0800 (Mon, 22 Feb 2016)
Log Message
Web Inspector: Timelines sidebar and overview attempt to access undefined properties when FPS instrument is absent
https://bugs.webkit.org/show_bug.cgi?id=154567
<rdar://problem/24781536>
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
The viewMode property should be in a valid state before attempting
to access the current view mode settings.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.get minimumWidth):
(WebInspector.TimelineSidebarPanel.prototype._updateViewModeIfNeeded):
(WebInspector.TimelineSidebarPanel):
Added missing checks for FPSInstrument support.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (196967 => 196968)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-02-23 01:01:46 UTC (rev 196967)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-02-23 02:31:02 UTC (rev 196968)
@@ -1,3 +1,22 @@
+2016-02-22 Matt Baker <[email protected]>
+
+ Web Inspector: Timelines sidebar and overview attempt to access undefined properties when FPS instrument is absent
+ https://bugs.webkit.org/show_bug.cgi?id=154567
+ <rdar://problem/24781536>
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Views/TimelineOverview.js:
+ (WebInspector.TimelineOverview):
+ The viewMode property should be in a valid state before attempting
+ to access the current view mode settings.
+
+ * UserInterface/Views/TimelineSidebarPanel.js:
+ (WebInspector.TimelineSidebarPanel.prototype.get minimumWidth):
+ (WebInspector.TimelineSidebarPanel.prototype._updateViewModeIfNeeded):
+ (WebInspector.TimelineSidebarPanel):
+ Added missing checks for FPSInstrument support.
+
2016-02-22 Nikita Vasilyev <[email protected]>
REGRESSION (r196620): Web Inspector: Filter bar in the left sidebar is 1px shorter than the console prompt
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (196967 => 196968)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2016-02-23 01:01:46 UTC (rev 196967)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2016-02-23 02:31:02 UTC (rev 196968)
@@ -85,6 +85,7 @@
this._mouseWheelDelta = 0;
this._cachedScrollContainerWidth = NaN;
this._timelineRulerSelectionChanged = false;
+ this._viewMode = WebInspector.TimelineOverview.ViewMode.Timelines;
for (let instrument of this._recording.instruments)
this._instrumentAdded(instrument);
@@ -92,7 +93,7 @@
if (!WebInspector.timelineManager.isCapturingPageReload())
this._resetSelection();
- this.viewMode = WebInspector.TimelineOverview.ViewMode.Timelines;
+ this._viewModeDidChange();
}
// Public
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (196967 => 196968)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js 2016-02-23 01:01:46 UTC (rev 196967)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js 2016-02-23 02:31:02 UTC (rev 196968)
@@ -186,7 +186,7 @@
get minimumWidth()
{
- if (this._viewModeNavigationBar)
+ if (WebInspector.FPSInstrument.supported())
return Math.max(this._replayNavigationBar.minimumWidth, this._viewModeNavigationBar.minimumWidth);
return this._replayNavigationBar.minimumWidth;
}
@@ -899,6 +899,10 @@
_refreshFrameSelectionChart()
{
+ console.assert(WebInspector.FPSInstrument.supported());
+ if (!WebInspector.FPSInstrument.supported())
+ return;
+
if (!this.visible)
return;
@@ -1034,15 +1038,13 @@
this._viewMode = newViewMode;
- if (this._viewMode === WebInspector.TimelineOverview.ViewMode.Timelines) {
- this._timelinesTreeOutline.hidden = false;
- this._frameSelectionChartSection.collapsed = true;
- } else {
- this._timelinesTreeOutline.hidden = true;
- this._frameSelectionChartSection.collapsed = false;
+ let isShowingTimelines = this._viewMode === WebInspector.TimelineOverview.ViewMode.Timelines;
+ this._timelinesTreeOutline.hidden = !isShowingTimelines;
+
+ if (WebInspector.FPSInstrument.supported()) {
+ this._frameSelectionChartSection.collapsed = isShowingTimelines;
+ this._viewModeNavigationBar.selectedNavigationItem = this._viewMode;
}
-
- this._viewModeNavigationBar.selectedNavigationItem = this._viewMode;
}
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes