From 777155b762c7381f3dfe01035b1c3d80531de5c8 Mon Sep 17 00:00:00 2001 From: aleth Date: Wed, 2 Nov 2016 22:56:14 +0100 Subject: [PATCH] Bug 1314450 - Update methods exposed to content when swapping docshells. r=florian --HG-- extra : rebase_source : 3eed46f2abbf165d40270d5a8e19590c447a1679 --- chat/content/convbrowser.xml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/chat/content/convbrowser.xml b/chat/content/convbrowser.xml index d850540a9a..35dd0db30c 100644 --- a/chat/content/convbrowser.xml +++ b/chat/content/convbrowser.xml @@ -892,6 +892,17 @@ + + + + + + @@ -911,10 +922,8 @@ } this._loadState = 1; - // Expose scrollToElement and autoScrollEnabled to the - // message styles. - this.contentWindow.scrollToElement = this._scrollToElement.bind(this); - this.contentWindow.autoScrollEnabled = this.autoScrollEnabled.bind(this); + this._exposeMethodsToContent(); + // A common use case is to click somewhere in the conversation and // start typing a command (often /me). If quick find is enabled, it // will pick up the "/" keypress and open the findbar. See bug 1161930. @@ -1236,6 +1245,8 @@ aOtherBrowser[field] = ourFieldValues[field]; } + this._exposeMethodsToContent(); + this.initMagicCopy(); // The listener from the other browser is gone and we need a new one.