Commit graph

4496 commits

Author SHA1 Message Date
James Teh
3676e15738 Bug 1436086: Implement keyboard navigation for the main and Bookmarks toolbars. r=Gijs
Having separate tab stops for every toolbar control results in an unmanageable number of tab stops.
Therefore, we group several buttons under a single tab stop and allow movement between them using left/right arrows.
However, text inputs use the arrow keys for their own purposes, so they need their own tab stop.
There are also groups of buttons before and after the URL bar input which should get their own tab stop.
The subsequent buttons on the toolbar are then another tab stop after that.

Tab stops for groups of buttons are set using the <toolbartabstop/> element.
This element is invisible, but gets included in the tab order.
When one of these gets focus, it redirects focus to the appropriate button.
This avoids the need to continually manage the tabindex of toolbar buttons in response to toolbarchanges.

Navigation to for the View site information button and notification anchors is now managed by this new framework.
As such, they no longer need their own position in the tab order and the CSS has been tweaked accordingly.

For now, this new functionality is behind a pref (browser.toolbars.keyboard_navigation) which is currently disabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D15060

--HG--
extra : moz-landing-system : lando
2019-02-13 22:51:06 +00:00
Cosmin Sabou
ea11387364 Backed out changeset a14a11bf2d6f (bug 1436086) for eslint failure on browser_toolbarButtonKeyPress.js. CLOSED TREE 2019-02-13 15:35:34 +02:00
James Teh
356adc5d97 Bug 1436086: Implement keyboard navigation for the main and Bookmarks toolbars. r=Gijs
Having separate tab stops for every toolbar control results in an unmanageable number of tab stops.
Therefore, we group several buttons under a single tab stop and allow movement between them using left/right arrows.
However, text inputs use the arrow keys for their own purposes, so they need their own tab stop.
There are also groups of buttons before and after the URL bar input which should get their own tab stop.
The subsequent buttons on the toolbar are then another tab stop after that.

Tab stops for groups of buttons are set using the <toolbartabstop/> element.
This element is invisible, but gets included in the tab order.
When one of these gets focus, it redirects focus to the appropriate button.
This avoids the need to continually manage the tabindex of toolbar buttons in response to toolbarchanges.

Navigation to for the View site information button and notification anchors is now managed by this new framework.
As such, they no longer need their own position in the tab order and the CSS has been tweaked accordingly.

For now, this new functionality is behind a pref (browser.toolbars.keyboard_navigation) which is currently disabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D15060

--HG--
extra : moz-landing-system : lando
2019-02-13 11:18:45 +00:00
Thomas Nguyen
85ce5ab061 Bug 1517703 - Part 2 - Use ReferrerInfo in loadURIOptions from js r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D17922

--HG--
extra : moz-landing-system : lando
2019-02-12 19:35:24 +00:00
Mike Conley
5e922d0885 Bug 1523648 - Remove BUSY_TAB_ABANDONED probe and tests. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D19165

--HG--
extra : moz-landing-system : lando
2019-02-08 19:41:42 +00:00
Mark Striemer
911fb7280f Bug 1500147 - Part 3: Record add-on manager telemetry for page/browser actions r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D18003

--HG--
extra : moz-landing-system : lando
2019-02-07 16:43:02 +00:00
Brian Grinstead
04c18529e4 Bug 1487065 - Implement popup-notification as a Custom Element r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D17699

--HG--
rename : toolkit/content/widgets/notification.xml => toolkit/content/widgets/popupnotification.js
extra : moz-landing-system : lando
2019-02-07 22:16:26 +00:00
Oriol Brufau
9a121796e0 Bug 1522820 - Disable browser action's "Remove Extension" if the addon can't be uninstalled. r=Felipe
Differential Revision: https://phabricator.services.mozilla.com/D18493

--HG--
extra : moz-landing-system : lando
2019-02-06 17:18:32 +00:00
Mark Banner
ce5822c6c9 Bug 1525429 - Port function for stripping unsafe protocols when pasting to QuantumBar. r=dao
Depends on D18751

Differential Revision: https://phabricator.services.mozilla.com/D18840

--HG--
rename : browser/components/urlbar/tests/legacy/browser_removeUnsafeProtocolsFromURLBarPaste.js => browser/components/urlbar/tests/browser/browser_removeUnsafeProtocolsFromURLBarPaste.js
extra : moz-landing-system : lando
2019-02-06 17:29:23 +00:00
Andrew Swan
f527f0e6ff Bug 1504056 Part 1: Refactor AddonManager.getInstallForURL() arguments r=kmag
AddonManagergetInstallForURL() has a number of optional arguments, most
of which are passed infrequently.  Convert them from positional arguments
to a single options object.

Differential Revision: https://phabricator.services.mozilla.com/D18475

