Title: [243403] trunk/Source/WebInspectorUI
- Revision
- 243403
- Author
- drou...@apple.com
- Date
- 2019-03-22 15:19:38 -0700 (Fri, 22 Mar 2019)
Log Message
Web Inspector: Sources: "Reveal in Resources Tab" still shown when Sources tab is enabled
https://bugs.webkit.org/show_bug.cgi?id=196134
Reviewed by Joseph Pecoraro.
* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement.prototype.populateContextMenu):
Drive-by: find the first call frame that has a source code location, rather than naively
always using the top call frame.
* UserInterface/Views/SearchResultTreeElement.js:
(WI.SearchResultTreeElement.prototype.populateContextMenu):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (243402 => 243403)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-03-22 22:12:32 UTC (rev 243402)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-03-22 22:19:38 UTC (rev 243403)
@@ -1,3 +1,18 @@
+2019-03-22 Devin Rousso <drou...@apple.com>
+
+ Web Inspector: Sources: "Reveal in Resources Tab" still shown when Sources tab is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=196134
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Views/RecordingActionTreeElement.js:
+ (WI.RecordingActionTreeElement.prototype.populateContextMenu):
+ Drive-by: find the first call frame that has a source code location, rather than naively
+ always using the top call frame.
+
+ * UserInterface/Views/SearchResultTreeElement.js:
+ (WI.SearchResultTreeElement.prototype.populateContextMenu):
+
2019-03-22 Keith Rollin <krol...@apple.com>
Enable ThinLTO support in Production builds
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js (243402 => 243403)
--- trunk/Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js 2019-03-22 22:12:32 UTC (rev 243402)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js 2019-03-22 22:19:38 UTC (rev 243403)
@@ -428,10 +428,22 @@
contextMenu.appendSeparator();
- let callFrame = this.representedObject.trace[0];
- if (callFrame) {
- contextMenu.appendItem(WI.UIString("Reveal in Resources Tab"), () => {
- WI.showSourceCodeLocation(callFrame.sourceCodeLocation, {
+ let sourceCodeLocation = null;
+ for (let callFrame of this.representedObject.trace) {
+ if (callFrame.sourceCodeLocation) {
+ sourceCodeLocation = callFrame.sourceCodeLocation;
+ break;
+ }
+ }
+
+ if (sourceCodeLocation) {
+ let label = null;
+ if (WI.settings.experimentalEnableSourcesTab.value)
+ label = WI.UIString("Reveal in Sources Tab");
+ else
+ label = WI.UIString("Reveal in Resources Tab");
+ contextMenu.appendItem(label, () => {
+ WI.showSourceCodeLocation(sourceCodeLocation, {
ignoreNetworkTab: true,
ignoreSearchTab: true,
});
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchResultTreeElement.js (243402 => 243403)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchResultTreeElement.js 2019-03-22 22:12:32 UTC (rev 243402)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchResultTreeElement.js 2019-03-22 22:19:38 UTC (rev 243403)
@@ -99,7 +99,12 @@
});
});
} else if (this.representedObject instanceof WI.SourceCodeSearchMatchObject) {
- contextMenu.appendItem(WI.UIString("Reveal in Resources Tab"), () => {
+ let label = null;
+ if (WI.settings.experimentalEnableSourcesTab.value)
+ label = WI.UIString("Reveal in Sources Tab");
+ else
+ label = WI.UIString("Reveal in Resources Tab");
+ contextMenu.appendItem(label, () => {
WI.showOriginalOrFormattedSourceCodeTextRange(this.representedObject.sourceCodeTextRange, {
ignoreNetworkTab: true,
ignoreSearchTab: true,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes