summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content/tabbrowser.xml
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-06-12 22:02:00 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-06-12 22:05:07 +0200
commitfb291846a59f9b8eaf8bba29e0d9794893e895bf (patch)
tree7430f5b98d8d40ba8a4baf6992936db82c1552a7 /application/palemoon/base/content/tabbrowser.xml
parent518f95c2baf85a21c79d23065357f7299a021a69 (diff)
downloadUXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.tar
UXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.tar.gz
UXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.tar.lz
UXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.tar.xz
UXP-fb291846a59f9b8eaf8bba29e0d9794893e895bf.zip
Minimal easy fix -- move findbar getters to tabbrowser.
Resolves #487
Diffstat (limited to 'application/palemoon/base/content/tabbrowser.xml')
-rw-r--r--application/palemoon/base/content/tabbrowser.xml41
1 files changed, 41 insertions, 0 deletions
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index c054318ec..2db38e56f 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -128,6 +128,10 @@
false
</field>
+ <field name="_lastFindValue">
+ ""
+ </field>
+
<property name="_numPinnedTabs" readonly="true">
<getter><![CDATA[
for (var i = 0; i < this.tabs.length; i++) {
@@ -154,6 +158,43 @@
]]></getter>
</property>
+ <method name="isFindBarInitialized">
+ <parameter name="aTab"/>
+ <body><![CDATA[
+ return (aTab || this.selectedTab)._findBar != undefined;
+ ]]></body>
+ </method>
+
+ <method name="getFindBar">
+ <parameter name="aTab"/>
+ <body><![CDATA[
+ if (!aTab)
+ aTab = this.selectedTab;
+
+ if (aTab._findBar)
+ return aTab._findBar;
+
+ let findBar = document.createElementNS(this.namespaceURI, "findbar");
+ let browser = this.getBrowserForTab(aTab);
+ let browserContainer = this.getBrowserContainer(browser);
+ browserContainer.appendChild(findBar);
+
+ // Force a style flush to ensure that our binding is attached.
+ findBar.clientTop;
+
+ findBar.browser = browser;
+ findBar._findField.value = this._lastFindValue;
+
+ aTab._findBar = findBar;
+
+ let event = document.createEvent("Events");
+ event.initEvent("TabFindInitialized", true, false);
+ aTab.dispatchEvent(event);
+
+ return findBar;
+ ]]></body>
+ </method>
+
<method name="updateWindowResizers">
<body><![CDATA[
if (!window.gShowPageResizers)