--HG--
extra : rebase_source : 503c09b54fab90cefe69286b05def43ef70074df
2019-02-01 15:23:55 -08:00
Johann Hofmann
d59d079e47 Bug 377496 - Improve auth dialog blocking heuristics. r=MattN
The fix in bug 1312243 introduced a maximum of three consecutive cancelations (controlled by a pref) that a user could perform until Firefox would prevent the page from showing more dialogs.

This, in my opinion, is a great idea. The implementation, however, has a major fallacy: It checks the inner window id in the well-meaning attempt to find user navigation or reloads and clears its internal counter when that window id changes. Unfortunately this also clears the counter on non-user-initiated navigations and reloads. I believe that the true intention of the patch was to cancel the auth dialog after 3 attempts, except if:

- The user reloads the page on their own terms
- The user navigates to a different site on their own

Which is what I plan to implement, using the same pattern we applied to implement temporarily blocked site permissions:

- Temporarily store basic auth counter state on the browser object, as a map from baseDomain (eTLD+1) to number of cancellations
- Reset this state only on user initiated reload
- Reset the counter for a domain if the user has entered login data into the dialog and submitted

This would mitigate the DOS issue while hopefully not breaking any sites that rely on basic auth.

Differential Revision: https://phabricator.services.mozilla.com/D18019

--HG--
extra : moz-landing-system : lando
2019-02-03 19:42:19 +00:00
Ricky Rosario
9f5268b75e Bug 1521629 - Port search() to UrlbarInput.jsm r=dao
MozReview-Commit-ID: 70RV8IdoAKc

Differential Revision: https://phabricator.services.mozilla.com/D18381

--HG--
extra : moz-landing-system : lando
2019-02-02 16:33:57 +00:00
Mike de Boer
481ae95c00 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

--HG--
rename : netwerk/base/nsIBrowserSearchService.idl => toolkit/components/search/nsISearchService.idl
extra : moz-landing-system : lando
2019-02-02 11:27:21 +00:00
Andrea Marchesini
5a909353eb Bug 1522210 - Fingerprinting and cryptomining classifiers must have separate nsIWebProgressListener blocking state codes - part 6 - fingerprinting, r=ehsan,johannh
Differential Revision: https://phabricator.services.mozilla.com/D17640
2019-01-30 14:01:05 +01:00
Dave Townsend
5d41d30a08 Bug 1518632: Show the first-run experience for users that get pushed to a new profile. r=Gijs, r=flod, r=stomlinson
On startup of a fresh dedicated profile show a welcome page and a modal dialog
to explain what has happened.

--HG--
extra : rebase_source : 1505cf27f900070debc1f9e1c71ec4bef3bc099d
extra : source : 05200c5388b4f7adc4414268727458515d7b9ed9
2019-01-30 11:31:13 -08:00
Coroiu Cristina
98ec0ea927 Backed out 7 changesets (bug 1518632, bug 1463198, bug 1455707, bug 1522934, bug 1322797, bug 1474285) for build bustages at /builds/worker/workspace/build/src/toolkit/xre/nsAppRunner.cpp on a CLOSED TREE
Backed out changeset 82355ab7e063 (bug 1455707)
Backed out changeset b965981c9ce0 (bug 1463198)
Backed out changeset 21a801ca5f6d (bug 1455707)
Backed out changeset 05200c5388b4 (bug 1518632)
Backed out changeset ebcd8225434a (bug 1522934)
Backed out changeset e69cac07b209 (bug 1474285)
Backed out changeset 35af79575f54 (bug 1322797)
2019-01-31 03:34:49 +02:00
Dave Townsend
93581af510 Bug 1518632: Show the first-run experience for users that get pushed to a new profile. r=Gijs, r=flod, r=stomlinson
On startup of a fresh dedicated profile show a welcome page and a modal dialog
to explain what has happened.

--HG--
extra : rebase_source : a033baf831aa8b9fcfa95d1f921364632a837390
2019-01-30 11:31:13 -08:00
Myk Melez
25349d2601 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

--HG--
extra : moz-landing-system : lando
2019-01-30 17:26:25 +00:00
Cosmin Sabou
599a15d354 Merge mozilla-inbound to mozilla-central. a=merge 2019-01-29 12:01:56 +02:00
Shane Caraveo
e8915eda78 Bug 1515701 show addons disabled doorhanger in private browsing, r=Gijs,flod
Differential Revision: https://phabricator.services.mozilla.com/D15445

--HG--
extra : moz-landing-system : lando
2019-01-29 01:39:37 +00:00
Mike Conley
d257d1d3f5 Bug 1277060 - Ensure the URL bar gets cleared if Home button sends us to an initial page. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D17408

--HG--
extra : moz-landing-system : lando
2019-01-28 21:24:00 +00:00
Dão Gottwald
f4f4709dc2 Bug 1522502 - Support displaying about:reader URLs. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17510

