Commit Graph

950 Commits

Author SHA1 Message Date
Drew Willcoxon
9c8cde609c Bug 1539804 - Quantumbar: Re-enable browser_urlbarStopSearchOnSelection.js and fix a couple of related problems. r=mak
This test uncovered a couple of problems:

(1) UrlbarController.handleKeyNavigation relies on event.defaultPrevented to tell whether the one-offs handled the key event. That's a problem when combined with deferring the down arrow key.

handleKeyNavigation is called twice in that case. The first time, the event is deferred (so executeAction = false), and handleKeyNavigation calls event.preventDefault. The second time, the event is being replayed, but defaultPrevented is true from the previous call regardless of whether the one-offs actually handled the event.

So handleKeyNavigation always returns early because it thinks the one-offs always handled the event, so it never properly replays down arrow keys.

(2) UrlbarProviderUnifiedComplete's query promise is never resolved when the query is canceled. That's a problem in general of course but I tripped over it in this test because I need to check results after the query is canceled, and the test ended up hanging since UrlbarTestUtils waits for the query to finish in order to get its results.

It's not a problem in UnifiedComplete itself per se because of course awesomebar uses UnifiedComplete too, and it doesn't have this problem. The difference is that nsAutoCompleteController::StopSearch calls input->OnSearchComplete() (via PostSearchCleanup): https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/toolkit/components/autocomplete/nsAutoCompleteController.cpp#1433

Quantumbar's UnifiedComplete provider is missing that behavior, so this patch adds it by resolving its query promise when the query is canceled.

Differential Revision: https://phabricator.services.mozilla.com/D29300
2019-05-01 17:42:19 +00:00
Ciure Andrei
6853e98089 Backed out changeset 9242458b79d5 (bug 1539804) for high frequency browser/browser_urlbarStopSearchOnSelection.js failures CLOSED TREE 2019-05-01 14:45:59 +03:00
Drew Willcoxon
01a0ae6979 Bug 1539804 - Quantumbar: Re-enable browser_urlbarStopSearchOnSelection.js and fix a couple of related problems. r=mak
This test uncovered a couple of problems:

(1) UrlbarController.handleKeyNavigation relies on event.defaultPrevented to tell whether the one-offs handled the key event. That's a problem when combined with deferring the down arrow key.

handleKeyNavigation is called twice in that case. The first time, the event is deferred (so executeAction = false), and handleKeyNavigation calls event.preventDefault. The second time, the event is being replayed, but defaultPrevented is true from the previous call regardless of whether the one-offs actually handled the event.

So handleKeyNavigation always returns early because it thinks the one-offs always handled the event, so it never properly replays down arrow keys.

(2) UrlbarProviderUnifiedComplete's query promise is never resolved when the query is canceled. That's a problem in general of course but I tripped over it in this test because I need to check results after the query is canceled, and the test ended up hanging since UrlbarTestUtils waits for the query to finish in order to get its results.

It's not a problem in UnifiedComplete itself per se because of course awesomebar uses UnifiedComplete too, and it doesn't have this problem. The difference is that nsAutoCompleteController::StopSearch calls input->OnSearchComplete() (via PostSearchCleanup): https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/toolkit/components/autocomplete/nsAutoCompleteController.cpp#1433

Quantumbar's UnifiedComplete provider is missing that behavior, so this patch adds it by resolving its query promise when the query is canceled.

Differential Revision: https://phabricator.services.mozilla.com/D29300
2019-05-01 02:30:47 +00:00
Mark Banner
ad2d747bb0 Bug 1547291 - Update URLs for the Prisjakt search engine. r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D29012
2019-04-26 17:26:22 +00:00
Dale Harvey
0cc572a537 Bug 1545517 - Remove engines that dont work over https. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D28342
2019-04-25 20:51:16 +00:00
Mark Banner
7a51848bee Bug 1544392 - Allow extension icons to be supplied from localized manifest properties, and fix the Yandex icon in search engines. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D28499
2019-04-23 21:10:00 +00:00
Brian Grinstead
fac4c41f94 Bug 1528268 - Make initializeAttributeInheritance and incremental attribute changes do less work r=aswan
This provides a flipped data structure based on the provided inheritedAttributes,
which looks like:

