Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (215629 => 215630)
--- trunk/Source/WebInspectorUI/ChangeLog 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/ChangeLog 2017-04-21 20:05:32 UTC (rev 215630)
@@ -1,3 +1,101 @@
+2017-04-21 Devin Rousso <[email protected]>
+
+ Web Inspector: Don't show the Search tab if it's open and matches the representedObject
+ https://bugs.webkit.org/show_bug.cgi?id=168709
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.handlePossibleLinkClick):
+ (WebInspector.openURL):
+ (WebInspector.showSourceCode):
+ (WebInspector.showOriginalUnformattedSourceCodeLocation):
+ (WebInspector.showOriginalOrFormattedSourceCodeLocation):
+ (WebInspector.showOriginalOrFormattedSourceCodeTextRange):
+ (WebInspector._frameWasAdded):
+ (WebInspector.createSourceCodeLocationLink):
+ (WebInspector.linkifyLocation):
+ (WebInspector.linkifyElement):
+ Add `options` parameter to provide greater customization. Also fix some style issues.
+
+ * UserInterface/Views/NetworkGridContentView.js:
+ (WebInspector.NetworkGridContentView.prototype.hasRepresentedObject): Deleted.
+ * UserInterface/Views/NetworkSidebarPanel.js:
+ (WebInspector.NetworkSidebarPanel.prototype.hasRepresentedObject): Deleted.
+ * UserInterface/Views/NetworkTabContentView.js:
+ (WebInspector.NetworkTabContentView.prototype.canShowRepresentedObject):
+ * UserInterface/Views/SearchTabContentView.js:
+ (WebInspector.SearchTabContentView.prototype.canShowRepresentedObject):
+ Ensure that the Search tab can only display resources that it has entries for in its view.
+ Also rework the way in which this is determined.
+
+ * UserInterface/Controllers/BreakpointPopoverController.js:
+ (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
+ * UserInterface/Protocol/InspectorFrontendAPI.js:
+ (InspectorFrontendAPI.showMainResourceForFrame):
+ * UserInterface/Views/CSSStyleDeclarationSection.js:
+ (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
+ * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+ (WebInspector.CSSStyleDeclarationTextEditor.tokenTrackingControllerHighlightedRangeWasClicked.showRangeInSourceCode):
+ (WebInspector.CSSStyleDeclarationTextEditor.tokenTrackingControllerHighlightedRangeWasClicked):
+ * UserInterface/Views/ComputedStyleDetailsPanel.js:
+ (WebInspector.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorShowProperty):
+ * UserInterface/Views/ConsoleMessageView.js:
+ (WebInspector.ConsoleMessageView.prototype._linkifyLocation):
+ * UserInterface/Views/DOMDetailsSidebarPanel.js:
+ (WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked):
+ * UserInterface/Views/DOMTreeContentView.js:
+ (WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink):
+ * UserInterface/Views/DOMTreeElement.js:
+ (WebInspector.DOMTreeElement.prototype._showCustomElementDefinition):
+ * UserInterface/Views/DebuggerDashboardView.js:
+ (WebInspector.DebuggerDashboardView.prototype._rebuildLocation):
+ * UserInterface/Views/DebuggerSidebarPanel.js:
+ (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
+ (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonGotoArrow):
+ * UserInterface/Views/ErrorObjectView.js:
+ (WebInspector.ErrorObjectView.makeSourceLinkWithPrefix):
+ * UserInterface/Views/EventListenerSectionGroup.js:
+ (WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
+ * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
+ (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
+ (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
+ * UserInterface/Views/ObjectTreeBaseTreeElement.js:
+ (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
+ (WebInspector.ObjectTreeBaseTreeElement):
+ * UserInterface/Views/ProbeSetDetailsSection.js:
+ (WebInspector.ProbeSetDetailsSection.prototype._updateLinkElement):
+ * UserInterface/Views/ProfileDataGridNode.js:
+ (WebInspector.ProfileDataGridNode.prototype._displayContent):
+ * UserInterface/Views/ResourceDetailsSidebarPanel.js:
+ (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRelatedResourcesSection):
+ (WebInspector.ResourceDetailsSidebarPanel.prototype._goToRequestDataClicked):
+ * UserInterface/Views/ResourceSidebarPanel.js:
+ (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
+ * UserInterface/Views/ResourceTimelineDataGridNode.js:
+ (WebInspector.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked):
+ * UserInterface/Views/RulesStyleDetailsPanel.js:
+ (WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
+ * UserInterface/Views/SearchSidebarPanel.js:
+ (WebInspector.SearchSidebarPanel.prototype._treeElementDoubleClick):
+ * UserInterface/Views/SourceCodeTextEditor.js:
+ (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
+ * UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
+ (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype._createNameCellContent):
+ * UserInterface/Views/TimelineDataGrid.js:
+ (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange):
+ * UserInterface/Views/TimelineDataGridNode.js:
+ (WebInspector.TimelineDataGridNode.prototype.createCellContent):
+ * UserInterface/Views/VisualStyleSelectorTreeItem.js:
+ (WebInspector.VisualStyleSelectorTreeItem.prototype.populateContextMenu):
+ Ensure that the Search tab is never shown from links generated by these functions.
+ Also do the same for the Network tab in some cases.
+
+ * UserInterface/Views/NetworkTimelineView.js:
+ (WebInspector.NetworkTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
+ (WebInspector.NetworkTimelineView.prototype.showContentViewForTreeElement): Deleted.
+ Drive-by cleanup: remove dead code.
+
2017-04-20 Matt Baker <[email protected]>
Web Inspector: Add regular _expression_ support to XHR breakpoints
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -803,7 +803,7 @@
this.notifications.dispatchEventToListeners(WebInspector.Notification.VisibilityStateDidChange);
};
-WebInspector.handlePossibleLinkClick = function(event, frame, alwaysOpenExternally)
+WebInspector.handlePossibleLinkClick = function(event, frame, options = {})
{
var anchorElement = event.target.enclosingNodeOrSelfWithNodeName("a");
if (!anchorElement || !anchorElement.href)
@@ -818,7 +818,7 @@
event.preventDefault();
event.stopPropagation();
- this.openURL(anchorElement.href, frame, {lineNumber: anchorElement.lineNumber});
+ this.openURL(anchorElement.href, frame, Object.shallowMerge(options, {lineNumber: anchorElement.lineNumber}));
return true;
};
@@ -1214,7 +1214,7 @@
WebInspector.showSourceCodeLocation = function(sourceCodeLocation, options = {})
{
this.showSourceCode(sourceCodeLocation.displaySourceCode, Object.shallowMerge(options, {
- positionToReveal: sourceCodeLocation.displayPosition()
+ positionToReveal: sourceCodeLocation.displayPosition(),
}));
};
@@ -1222,7 +1222,7 @@
{
this.showSourceCode(sourceCodeLocation.sourceCode, Object.shallowMerge(options, {
positionToReveal: sourceCodeLocation.position(),
- forceUnformatted: true
+ forceUnformatted: true,
}));
};
@@ -1229,7 +1229,7 @@
WebInspector.showOriginalOrFormattedSourceCodeLocation = function(sourceCodeLocation, options = {})
{
this.showSourceCode(sourceCodeLocation.sourceCode, Object.shallowMerge(options, {
- positionToReveal: sourceCodeLocation.formattedPosition()
+ positionToReveal: sourceCodeLocation.formattedPosition(),
}));
};
@@ -1238,7 +1238,7 @@
var textRangeToSelect = sourceCodeTextRange.formattedTextRange;
this.showSourceCode(sourceCodeTextRange.sourceCode, Object.shallowMerge(options, {
positionToReveal: textRangeToSelect.startPosition(),
- textRangeToSelect
+ textRangeToSelect,
}));
};
@@ -1393,7 +1393,11 @@
function delayedWork()
{
- this.showSourceCodeForFrame(frame.id);
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ this.showSourceCodeForFrame(frame.id, options);
}
// Delay showing the frame since FrameWasAdded is called before MainFrameChanged.
@@ -2294,7 +2298,7 @@
return button;
};
-WebInspector.createSourceCodeLocationLink = function(sourceCodeLocation, dontFloat, useGoToArrowButton)
+WebInspector.createSourceCodeLocationLink = function(sourceCodeLocation, options = {})
{
console.assert(sourceCodeLocation);
if (!sourceCodeLocation)
@@ -2302,21 +2306,21 @@
var linkElement = document.createElement("a");
linkElement.className = "go-to-link";
- WebInspector.linkifyElement(linkElement, sourceCodeLocation);
+ WebInspector.linkifyElement(linkElement, sourceCodeLocation, options);
sourceCodeLocation.populateLiveDisplayLocationTooltip(linkElement);
- if (useGoToArrowButton)
+ if (options.useGoToArrowButton)
linkElement.appendChild(WebInspector.createGoToArrowButton());
else
sourceCodeLocation.populateLiveDisplayLocationString(linkElement, "textContent");
- if (dontFloat)
+ if (options.dontFloat)
linkElement.classList.add("dont-float");
return linkElement;
};
-WebInspector.linkifyLocation = function(url, lineNumber, columnNumber, className)
+WebInspector.linkifyLocation = function(url, sourceCodePosition, options = {})
{
var sourceCode = WebInspector.sourceCodeForURL(url);
@@ -2323,21 +2327,21 @@
if (!sourceCode) {
var anchor = document.createElement("a");
anchor.href = ""
- anchor.lineNumber = lineNumber;
- if (className)
- anchor.className = className;
- anchor.append(WebInspector.displayNameForURL(url) + ":" + lineNumber);
+ anchor.lineNumber = sourceCodePosition.lineNumber;
+ if (options.className)
+ anchor.className = options.className;
+ anchor.append(WebInspector.displayNameForURL(url) + ":" + sourceCodePosition.lineNumber);
return anchor;
}
- var sourceCodeLocation = sourceCode.createSourceCodeLocation(lineNumber, columnNumber);
- var linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, true);
- if (className)
- linkElement.classList.add(className);
+ let sourceCodeLocation = sourceCode.createSourceCodeLocation(sourceCodePosition.lineNumber, sourceCodePosition.columnNumber);
+ let linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, Object.shallowMerge(options, {dontFloat: true}));
+ if (options.className)
+ linkElement.classList.add(options.className);
return linkElement;
};
-WebInspector.linkifyElement = function(linkElement, sourceCodeLocation) {
+WebInspector.linkifyElement = function(linkElement, sourceCodeLocation, options = {}) {
console.assert(sourceCodeLocation);
function showSourceCodeLocation(event)
@@ -2346,9 +2350,9 @@
event.preventDefault();
if (event.metaKey)
- this.showOriginalUnformattedSourceCodeLocation(sourceCodeLocation);
+ this.showOriginalUnformattedSourceCodeLocation(sourceCodeLocation, options);
else
- this.showSourceCodeLocation(sourceCodeLocation);
+ this.showSourceCodeLocation(sourceCodeLocation, options);
}
linkElement.addEventListener("click", showSourceCodeLocation.bind(this));
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -67,7 +67,11 @@
};
const revealOriginalSourceCodeLocation = () => {
- WebInspector.showOriginalOrFormattedSourceCodeLocation(breakpoint.sourceCodeLocation, {ignoreNetworkTab: true});
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.showOriginalOrFormattedSourceCodeLocation(breakpoint.sourceCodeLocation, options);
};
if (WebInspector.debuggerManager.isBreakpointEditable(breakpoint))
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -109,7 +109,11 @@
showMainResourceForFrame: function(frameIdentifier)
{
- WebInspector.showSourceCodeForFrame(frameIdentifier, {ignoreNetworkTab: true});
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.showSourceCodeForFrame(frameIdentifier, options);
},
contextMenuItemSelected: function(id)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -247,7 +247,12 @@
appendSelectorTextKnownToMatch.call(this, this._style.ownerRule.selectorText);
if (this._style.ownerRule.sourceCodeLocation) {
- let sourceCodeLink = WebInspector.createSourceCodeLocationLink(this._style.ownerRule.sourceCodeLocation, true);
+ const options = {
+ dontFloat: true,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ let sourceCodeLink = WebInspector.createSourceCodeLocationLink(this._style.ownerRule.sourceCodeLocation, options);
this._originElement.appendChild(sourceCodeLink);
} else {
let originString;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -1705,11 +1705,16 @@
let token = candidate.hoveredToken;
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+
// Special case option-clicking url(...) links.
if (token && /\blink\b/.test(token.type)) {
let url = ""
let baseURL = sourceCodeLocation ? sourceCodeLocation.sourceCode.url : this._style.node.ownerDocument.documentURL;
- WebInspector.openURL(absoluteURL(url, baseURL));
+ WebInspector.openURL(absoluteURL(url, baseURL), options);
return;
}
@@ -1726,7 +1731,7 @@
if (!sourceCode || !range)
return false;
- WebInspector.showSourceCodeLocation(sourceCode.createSourceCodeLocation(range.startLine, range.startColumn), {ignoreNetworkTab: true});
+ WebInspector.showSourceCodeLocation(sourceCode.createSourceCodeLocation(range.startLine, range.startColumn), options);
return true;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -102,8 +102,12 @@
let sourceCode = ownerRule.sourceCodeLocation.sourceCode;
let {startLine, startColumn} = effectiveProperty.styleSheetTextRange;
- let sourceCodeLocation = sourceCode.createSourceCodeLocation(startLine, startColumn);
- WebInspector.showSourceCodeLocation(sourceCodeLocation, {ignoreNetworkTab: true});
+
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.showSourceCodeLocation(sourceCode.createSourceCodeLocation(startLine, startColumn), options);
}
refresh(significantChange)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -702,7 +702,12 @@
_linkifyLocation(url, lineNumber, columnNumber)
{
- return WebInspector.linkifyLocation(url, lineNumber, columnNumber, "console-message-url");
+ const options = {
+ className: "console-message-url",
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ return WebInspector.linkifyLocation(url, new WebInspector.SourceCodePosition(lineNumber, columnNumber), options);
}
_userProvidedColumnNames(columnNamesArgument)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMDetailsSidebarPanel.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMDetailsSidebarPanel.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMDetailsSidebarPanel.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -107,6 +107,10 @@
var parentFrame = mainResource.parentFrame;
}
- WebInspector.handlePossibleLinkClick(event, parentFrame);
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.handlePossibleLinkClick(event, parentFrame, options);
}
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -486,8 +486,13 @@
// Since followLink is delayed, the call to WebInspector.openURL can't look at window.event
// to see if the command key is down like it normally would. So we need to do that check
// before calling WebInspector.openURL.
- var alwaysOpenExternally = event ? event.metaKey : false;
- WebInspector.openURL(anchorElement.href, this._frame, {alwaysOpenExternally, lineNumber: anchorElement.lineNumber});
+ const options = {
+ alwaysOpenExternally: event ? event.metaKey : false,
+ lineNumber: anchorElement.lineNumber,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.openURL(anchorElement.href, this._frame, options);
}
// Start a timeout since this is a single click, if the timeout is canceled before it fires,
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -720,7 +720,12 @@
if (WebInspector.frameResourceManager.resourceForURL(url)) {
contextMenu.appendItem(WebInspector.UIString("Reveal in Resources Tab"), () => {
let frame = WebInspector.frameResourceManager.frameForIdentifier(node.frameIdentifier);
- WebInspector.openURL(url, frame, {ignoreNetworkTab: true});
+
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.openURL(url, frame, options);
});
}
@@ -1586,7 +1591,12 @@
return;
let sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber || 0);
- WebInspector.showSourceCodeLocation(sourceCodeLocation, {ignoreNetworkTab: true});
+
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.showSourceCodeLocation(sourceCodeLocation, options);
});
result.release();
});
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -88,9 +88,12 @@
nameElement.classList.add("function-name");
this._locationElement.appendChild(nameElement);
- var sourceCodeLocation = WebInspector.debuggerManager.activeCallFrame.sourceCodeLocation;
- var shouldPreventLinkFloat = true;
- var linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, shouldPreventLinkFloat);
+ const options = {
+ dontFloat: true,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ let linkElement = WebInspector.createSourceCodeLocationLink(WebInspector.debuggerManager.activeCallFrame.sourceCodeLocation, options);
this._locationElement.appendChild(linkElement);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -825,8 +825,13 @@
if (!treeElement)
return;
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+
if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) {
- WebInspector.showSourceCode(treeElement.representedObject, {ignoreNetworkTab: true});
+ WebInspector.showSourceCode(treeElement.representedObject, options);
return;
}
@@ -836,12 +841,13 @@
WebInspector.debuggerManager.activeCallFrame = callFrame;
if (callFrame.sourceCodeLocation)
- WebInspector.showSourceCodeLocation(callFrame.sourceCodeLocation, {ignoreNetworkTab: true});
+ WebInspector.showSourceCodeLocation(callFrame.sourceCodeLocation, options);
+
return;
}
if (treeElement instanceof WebInspector.IssueTreeElement) {
- WebInspector.showSourceCodeLocation(treeElement.issueMessage.sourceCodeLocation, {ignoreNetworkTab: true});
+ WebInspector.showSourceCodeLocation(treeElement.issueMessage.sourceCodeLocation, options);
return;
}
@@ -850,7 +856,7 @@
let breakpoint = treeElement.breakpoint;
if (treeElement.treeOutline === this._pauseReasonTreeOutline) {
- WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation, {ignoreNetworkTab: true});
+ WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation, options);
return;
}
@@ -861,7 +867,7 @@
if (!(treeElement.parent.representedObject instanceof WebInspector.SourceCode))
return;
- WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation, {ignoreNetworkTab: true});
+ WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation, options);
}
_compareTopLevelTreeElements(a, b)
@@ -1079,7 +1085,12 @@
if (!sourceCodeLocation)
return;
- var linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, false, true);
+ const options = {
+ useGoToArrowButton: true,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ let linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, options);
this._pauseReasonLinkContainerElement.appendChild(linkElement);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -57,7 +57,11 @@
span.classList.add("error-object-link-container");
span.textContent = " — ";
- var a = WebInspector.linkifyLocation(sourceURL, parseInt(lineNumber) - 1, parseInt(columnNumber));
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ let a = WebInspector.linkifyLocation(sourceURL, new WebInspector.SourceCodePosition(parseInt(lineNumber) - 1, parseInt(columnNumber)), options);
a.classList.add("error-object-link");
span.appendChild(a);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/EventListenerSectionGroup.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/EventListenerSectionGroup.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/EventListenerSectionGroup.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -89,7 +89,14 @@
return functionName;
var sourceCodeLocation = sourceCode.createSourceCodeLocation(this._eventListener.location.lineNumber, this._eventListener.location.columnNumber || 0);
- var linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, anonymous);
+
+ const options = {
+ dontFloat: anonymous,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ let linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, options);
+
if (anonymous)
return linkElement;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -312,9 +312,13 @@
let sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber);
sourceCodeLocation.populateLiveDisplayLocationString(locationElement, "textContent", WebInspector.SourceCodeLocation.ColumnStyle.Hidden, WebInspector.SourceCodeLocation.NameStyle.Short);
- const dontFloat = true;
- const useGoToArrowButton = true;
- let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, dontFloat, useGoToArrowButton);
+ const options = {
+ dontFloat: true,
+ useGoToArrowButton: true,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, options);
containerElement.appendChild(goToArrowButtonLink);
}
return;
@@ -426,10 +430,15 @@
let location = functionDetails.location;
let sourceCode = WebInspector.debuggerManager.scriptForIdentifier(location.scriptId, WebInspector.assumingMainTarget());
if (sourceCode) {
- const dontFloat = true;
- const useGoToArrowButton = true;
let sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber);
- let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, dontFloat, useGoToArrowButton);
+
+ const options = {
+ dontFloat: true,
+ useGoToArrowButton: true,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, options);
containerElement.replaceChild(goToArrowButtonLink, goToArrowPlaceHolderElement);
}
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -267,15 +267,6 @@
this.reset();
}
- hasRepresentedObject(representedObject)
- {
- const comparator = (dataGridNode) => dataGridNode.resource === representedObject;
- const skipHidden = true;
- const stayWithin = false;
- const dontPopulate = true;
- return this._dataGrid.findNode(comparator, skipHidden, stayWithin, dontPopulate);
- }
-
// Private
_resourceCachingDisabledSettingChanged()
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -94,11 +94,6 @@
return !this.restoringState || !this._restoredShowingNetworkGridContentView;
}
- hasRepresentedObject(representedObject)
- {
- return this._networkGridView.hasRepresentedObject(representedObject);
- }
-
// Protected
saveStateToCookie(cookie)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -59,7 +59,7 @@
if (!(representedObject instanceof WebInspector.Resource))
return false;
- return this._navigationSidebarPanel.hasRepresentedObject(representedObject);
+ return !!this._navigationSidebarPanel.contentTreeOutline.getCachedTreeElement(representedObject);
}
get supportsSplitContentBrowser()
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -203,23 +203,6 @@
// Protected
- canShowContentViewForTreeElement(treeElement)
- {
- if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement)
- return true;
- return super.canShowContentViewForTreeElement(treeElement);
- }
-
- showContentViewForTreeElement(treeElement)
- {
- if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) {
- WebInspector.showSourceCode(treeElement.representedObject, {ignoreNetworkTab: true});
- return;
- }
-
- console.error("Unknown tree element selected.", treeElement);
- }
-
dataGridNodePathComponentSelected(event)
{
let pathComponent = event.data.pathComponent;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -228,7 +228,12 @@
return;
let sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber || 0);
- WebInspector.showSourceCodeLocation(sourceCodeLocation, {ignoreNetworkTab: true});
+
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.showSourceCodeLocation(sourceCodeLocation, options);
});
});
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -93,15 +93,19 @@
_updateLinkElement()
{
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+
var breakpoint = this._probeSet.breakpoint;
if (breakpoint.sourceCodeLocation.sourceCode)
- this.titleElement = WebInspector.createSourceCodeLocationLink(breakpoint.sourceCodeLocation);
+ this.titleElement = WebInspector.createSourceCodeLocationLink(breakpoint.sourceCodeLocation, options);
else {
// Fallback for when we can't create a live source link.
console.assert(!breakpoint.resolved);
- var location = breakpoint.sourceCodeLocation;
- this.titleElement = WebInspector.linkifyLocation(breakpoint.contentIdentifier, location.displayLineNumber, location.displayColumnNumber);
+ this.titleElement = WebInspector.linkifyLocation(breakpoint.contentIdentifier, breakpoint.sourceCodeLocation.position, options);
}
this.titleElement.classList.add(WebInspector.ProbeSetDetailsSection.DontFloatLinkStyleClassName);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -241,10 +241,13 @@
locationElement.classList.add("location");
sourceCodeLocation.populateLiveDisplayLocationString(locationElement, "textContent", WebInspector.SourceCodeLocation.ColumnStyle.Hidden, WebInspector.SourceCodeLocation.NameStyle.Short);
- let dontFloat = true;
- let useGoToArrowButton = true;
- let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, dontFloat, useGoToArrowButton);
- fragment.appendChild(goToArrowButtonLink);
+ const options = {
+ dontFloat: true,
+ useGoToArrowButton: true,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ fragment.appendChild(WebInspector.createSourceCodeLocationLink(sourceCodeLocation, options));
}
return fragment;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -275,7 +275,14 @@
}
let initiatorLocation = this._resource.initiatorSourceCodeLocation;
- this._initiatorRow.value = initiatorLocation ? WebInspector.createSourceCodeLocationLink(initiatorLocation, true) : null;
+ if (initiatorLocation) {
+ const options = {
+ dontFloat: true,
+ ignoreSearchTab: true,
+ };
+ this._initiatorRow.value = WebInspector.createSourceCodeLocationLink(initiatorLocation, options);
+ } else
+ this._initiatorRow.value = null;
let initiatedResources = this._resource.initiatedResources;
if (initiatedResources.length) {
@@ -497,7 +504,10 @@
_goToRequestDataClicked()
{
- WebInspector.showResourceRequest(this._resource);
+ const options = {
+ ignoreSearchTab: true,
+ };
+ WebInspector.showResourceRequest(this._resource, options);
}
_refreshRequestDataSection()
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -422,7 +422,12 @@
|| treeElement instanceof WebInspector.ResourceTreeElement
|| treeElement instanceof WebInspector.ScriptTreeElement
|| treeElement instanceof WebInspector.ContentFlowTreeElement) {
- WebInspector.showRepresentedObject(treeElement.representedObject, null, {ignoreNetworkTab: true});
+ const cookie = null;
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.showRepresentedObject(treeElement.representedObject, cookie, options);
return;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -271,7 +271,11 @@
_dataGridNodeGoToArrowClicked()
{
- WebInspector.showSourceCode(this._resource, {ignoreNetworkTab: true});
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ WebInspector.showSourceCode(this._resource, options);
}
_updateStatus(cell)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -204,8 +204,14 @@
mediaLabel.className = "label";
mediaLabel.append(prefixElement, media.text);
- if (media.sourceCodeLocation)
- mediaLabel.append(" \u2014 ", WebInspector.createSourceCodeLocationLink(media.sourceCodeLocation, true));
+ if (media.sourceCodeLocation) {
+ const options = {
+ dontFloat: true,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ mediaLabel.append(" \u2014 ", WebInspector.createSourceCodeLocationLink(media.sourceCodeLocation, options));
+ }
newDOMFragment.appendChild(mediaLabel);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -355,8 +355,13 @@
if (!treeElement || treeElement instanceof WebInspector.FolderTreeElement)
return;
+ const options = {
+ ignoreNetworkTab: true,
+ };
+
if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) {
- WebInspector.showRepresentedObject(treeElement.representedObject, null, {ignoreNetworkTab: true});
+ const cookie = null;
+ WebInspector.showRepresentedObject(treeElement.representedObject, cookie, options);
return;
}
@@ -367,7 +372,7 @@
if (treeElement.representedObject instanceof WebInspector.DOMSearchMatchObject)
WebInspector.showMainFrameDOMTree(treeElement.representedObject.domNode);
else if (treeElement.representedObject instanceof WebInspector.SourceCodeSearchMatchObject)
- WebInspector.showOriginalOrFormattedSourceCodeTextRange(treeElement.representedObject.sourceCodeTextRange, {ignoreNetworkTab: true});
+ WebInspector.showOriginalOrFormattedSourceCodeTextRange(treeElement.representedObject.sourceCodeTextRange, options);
}
_treeElementDoubleClick(event)
@@ -376,9 +381,15 @@
if (!treeElement)
return;
- if (treeElement.representedObject instanceof WebInspector.DOMSearchMatchObject)
- WebInspector.showMainFrameDOMTree(treeElement.representedObject.domNode, {ignoreSearchTab: true});
- else if (treeElement.representedObject instanceof WebInspector.SourceCodeSearchMatchObject)
- WebInspector.showOriginalOrFormattedSourceCodeTextRange(treeElement.representedObject.sourceCodeTextRange, {ignoreNetworkTab: true, ignoreSearchTab: true});
+ if (treeElement.representedObject instanceof WebInspector.DOMSearchMatchObject) {
+ WebInspector.showMainFrameDOMTree(treeElement.representedObject.domNode, {
+ ignoreSearchTab: true,
+ });
+ } else if (treeElement.representedObject instanceof WebInspector.SourceCodeSearchMatchObject) {
+ WebInspector.showOriginalOrFormattedSourceCodeTextRange(treeElement.representedObject.sourceCodeTextRange, {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ });
+ }
}
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -70,7 +70,10 @@
canShowRepresentedObject(representedObject)
{
- return representedObject instanceof WebInspector.Resource || representedObject instanceof WebInspector.Script || representedObject instanceof WebInspector.DOMTree;
+ if (!(representedObject instanceof WebInspector.Resource) && !(representedObject instanceof WebInspector.Script) && !(representedObject instanceof WebInspector.DOMTree))
+ return false;
+
+ return !!this._navigationSidebarPanel.contentTreeOutline.getCachedTreeElement(representedObject);
}
focusSearchField()
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -1667,11 +1667,16 @@
if (/\blink\b/.test(this.tokenTrackingController.candidate.hoveredToken.type))
return;
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+
var sourceCodeLocation = this._sourceCodeLocationForEditorPosition(this.tokenTrackingController.candidate.hoveredTokenRange.start);
if (this.sourceCode instanceof WebInspector.SourceMapResource)
- WebInspector.showOriginalOrFormattedSourceCodeLocation(sourceCodeLocation, {ignoreNetworkTab: true});
+ WebInspector.showOriginalOrFormattedSourceCodeLocation(sourceCodeLocation, options);
else
- WebInspector.showSourceCodeLocation(sourceCodeLocation, {ignoreNetworkTab: true});
+ WebInspector.showSourceCodeLocation(sourceCodeLocation, options);
}
tokenTrackingControllerNewHighlightCandidate(tokenTrackingController, candidate)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -87,7 +87,12 @@
subtitleElement.classList.add("subtitle");
sourceCodeLocation.populateLiveDisplayLocationString(subtitleElement, "textContent", null, WebInspector.SourceCodeLocation.NameStyle.None, WebInspector.UIString("line "));
- let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, false, true);
+ const options = {
+ useGoToArrowButton: true,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+ let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, options);
fragment.append(goToArrowButtonLink, subtitleElement);
// Give the whole cell a tooltip and keep it up to date.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -530,7 +530,10 @@
if (!callFrame.sourceCodeLocation)
return;
- WebInspector.showSourceCodeLocation(callFrame.sourceCodeLocation, {ignoreNetworkTab: true});
+ WebInspector.showSourceCodeLocation(callFrame.sourceCodeLocation, {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ });
}
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -108,6 +108,12 @@
if (!value)
return emDash;
+ const options = {
+ useGoToArrowButton: true,
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+
if (value instanceof WebInspector.SourceCodeLocation) {
if (value.sourceCode instanceof WebInspector.Resource) {
cell.classList.add(WebInspector.ResourceTreeElement.ResourceIconStyleClassName);
@@ -125,10 +131,8 @@
value.populateLiveDisplayLocationTooltip(cell);
var fragment = document.createDocumentFragment();
+ fragment.appendChild(WebInspector.createSourceCodeLocationLink(value, options));
- var goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(value, false, true);
- fragment.appendChild(goToArrowButtonLink);
-
var titleElement = document.createElement("span");
value.populateLiveDisplayLocationString(titleElement, "textContent");
fragment.appendChild(titleElement);
@@ -154,8 +158,7 @@
// Give the whole cell a tooltip and keep it up to date.
callFrame.sourceCodeLocation.populateLiveDisplayLocationTooltip(cell);
- var goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(callFrame.sourceCodeLocation, false, true);
- fragment.appendChild(goToArrowButtonLink);
+ fragment.appendChild(WebInspector.createSourceCodeLocationLink(value, options));
if (isAnonymousFunction) {
// For anonymous functions we show the resource or script icon and name.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js (215629 => 215630)
--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js 2017-04-21 20:02:04 UTC (rev 215629)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js 2017-04-21 20:05:32 UTC (rev 215630)
@@ -137,10 +137,15 @@
return;
contextMenu.appendItem(WebInspector.UIString("Show Source"), () => {
+ const options = {
+ ignoreNetworkTab: true,
+ ignoreSearchTab: true,
+ };
+
if (event.metaKey)
- WebInspector.showOriginalUnformattedSourceCodeLocation(this.representedObject.ownerRule.sourceCodeLocation, {ignoreNetworkTab: true});
+ WebInspector.showOriginalUnformattedSourceCodeLocation(this.representedObject.ownerRule.sourceCodeLocation, options);
else
- WebInspector.showSourceCodeLocation(this.representedObject.ownerRule.sourceCodeLocation, {ignoreNetworkTab: true});
+ WebInspector.showSourceCodeLocation(this.representedObject.ownerRule.sourceCodeLocation, options);
});
// Only used one colon temporarily since single-colon pseudo elements are valid CSS.