Bug 1189959 - Make dragging external URI onto newtab grid work in e10s. r=mconley
authorUrsula <usarracini@mozilla.com>
Fri, 31 Jul 2015 18:01:51 -0400
changeset 287380 7efbff41b71f7a1456614493c59eb27d51a6ac19
parent 287379 51c1e5d6c4a1c3f85fbb520fedb629437863ec03
child 287381 b4f95c2cc2430eabd4a37721daa73331d1068ae9
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1189959
milestone42.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 1189959 - Make dragging external URI onto newtab grid work in e10s. r=mconley
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -962,18 +962,18 @@ file, You can obtain one at http://mozil
 
         // Drag only if the entire value is selected and it's a valid URI.
         var isFullSelection = this.selectionStart == 0 &&
                               this.selectionEnd == this.textLength;
         if (!isFullSelection ||
             this.getAttribute("pageproxystate") != "valid")
           return;
 
-        var urlString = content.location.href;
-        var title = content.document.title || urlString;
+        var urlString = gBrowser.selectedBrowser.currentURI.spec;
+        var title = gBrowser.selectedBrowser.contentTitle || urlString;
         var htmlString = "<a href=\"" + urlString + "\">" + urlString + "</a>";
 
         var dt = event.dataTransfer;
         dt.setData("text/x-moz-url", urlString + "\n" + title);
         dt.setData("text/unicode", urlString);
         dt.setData("text/html", htmlString);
 
         dt.effectAllowed = "copyLink";