--HG--
extra : moz-landing-system : lando
2019-01-24 19:43:37 +00:00
Dão Gottwald
535429cd1f Bug 1522529 - Remove focus hack from the gURLBar getter and properly implement UrlbarInput focus and blur methods. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D17521

--HG--
extra : moz-landing-system : lando
2019-01-24 16:49:41 +00:00
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Johann Hofmann
ad87a838f7 Bug 1492498 - Make certificate exceptions on the new cert error pages permanent by default. r=nhnt11,keeler
This includes a new test for the feature and a bit of test cleanup to factor
out all exception related tests into their own test file.

Differential Revision: https://phabricator.services.mozilla.com/D17109

--HG--
rename : browser/base/content/test/about/browser_aboutCertError.js => browser/base/content/test/about/browser_aboutCertError_exception.js
extra : moz-landing-system : lando
2019-01-23 16:59:12 +00:00
Mark Banner
2ed2cfee12 Bug 1521719 - Stop the legacy urlbar binding being constructed and registering listeners when QuantumBar is enabled. r=dao
As a result, we can also re-enable some tests running against QuantumBar.

Differential Revision: https://phabricator.services.mozilla.com/D17352

--HG--
extra : moz-landing-system : lando
2019-01-23 16:15:34 +00:00
Dão Gottwald
63d3b24a1b Bug 1521783 - Let typeRestrictToken focus the address bar. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D17239

--HG--
extra : moz-landing-system : lando
2019-01-22 16:40:12 +00:00
Harry Twyford
70df5bbf20 Bug 1313429 - Add Touch Bar functionality to Firefox r=spohl,mikedeboer,flod
Adds Touch Bar functionality to Firefox across eight commits.

Differential Revision: https://phabricator.services.mozilla.com/D5496

--HG--
extra : moz-landing-system : lando
2019-01-22 17:13:33 +00:00
Ehsan Akhgari
4137a92662 Bug 1514340 - Part 2: Break out the content blocking related notifications into nsIWebProgressListener.onContentBlockingEvent(); r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D16052
2019-01-21 09:58:50 -05:00
Tim Nguyen
60a5143df0 Bug 1241885 - Implement support for -moz-window-dragging in GTK and remove toolkit toolbar-drag binding. r=dao,bzbarsky,stransky
The restriction preventing fullscreen windows from being dragged is removed.

Differential Revision: https://phabricator.services.mozilla.com/D15075

--HG--
extra : moz-landing-system : lando
2019-01-18 22:42:24 +00:00
Andreea Pavel
95431afe85 Backed out 1 changesets (bug 1241885) for build bustages on a CLOSED TREE
Backed out changeset 176be7000d33 (bug 1241885)
2019-01-18 23:49:55 +02:00
Tim Nguyen
495df7ddea Bug 1241885 - Implement support for -moz-window-dragging in GTK and remove toolkit toolbar-drag binding. r=dao,bzbarsky,stransky
The restriction preventing fullscreen windows from being dragged is removed.

Differential Revision: https://phabricator.services.mozilla.com/D15075

--HG--
extra : moz-landing-system : lando
2019-01-18 16:51:08 +00:00
Drew Willcoxon
7efd7f75c9 Bug 1518031 - Update "Add Search Engine" page action image when search engine icon becomes available. r=mossop
We can just add `onLinkIconAvailable` to `TabsProgressListener` in browser.js and update the search badge.

Differential Revision: https://phabricator.services.mozilla.com/D16590

--HG--
extra : moz-landing-system : lando
2019-01-17 17:29:18 +00:00
Mark Banner
1619ba50da Bug 1520336 - Removed unused 'where' parameter from BrowserSearch.recordOneoffSearchInTelemetry. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D16617

--HG--
extra : moz-landing-system : lando
2019-01-16 01:21:24 +00:00
Christoph Kerschbaumer
6756032512 Bug 1513241: Update frontend consumers of loadURI and pass loadURIOptions dictionary. r=gijs 2019-01-11 12:44:20 +01:00
Gijs Kruitbosch
3da0062d36 Bug 1502179 - don't treat closing last non-popup window as quitting when a popup window is still open (on Windows/Linux), r=jaws,mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D15408

--HG--
extra : moz-landing-system : lando
2019-01-07 19:26:17 +00:00
Rob Wu
d501cbec73 Bug 1501244 - Preserve privateBrowsingId OA when userContextId is set r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D9535

--HG--
extra : moz-landing-system : lando
2018-10-24 21:23:17 +00:00
Timothy Guan-tin Chien
bd38b39f8a Bug 1512048 - Convert tabmodalprompt binding to JSM module r=Gijs
This converts the tabmodalprompt binding to a class, to be constructed along side with the element
by TabModalPromptBox.

