WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-168709-20170221221033.patch (text/plain), 54.07 KB, created by
Devin Rousso
on 2017-02-21 22:13:19 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2017-02-21 22:13:19 PST
Size:
54.07 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 0023c8201d65c1f39905c7455e0fc55b06501377..f9da8bb54eab23ed2ec7c0c3ec2fd8acec360dfc 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,5 +1,103 @@ > 2017-02-21 Devin Rousso <dcrousso+webkit@gmail.com> > >+ 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 NOBODY (OOPS!). >+ >+ * 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-02-21 Devin Rousso <dcrousso+webkit@gmail.com> >+ > Web Inspector: Prefer Resources tab over Network tab when showing files > https://bugs.webkit.org/show_bug.cgi?id=168021 > >diff --git a/Source/WebInspectorUI/UserInterface/Base/Main.js b/Source/WebInspectorUI/UserInterface/Base/Main.js >index e2bb507c26a2fb2cdb3406e02bb31643ce640a9d..0a09e8e246c36b9d33f374a2615175aaaafc3d19 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/Main.js >+++ b/Source/WebInspectorUI/UserInterface/Base/Main.js >@@ -795,7 +795,7 @@ WebInspector.updateVisibilityState = function(visible) > 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) >@@ -810,7 +810,9 @@ WebInspector.handlePossibleLinkClick = function(event, frame, alwaysOpenExternal > 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; > }; >@@ -845,7 +847,9 @@ WebInspector.openURL = function(url, frame, options = {}) > var resource = frame.url === simplifiedURL ? frame.mainResource : frame.resourceForURL(simplifiedURL, searchChildFrames); > if (resource) { > let positionToReveal = new WebInspector.SourceCodePosition(options.lineNumber, 0); >- this.showSourceCode(resource, Object.shallowMerge(options, {positionToReveal})); >+ this.showSourceCode(resource, Object.shallowMerge(options, { >+ positionToReveal, >+ })); > return; > } > >@@ -1225,7 +1229,7 @@ WebInspector.showSourceCode = function(sourceCode, options = {}) > WebInspector.showSourceCodeLocation = function(sourceCodeLocation, options = {}) > { > this.showSourceCode(sourceCodeLocation.displaySourceCode, Object.shallowMerge(options, { >- positionToReveal: sourceCodeLocation.displayPosition() >+ positionToReveal: sourceCodeLocation.displayPosition(), > })); > }; > >@@ -1233,14 +1237,14 @@ WebInspector.showOriginalUnformattedSourceCodeLocation = function(sourceCodeLoca > { > this.showSourceCode(sourceCodeLocation.sourceCode, Object.shallowMerge(options, { > positionToReveal: sourceCodeLocation.position(), >- forceUnformatted: true >+ forceUnformatted: true, > })); > }; > > WebInspector.showOriginalOrFormattedSourceCodeLocation = function(sourceCodeLocation, options = {}) > { > this.showSourceCode(sourceCodeLocation.sourceCode, Object.shallowMerge(options, { >- positionToReveal: sourceCodeLocation.formattedPosition() >+ positionToReveal: sourceCodeLocation.formattedPosition(), > })); > }; > >@@ -1249,7 +1253,7 @@ WebInspector.showOriginalOrFormattedSourceCodeTextRange = function(sourceCodeTex > var textRangeToSelect = sourceCodeTextRange.formattedTextRange; > this.showSourceCode(sourceCodeTextRange.sourceCode, Object.shallowMerge(options, { > positionToReveal: textRangeToSelect.startPosition(), >- textRangeToSelect >+ textRangeToSelect, > })); > }; > >@@ -1399,7 +1403,10 @@ WebInspector._frameWasAdded = function(event) > > function delayedWork() > { >- this.showSourceCodeForFrame(frame.id); >+ this.showSourceCodeForFrame(frame.id, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > } > > // Delay showing the frame since FrameWasAdded is called before MainFrameChanged. >@@ -2289,7 +2296,7 @@ WebInspector.createGoToArrowButton = function() > return button; > }; > >-WebInspector.createSourceCodeLocationLink = function(sourceCodeLocation, dontFloat, useGoToArrowButton) >+WebInspector.createSourceCodeLocationLink = function(sourceCodeLocation, options = {}) > { > console.assert(sourceCodeLocation); > if (!sourceCodeLocation) >@@ -2297,42 +2304,44 @@ WebInspector.createSourceCodeLocationLink = function(sourceCodeLocation, dontFlo > > 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, options = {}) > { > var sourceCode = WebInspector.sourceCodeForURL(url); > > if (!sourceCode) { > var anchor = document.createElement("a"); > anchor.href = url; >- anchor.lineNumber = lineNumber; >- if (className) >- anchor.className = className; >- anchor.append(WebInspector.displayNameForURL(url) + ":" + lineNumber); >+ anchor.lineNumber = options.lineNumber; >+ if (options.className) >+ anchor.className = options.className; >+ anchor.append(WebInspector.displayNameForURL(url) + ":" + options.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(options.lineNumber, options.columnNumber); >+ let linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, { >+ 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) >@@ -2341,9 +2350,9 @@ WebInspector.linkifyElement = function(linkElement, sourceCodeLocation) { > 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)); >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js b/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js >index 2aa4d305958cc4b2eab80e99b73faa0147b77429..019365e46c002ec3b787c4a5dd30a70d0af24057 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js >@@ -67,7 +67,10 @@ WebInspector.BreakpointPopoverController = class BreakpointPopoverController ext > }; > > const revealOriginalSourceCodeLocation = () => { >- WebInspector.showOriginalOrFormattedSourceCodeLocation(breakpoint.sourceCodeLocation, {ignoreNetworkTab: true}); >+ WebInspector.showOriginalOrFormattedSourceCodeLocation(breakpoint.sourceCodeLocation, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > }; > > if (WebInspector.debuggerManager.isBreakpointEditable(breakpoint)) >diff --git a/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js b/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js >index 13b50d733823f31e6ec1e8d4d0efe7f6510f1c9e..b8197958316e8c8eaf992709f286c6527d4a576d 100644 >--- a/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js >+++ b/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js >@@ -109,7 +109,10 @@ InspectorFrontendAPI = { > > showMainResourceForFrame: function(frameIdentifier) > { >- WebInspector.showSourceCodeForFrame(frameIdentifier, {ignoreNetworkTab: true}); >+ WebInspector.showSourceCodeForFrame(frameIdentifier, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > }, > > contextMenuItemSelected: function(id) >diff --git a/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js b/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js >index fb26f033c3d63516ec04d54dc75f85644e75ef07..f0dcd577b36b7fba827cbcf39dff756db79cc027 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js >+++ b/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js >@@ -247,7 +247,11 @@ WebInspector.CSSStyleDeclarationSection = class CSSStyleDeclarationSection exten > appendSelectorTextKnownToMatch.call(this, this._style.ownerRule.selectorText); > > if (this._style.ownerRule.sourceCodeLocation) { >- let sourceCodeLink = WebInspector.createSourceCodeLocationLink(this._style.ownerRule.sourceCodeLocation, true); >+ let sourceCodeLink = WebInspector.createSourceCodeLocationLink(this._style.ownerRule.sourceCodeLocation, { >+ dontFloat: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > this._originElement.appendChild(sourceCodeLink); > } else { > let originString; >diff --git a/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js b/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js >index 1893901cc5dd7169df9211aa7a55b7533367d41b..5fca386a5c985d5076b85bb09b195a37aa0c1561 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js >+++ b/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js >@@ -1671,7 +1671,10 @@ WebInspector.CSSStyleDeclarationTextEditor = class CSSStyleDeclarationTextEditor > if (token && /\blink\b/.test(token.type)) { > let url = token.string; > let baseURL = sourceCodeLocation.sourceCode.url; >- WebInspector.openURL(absoluteURL(url, baseURL)); >+ WebInspector.openURL(absoluteURL(url, baseURL), { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > return; > } > >@@ -1680,7 +1683,10 @@ WebInspector.CSSStyleDeclarationTextEditor = class CSSStyleDeclarationTextEditor > if (!sourceCode || !range) > return false; > >- WebInspector.showSourceCodeLocation(sourceCode.createSourceCodeLocation(range.startLine, range.startColumn), {ignoreNetworkTab: true}); >+ WebInspector.showSourceCodeLocation(sourceCode.createSourceCodeLocation(range.startLine, range.startColumn), { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > return true; > } > >diff --git a/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js b/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js >index 2a95c1d7f72c1e000054bf063ab455ad006bddfa..89e6f7f8ebdce000c0388b44f30691cc986c4846 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js >@@ -103,7 +103,10 @@ WebInspector.ComputedStyleDetailsPanel = class ComputedStyleDetailsPanel extends > let sourceCode = ownerRule.sourceCodeLocation.sourceCode; > let {startLine, startColumn} = effectiveProperty.styleSheetTextRange; > let sourceCodeLocation = sourceCode.createSourceCodeLocation(startLine, startColumn); >- WebInspector.showSourceCodeLocation(sourceCodeLocation, {ignoreNetworkTab: true}); >+ WebInspector.showSourceCodeLocation(sourceCodeLocation, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > } > > refresh(significantChange) >diff --git a/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js b/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js >index 0fa66f6100099ce8a14ccc8a7ac88f57e150472c..6bfa8c081dc50debff452994786b06b98e3a1226 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js >@@ -702,7 +702,13 @@ WebInspector.ConsoleMessageView = class ConsoleMessageView extends WebInspector. > > _linkifyLocation(url, lineNumber, columnNumber) > { >- return WebInspector.linkifyLocation(url, lineNumber, columnNumber, "console-message-url"); >+ return WebInspector.linkifyLocation(url, { >+ lineNumber, >+ columnNumber, >+ className: "console-message-url", >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > } > > _userProvidedColumnNames(columnNamesArgument) >diff --git a/Source/WebInspectorUI/UserInterface/Views/DOMDetailsSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/DOMDetailsSidebarPanel.js >index 32e6383b7a55028581d8e509957d2447a8a43dfd..cc34ad6004b6aa324a5b6c7fc39325d58b87b133 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/DOMDetailsSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/DOMDetailsSidebarPanel.js >@@ -107,6 +107,9 @@ WebInspector.DOMDetailsSidebarPanel = class DOMDetailsSidebarPanel extends WebIn > var parentFrame = mainResource.parentFrame; > } > >- WebInspector.handlePossibleLinkClick(event, parentFrame); >+ WebInspector.handlePossibleLinkClick(event, parentFrame, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > } > }; >diff --git a/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js b/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js >index bc6391ebc8ebfac6d038e5362703b4a851f85d91..fe6c2e0df502e66afdf9fa999a9b681d3587ead3 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js >@@ -431,7 +431,12 @@ WebInspector.DOMTreeContentView = class DOMTreeContentView extends WebInspector. > // 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}); >+ WebInspector.openURL(anchorElement.href, this._frame, { >+ alwaysOpenExternally, >+ lineNumber: anchorElement.lineNumber, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > } > > // Start a timeout since this is a single click, if the timeout is canceled before it fires, >diff --git a/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js b/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js >index 6f31ea38e49ed0104fa9328e63ee66aaf64f69c4..126472bacf0347dc0033cadc4ed4113ee1351ed0 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js >+++ b/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js >@@ -658,7 +658,10 @@ WebInspector.DOMTreeElement = class DOMTreeElement extends WebInspector.TreeElem > 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}); >+ WebInspector.openURL(url, frame, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > }); > } > >@@ -1513,7 +1516,10 @@ WebInspector.DOMTreeElement = class DOMTreeElement extends WebInspector.TreeElem > return; > > let sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber || 0); >- WebInspector.showSourceCodeLocation(sourceCodeLocation, {ignoreNetworkTab: true}); >+ WebInspector.showSourceCodeLocation(sourceCodeLocation, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > }); > result.release(); > }); >diff --git a/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js b/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js >index 90b9b52df93f741999f857a884f940aa4d84c254..6b25ce805d1fab95dac612fddfa43389e1fe0fbe 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.js >@@ -89,8 +89,11 @@ WebInspector.DebuggerDashboardView = class DebuggerDashboardView extends WebInsp > this._locationElement.appendChild(nameElement); > > var sourceCodeLocation = WebInspector.debuggerManager.activeCallFrame.sourceCodeLocation; >- var shouldPreventLinkFloat = true; >- var linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, shouldPreventLinkFloat); >+ let linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, { >+ dontFloat: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > this._locationElement.appendChild(linkElement); > } > >diff --git a/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js >index c6365a8bbcfa49e79d1a7a2afb8c7020cf307226..755d826daf54fc15c3a2662cdc9392ecdfb7d27d 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js >@@ -781,8 +781,13 @@ WebInspector.DebuggerSidebarPanel = class DebuggerSidebarPanel extends WebInspec > 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; > } > >@@ -792,12 +797,13 @@ WebInspector.DebuggerSidebarPanel = class DebuggerSidebarPanel extends WebInspec > 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; > } > >@@ -806,7 +812,7 @@ WebInspector.DebuggerSidebarPanel = class DebuggerSidebarPanel extends WebInspec > > let breakpoint = treeElement.breakpoint; > if (treeElement.treeOutline === this._pauseReasonTreeOutline) { >- WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation, {ignoreNetworkTab: true}); >+ WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation, options); > return; > } > >@@ -817,7 +823,7 @@ WebInspector.DebuggerSidebarPanel = class DebuggerSidebarPanel extends WebInspec > if (!(treeElement.parent.representedObject instanceof WebInspector.SourceCode)) > return; > >- WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation, {ignoreNetworkTab: true}); >+ WebInspector.showSourceCodeLocation(breakpoint.sourceCodeLocation, options); > } > > _compareTopLevelTreeElements(a, b) >@@ -948,7 +954,11 @@ WebInspector.DebuggerSidebarPanel = class DebuggerSidebarPanel extends WebInspec > if (!sourceCodeLocation) > return; > >- var linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, false, true); >+ let linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, { >+ useGoToArrowButton: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > this._pauseReasonLinkContainerElement.appendChild(linkElement); > } > >diff --git a/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js b/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js >index 6dbf9df4d09f233c262595c62667056048f791f9..0a87454e3c3d6a5806c80f64cfdf9938f847b5b0 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js >@@ -57,7 +57,12 @@ WebInspector.ErrorObjectView = class ErrorObjectView extends WebInspector.Object > span.classList.add("error-object-link-container"); > span.textContent = " â "; > >- var a = WebInspector.linkifyLocation(sourceURL, parseInt(lineNumber) - 1, parseInt(columnNumber)); >+ let a = WebInspector.linkifyLocation(sourceURL, { >+ lineNumber: parseInt(lineNumber) - 1, >+ columnNunber: parseInt(columnNumber), >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > a.classList.add("error-object-link"); > span.appendChild(a); > >diff --git a/Source/WebInspectorUI/UserInterface/Views/EventListenerSectionGroup.js b/Source/WebInspectorUI/UserInterface/Views/EventListenerSectionGroup.js >index 92b7e42af5c8ff2a746b5871c5c243290e338fb5..80b5dc7281d75c29bf864da4f0d17fb110b85825 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/EventListenerSectionGroup.js >+++ b/Source/WebInspectorUI/UserInterface/Views/EventListenerSectionGroup.js >@@ -84,7 +84,11 @@ WebInspector.EventListenerSectionGroup = class EventListenerSectionGroup extends > return functionName; > > var sourceCodeLocation = sourceCode.createSourceCodeLocation(this._eventListener.location.lineNumber, this._eventListener.location.columnNumber || 0); >- var linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, anonymous); >+ let linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, { >+ dontFloat: anonymous, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > if (anonymous) > return linkElement; > >diff --git a/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js b/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js >index c23bedcb337359b6df87bb9b92d96086076970bc..7ec6f420dd19c040a8f110fdf5cd32b85fba7520 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js >+++ b/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js >@@ -312,9 +312,12 @@ WebInspector.HeapSnapshotInstanceDataGridNode = class HeapSnapshotInstanceDataGr > 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); >+ let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, { >+ dontFloat: true, >+ useGoToArrowButton: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > containerElement.appendChild(goToArrowButtonLink); > } > return; >@@ -426,10 +429,13 @@ WebInspector.HeapSnapshotInstanceDataGridNode = class HeapSnapshotInstanceDataGr > 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); >+ let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, { >+ dontFloat: true, >+ useGoToArrowButton: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > containerElement.replaceChild(goToArrowButtonLink, goToArrowPlaceHolderElement); > } > } >diff --git a/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js b/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js >index e55a94354b3b0d62014170a461db2349b9f53490..50c58f8de6ac4e1192184d8915ea189005411158 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js >@@ -225,15 +225,6 @@ WebInspector.NetworkGridContentView = class NetworkGridContentView extends WebIn > 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 > > _processPendingRecords() >diff --git a/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js >index cf78a417014208476b45f536a39197ad761a546b..b2f0581aead7b53ba8109ee776fb01e4e177cc7a 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js >@@ -94,11 +94,6 @@ WebInspector.NetworkSidebarPanel = class NetworkSidebarPanel extends WebInspecto > return !this.restoringState || !this._restoredShowingNetworkGridContentView; > } > >- hasRepresentedObject(representedObject) >- { >- return this._networkGridView.hasRepresentedObject(representedObject); >- } >- > // Protected > > saveStateToCookie(cookie) >diff --git a/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js >index d12ccb0f663cac372ae31461a33e39c7c9ed5ff9..6745b9d53d2d2526ce99d532e817d96da89e709f 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js >@@ -59,7 +59,7 @@ WebInspector.NetworkTabContentView = class NetworkTabContentView extends WebInsp > if (!(representedObject instanceof WebInspector.Resource)) > return false; > >- return this._navigationSidebarPanel.hasRepresentedObject(representedObject); >+ return !!this._navigationSidebarPanel.contentTreeOutline.getCachedTreeElement(representedObject); > } > > get supportsSplitContentBrowser() >diff --git a/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js >index 2414d950982d5105fe90d9fe3139887d28564d6a..6f9bdbb3733f08f89afab9d52a12455361e0be13 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js >@@ -178,23 +178,6 @@ WebInspector.NetworkTimelineView = class NetworkTimelineView extends WebInspecto > > // 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; >diff --git a/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js b/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js >index e3a61cfe20932c740966c41e0551abf8431d90a6..68d4d058f6e9eab9fce17459b93a18a9b9a22e9b 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js >@@ -228,7 +228,10 @@ WebInspector.ObjectTreeBaseTreeElement = class ObjectTreeBaseTreeElement extends > return; > > let sourceCodeLocation = sourceCode.createSourceCodeLocation(location.lineNumber, location.columnNumber || 0); >- WebInspector.showSourceCodeLocation(sourceCodeLocation, {ignoreNetworkTab: true}); >+ WebInspector.showSourceCodeLocation(sourceCodeLocation, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > }); > }); > } >diff --git a/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js b/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js >index 526c19e73873352652b2e1dedc5d9734590e19ec..aa92897aab574f2c5ac175d4474fe1f2a0a98e68 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js >@@ -89,9 +89,12 @@ WebInspector.ProbeSetDetailsSection = class ProbeSetDetailsSection extends WebIn > { > var breakpoint = this._probeSet.breakpoint; > var titleElement = null; >- if (breakpoint.sourceCodeLocation.sourceCode) >- titleElement = WebInspector.createSourceCodeLocationLink(breakpoint.sourceCodeLocation); >- else { >+ if (breakpoint.sourceCodeLocation.sourceCode) { >+ titleElement = WebInspector.createSourceCodeLocationLink(breakpoint.sourceCodeLocation, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); >+ } else { > // Fallback for when we can't create a live source link. > console.assert(!breakpoint.resolved); > >diff --git a/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js b/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js >index 1ab12987d03dc6516b0f57c20ebe878ec8b26dd9..71e0ca70c408e40b7ed74bbce89ce61b41d8457e 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js >@@ -241,10 +241,12 @@ WebInspector.ProfileDataGridNode = class ProfileDataGridNode extends WebInspecto > 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); >+ fragment.appendChild(WebInspector.createSourceCodeLocationLink(sourceCodeLocation, { >+ dontFloat: true, >+ useGoToArrowButton: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ })); > } > > return fragment; >diff --git a/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js >index fe193f60875739c3fcbcab1dc10633f9f1b48029..ea476b4e7bb400c154bfdb14321ecda293727084 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js >@@ -259,7 +259,13 @@ WebInspector.ResourceDetailsSidebarPanel = class ResourceDetailsSidebarPanel ext > } > > let initiatorLocation = this._resource.initiatorSourceCodeLocation; >- this._initiatorRow.value = initiatorLocation ? WebInspector.createSourceCodeLocationLink(initiatorLocation, true) : null; >+ if (initiatorLocation) { >+ this._initiatorRow.value = WebInspector.createSourceCodeLocationLink(initiatorLocation, { >+ dontFloat: true, >+ ignoreSearchTab: true, >+ }); >+ } else >+ this._initiatorRow.value = null; > > let initiatedResources = this._resource.initiatedResources; > if (initiatedResources.length) { >@@ -433,7 +439,9 @@ WebInspector.ResourceDetailsSidebarPanel = class ResourceDetailsSidebarPanel ext > > _goToRequestDataClicked() > { >- WebInspector.showResourceRequest(this._resource); >+ WebInspector.showResourceRequest(this._resource, { >+ ignoreSearchTab: true, >+ }); > } > > _refreshRequestDataSection() >diff --git a/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js >index e42c295ee46ace8bca18d0865acc3cb266c6bc86..418d04dce165536576cacc928b4d715cfcb6923d 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js >@@ -422,7 +422,10 @@ WebInspector.ResourceSidebarPanel = class ResourceSidebarPanel extends WebInspec > || treeElement instanceof WebInspector.ResourceTreeElement > || treeElement instanceof WebInspector.ScriptTreeElement > || treeElement instanceof WebInspector.ContentFlowTreeElement) { >- WebInspector.showRepresentedObject(treeElement.representedObject, null, {ignoreNetworkTab: true}); >+ WebInspector.showRepresentedObject(treeElement.representedObject, null, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > return; > } > >diff --git a/Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js b/Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js >index e4db013f4956154904dad600fcf41042eea65509..3c3a59690e459764fb9be9a0a55a7555bb4fceed 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js >@@ -240,7 +240,10 @@ WebInspector.ResourceTimelineDataGridNode = class ResourceTimelineDataGridNode e > > _dataGridNodeGoToArrowClicked() > { >- WebInspector.showSourceCode(this._resource, {ignoreNetworkTab: true}); >+ WebInspector.showSourceCode(this._resource, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > } > > _updateStatus(cell) >diff --git a/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js b/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js >index c03d89f94acf37a0f59592fccb3fccabafdc30c9..03836366d163a8259da75158f56c76e7c636d874 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js >@@ -204,8 +204,13 @@ WebInspector.RulesStyleDetailsPanel = class RulesStyleDetailsPanel extends WebIn > mediaLabel.className = "label"; > mediaLabel.append(prefixElement, media.text); > >- if (media.sourceCodeLocation) >- mediaLabel.append(" \u2014 ", WebInspector.createSourceCodeLocationLink(media.sourceCodeLocation, true)); >+ if (media.sourceCodeLocation) { >+ mediaLabel.append(" \u2014 ", WebInspector.createSourceCodeLocationLink(media.sourceCodeLocation, { >+ dontFloat: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ })); >+ } > > newDOMFragment.appendChild(mediaLabel); > >diff --git a/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js b/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js >index 79230dd0f1bada78224412de38dd0e7e6ad3567a..9ea702bc08950c62473e6793a9daefdbe659162b 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js >@@ -356,7 +356,9 @@ WebInspector.SearchSidebarPanel = class SearchSidebarPanel extends WebInspector. > return; > > if (treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement) { >- WebInspector.showRepresentedObject(treeElement.representedObject, null, {ignoreNetworkTab: true}); >+ WebInspector.showRepresentedObject(treeElement.representedObject, null, { >+ ignoreNetworkTab: true, >+ }); > return; > } > >@@ -376,9 +378,15 @@ WebInspector.SearchSidebarPanel = class SearchSidebarPanel extends WebInspector. > 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, >+ }); >+ } > } > }; >diff --git a/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js b/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js >index cedabd78886b3aa61ee2d1a09c337cb7f14d0f19..18078c5abc83640f995070b439b661e25e7029fd 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js >@@ -70,7 +70,10 @@ WebInspector.SearchTabContentView = class SearchTabContentView extends WebInspec > > 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() >diff --git a/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js b/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js >index 523b928e46aebbfca9323b6ef2acb91970f0d480..9c7006963b4f11ecf6ccffbae58fabbe25e90d7c 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js >@@ -1667,11 +1667,16 @@ WebInspector.SourceCodeTextEditor = class SourceCodeTextEditor extends WebInspec > 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) >diff --git a/Source/WebInspectorUI/UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js b/Source/WebInspectorUI/UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js >index c76665427ca5cc372aa4aeda4e19794a152ccc63..f2ffe48a91abddf388f0bcc63aedd0b5ff943d57 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js >@@ -87,7 +87,11 @@ WebInspector.SourceCodeTimelineTimelineDataGridNode = class SourceCodeTimelineTi > subtitleElement.classList.add("subtitle"); > sourceCodeLocation.populateLiveDisplayLocationString(subtitleElement, "textContent", null, WebInspector.SourceCodeLocation.NameStyle.None, WebInspector.UIString("line ")); > >- let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, false, true); >+ let goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, { >+ useGoToArrowButton: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > fragment.append(goToArrowButtonLink, subtitleElement); > > // Give the whole cell a tooltip and keep it up to date. >diff --git a/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js b/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js >index 84edeea275a96ffdacfb4887c83d1b9b8970a056..19faf1b3706e45a27d5526ee076afac1ffdbde2d 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js >@@ -525,7 +525,10 @@ WebInspector.TimelineDataGrid = class TimelineDataGrid extends WebInspector.Data > if (!callFrame.sourceCodeLocation) > return; > >- WebInspector.showSourceCodeLocation(callFrame.sourceCodeLocation, {ignoreNetworkTab: true}); >+ WebInspector.showSourceCodeLocation(callFrame.sourceCodeLocation, { >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ }); > } > }; > >diff --git a/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js b/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js >index 6255260f32f712ec34843d83f4288cf01d4ebf0a..5b8b792bbcad46a89ada5561569ef642c410babb 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js >@@ -126,8 +126,11 @@ WebInspector.TimelineDataGridNode = class TimelineDataGridNode extends WebInspec > > var fragment = document.createDocumentFragment(); > >- var goToArrowButtonLink = WebInspector.createSourceCodeLocationLink(value, false, true); >- fragment.appendChild(goToArrowButtonLink); >+ fragment.appendChild(WebInspector.createSourceCodeLocationLink(value, { >+ useGoToArrowButton: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ })); > > var titleElement = document.createElement("span"); > value.populateLiveDisplayLocationString(titleElement, "textContent"); >@@ -154,8 +157,11 @@ WebInspector.TimelineDataGridNode = class TimelineDataGridNode extends WebInspec > // 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, { >+ useGoToArrowButton: true, >+ ignoreNetworkTab: true, >+ ignoreSearchTab: true, >+ })); > > if (isAnonymousFunction) { > // For anonymous functions we show the resource or script icon and name. >diff --git a/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js b/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js >index 2fe970aa54d711ed5ec7624113edf3c0c4171842..a8fee7c4e5f28f7f1146ecc3327811c63995bb59 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js >+++ b/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js >@@ -137,10 +137,15 @@ WebInspector.VisualStyleSelectorTreeItem = class VisualStyleSelectorTreeItem ext > 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.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 168709
:
302369
|
302382
|
306255