Changeset 226347 in webkit
- Timestamp:
- Jan 2, 2018 6:52:04 PM (6 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r226320 r226347 1 2018-01-02 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Clicking source location link in Console unexpectedly jumps to Network tab 4 https://bugs.webkit.org/show_bug.cgi?id=181229 5 <rdar://problem/36075219> 6 7 Reviewed by Matt Baker. 8 9 * UserInterface/Base/Main.js: 10 Cleanup linkifyURLAsNode. Ignore Search tab in generic handlePossibleLinkClick 11 when not already in the Search tab. 12 13 * UserInterface/Views/CallFrameView.js: 14 (WI.CallFrameView): 15 Ignore Search and Network tab in CallFrame links. 16 17 * UserInterface/Views/TabBrowser.js: 18 (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject): 19 Improve style. 20 1 21 == Rolled over to ChangeLog-2018-01-01 == -
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
r225979 r226347 776 776 WI.handlePossibleLinkClick = function(event, frame, options = {}) 777 777 { 778 varanchorElement = event.target.enclosingNodeOrSelfWithNodeName("a");778 let anchorElement = event.target.enclosingNodeOrSelfWithNodeName("a"); 779 779 if (!anchorElement || !anchorElement.href) 780 780 return false; … … 789 789 event.stopPropagation(); 790 790 791 this.openURL(anchorElement.href, frame, Object.shallowMerge(options, {lineNumber: anchorElement.lineNumber})); 791 this.openURL(anchorElement.href, frame, Object.shallowMerge(options, { 792 lineNumber: anchorElement.lineNumber, 793 ignoreSearchTab: !WI.isShowingSearchTab(), 794 })); 792 795 793 796 return true; … … 980 983 { 981 984 return this.tabBrowser.selectedTabContentView instanceof WI.NetworkTabContentView; 985 }; 986 987 WI.isShowingSearchTab = function() 988 { 989 return this.tabBrowser.selectedTabContentView instanceof WI.SearchTabContentView; 982 990 }; 983 991 … … 2360 2368 }; 2361 2369 2362 WI.linkifyURLAsNode = function(url, linkText, classes) 2363 { 2364 if (!linkText) 2365 linkText = url; 2366 2367 classes = classes ? classes + " " : ""; 2368 2369 var a = document.createElement("a"); 2370 WI.linkifyURLAsNode = function(url, linkText, className) 2371 { 2372 let a = document.createElement("a"); 2370 2373 a.href = url; 2371 a.className = classes; 2372 2373 a.textContent = linkText; 2374 a.className = className || ""; 2375 a.textContent = linkText || url; 2374 2376 a.style.maxWidth = "100%"; 2375 2376 2377 return a; 2377 2378 }; -
trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameView.js
r220119 r226347 38 38 var sourceCodeLocation = callFrame.sourceCodeLocation; 39 39 if (sourceCodeLocation) { 40 WI.linkifyElement(callFrameElement, sourceCodeLocation); 40 WI.linkifyElement(callFrameElement, sourceCodeLocation, { 41 ignoreNetworkTab: true, 42 ignoreSearchTab: true, 43 }); 41 44 42 45 var linkElement = document.createElement("a"); -
trunk/Source/WebInspectorUI/UserInterface/Views/TabBrowser.js
r224508 r226347 123 123 console.assert(!this.selectedTabContentView || this.selectedTabContentView === this._recentTabContentViews[0]); 124 124 125 for ( vartabContentView of this._recentTabContentViews) {125 for (let tabContentView of this._recentTabContentViews) { 126 126 if (options.ignoreSearchTab && tabContentView instanceof WI.SearchTabContentView) 127 127 continue; 128 129 128 if (options.ignoreNetworkTab && tabContentView instanceof WI.NetworkTabContentView) 130 129 continue; 131 132 130 if (options.ignoreResourcesTab && tabContentView instanceof WI.ResourcesTabContentView) 133 131 continue; 134 135 132 if (options.ignoreDebuggerTab && tabContentView instanceof WI.DebuggerTabContentView) 136 133 continue;
Note: See TracChangeset
for help on using the changeset viewer.