Bug 1314450 - Update methods exposed to content when swapping docshells. r=florian

--HG--
extra : rebase_source : 3eed46f2abbf165d40270d5a8e19590c447a1679
This commit is contained in:
aleth 2016-11-02 22:56:14 +01:00
Родитель dde0a10acc
Коммит 777155b762
1 изменённых файлов: 15 добавлений и 4 удалений

Просмотреть файл

@ -892,6 +892,17 @@
</body>
</method>
<method name="_exposeMethodsToContent">
<body>
<![CDATA[
// Expose scrollToElement and autoScrollEnabled to the
// message styles.
this.contentWindow.scrollToElement = this._scrollToElement.bind(this);
this.contentWindow.autoScrollEnabled = this.autoScrollEnabled.bind(this);
]]>
</body>
</method>
<!-- nsIWebProgressListener implementation -->
<method name="onStateChange">
<parameter name="aProgress"/>
@ -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.