Merge mozilla-central to mozilla-inbound

This commit is contained in:
Carsten "Tomcat" Book 2013-11-09 12:25:41 +01:00
Родитель 336053fa45 f8d51d3d31
Коммит ae6f76e443
19 изменённых файлов: 232 добавлений и 82 удалений

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

@ -750,7 +750,6 @@ pref("webgl.can-lose-context-in-foreground", false);
pref("memory_info_dumper.watch_fifo.enabled", true);
pref("memory_info_dumper.watch_fifo.directory", "/data/local");
pref("general.useragent.enable_overrides", true);
// See ua-update.json.in for the packaged UA override list
pref("general.useragent.updates.enabled", true);
pref("general.useragent.updates.url", "https://dynamicua.cdn.mozilla.net/0/%APP_ID%");

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

@ -43,12 +43,8 @@
"ebay.com": "\\(Mobile#(Android; Mobile",
// bug 827622, bing.com
"bing.com": "\\(Mobile#(Android; Mobile",
// bug 827625, pagseguro.uol.com.br
"pagseguro.uol.com.br": "\\(Mobile#(Android; Mobile",
// bug 827626, magazineluiza.com.br
"magazineluiza.com.br": "\\(Mobile#(Android; Mobile",
// bug 827627, bol.uol.com.br
"bol.uol.com.br": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 827628, groupon.com.br
"groupon.com.br": "\\(Mobile#(Android; Mobile",
// bug 827630, vagalume.com.br
@ -83,8 +79,6 @@
"sport.pl": "\\(Mobile#(Android; Mobile",
// bug 828364, nk.pl
"nk.pl": "\\(Mobile#(Android; Mobile",
// bug 828366, wyborcza.biz
"wyborcza.biz": "\\(Mobile#(Android; Mobile",
// bug 828369, money.pl
"money.pl": "\\(Mobile#(Android; Mobile",
// bug 828371, ingbank.pl
@ -215,8 +209,6 @@
"download.com": "\\(Mobile#(Android; Mobile",
// bug 878264, haber.ba
"haber.ba": "\\(Mobile#(Android; Mobile",
// bug 878268, jutarnji.hr
"jutarnji.hr": "\\(Mobile#(Android; Mobile",
// bug 878271, kurir-info.rs
"kurir-info.rs": "\\(Mobile#(Android; Mobile",
// bug 878273, livescore.com
@ -233,8 +225,6 @@
"ask.com": "\\(Mobile#(Android; Mobile",
// bug 878632, banorte.com
"banorte.com": "\\(Mobile#(Android; Mobile",
// bug 878634, buenastareas.com
"buenastareas.com": "\\(Mobile#(Android; Mobile",
// bug 878637, eluniversal.com.mx
"eluniversal.com.mx": "\\(Mobile#(Android; Mobile",
// bug 878640, hootsuite.com

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

@ -1,4 +1,4 @@
{
"revision": "979add320adbf777379cfd1044978392c576aaf8",
"revision": "cc492bd8ccdfb6f02734b7e13d970c605c8a4f87",
"repo_path": "/integration/gaia-central"
}

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