Object<selector, attrs_to_inherit_comma_separated>

To one that looks like:

Object<attr, Array<Array<selector, attr_to_inherit>>

This should improve performance because:

1) We only fetch element at connectedCallback that actually will have attributes inherited.
2) When an attribute changes we can quickly inherit only that one.

Differential Revision: https://phabricator.services.mozilla.com/D27801
2019-04-18 16:41:39 +00:00
Rob Wu
5ea50ab2dd Bug 1544834 - Replace deprecated generics in test code r=evilpie
- `Array.map` becomes `Array.from`
- Array copying via `Array.slice` becomes `Array.from`.
- `Array.forEach` that did not rely on closures becomes `for`-`of` loops.
- Anything else: `Array.X` becomes `Array.prototype.X`.

Complex cases:

dom/bindings/test/TestInterfaceJS.js and
dom/bindings/test/test_exception_options_from_jsimplemented.html
use `Array.indexOf` to generate an error with a specific error message.
Switched to `Array.prototype.forEach` to generate the same error.

js/src/jit-test/tests/basic/exception-column-number.js
In this test `Array.indexOf()` is used to generate an error. Since the
exact message doesn't matter, I switched to `Array.from()`.

Intentionally not changed:

editor/libeditor/tests/browserscope/lib/richtext/richtext/js/range.js
Did not modify because this is 3rd-party code and the code uses
feature detection as a fall back when Array generics are not used.

testing/talos/talos/tests/dromaeo/lib/mootools.js
Did not modify because mootools adds the `Array.slice` method to the
`Array` object.

Not changed because they check the implementation of Array generics:
js/src/jit-test/tests/basic/arrayNatives.js
js/src/jit-test/tests/basic/bug563243.js
js/src/jit-test/tests/basic/bug618853.js
js/src/jit-test/tests/basic/bug830967.js
js/src/jit-test/tests/jaeger/recompile/bug656753.js
js/src/jit-test/tests/self-hosting/alternate-static-and-instance-array-extras.js
js/src/tests/non262/Array/generics.js
js/src/tests/non262/Array/regress-415540.js
js/src/tests/non262/extensions/regress-355497.js
js/src/tests/non262/extensions/typedarray-set-neutering.js

Depends on D27802

Differential Revision: https://phabricator.services.mozilla.com/D27803
2019-04-17 19:03:19 +00:00
Dorel Luca
cbbe0cd921 Backed out 2 changesets (bug 1519502, bug 1528268) for Crashtest failures in toolkit/content/tests/chrome/test_popupincontent.xul. CLOSED TREE
Backed out changeset 904cc7903feb (bug 1519502)
Backed out changeset f8770d7eebd1 (bug 1528268)
2019-04-18 18:26:41 +03:00
Brian Grinstead
251289c95b Bug 1528268 - Make initializeAttributeInheritance and incremental attribute changes do less work r=aswan
This provides a flipped data structure based on the provided inheritedAttributes,
which looks like:

Object<selector, attrs_to_inherit_comma_separated>

To one that looks like:

Object<attr, Array<Array<selector, attr_to_inherit>>

This should improve performance because:

1) We only fetch element at connectedCallback that actually will have attributes inherited.
2) When an attribute changes we can quickly inherit only that one.

Differential Revision: https://phabricator.services.mozilla.com/D27801
2019-04-17 18:48:46 +00:00
Mike de Boer
4685c831da Bug 1518545 - Remove the superfluous 'engine-current' Search Service observer topic in favour of 'engine-default'. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D27857
2019-04-17 09:45:24 +00:00
Dale Harvey
bc022faecf Bug 1544077 - Remove unused recordSearchURLTelemetry idl definition. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D27725
2019-04-16 15:50:50 +00:00
Drew Willcoxon
c2c5a74a3a Bug 1541929 - Don't autofill the first result in some cases. r=mak
We need to handle autofilling the first result separately from autofilling results in general (which happens in UrlbarInput.setValueFromResult), so add a new UrlbarInput.autofillFirstResult method. The controller calls it instead of setValueFromResult. I ported the logic from nsAutoCompleteController, as described in the bug.

