[Pkg-mozext-commits] [tabmixplus] 53/123: Use browser getters instead of contentWindow Update changeset 7b3a13891a21 - [e10s] Follow up bug 1051017 - browser.contentDocument -> browser.contentDocumentAsCPOW

David Prévot taffit at moszumanska.debian.org
Wed Sep 17 21:16:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 6d75ca1434e2be533a15a874a7a48440c6cf2da7
Author: onemen <tabmix.onemen at gmail.com>
Date:   Thu Aug 28 22:22:58 2014 +0300

    Use browser getters instead of contentWindow
    Update changeset 7b3a13891a21 - [e10s] Follow up bug 1051017 - browser.contentDocument -> browser.contentDocumentAsCPOW
---
 chrome/content/click/click.js         | 2 +-
 chrome/content/links/userInterface.js | 4 ++--
 chrome/content/minit/tablib.js        | 4 +---
 chrome/content/places/places.js       | 2 +-
 modules/RenameTab.jsm                 | 2 +-
 5 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/chrome/content/click/click.js b/chrome/content/click/click.js
index a98652a..637fcb9 100644
--- a/chrome/content/click/click.js
+++ b/chrome/content/click/click.js
@@ -461,7 +461,7 @@ var TabmixContext = {
       if (aTab.hasAttribute("busy")) {
         let browser = gBrowser.getBrowserForTab(aTab);
         let url = browser.currentURI.spec;
-        let docTitle = TMP_Places.getTitleFromBookmark(url, browser[TabmixSvc.contentDocumentAsCPOW].title, null, aTab);
+        let docTitle = TMP_Places.getTitleFromBookmark(url, browser.contentTitle, null, aTab);
         if (!docTitle || docTitle == gBrowser.mStringBundle.getString("tabs.emptyTabTitle"))
           titleNotReady = true;
       }
diff --git a/chrome/content/links/userInterface.js b/chrome/content/links/userInterface.js
index f5a624e..1cc9f81 100644
--- a/chrome/content/links/userInterface.js
+++ b/chrome/content/links/userInterface.js
@@ -67,7 +67,7 @@ Tabmix.openURL = function TMP_openURL(aURL, event) {
    }
 
    var tabBrowser = browserWindow.gBrowser;
-   var originCharset = tabBrowser.selectedBrowser[TabmixSvc.contentDocumentAsCPOW].characterSet;
+   var originCharset = tabBrowser.selectedBrowser.characterSet;
 
    // if the current tab is empty, then do not open a new tab
    if (tabBrowser.currentURI.spec == "about:blank") {
@@ -167,7 +167,7 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
       try { // just in case.....
          let browser = newTab.linkedBrowser;
          browser.stop();
-         let originCharset = gBrowser.selectedBrowser[TabmixSvc.contentDocumentAsCPOW].characterSet;
+         let originCharset = gBrowser.selectedBrowser.characterSet;
          browser.loadURIWithFlags(url, flags, null, originCharset);
          gBrowser.selectedBrowser.focus();
       }
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index 37586fc..a497847 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -1208,12 +1208,10 @@ var tablib = {
     gBrowser.copyTabUrl = function (aTab) {
       if (aTab.localName != "tab")
         aTab = this.mCurrentTab;
-      var URL = this.getBrowserForTab(aTab)[TabmixSvc.contentDocumentAsCPOW].location;
-
       var clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
                    .getService(Components.interfaces.nsIClipboardHelper);
 
-      clipboard.copyString(URL);
+      clipboard.copyString(this.getBrowserForTab(aTab).currentURI.spec);
     }
 
   /** XXX need to fix this functions:
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index f8eaff8..c827730 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -483,7 +483,7 @@ var TMP_Places = {
       if (this.isUserRenameTab(tab, url))
         return;
       let bookMarkName = this.getTitleFromBookmark(url);
-      if (bookMarkName && browser[TabmixSvc.contentDocumentAsCPOW].title != bookMarkName)
+      if (bookMarkName && browser.contentTitle != bookMarkName)
         browser[TabmixSvc.contentDocumentAsCPOW].title = bookMarkName;
     }, this)
     this.startObserver();
diff --git a/modules/RenameTab.jsm b/modules/RenameTab.jsm
index e94ff6a..8a705ff 100644
--- a/modules/RenameTab.jsm
+++ b/modules/RenameTab.jsm
@@ -23,7 +23,7 @@ let RenameTab = {
     var browser = gBrowser.getBrowserForTab(aTab);
     let docTitle = aTab.hasAttribute("pending") ?
           this.window.TMP_SessionStore.getTitleFromTabState(aTab) :
-          browser[TabmixSvc.contentDocumentAsCPOW].title;
+          browser.contentTitle;
     this.data.url = browser.currentURI.spec;
     this.data.docTitle = this.window.TMP_Places.getTitleFromBookmark(this.data.url,
         docTitle, null, aTab);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list