This is a first stab at the new tokenizer.
It's not expected to be perfect yet, but good enough to be modified and replace the existing code in unifiedComplete with just a few modifications.
It's mostly intended to start setting up a code and tests structure.
Differential Revision: https://phabricator.services.mozilla.com/D2838
--HG--
extra : moz-landing-system : lando
Some Gtk+ themes use non-rectangular toplevel windows. To fully support
such themes we need to make toplevel window transparent with ARGB visual
and make background of toplevel window transparent.
It may cause performance issue so let's disable it by default and
put it under a preference to allow distros to enable it per default theme.
Depends on D4665
Differential Revision: https://phabricator.services.mozilla.com/D4667
--HG--
extra : moz-landing-system : lando
The browser_all_files_referenced.js test partly relies on finding chrome
and resource urls in the libxul binary, but with LTO, clang actually
replaces AssignASCII calls to inline copies using immediate values, like
this:
movabsq $0x726573776f72622f, %rcx
movq %rcx, 0x8(%rax)
movabsq $0x2f3a656d6f726863, %rcx
movq %rcx, (%rax)
Those immediate values are, respectively, "/browser" and "chrome:/".
Somehow, the aboutNetError-new url is the only one where that causes
problems, which is kind of surprising, in a sense. It's also in a
special position, being temporary until aboutNetError is actually
replaced and the new about:certerror rides the train. Chances are, if we
add an exception for aboutNetError-new in the
browser_all_files_referenced.js test itself, it would remain there after
the new about:certerror rides the train.
However, using the somehow circumvoluted Assign(NS_LITERAL_CSTRING())
construct, we can prevent clang from LTOing the string into pieces. And
there are better chances the code will go away when the new
about:certerror rides the train.
Differential Revision: https://phabricator.services.mozilla.com/D5017
This patch contains a set of changes needed to add WEBEXT telemetry probes keyed by addon id.
The telemetry probes keyed by addon id has been added as separate telemetry histograms
named after the related generic WEBEXT probe with the additional "_BY_ADDONID" suffix.
A set of small helper methods have been defined in a new ExtensionTelemetry object, exported
by the ExtensionUtils.jsm.
Differential Revision: https://phabricator.services.mozilla.com/D4437
--HG--
extra : moz-landing-system : lando
This has two parts:
(1) urlbar already had a formatValue method. Right now, it only does the URL formatting (domain highlighting, crossing out https for mixed content pages) that we do when the urlbar is not focused. This patch generalizes that method into a kind of "any formatting you want to do, do it here" method, and it adds alias formatting.
formatValue is called by the base autocomplete binding when `value` is set. So it's called when the selection in the popup changes and the autocomplete controller subsequently sets the input value. (It's also called by urlbar on focus and blur.) And if anyone else sets the value directly, it'll be called then too of course.
But it's not called when you're just typing in the input, so I added a call in urlbar.onResultsAdded, where we were calling highlightSearchAlias, to handle the first heuristic result being added or modified as a result of what you type.
So I think that should cover all possible times we need to highlight the alias?
(2) Just looking at the selected result to get the alias in the input doesn't work all the time. If you click a search tile on newtab and then key around in the popup, sometimes when you key down to the one-off buttons, the input value reverts to the alias (it's the user-typed value I guess?), but at the time that the value setter is called during the revert, the popup's selected index is still the last selection in the popup. IOW the selected index doesn't match up with what's in the input.
Rather than deal with that, it seems safer to call PlacesSearchAutocompleteProvider.findMatchByAlias() on the first word in the input. But that has a couple of problems. It's async, and I noticed there can be a slight delay in the highlighting appearing. Also, we've already gotten the information returned by that method, when we generated the results in the first place, so it seems inelegant to call it again.
So what I've done instead is to cache aliases in the popup when results are added, and then just look up the first word in the input in these aliases. We shouldn't reset this cache until the first result of a new search comes in.
Differential Revision: https://phabricator.services.mozilla.com/D3850
--HG--
extra : moz-landing-system : lando
Also remove a useless line that looks like some debugging code I accidentally left in.
Differential Revision: https://phabricator.services.mozilla.com/D5059
--HG--
extra : moz-landing-system : lando
nsISHEntry.index is readonly, but if you pass `true` as getEntryAtIndex()'s
second argument, nsISHEntry.index will be modified. This is pretty gross.
This patch changes `index` so it's not readonly (because it's not!) and removes
getEntryAtIndex()'s second argument.
--HG--
extra : rebase_source : c519d77fcc1c3bda2f260b5888ce9cd0f6cfdab5
This switches send-tab to use the new FxA "device commands" feature
by default, rather than the old sync client commands channel.
Differential Revision: https://phabricator.services.mozilla.com/D4892
--HG--
extra : moz-landing-system : lando
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().
Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.
FormAutofillStorage can be improved if there are complex use cases for it.
Differential Revision: https://phabricator.services.mozilla.com/D4420
--HG--
extra : moz-landing-system : lando
It turns out nsSecureBrowserUIImpl is considerably more complicated than it
needs to be. This patch reimplements it in terms of OnLocationChange only, which
is all it needs to produce the same behavior as before.
Differential Revision: https://phabricator.services.mozilla.com/D3548
--HG--
extra : moz-landing-system : lando
We're ending up in a case here where document.activeElement is null in
browser.xhtml but it's a <browser> tag in browser.xul.
We'll need more analysis and testing to decide if we want the HTML or XUL
activeElement behavior, and then adjust as needed. But in the meantime,
this unbreaks a bunch of browser.xhtml tests and is a safe null check in
both cases.
Differential Revision: https://phabricator.services.mozilla.com/D4705
--HG--
extra : moz-landing-system : lando
The pagehide handler has been as dead as a doornail for a while now,
but the side-effect of forcing the creation of an about:blank document
in non-remote windows was implicitly relied upon by some tests.
This removes the dead code and fixes up some tests.
Differential Revision: https://phabricator.services.mozilla.com/D4962
--HG--
extra : moz-landing-system : lando
This avoids the conflict with cmd-enter/click to open links in new tabs on
macOS. It also removes support for the use of `shift` to complete to '.net',
and allows users to toggle a pref to turn off `ctrl` support on all OSes.
Differential Revision: https://phabricator.services.mozilla.com/D2604
--HG--
extra : moz-landing-system : lando
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().
Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.
FormAutofillStorage can be improved if there are complex use cases for it.
Differential Revision: https://phabricator.services.mozilla.com/D4420
--HG--
extra : moz-landing-system : lando
It turns out nsSecureBrowserUIImpl is considerably more complicated than it
needs to be. This patch reimplements it in terms of OnLocationChange only, which
is all it needs to produce the same behavior as before.
Differential Revision: https://phabricator.services.mozilla.com/D3548
--HG--
extra : moz-landing-system : lando
extension.getViews() returns all windows whose context.active property
is true. In an upcoming commit, this "active" property will no longer be
set to false upon pagehide (which is a bit too early, since the window
has not unloaded yet), but set to false if the window is truly unloaded
(or frozen in the bfcache).
In the extension.getViews() test, the parts that close the popup or tab
should not immediately resume the test, but wait until the window in the
extension process has unloaded. Otherwise there is a rare chance that
extension.getViews() will return the window that was expected to be
closed, which results in a test failure.
Differential Revision: https://phabricator.services.mozilla.com/D4992
--HG--
extra : moz-landing-system : lando
Use tab.setAttribute instead of tab.setUserContextId, in case the XBL
bindings are not ready yet.
Differential Revision: https://phabricator.services.mozilla.com/D5013
--HG--
extra : moz-landing-system : lando
The container tab indicator should also be set on the tab, not just on
the browser. Otherwise it is possible for the indicator to be missing
when a new window is opened.
And previously, if the URL was an "about:blank" URL, the tab in the new
window would use the default container because of the early return in
_handleURIToLoad. This is fixed by accounting for window.arguments[6]
when initializing the default (about:blank) tab in the tabbrowser.
Unit tests for these code path will be added in bug 1393570.
Differential Revision: https://phabricator.services.mozilla.com/D4920
--HG--
extra : moz-landing-system : lando
This allows screen reader users to determine the context of various controls when tabbing through them.
Specific changes:
1. Describe the "Cookies and Site Data" group using the disk space indicator; e.g. "Your stored cookies, site data and cache are currently using 315 MB of disk space."
2. Associate the description for the "Content Blocking" group; i.e. "Block third-party content, like ads or code..."
3. Correct association of the label for the "Do Not Track" setting; i.e. 'Send websites a “Do Not Track” signal that you don’t want to be tracked'
4. Associate the label for the "Permissions" group.
5. Make each permission a labelled group so the user knows what the various "Settings…" buttons are for.
6. Associate the label for the "Data Collection and Use" group.
Differential Revision: https://phabricator.services.mozilla.com/D4638
--HG--
extra : moz-landing-system : lando
replaceTabsWithWindow calls replaceTabWithWindow to create a new window window with a first tab.
But unlike the later function, the former cited function don't take an object param (aOptions) containing informations such as the mouse position (which helps set the new window position).
To adress the issue, we added support for passing an option param to replaceTabsWithWindow which just transferts the param to replaceTabWithWindow.
Differential Revision: https://phabricator.services.mozilla.com/D4735
--HG--
extra : moz-landing-system : lando
This does a few things that should help:
(1) Run the timeout only after resize events have stopped.
(2) Increase the timeout from 30ms to 100ms. It doesn't need to be so fast.
(3) Add a parameter to formatValue that bypasses actually formatting the value and instead only ensures the host is visible. There's no need in this case to keep removing the formatting and then adding it back. Having a "formatValue" method take a parameter to skip formatting is kind of weird, though. At first I tried factoring out the make-host-visible part, but that requires also factoring out all the logic that determines whether the value is a formattable URL, and that ended up being ugly. I'm open to better ideas.
Based on an earlier patch by Marco Bonardo <mbonardo@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D4502
--HG--
extra : moz-landing-system : lando
Enable globally by default by blacklist directories outside of the ones we're enabling. Remove now unnecessary existing configurations.
Differential Revision: https://phabricator.services.mozilla.com/D4440
--HG--
extra : moz-landing-system : lando
Automatic changes by ESLint, except for manual corrections for .xml files.
Differential Revision: https://phabricator.services.mozilla.com/D4439
--HG--
extra : moz-landing-system : lando
Explicitly specify which load we're waiting for to avoid intermittent oranges
Differential Revision: https://phabricator.services.mozilla.com/D4692
--HG--
extra : moz-landing-system : lando
This stops us from showing a pending space when an icon is added after loading is
complete causing us to shift the title when both pending and previous icon are
shown.
Differential Revision: https://phabricator.services.mozilla.com/D4694
--HG--
extra : moz-landing-system : lando
Two cases were hiding permanently failing tests. I've commented those out and
filed bug 1487431.
Differential Revision: https://phabricator.services.mozilla.com/D4680
--HG--
extra : rebase_source : 232fa6173de8844a9c47d59926ec8e39d0640ecd
This restores the previous behavior where we set the selection only when setting a new different value
Differential Revision: https://phabricator.services.mozilla.com/D4528
--HG--
extra : moz-landing-system : lando
The fix in bug 1418793 accidentally removed the onCloseWindow call, which
meant we were setting `.enabled` on taskbar window objects whose windows
were already dead, which was causing crashes.
I've reverted the removal, and also added some nullchecking, because the
C++ component shouldn't make it this easy for consumers to cause crashes.
Differential Revision: https://phabricator.services.mozilla.com/D4559
--HG--
extra : moz-landing-system : lando
This does a few things that should help:
(1) Run the timeout only after resize events have stopped.
(2) Increase the timeout from 30ms to 100ms. It doesn't need to be so fast.
(3) Add a parameter to formatValue that bypasses actually formatting the value and instead only ensures the host is visible. There's no need in this case to keep removing the formatting and then adding it back. Having a "formatValue" method take a parameter to skip formatting is kind of weird, though. At first I tried factoring out the make-host-visible part, but that requires also factoring out all the logic that determines whether the value is a formattable URL, and that ended up being ugly. I'm open to better ideas.
Based on an earlier patch by Marco Bonardo <mbonardo@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D4502
--HG--
extra : moz-landing-system : lando
In the Pocket dropdown, the Tag input field has an auto-complete. In the case
that the user is enrolled in a A/B experiment, a "Send to Phone" section will
be added to the panel. The tag auto-complete field, when active, appears
behind the experiment section.
Differential Revision: https://phabricator.services.mozilla.com/D4580
--HG--
extra : moz-landing-system : lando
This adds a simple empty box that is displayed when we're still loading an icon
but are no longer showing the throbber. Ideally I'd like to keep showing the
throbber and maintain the busy state but that seems more risky for now.
Differential Revision: https://phabricator.services.mozilla.com/D2364
--HG--
extra : moz-landing-system : lando