TabModalPromptBox will keep the instances in a map and pass it to the callers, instead of the element.
The tests and callers can access the class instance by passing the element reference to the map.

Differential Revision: https://phabricator.services.mozilla.com/D15505

--HG--
rename : toolkit/components/prompts/content/tabprompts.xml => toolkit/components/prompts/content/tabprompts.jsm
extra : moz-landing-system : lando
2019-01-04 19:29:34 +00:00
Gijs Kruitbosch
ccfd35873f Bug 1514724 - define script getters in the browser instead of via a module and iterating over windows, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D14805

--HG--
extra : rebase_source : e146dfb7df7626abcd38cd6d44c6fed1523cb111
2018-12-28 11:27:59 +00:00
Razvan Maries
e048f91e8e Merge mozilla-inbound to mozilla-central a=merge 2018-12-24 23:50:58 +02:00
Paolo Amadini
24c49f1473 Bug 1466817 - The "Edit Pop-up Blocker Options/Preferences" command should open the in-content preferences. r=jaws
Instead of opening the pop-up permissions dialog with the origin already populated, this command now highlights the pop-up permission row in the preferences. This doesn't remove any functionality because the only action that would be available for the origin in the permissions dialog is "Allow", which is equivalent to the "Allow pop-ups for" command in the notification bar menu.

Differential Revision: https://phabricator.services.mozilla.com/D15066

--HG--
extra : rebase_source : 064b3d39dc2a8c4d6a3c0949a51ab361ed6e71dd
2018-12-23 20:52:15 +00:00
James Teh
3ce66961cd Bug 1509767: Support keyboard activation (space/enter) of the Back/Forward buttons when focused. r=Gijs
When focused, the Back and Forward buttons previously couldn't be activated by pressing space or enter.
Although they do have a command event handler, they have type="menu", which means the command event is not fired for key presses by default.
Since these buttons are special (in that they have type="menu" and a command event), this change implements specific keyboard behavior for these buttons.

Differential Revision: https://phabricator.services.mozilla.com/D12868

--HG--
extra : moz-landing-system : lando
2018-12-20 05:33:32 +00:00
Dão Gottwald
b77881e30c Bug 1516130 - Accel+K shouldn't focus and modify the read-only address bar in popups. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D15260

--HG--
extra : moz-landing-system : lando
2018-12-24 14:50:38 +00:00
Abdelrhman Ahmed
3823488bec Bug 1475670: Optimizing the code inside ContentBlocking. r=johannh 2018-12-18 11:18:13 +02:00
Mike Conley
351f5497f6 Bug 1503796 - Convert XPCOM arrays and strings from nsBrowserContentHandler to JS arrays and strings earlier when opening browser windows. r=Gijs
This also makes it so that the initial browser tab setup code can handle a JS array
as the URI(s) to load during start-up. If it's an array, the first element of that
array is inspected to determine what process type the initial browser tab should
be in.

Differential Revision: https://phabricator.services.mozilla.com/D14755

--HG--
extra : moz-landing-system : lando
2018-12-17 21:21:57 +00:00
Tim Huang
1e2c28f939 Bug 1446472 - Part 1: Showing the identity block icon for canvas permission without the doorhanger when canvas extraction is auto detected. r=baku,Gijs
For a better user experience of auto-blocking canvas extraction, this
patch changes the behavior when detecting a canvas extraction without
user interaction. It will show a canvas identity block icon with a
hidden doorhanger when auto-blocking the canvas extraction. Users can
make their choice to either block or allow the canvas extraction by
clicking the identity block icon and then refresh the page to make
the canvas permission taking effect.

Differential Revision: https://phabricator.services.mozilla.com/D14259

--HG--
extra : moz-landing-system : lando
2018-12-16 21:30:59 +00:00
Dão Gottwald
a2bda7b56d Bug 1514151 - Consistently use arrow functions and destructuring assignments in XPCOMUtils.defineLazyGetter calls from browser.js. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D14532

--HG--
extra : moz-landing-system : lando
2018-12-14 19:46:58 +00:00
Dão Gottwald
0afe87a2cf Bug 1513827 - Let toolbar context menu handle nodes without ids. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D14390

--HG--
extra : moz-landing-system : lando
2018-12-13 14:53:18 +00:00
Dão Gottwald
d0b805fc67 Bug 1513845 - Stop using XPCOMUtils.defineLazyGetter for gNavigatorBundle. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D14391

--HG--
extra : moz-landing-system : lando
2018-12-13 12:34:40 +00:00
Dão Gottwald
84a61fb2d2 Bug 1513508 - Clean up Object.defineProperty calls in browser.js. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D14241

--HG--
extra : moz-landing-system : lando
2018-12-12 13:40:06 +00:00