Other changes are related to the new test for this.

As part of this work, I was interested in learning how awesomebar handles browser_autoFill_typed.js, so I added it to the legacy tests, with a small tweak in the test for awesomebar.

Differential Revision: https://phabricator.services.mozilla.com/D26852
2019-04-15 13:15:30 +00:00
Dale Harvey
7123e48793 Bug 1496075 - Part 4: Delete searchplugins. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D25357
2019-04-11 20:49:56 +00:00
Dale Harvey
6bc5b736e5 Bug 1496075 - Part 3: Use webextensions in SearchServices. r=mikedeboer,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D25246
2019-04-11 20:49:31 +00:00
Dale Harvey
3ca8161201 Bug 1486820 - Convert Opensearch files to WebExtensions. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D24140
2019-04-11 20:48:09 +00:00
Trushita
19b14883c7 Bug 1494948: Removed FX_PREFERENCES_OPENED_VIA probe and origin parameter for openPreferences r=jaws,chutten
Removed FX_PREFERENCES_OPENED_VIA probe as it expired in 63.Origin parameter for openPreferences has also been removed.

Differential Revision: https://phabricator.services.mozilla.com/D26795
2019-04-09 20:40:26 +00:00
Hector Zhao
7286ee84f7 Bug 1540017 - Update Baidu searchplugin with new code. r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D25339
2019-04-03 02:18:33 +00:00
Mike de Boer
87f619fd13 Bug 1537117 - Update the search engine quick-switching functionality to work with an async SearchService API. r=florian
I also updated the logic to properly cycle through the visible search engines list
and added a unit test that was missing, somehow.

Differential Revision: https://phabricator.services.mozilla.com/D25368
2019-04-02 14:15:35 +00:00
Mark Banner
d5029e0dae Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850
2019-03-28 09:38:14 +00:00
Francesco Lodolo (:flod)
4f312ded23 Bug 1535288 - Set up productization for Bengali (bn) on Firefox desktop and Firefox for Android r=mkaply
- Use Bengali (bn-BD) as base
- Keep amazon-in on Desktop (from bn-IN)
- Remove rediff (from bn-IN)

Differential Revision: https://phabricator.services.mozilla.com/D23480
2019-03-26 12:09:26 +00:00
Francesco Lodolo (:flod)
e50f66b26f Bug 1538065 - Update name for Wikipedia (ast) searchplugin r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D24479
2019-03-24 00:24:44 +00:00
Yura Zenevich
84e7c6f3a0 Bug 1506510 - add keyboard focus styling for toolbar/urlbar buttons. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D19958
2019-03-15 04:35:09 +00:00
Edwin Gao
33d266792b Bug 1531590, 1531598, 1534811, 1336075, 1531571, 1531572, 1531572, 1531574, 1534855, 1534857, 1535082 - skip tests in mochitest-dev-tools and mochitest-browser-chrome suites for windows10-aarch64 r=jmaher
Bug 1531598 - disable browser_markup_copy_image_data.js
Bug 1531598 - disable browser_markup_links_04.js
Bug 1531598 - disable browser_inspector_menu-01-sensitivity.js
Bug 1534811 - disable accessible/tests/browser/general
Bug 1336075 - disable browser_largeAllocation_non_win32.js
Bug 1531571 - disable browser_jsterm_context_menu_labels.js
Bug 1531572 - disable browser_jsterm_helper_dollar_x.js
Bug 1531573 - disable browser_jsterm_no_input_and_tab_key_pressed.js
Bug 1531574 - disable browser_jsterm_syntax_highlight_output.js
Bug 1534855 - disable accessible/tests/browser/
Bug 1534857 - disable browser_ext_slow_script.js
Bug 1535082 - disable browser_jsterm_helper_dollar_dollar.js

