Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (200572 => 200573)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-09 14:52:19 UTC (rev 200573)
@@ -1,3 +1,63 @@
+2016-05-09 Matt Baker <mattba...@apple.com>
+
+ Web Inspector: Show in progress message in Timeline views that do not show data until the recording finishes
+ https://bugs.webkit.org/show_bug.cgi?id=156761
+ <rdar://problem/25970771>
+
+ Reviewed by Timothy Hatcher.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ New UI strings.
+
+ * UserInterface/Main.html:
+ New view class.
+
+ * UserInterface/Views/HeapAllocationsTimelineView.js:
+ (WebInspector.HeapAllocationsTimelineView.prototype.get showsLiveRecordingData):
+ * UserInterface/Views/RenderingFrameTimelineView.js:
+ (WebInspector.RenderingFrameTimelineView.prototype.get showsLiveRecordingData):
+ * UserInterface/Views/ScriptDetailsTimelineView.js:
+ (WebInspector.ScriptDetailsTimelineView.prototype.get showsLiveRecordingData):
+ * UserInterface/Views/ScriptProfileTimelineView.js:
+ (WebInspector.ScriptProfileTimelineView.prototype.get showsLiveRecordingData):
+ Don't show live recording data.
+
+ * UserInterface/Views/ScriptClusterTimelineView.js:
+ (WebInspector.ScriptClusterTimelineView.prototype.get showsLiveRecordingData):
+ Forward property to current child TimelineView.
+
+ * UserInterface/Views/TimelineRecordingContentView.css:
+ (.content-view.timeline-recording > .content-browser .recording-progress):
+ (.content-view.timeline-recording > .content-browser .recording-progress > .status):
+ (.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
+ New progress view styles.
+
+ * UserInterface/Views/TimelineRecordingContentView.js:
+ (WebInspector.TimelineRecordingContentView):
+ (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
+ (WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
+ (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
+ Refresh progress view visibility.
+
+ (WebInspector.TimelineRecordingContentView.prototype._updateProgressView):
+ Show the progress view if we're currently capturing, and showing a view
+ that doesn't support showing live data.
+
+ * UserInterface/Views/TimelineRecordingProgressView.js:
+ (WebInspector.TimelineRecordingProgressView):
+ (WebInspector.TimelineRecordingProgressView.prototype.get visible):
+ (WebInspector.TimelineRecordingProgressView.prototype.set visible):
+ Show a status message, indeterminate progress spinner, and Stop Recording
+ button while timeline data is being recorded.
+
+ * UserInterface/Views/TimelineView.js:
+ (WebInspector.TimelineView.prototype.get showsLiveRecordingData):
+ Implemented by TimelineViews that don't support showing data while recording.
+
+ * UserInterface/Views/Variables.css:
+ (:root):
+ Add --panel-background-color-light for the progress view.
+
2016-05-08 Matt Baker <mattba...@apple.com>
Web Inspector: Add Breakpoints and Scripts folders to Debugger sidebar
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (200572 => 200573)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2016-05-09 14:52:19 UTC (rev 200573)
@@ -558,6 +558,7 @@
localizedStrings["Readonly"] = "Readonly";
localizedStrings["Reasons for compositing:"] = "Reasons for compositing:";
localizedStrings["Recording"] = "Recording";
+localizedStrings["Recording Timeline Data"] = "Recording Timeline Data";
localizedStrings["Reference Issue"] = "Reference Issue";
localizedStrings["Reflection"] = "Reflection";
localizedStrings["Refresh"] = "Refresh";
Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Main.html 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html 2016-05-09 14:52:19 UTC (rev 200573)
@@ -625,6 +625,7 @@
<script src=""
<script src=""
<script src=""
+ <script src=""
<script src=""
<script src=""
<script src=""
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js 2016-05-09 14:52:19 UTC (rev 200573)
@@ -93,6 +93,8 @@
// Public
+ get showsLiveRecordingData() { return false; }
+
showHeapSnapshotList()
{
if (this._showingSnapshotList)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js 2016-05-09 14:52:19 UTC (rev 200573)
@@ -108,6 +108,8 @@
// Public
+ get showsLiveRecordingData() { return false; }
+
shown()
{
super.shown();
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js 2016-05-09 14:52:19 UTC (rev 200573)
@@ -61,6 +61,7 @@
// TimelineView
// FIXME: Determine a better way to bridge TimelineView methods to the sub-timeline views.
+ get showsLiveRecordingData() { return this._contentViewContainer.currentContentView.showsLiveRecordingData; }
get zeroTime() { return this._contentViewContainer.currentContentView.zeroTime; }
set zeroTime(x) { this._contentViewContainer.currentContentView.zeroTime = x; }
get startTime() { return this._contentViewContainer.currentContentView.startTime; }
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js 2016-05-09 14:52:19 UTC (rev 200573)
@@ -89,6 +89,8 @@
// Public
+ get showsLiveRecordingData() { return false; }
+
shown()
{
super.shown();
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptProfileTimelineView.js 2016-05-09 14:52:19 UTC (rev 200573)
@@ -65,6 +65,10 @@
// FIXME: Support filtering the ProfileView.
}
+ // Public
+
+ get showsLiveRecordingData() { return false; }
+
// Protected
closed()
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.css (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.css 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.css 2016-05-09 14:52:19 UTC (rev 200573)
@@ -61,3 +61,28 @@
.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows {
color: black;
}
+
+.content-view.timeline-recording > .content-browser .recording-progress {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 30px;
+ bottom: 0;
+ text-align: center;
+ background-color: var(--panel-background-color-light);
+}
+
+.content-view.timeline-recording > .content-browser .recording-progress > .status {
+ margin-top: 40px;
+ margin-bottom: 10px;
+ text-align: center;
+ font-size: 12px;
+ color: hsl(0, 0%, 12%);
+}
+
+.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner {
+ display: inline-block;
+ margin-top: -1px;
+ margin-left: 8px;
+ vertical-align: middle;
+}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-05-09 14:52:19 UTC (rev 200573)
@@ -63,6 +63,9 @@
this._overviewTimelineView = new WebInspector.OverviewTimelineView(recording);
this._overviewTimelineView.secondsPerPixel = this._timelineOverview.secondsPerPixel;
+ this._progressView = new WebInspector.TimelineRecordingProgressView;
+ this._timelineContentBrowser.addSubview(this._progressView);
+
this._timelineViewMap = new Map;
this._pathComponentMap = new Map;
@@ -271,6 +274,7 @@
this._timelineOverview.viewMode = newViewMode;
this._updateTimelineOverviewHeight();
+ this._updateProgressView();
if (timelineView) {
this._updateTimelineViewSelection(timelineView);
@@ -431,6 +435,8 @@
_capturingStarted(event)
{
+ this._updateProgressView();
+
if (!this._updating)
this._startUpdatingCurrentTime(event.data.startTime);
this._clearTimelineNavigationItem.enabled = !this._recording.readonly;
@@ -438,6 +444,8 @@
_capturingStopped(event)
{
+ this._updateProgressView();
+
if (this._updating)
this._stopUpdatingCurrentTime();
}
@@ -714,4 +722,10 @@
let filtered = event.data.filtered;
this._timelineOverview.recordWasFiltered(this.currentTimelineView.representedObject, record, filtered);
}
+
+ _updateProgressView()
+ {
+ let isCapturing = WebInspector.timelineManager.isCapturing();
+ this._progressView.visible = isCapturing && this.currentTimelineView && !this.currentTimelineView.showsLiveRecordingData;
+ }
};
Copied: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingProgressView.js (from rev 200572, trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.css) (0 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingProgressView.js (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingProgressView.js 2016-05-09 14:52:19 UTC (rev 200573)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.TimelineRecordingProgressView = class TimelineRecordingProgressView extends WebInspector.View
+{
+ constructor()
+ {
+ super();
+
+ this.element.classList.add("recording-progress");
+
+ let statusElement = document.createElement("div");
+ statusElement.classList.add("status");
+ statusElement.textContent = WebInspector.UIString("Recording Timeline Data");
+ this.element.append(statusElement);
+
+ let spinner = new WebInspector.IndeterminateProgressSpinner;
+ statusElement.append(spinner.element);
+
+ this._stopRecordingButtonElement = document.createElement("button");
+ this._stopRecordingButtonElement.textContent = WebInspector.UIString("Stop Recording");
+ this._stopRecordingButtonElement.addEventListener("click", () => WebInspector.timelineManager.stopCapturing());
+ this.element.append(this._stopRecordingButtonElement);
+ }
+
+ // Public
+
+ get visible() { return this._visible; }
+
+ set visible(x)
+ {
+ if (this._visible === x)
+ return;
+
+ // FIXME: remove once <https://webkit.org/b/150741> is fixed.
+ this._visible = x;
+ this.element.classList.toggle("hidden", !this._visible);
+ }
+};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js 2016-05-09 14:52:19 UTC (rev 200573)
@@ -43,6 +43,12 @@
// Public
+ get showsLiveRecordingData()
+ {
+ // Implemented by sub-classes if needed.
+ return true;
+ }
+
get navigationItems()
{
return this._scopeBar ? [this._scopeBar] : [];
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css (200572 => 200573)
--- trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css 2016-05-09 10:17:29 UTC (rev 200572)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Variables.css 2016-05-09 14:52:19 UTC (rev 200573)
@@ -45,6 +45,7 @@
--border-color: hsl(0, 0%, 70%);
--panel-background-color: hsl(0, 0%, 94%);
+ --panel-background-color-light: hsl(0, 0%, 96%);
--console-secondary-text-color: hsla(0, 0%, 0%, 0.33);
--console-prompt-min-height: 30px;