Title: [246556] trunk/Source/WebInspectorUI
- Revision
- 246556
- Author
- drou...@apple.com
- Date
- 2019-06-18 12:13:06 -0700 (Tue, 18 Jun 2019)
Log Message
Web Inspector: Canvas: the initial state should be selected when processing a new/imported recording if the navigation sidebar is collapsed
https://bugs.webkit.org/show_bug.cgi?id=198952
Reviewed by Joseph Pecoraro.
Prevent any content from being generated until `initialLayout` is called, as otherwise it's
possible for the `CanvasNavigationSidebar` to update the current action index before the
preview element has been created, which would throw an error.
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.initialLayout):
(WI.RecordingContentView.prototype._updateSliderValue):
(WI.RecordingContentView.prototype._handleRecordingProcessedAction):
Drive-by: update the slider max each time the selected action index is changed.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (246555 => 246556)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-06-18 19:09:37 UTC (rev 246555)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-06-18 19:13:06 UTC (rev 246556)
@@ -1,5 +1,23 @@
2019-06-18 Devin Rousso <drou...@apple.com>
+ Web Inspector: Canvas: the initial state should be selected when processing a new/imported recording if the navigation sidebar is collapsed
+ https://bugs.webkit.org/show_bug.cgi?id=198952
+
+ Reviewed by Joseph Pecoraro.
+
+ Prevent any content from being generated until `initialLayout` is called, as otherwise it's
+ possible for the `CanvasNavigationSidebar` to update the current action index before the
+ preview element has been created, which would throw an error.
+
+ * UserInterface/Views/RecordingContentView.js:
+ (WI.RecordingContentView.prototype.updateActionIndex):
+ (WI.RecordingContentView.prototype.initialLayout):
+ (WI.RecordingContentView.prototype._updateSliderValue):
+ (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
+ Drive-by: update the slider max each time the selected action index is changed.
+
+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
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js (246555 => 246556)
--- trunk/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js 2019-06-18 19:09:37 UTC (rev 246555)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js 2019-06-18 19:13:06 UTC (rev 246556)
@@ -111,7 +111,8 @@
this._updateSliderValue();
- this._generateContentThrottler.fire();
+ if (this.didInitialLayout)
+ this._generateContentThrottler.fire();
this._action = this.representedObject.actions[this._index];
@@ -179,6 +180,9 @@
}
this._updateSliderValue();
+
+ if (!isNaN(this._index))
+ this._generateContentThrottler.fire();
}
// Private
@@ -483,6 +487,7 @@
}
this._sliderElement.value = visualActionIndex;
+ this._sliderElement.max = visualActionIndexes.length;
this._sliderValueElement.textContent = WI.UIString("%d of %d").format(visualActionIndex, visualActionIndexes.length);
}
@@ -523,7 +528,6 @@
{
this._updateExportButton();
- this._sliderElement.max = this.representedObject.visualActionIndexes.length;
this._updateSliderValue();
if (this.representedObject.ready)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes