Bug 675215 - Include page title in data transfer when ctrl/opt+dragging tab.
authorFrank Yan <fyan@mozilla.com>
Mon, 01 Aug 2011 17:57:48 -0700
changeset 73623 d5c5b7841f212233c720ed67a6ce79824ae6e045
parent 73622 e9c579848ab6e09d1229d68fe0f60e00ed566d9c
child 73624 5f37764372988cd1d010c0c8846580c7caf668ee
push id70
push userfyan@mozilla.com
push dateTue, 02 Aug 2011 01:00:38 +0000
treeherderfx-team@d5c5b7841f21 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs675215
milestone8.0a1
Bug 675215 - Include page title in data transfer when ctrl/opt+dragging tab.
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -3814,18 +3814,18 @@
           return;
 
 #ifdef XP_MACOSX
         if (event.altKey) {
 #else
         if (event.ctrlKey) {
 #endif
           let dt = event.dataTransfer;
-          let spec = this.tabbrowser.getBrowserForTab(tab).currentURI.spec;
-          dt.setData("text/x-moz-url", spec);
+          let browser = tab.linkedBrowser;
+          dt.setData("text/x-moz-url", browser.currentURI.spec + "\n" + browser.contentTitle);
           let favicon = document.getAnonymousElementByAttribute(tab, "class", "tab-icon-image");
           dt.setDragImage(favicon, 16, 16);
           return;
         }
 
         this.setAttribute("drag", "move");
         this.draggedTab = tab;
         tab.setAttribute("dragged", "true");