Changeset 213000 in webkit
- Timestamp:
- Feb 25, 2017 12:29:59 AM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r212999 r213000 1 2017-02-25 Devin Rousso <dcrousso+webkit@gmail.com> 2 3 Web Inspector: copying a search result out of Search Tab navigation sidebar does nothing 4 https://bugs.webkit.org/show_bug.cgi?id=167074 5 6 Reviewed by Brian Burg. 7 8 * UserInterface/Base/Main.js: 9 (WebInspector._copy): 10 * UserInterface/Views/SearchTabContentView.js: 11 (WebInspector.SearchTabContentView.prototype.handleCopyEvent): 12 Provide the container TabContentView with the opportunity to intercept the copy event. 13 14 * UserInterface/Models/SourceCodeTextRange.js: 15 (WebInspector.SourceCodeTextRange.prototype.get synthesizedTextValue): 16 * UserInterface/Views/SearchResultTreeElement.js: 17 (WebInspector.SearchResultTreeElement.prototype.get synthesizedTextValue): 18 Generate a string with the format `${url}:${lineNumber}:${resultLine}`. 19 1 20 2017-02-25 Devin Rousso <dcrousso+webkit@gmail.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
r212761 r213000 2109 2109 } 2110 2110 2111 let tabContentView = this.tabBrowser.selectedTabContentView; 2112 if (tabContentView && typeof tabContentView.handleCopyEvent === "function") { 2113 tabContentView.handleCopyEvent(event); 2114 return; 2115 } 2116 2111 2117 return; 2112 2118 } -
trunk/Source/WebInspectorUI/UserInterface/Models/SourceCodeTextRange.js
r181769 r213000 106 106 } 107 107 108 get synthesizedTextValue() 109 { 110 // Must add 1 to the lineNumber since it starts counting at 0. 111 return this._sourceCode.url + ":" + (this._startLocation.lineNumber + 1); 112 } 113 108 114 // Private 109 115 -
trunk/Source/WebInspectorUI/UserInterface/Views/SearchResultTreeElement.js
r196275 r213000 81 81 return {text: [this.representedObject.title]}; 82 82 } 83 84 get synthesizedTextValue() 85 { 86 return this.representedObject.sourceCodeTextRange.synthesizedTextValue + ":" + this.representedObject.title; 87 } 83 88 }; 84 89 -
trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js
r211010 r213000 86 86 } 87 87 88 handleCopyEvent(event) 89 { 90 let selectedTreeElement = this.navigationSidebarPanel.contentTreeOutline.selectedTreeElement; 91 if (!selectedTreeElement) 92 return; 93 94 event.clipboardData.setData("text/plain", selectedTreeElement.synthesizedTextValue); 95 event.stopPropagation(); 96 event.preventDefault(); 97 } 98 88 99 // Protected 89 100
Note: See TracChangeset
for help on using the changeset viewer.