Differential Revision: https://phabricator.services.mozilla.com/D23369
2019-03-13 19:47:25 +00:00
Michael Kaply
da82584ec0 Bug 1531893 - Add support for search channel. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D22169
2019-03-06 09:31:47 +00:00
Mark Banner
648d6d7272 Bug 1530961 - Fix the right-click 'search in new tab' option for search one-offs to work in all situations. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D22353
2019-03-07 12:49:30 +00:00
Mark Banner
4521b1fed4 Bug 1530961 - Move SearchTestUtils.jsm from browser to toolkit. r=adw
This seems to make more sense as it is currently only handling the search service.

Differential Revision: https://phabricator.services.mozilla.com/D22351
2019-03-07 12:46:19 +00:00
Alexander Surkov
3a49f8b70c Bug 1525101 - Convert browser-search-autocomplete-result-popup into a Custom Element, r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D20819
2019-03-06 21:06:41 +00:00
Alexander Surkov
df64082334 Bug 1525101 - Copy search.xml to keep hg history for search custom elements, r=bgrins,MattN
Differential Revision: https://phabricator.services.mozilla.com/D20817
2019-03-06 21:06:34 +00:00
Francesco Lodolo (:flod)
c4ef1804a4 Bug 1531751 - Correct search parameter for mapy.cz searchplugin used in Czech (cs) version of Firefox and Firefox for Android r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D21690
2019-03-01 17:09:58 +00:00
Mike de Boer
71f1c924e1 Bug 1530086 - Fix the method signature used by searchbar scripts for addEngine(). r=florian
Differential Revision: https://phabricator.services.mozilla.com/D21706
2019-03-01 15:51:50 +00:00
Marco Bonardo
a040dd21a3 Bug 1528751 - Add a custom eslint rule to check "consistent" if bracing. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D20753
2019-02-28 08:39:33 +00:00
Felipe Gomes
c842dc638d Bug 1530767 - Don't limit bug 1529380 improvements to the handoff-to-awesomebar flow. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D21246
2019-02-27 17:37:49 +00:00
Francesco Lodolo (:flod)
fa628d90fa Bug 1527349 - Remove meta.ua searchplugin from Ukrainian (uk) locale r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D19522
2019-02-22 16:58:57 +00:00
Mike de Boer
11f44d1346 Bug 1528203 - Searchbar popups' updateHeader was using the wrong method signature to get the default search engine. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D20531
2019-02-20 20:25:55 +00:00
Mark Banner
2507c97a6e Bug 1522495 - Port tests in browser/components/search/ to QuantumBar. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D20122
2019-02-18 16:08:42 +00:00
Brian Grinstead
e43c8faeb7 Bug 1527680 - Add MozElement inheritedAttributes helper for automatically inheriting attributes based on a map of selectors to attributes r=paolo
This allows elements to skip explicitly declaring `observedAttributes` and then imperatively
calling `inheritAttribute` on the appropriate child nodes. For simple cases this means less
boilerplate and moving this logic into the base class.

This is an opt-in feature, so more complex cases can continue to manually implement inheriting
behavior as before.

Differential Revision: https://phabricator.services.mozilla.com/D19702
2019-02-15 23:10:18 +00:00
Cosmin Sabou
73f56f8962 Backed out changeset 66082f22ae11 (bug 1527680) for merge conflicts on toolkit/content/widgets/popupnotification.js. 2019-02-15 20:49:37 +02:00
Brian Grinstead
513c12356a Bug 1527680 - Add MozElement inheritedAttributes helper for automatically inheriting attributes based on a map of selectors to attributes r=paolo
This allows elements to skip explicitly declaring `observedAttributes` and then imperatively
calling `inheritAttribute` on the appropriate child nodes. For simple cases this means less
boilerplate and moving this logic into the base class.

This is an opt-in feature, so more complex cases can continue to manually implement inheriting
behavior as before.

Differential Revision: https://phabricator.services.mozilla.com/D19702
2019-02-15 16:33:00 +00:00
Dão Gottwald
d160888a91 Bug 1527260 - Integrate one off buttons into keyboard navigation. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D19656
2019-02-13 15:06:54 +00:00
Mike de Boer
559575f0a1 Bug 1525833 - nsISearchService::addEngine does not support using a callback anymore, instead it returns a Promise. Update the searchbar's usage to reflect this. r=florian
This also officially gets rid of the nsIBrowserSearchInitObserver and nsISearchInstallCallback
from nsISearchService.idl, even though they're not used for anything anymore.

