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 74442 d5c5b7841f212233c720ed67a6ce79824ae6e045
parent 74441 e9c579848ab6e09d1229d68fe0f60e00ed566d9c
child 74443 5f37764372988cd1d010c0c8846580c7caf668ee
push id235
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 17:13:04 +0000
treeherdermozilla-beta@2d1e082d176a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs675215
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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");