@ -1,7 +1,7 @@
[
{
"size": 86149048,
"digest": "4ff723d8a372e2af95e62efb8739517943f362b515b4cee78006137a8dbc97f3b42edbd2e17429eaa7fa16b7f24594ed058b7032bcb7aa2ecfe9788a212dda4d",
"size": 60589756,
"digest": "29f6a7f09edbcc777ab155de64b4c7ff8c79ea25021bacc95a44d2ee8b7b13caa72991294b05dac1d841128a90eced3f52bcc3399ead4452f6170742e0e52fc1",
"algorithm": "sha512",
"filename": "helix-ics.tar.xz"
},

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

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1383344509000">
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1383954148000">
<emItems>
<emItem blockID="i454" id="sqlmoz@facebook.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
@ -37,6 +37,10 @@
<versionRange minVersion="2.4.6.4" maxVersion="2.4.6.4" severity="1">
</versionRange>
</emItem>
<emItem blockID="i433" id="{c95a4e8e-816d-4655-8c79-d736da1adb6d}">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i65" id="activity@facebook.com">
<versionRange minVersion="0" maxVersion="*">
</versionRange>
@ -45,6 +49,10 @@
<versionRange minVersion="0" maxVersion="*">
</versionRange>
</emItem>
<emItem blockID="i224" id="{336D0C35-8A85-403a-B9D2-65C292C39087}">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i105" id="{95ff02bc-ffc6-45f0-a5c8-619b8226a9de}">
<versionRange minVersion="0" maxVersion="*">
</versionRange>
@ -90,8 +98,8 @@
<versionRange minVersion="3.4.1" maxVersion="3.4.1.194" severity="1">
</versionRange>
</emItem>
<emItem blockID="i433" id="{c95a4e8e-816d-4655-8c79-d736da1adb6d}">
<versionRange minVersion="0" maxVersion="*" severity="1">
<emItem blockID="i474" id="{906000a4-88d9-4d52-b209-7a772970d91f}">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i40" id="{28387537-e3f9-4ed7-860c-11e69af4a8a0}">
@ -121,6 +129,10 @@
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i478" id="{7e8a1050-cf67-4575-92df-dcc60e7d952d}">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i84" id="pink@rosaplugin.info">
<versionRange minVersion="0" maxVersion="*">
</versionRange>
@ -133,6 +145,10 @@
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i467" id="plugin@analytic-s.com">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i360" id="ytd@mybrowserbar.com">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
@ -159,6 +175,10 @@
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i475" id="{B21F5E31-B8E8-41CD-B74C-168A71A10E49}">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i11" id="yslow@yahoo-inc.com">
<versionRange minVersion="2.0.5" maxVersion="2.0.5">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
@ -170,6 +190,10 @@
<versionRange minVersion="0" maxVersion="*">
</versionRange>
</emItem>
<emItem blockID="i472" id="linksicle@linksicle.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i99" id="pfzPXmnzQRXX6@2iABkVe.com">
<versionRange minVersion="0" maxVersion="*">
</versionRange>
@ -194,16 +218,8 @@
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i38" id="{B7082FAA-CB62-4872-9106-E42DD88EDE45}">
<versionRange minVersion="0.1" maxVersion="3.3.0.*">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange minVersion="3.7a1" maxVersion="*" />
</targetApplication>
</versionRange>
<versionRange minVersion="3.3.1" maxVersion="*">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange minVersion="5.0a1" maxVersion="*" />
</targetApplication>
<emItem blockID="i466" id="afext@anchorfree.com">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i98" id="youtubeeing@youtuberie.com">
@ -255,6 +271,10 @@
<versionRange minVersion=" " maxVersion="6.*">
</versionRange>
</emItem>
<emItem blockID="i358" id="lfind@nijadsoft.net">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i228" id="crossriderapp5060@crossrider.com">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
@ -313,6 +333,10 @@
<versionRange minVersion="0" maxVersion="1.0" severity="1">
</versionRange>
</emItem>
<emItem blockID="i468" id="05dd836e-2cbd-4204-9ff3-2f8a8665967d@a8876730-fb0c-4057-a2fc-f9c09d438e81.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i398" id="{377e5d4d-77e5-476a-8716-7e70a9272da0}">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
@ -369,6 +393,10 @@
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i477" id="mbrnovone@facebook.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i446" id="{E90FA778-C2B7-41D0-9FA9-3FEC1CA54D66}">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
@ -379,7 +407,11 @@
<versionRange minVersion="0" maxVersion="*">
</versionRange>
</emItem>
<emItem blockID="i224" id="{336D0C35-8A85-403a-B9D2-65C292C39087}">
<emItem blockID="i471" id="firefox@luckyleap.net">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i320" id="torntv@torntv.com">
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
@ -469,8 +501,8 @@
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i196" id="info@wxdownloadmanager.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
<emItem blockID="i91" id="crossriderapp4926@crossrider.com">
<versionRange minVersion="0" maxVersion="0.81.43" severity="1">
</versionRange>
</emItem>
<emItem blockID="i435" id="pluggets@gmail.com">
@ -485,6 +517,18 @@
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i38" id="{B7082FAA-CB62-4872-9106-E42DD88EDE45}">
<versionRange minVersion="0.1" maxVersion="3.3.0.*">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange minVersion="3.7a1" maxVersion="*" />
</targetApplication>
</versionRange>
<versionRange minVersion="3.3.1" maxVersion="*">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange minVersion="5.0a1" maxVersion="*" />
</targetApplication>
</versionRange>
</emItem>
<emItem blockID="i6" id="{3f963a5b-e555-4543-90e2-c3908898db71}">
<versionRange minVersion=" " maxVersion="8.5">
</versionRange>
@ -547,8 +591,8 @@
<versionRange minVersion="0" maxVersion="*">
</versionRange>
</emItem>
<emItem blockID="i320" id="torntv@torntv.com">
<versionRange minVersion="0" maxVersion="*" severity="1">
<emItem blockID="i476" id="mbroctone@facebook.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i3" id="langpack-vi-VN@firefox.mozilla.org">
@ -559,8 +603,8 @@
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i358" id="lfind@nijadsoft.net">
<versionRange minVersion="0" maxVersion="*" severity="1">
<emItem blockID="i470" id="extension@FastFreeConverter.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i162" id="{EB7508CA-C7B2-46E0-8C04-3E94A035BD49}">
@ -620,8 +664,12 @@
<versionRange minVersion="0" maxVersion="*">
</versionRange>
</emItem>
<emItem blockID="i91" id="crossriderapp4926@crossrider.com">
<versionRange minVersion="0" maxVersion="0.81.43" severity="1">
<emItem blockID="i196" id="info@wxdownloadmanager.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i469" id="OKitSpace@OKitSpace.es">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i167" id="{b64982b1-d112-42b5-b1e4-d3867c4533f8}">
@ -664,6 +712,10 @@
<versionRange minVersion="0" maxVersion="*" severity="1">
</versionRange>
</emItem>
<emItem blockID="i473" id="{81b13b5d-fba1-49fd-9a6b-189483ac548a}">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i437" id="{4933189D-C7F7-4C6E-834B-A29F087BFD23}">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
@ -754,16 +806,16 @@
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i21" id="support@update-firefox.com">
</emItem>
<emItem blockID="i322" id="jid0-Y6TVIzs0r7r4xkOogmJPNAGFGBw@jetpack">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i374" id="update@firefox.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i322" id="jid0-Y6TVIzs0r7r4xkOogmJPNAGFGBw@jetpack">
<versionRange minVersion="0" maxVersion="*" severity="3">
</versionRange>
</emItem>
<emItem blockID="i21" id="support@update-firefox.com">
</emItem>
</emItems>
<pluginItems>

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

@ -373,16 +373,6 @@ HTMLBreadcrumbs.prototype = {
}
},
/**
* Re-init the cache and remove all the buttons.
*/
invalidateHierarchy: function BC_invalidateHierarchy()
{
this.inspector.hideNodeMenu();
this.nodeHierarchy = [];
this.empty();
},
/**
* Set which button represent the selected node.
*
@ -615,7 +605,9 @@ HTMLBreadcrumbs.prototype = {
*/
update: function BC_update(reason)
{
this.inspector.hideNodeMenu();
if (reason !== "markupmutation") {
this.inspector.hideNodeMenu();
}
let cmdDispatcher = this.chromeDoc.commandDispatcher;
this.hadFocus = (cmdDispatcher.focusedElement &&

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

@ -987,7 +987,8 @@ MarkupView.prototype = {
* Initialize the preview panel.
*/
_initPreview: function() {
if (!Services.prefs.getBoolPref("devtools.inspector.markupPreview")) {
this._previewEnabled = Services.prefs.getBoolPref("devtools.inspector.markupPreview");
if (!this._previewEnabled) {
return;
}
@ -1017,6 +1018,9 @@ MarkupView.prototype = {
* Move the preview viewbox.
*/
_updatePreview: function() {
if (!this._previewEnabled) {
return;
}
let win = this._frame.contentWindow;
if (win.scrollMaxY == 0) {
@ -1052,6 +1056,9 @@ MarkupView.prototype = {
* Hide the preview while resizing, to avoid slowness.
*/
_resizePreview: function() {
if (!this._previewEnabled) {
return;
}
let win = this._frame.contentWindow;
this._previewBar.classList.add("hide");
win.clearTimeout(this._resizePreviewTimeout);

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

@ -590,13 +590,13 @@ var Browser = {
if (tab)
tab.active = true;
BrowserUI.update();
if (isFirstTab) {
// Don't waste time at startup updating the whole UI; just display the URL.
BrowserUI._titleChanged(browser);
} else {
// Update all of our UI to reflect the new tab's location
BrowserUI.updateURI();
BrowserUI.update();
let event = document.createEvent("Events");
event.initEvent("TabSelect", true, false);

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

@ -210,7 +210,7 @@
<!-- Navigation bar -->
<appbar id="navbar" mousethrough="never" visible="true">
<hbox id="progress-container" layer="true">
<hbox id="progress-container" layer="true" observes="bcast_windowState">
<hbox id="progress-control" />
</hbox>

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

@ -460,6 +460,9 @@ documenttab[selected] .documenttab-selection {
box-shadow: 0 1px 0 hsla(210,5%,50%,.1) inset;
-moz-user-focus: ignore;
}
#progress-container[startpage] {
visibility: collapse;
}
#progress-control {
display: block;

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

@ -202,11 +202,22 @@ public class TabsTray extends TwoWayView
// Updates the selected position in the list so that it will be scrolled to the right place.
private void updateSelectedPosition() {
int selected = getPositionForTab(Tabs.getInstance().getSelectedTab());
for (int i=0; i < getCount(); i++)
TabsTray.this.setItemChecked(i, (i == selected));
if (selected != -1)
if (selected != -1) {
TabsTray.this.setSelection(selected);
}
updateSelectedStyle(selected);
}
/**
* Updates the selected/unselected style for the tabs.
*
* @param selected position of the selected tab
*/
private void updateSelectedStyle(int selected) {
for (int i = 0; i < getCount(); i++) {
TabsTray.this.setItemChecked(i, (i == selected));
}
}
public void clear() {
@ -240,7 +251,9 @@ public class TabsTray extends TwoWayView
if (tab.isPrivate() == mIsPrivate && mTabs != null) {
mTabs.remove(tab);
notifyDataSetChanged(); // Be sure to call this whenever mTabs changes.
updateSelectedPosition();
int selected = getPositionForTab(Tabs.getInstance().getSelectedTab());
updateSelectedStyle(selected);
}
}

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

@ -147,7 +147,9 @@ public class LocalBrowserDB implements BrowserDB.BrowserDBIface {
// the constraint string(s), treating space-separated words as separate constraints
if (!TextUtils.isEmpty(constraint)) {
String[] constraintWords = constraint.toString().split(" ");
for (int i = 0; i < constraintWords.length; i++) {
// Only create a filter query with a maximum of 10 constraint words
int constraintCount = Math.min(constraintWords.length, 10);
for (int i = 0; i < constraintCount; i++) {
selection = DBUtils.concatenateWhere(selection, "(" + Combined.URL + " LIKE ? OR " +
Combined.TITLE + " LIKE ?)");
String constraintWord = "%" + constraintWords[i] + "%";

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

@ -27,10 +27,6 @@ pref("general.useragent.compatMode.firefox", false);
// overrides by default, don't initialize UserAgentOverrides.jsm.
pref("general.useragent.site_specific_overrides", true);
// This pref controls whether or not to enable UA overrides in the
// product code that end users use (as opposed to testing code).
pref("general.useragent.enable_overrides", false);
pref("general.config.obscure_value", 13); // for MCD .cfg files
pref("general.warnOnAboutConfig", true);

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

@ -41,12 +41,12 @@ groups.google.com: did not receive HSTS header
history.google.com: did not receive HSTS header
hostedtalkgadget.google.com: did not receive HSTS header
id.atlassian.com: did not receive HSTS header
iop.intuit.com: max-age too low: 86400
iop.intuit.com: could not connect to host
irccloud.com: did not receive HSTS header
jitsi.org: did not receive HSTS header
jottit.com: did not receive HSTS header
kiwiirc.com: max-age too low: 5256000
ledgerscope.net: max-age too low: 86400
ledgerscope.net: did not receive HSTS header
liberty.lavabit.com: did not receive HSTS header
lists.mayfirst.org: did not receive HSTS header
logentries.com: did not receive HSTS header
@ -102,7 +102,7 @@ www.gov.uk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR
www.greplin.com: could not connect to host
www.jitsi.org: did not receive HSTS header
www.lastpass.com: did not receive HSTS header
www.ledgerscope.net: max-age too low: 86400
www.ledgerscope.net: did not receive HSTS header
www.logentries.com: did not receive HSTS header
www.moneybookers.com: did not receive HSTS header
www.neonisi.com: could not connect to host

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

@ -8,7 +8,7 @@
/*****************************************************************************/
#include <stdint.h>
const PRTime gPreloadListExpirationTime = INT64_C(1394273230288000);
const PRTime gPreloadListExpirationTime = INT64_C(1394881586089000);
class nsSTSPreload
{
@ -61,6 +61,7 @@ static const nsSTSPreload kSTSPreloadList[] = {
{ "factor.cc", false },
{ "forum.linode.com", false },
{ "forum.quantifiedself.com", true },
{ "getlantern.org", true },
{ "grc.com", false },
{ "haste.ch", true },
{ "howrandom.org", true },

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

@ -4,6 +4,7 @@
[browser_bug295977_autoscroll_overflow.js]
[browser_bug594509.js]
[browser_default_image_filename.js]
[browser_findbar.js]
[browser_input_file_tooltips.js]
[browser_keyevents_during_autoscrolling.js]
[browser_save_resend_postdata.js]

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

@ -0,0 +1,91 @@
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
"resource://gre/modules/commonjs/sdk/core/promise.js");
XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
Components.utils.import("resource://gre/modules/Timer.jsm", this);
let gTabs = [];
registerCleanupFunction(function() {
for (let tab of gTabs) {
if (!tab)
continue;
gBrowser.removeTab(tab);
}
});
function test() {
waitForExplicitFinish();
Task.spawn(function() {
info("Check correct 'Phrase not found' on new tab");
// Create a tab to run the test.
yield promiseAboutHomeLoad();
// Search for the first word.
yield promiseFindFinished("--- THIS SHOULD NEVER MATCH ---", false);
let findbar = gBrowser.getFindBar();
is(findbar._findStatusDesc.textContent, findbar._notFoundStr,
"Findbar status text should be 'Phrase not found'");
// Create second tab.
yield promiseAboutHomeLoad();
// Search for a string that WILL be found, with 'Highlight All' on
yield promiseFindFinished("s", true);
ok(!gBrowser.getFindBar()._findStatusDesc.textContent,
"Findbar status should be empty");
finish();
});
}
function promiseAboutHomeLoad() {
let deferred = Promise.defer();
let tab = gBrowser.selectedTab = gBrowser.addTab("about:home");
gTabs.push(tab);
let browser = gBrowser.selectedBrowser;
browser.addEventListener("load", function listener() {
if (browser.currentURI.spec == "about:blank")
return;
info("Page loaded: " + browser.currentURI.spec);
browser.removeEventListener("load", listener, true);
deferred.resolve();
}, true);
return deferred.promise;
}
function promiseFindFinished(searchText, highlightOn) {
let deferred = Promise.defer();
let findbar = gBrowser.getFindBar();
findbar.startFind(findbar.FIND_NORMAL);
let highlightElement = findbar.getElement("highlight");
if (highlightElement.checked != highlightOn)
highlightElement.click();
executeSoon(() => {
findbar._findField.value = searchText;
let resultListener;
let findTimeout = setTimeout(() => foundOrTimedout(true), 2000);
let foundOrTimedout = function(timedOut) {
if (timedOut)
info("Result listener not called, timeout reached.");
clearTimeout(findTimeout);
findbar.browser.finder.removeResultListener(resultListener);
deferred.resolve();
}
resultListener = {
onFindResult: foundOrTimedout
};
findbar.browser.finder.addResultListener(resultListener);
findbar._find();
});
return deferred.promise;
}

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

@ -863,7 +863,7 @@
// Only search on input if we don't have a last-failed string,
// or if the current search string doesn't start with it.
if (this._findFailedString == null ||
if (!this._findFailedString ||
!val.startsWith(this._findFailedString))
{
this._enableFindButtons(val);

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

@ -35,7 +35,8 @@ Finder.prototype = {
this._listeners = this._listeners.filter(l => l != aListener);
},
_notify: function (aResult, aFindBackwards, aDrawOutline) {
_notify: function (aSearchString, aResult, aFindBackwards, aDrawOutline) {
this._searchString = aSearchString;
this._outlineLink(aDrawOutline);
let foundLink = this._fastFind.foundLink;
@ -60,7 +61,7 @@ Finder.prototype = {
},
get searchString() {
return this._fastFind.searchString;
return this._searchString;
},
set caseSensitive(aSensitive) {
@ -76,7 +77,8 @@ Finder.prototype = {
*/
fastFind: function (aSearchString, aLinksOnly, aDrawOutline) {
let result = this._fastFind.find(aSearchString, aLinksOnly);
this._notify(result, false, aDrawOutline);
let searchString = this._fastFind.searchString;
this._notify(searchString, result, false, aDrawOutline);
},
/**
@ -90,16 +92,17 @@ Finder.prototype = {
*/
findAgain: function (aFindBackwards, aLinksOnly, aDrawOutline) {
let result = this._fastFind.findAgain(aFindBackwards, aLinksOnly);
this._notify(result, aFindBackwards, aDrawOutline);
let searchString = this._fastFind.searchString;
this._notify(searchString, result, aFindBackwards, aDrawOutline);
},
highlight: function (aHighlight, aWord) {
this._searchString = aWord;
let found = this._highlight(aHighlight, aWord, null);
if (found)
this._notify(Ci.nsITypeAheadFind.FIND_FOUND, false, false);
else
this._notify(Ci.nsITypeAheadFind.FIND_NOTFOUND, false, false);
if (aHighlight) {
let result = found ? Ci.nsITypeAheadFind.FIND_FOUND
: Ci.nsITypeAheadFind.FIND_NOTFOUND;
this._notify(aWord, result, false, false);
}
},
enableSelection: function() {
@ -283,7 +286,7 @@ Finder.prototype = {
}
}
//Removing the highlighting always succeeds, so return true.
// Removing the highlighting always succeeds, so return true.
found = true;
}