Changeset 222124 in webkit
- Timestamp:
- Sep 15, 2017 7:12:17 PM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r222102 r222124 1 2017-09-15 Devin Rousso <webkit@devinrousso.com> 2 3 Web Inspector: REGRESSION(r222057): recording state doesn't update when changing actions 4 https://bugs.webkit.org/show_bug.cgi?id=176988 5 6 Reviewed by Matt Baker. 7 8 Replace `updateActionIndex` with `updateAction`, where the currently selected RecordingAction 9 is passed to the DetailsSidebarPanel. Also remove the call to `this._recording.actions` in 10 order to ensure that all logic performed by both DetailsSidebarPanel is synchronous. 11 12 * Localizations/en.lproj/localizedStrings.js: 13 14 * UserInterface/Views/RecordingTabContentView.js: 15 (WI.RecordingTabContentView.prototype._updateActionIndex): 16 17 * UserInterface/Views/RecordingContentView.js: 18 (WI.RecordingContentView.prototype.async._generateContentCanvas2D): 19 (WI.RecordingContentView.prototype.async._generateContentCanvasWebGL): 20 21 * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: 22 (WI.RecordingStateDetailsSidebarPanel): 23 (WI.RecordingStateDetailsSidebarPanel.prototype.set recording): 24 (WI.RecordingStateDetailsSidebarPanel.prototype.updateAction): 25 (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D): 26 (WI.RecordingStateDetailsSidebarPanel.prototype.updateActionIndex): Deleted. 27 28 * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: 29 (WI.RecordingTraceDetailsSidebarPanel): 30 (WI.RecordingTraceDetailsSidebarPanel.prototype.set recording): 31 (WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction): 32 (WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex): Deleted. 33 1 34 2017-09-15 Matt Baker <mattbaker@apple.com> 2 35 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r222064 r222124 147 147 localizedStrings["Call Frames Truncated"] = "Call Frames Truncated"; 148 148 localizedStrings["Call Stack"] = "Call Stack"; 149 localizedStrings["Call Stack Unavailable"] = "Call Stack Unavailable"; 149 150 localizedStrings["Call Trees"] = "Call Trees"; 150 151 localizedStrings["Calls"] = "Calls"; … … 595 596 localizedStrings["No Results Found"] = "No Results Found"; 596 597 localizedStrings["No Search Results"] = "No Search Results"; 597 localizedStrings["No Trace Data"] = "No Trace Data";598 598 localizedStrings["No Watch Expressions"] = "No Watch Expressions"; 599 599 localizedStrings["No matching ARIA role"] = "No matching ARIA role"; -
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js
r222057 r222124 399 399 applyActions(snapshot.index, this._index, () => { 400 400 if (options.actionCompletedCallback) 401 options.actionCompletedCallback( snapshot.context);401 options.actionCompletedCallback(actions[this._index], snapshot.context); 402 402 }); 403 403 … … 449 449 450 450 if (options.actionCompletedCallback) 451 options.actionCompletedCallback( );451 options.actionCompletedCallback(actions[this._index]); 452 452 } 453 453 -
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingStateDetailsSidebarPanel.js
r222102 r222124 31 31 32 32 this._recording = null; 33 this._ index = NaN;33 this._action = null; 34 34 35 35 this._dataGrid = null; … … 61 61 62 62 this._recording = recording; 63 this._ index = NaN;63 this._action = null; 64 64 65 65 for (let subview of this.contentView.subviews) … … 67 67 } 68 68 69 updateAction Index(index, context, options = {})69 updateAction(action, context, options = {}) 70 70 { 71 if (!this._recording )71 if (!this._recording || action === this._action) 72 72 return; 73 73 74 this._recording.actions.then((actions) => { 75 console.assert(index >= 0 && index < actions.length); 76 if (index < 0 || index > actions.length || index === this._index) 77 return; 74 this._action = action; 78 75 79 this._index = index; 76 if (this._recording.type === WI.Recording.Type.Canvas2D) 77 this._generateDetailsCanvas2D(action, context, options); 80 78 81 if (this._recording.type === WI.Recording.Type.Canvas2D) 82 this._generateDetailsCanvas2D(context, actions, options); 83 84 this.updateLayoutIfNeeded(); 85 }); 79 this.updateLayoutIfNeeded(); 86 80 } 87 81 88 82 // Private 89 83 90 _generateDetailsCanvas2D( context, actions, options = {})84 _generateDetailsCanvas2D(action, context, options = {}) 91 85 { 92 86 if (!this._dataGrid) { … … 149 143 } 150 144 151 let action = actions[this._index];152 145 for (let name in state) { 153 146 let value = state[name]; -
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingTabContentView.js
r222057 r222124 133 133 this._scrubberNavigationItem.value = index; 134 134 135 options.actionCompletedCallback = ( context) => {135 options.actionCompletedCallback = (action, context) => { 136 136 for (let detailsSidebarPanel of this.detailsSidebarPanels) { 137 if (detailsSidebarPanel.updateAction Index)138 detailsSidebarPanel.updateAction Index(index, context, options);137 if (detailsSidebarPanel.updateAction) 138 detailsSidebarPanel.updateAction(action, context, options); 139 139 } 140 140 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingTraceDetailsSidebarPanel.js
r222057 r222124 31 31 32 32 this._recording = null; 33 this._ index = NaN;33 this._action = null; 34 34 } 35 35 … … 59 59 60 60 this._recording = recording; 61 this._ index = NaN;61 this._action = null; 62 62 63 63 this.contentView.element.removeChildren(); 64 64 } 65 65 66 updateAction Index(index, context, options = {})66 updateAction(action, context, options = {}) 67 67 { 68 if (!this._recording )68 if (!this._recording || action === this._action) 69 69 return; 70 70 71 this._recording.actions.then((actions) => { 72 console.assert(index >= 0 && index < actions.length); 73 if (index < 0 || index > actions.length || index === this._index) 74 return; 71 this._action = action; 75 72 76 this._index = index;73 this.contentView.element.removeChildren(); 77 74 78 this.contentView.element.removeChildren(); 75 let trace = this._action.trace; 76 if (!trace.length) { 77 let noTraceDataElement = this.contentView.element.appendChild(document.createElement("div")); 78 noTraceDataElement.classList.add("no-trace-data"); 79 79 80 let trace = actions[this._index].trace; 81 if (!trace.length) { 82 let noTraceDataElement = this.contentView.element.appendChild(document.createElement("div")); 83 noTraceDataElement.classList.add("no-trace-data"); 80 let noTraceDataMessageElement = noTraceDataElement.appendChild(document.createElement("div")); 81 noTraceDataMessageElement.classList.add("message"); 82 noTraceDataMessageElement.textContent = WI.UIString("Call Stack Unavailable"); 83 return; 84 } 84 85 85 let noTraceDataMessageElement = noTraceDataElement.appendChild(document.createElement("div")); 86 noTraceDataMessageElement.classList.add("message"); 87 noTraceDataMessageElement.textContent = WI.UIString("No Trace Data"); 88 return; 89 } 90 91 const showFunctionName = true; 92 for (let callFrame of trace) 93 this.contentView.element.appendChild(new WI.CallFrameView(callFrame, showFunctionName)); 94 }); 86 const showFunctionName = true; 87 for (let callFrame of trace) 88 this.contentView.element.appendChild(new WI.CallFrameView(callFrame, showFunctionName)); 95 89 } 96 90 };
Note: See TracChangeset
for help on using the changeset viewer.