Differential Revision: https://phabricator.services.mozilla.com/D18993
2019-02-07 16:17:54 +00:00
Mike de Boer
02a11d417a Bug 1524908 - Since the Search Service API is now asynchronous, the one-off-search (re)build method became re-entrant and evidently race-y. Let's guard against that. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D18672
2019-02-06 11:51:04 +00:00
Brindusan Cristian
a322a6c7c9 Backed out changeset 0a5768488340 (bug 1524908) for bc failures at browser_urlbar_keyed_search.js. 2019-02-06 13:42:52 +02:00
Mike de Boer
405f5399d0 Bug 1524908 - Since the Search Service API is now asynchronous, the one-off-search (re)build method became re-entrant and evidently race-y. Let's guard against that. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D18672
2019-02-05 21:08:08 +00:00
Cosmin Sabou
ac80cb1ced Merge mozilla-inbound to mozilla-central. a=merge 2019-02-05 23:58:20 +02:00
Dão Gottwald
729caf4599 Bug 1491248 - Display one-off search buttons correctly in the UrlbarView panel. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D18676
2019-02-05 16:51:43 +00:00
Mike de Boer
39f20cd843 Bug 1524593 - nsISearchService (aka nsIBrowserSearchService, previously) refactor to be mostly an asynchronous, in preparation of WebExtension engines. r=daleharvey
This is a rollup of all the patches that have landed on the cedar project branch:

891252fdd0
Bug 1492475 - Part 1: Migrate most, if not all nsSearchService consumers to use async APIs. r=florian

79b2eb2367
Bug 1492475 - Part 2: Move nsIBrowserSearchService.idl to toolkit/components/search/nsISearchService.idl and update references. r=florian

a947d3cdf0
Bug 1492475 - Part 3: The search service init() method should simply return a Promise. r=florian

c1e172dfac
Bug 1492475 - Part 4: Remove the synchronous initialization flow. r=florian

cd41189eac
Bug 1492475 - Part 5: Since async initialization of the search service now is implicit behavior, remove the distinctive verbiage used internally. r=florian

2ae7189dfa
Bug 1492475 - Part 6: Update the cache build task to work with an actual Promise and re-initialize only once at the same time - all to fix race conditions here. r=florian

c8ee92973f
Bug 1492475 - Part 7: Make the region fetch not block the init flow, to ensure it's as fast as possible. r=florian

c44e674e16
Bug 1492475 - Part 8: Introduce an init flag, which can only be used privately, that allows to explicitly skip waiting for the region check process to complete. r=florian

6c79eaf1d3
Bug 1492475 - Part 9: Update unit tests to stop using 'currentEngine', in favor of 'defaultEngine'. r=Standard8

21b3aa17ee
Bug 1492475 - Part 10: Update unit tests to be fully aware of the new, async signatures of the search service API and remove sync init flow tests. r=mkaply,florian

ce5ba69019
Bug 1492475 - Part 11: Repair incorrect usage of the `identifier` property of nsISearchEngine instances. r=florian

fd177a7994
Bug 1518543 - Fix up the Android (Fennec) nsISearchService shim to work with the new asynchronous API. r=florian

3653d8ee22
Bug 1523708 - Change the search service interaction in the show-heartbeat action to use the new async API. r=florian

Differential Revision: https://phabricator.services.mozilla.com/D18355
2019-02-02 11:27:21 +00:00
Myk Melez
5ecc2c1225 Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17526
2019-01-30 17:26:25 +00:00
Cosmin Sabou
bf63534551 Merge mozilla-inbound to mozilla-central. a=merge 2019-01-29 12:01:56 +02:00
Francesco Lodolo (:flod)
93f6016f91 Bug 1523243 - Update URLs in LEO searchplugin, remove Romansh variant r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D17803
2019-01-28 16:54:41 +00:00