This patch ultimately overrides the user-agent which Fennec users send to Google Search pages, choosing a phone- or tablet-specific UA as appropriate.
It involves adding four new metadata keys to the webcompat addon's metadata for user-agent overrides: blocks, permanentPref, experiment, telemetryKey:
- "blocks" specifies URLs for which any requests should be aborted. This allows us to block the Google service worker for now, as it has caused "content corrupted" issues in the past with other enhanced search addons (see https://github.com/wisniewskit/google-search-fixer/issues/1).
- "permanentPref" specifies an about:config preference, which dictates whether the injection is used. Users may set this to `false` to disable the injection outright, and permanently; `true` or `undefined` values allow the injection to function normally.
- "experiment" specifies the name of the experiment this feature is optionally gated behind. Only a Fennec-specific implementation is provided in this patch. The implementation simply queries Switchboard to determine if the experiment is active.
- "telemetryKey" specifies which telemetry key should be flipped to "true" when this injection runs. We will use this to note whether enhanced search has actually been enabled for this profile. Only a Fennec-specific implementation is given in this patch, which actually just sets a Fennec Shared Preference, which Fennec's core telemetry ping later reads in Java to know what the ping should contain.
Differential Revision: https://phabricator.services.mozilla.com/D41074
--HG--
extra : moz-landing-system : lando
When returning from being backgrounded, GeckoView Example was trying to restore a `TabSession`, but only the underlying `GeckoSession` was being saved, resulting in a `ClassCastException` on restore.
Differential Revision: https://phabricator.services.mozilla.com/D41754
--HG--
extra : moz-landing-system : lando
Android artifacts (GeckoView AARs, GeckoViewExample (and Fennec) APKs)
require native libraries (`libxul.so`) and an omnijar (`omni.ja`).
These are produced by `mach package` (really, the `stage-package`
target). Engineers essentially never want a build without a package
for mobile/android. This adds mobile/android-only tiers that run
`mach package` and then `mach android assemble-app`. The latter
consumes `libxul.so` and `omni.ja` to produce _all the things_
relevant to GeckoView engineers.
Differential Revision: https://phabricator.services.mozilla.com/D41450
--HG--
extra : moz-landing-system : lando
This changes provide basic support for webextenion tabs and webNavigation listeners by implementing missing objects on which Fennec implementation was relying.
Differential Revision: https://phabricator.services.mozilla.com/D36575
--HG--
extra : moz-landing-system : lando
Bug 1534451 added a non-trivial amount of background computation during
onCreate. This introduced regressions by tickling the balance of existing
race conditions.
We're changing this by now uploading in onStart. Ideally we want to send
this mobile activation ping at least once from every client at startup. This change
should have minimal impact and keep the same consistency with the core ping.
Differential Revision: https://phabricator.services.mozilla.com/D41980
--HG--
extra : moz-landing-system : lando
This was originally added in bug 1428459 to separate system add-on updates from app updates, but the pref only made it to desktop and not mobile.
Differential Revision: https://phabricator.services.mozilla.com/D41795
--HG--
extra : moz-landing-system : lando
The remaining uses all need adjustements to in-tree mozconfigs, so they
all need to be done at once.
However, to make things slightly more intelligible, we do this in two
steps. This is step 1: we modify the use_toolchain transform to take care of
the transformation, while keeping the task definitions intact, so that
we only deal with mozconfig and build script adjustements here.
Differential Revision: https://phabricator.services.mozilla.com/D41890
When working on GeckoView, there's no need to produce a Fennec APK.
This commit avoids doing that work at `mach package` time. There are
many other things we'd like to stop doing as we remove Fennec from the
tree, so we add a general flag to guard such things.
Depends on D41447
Differential Revision: https://phabricator.services.mozilla.com/D41448
--HG--
extra : moz-landing-system : lando
Converts zoom.maxPercent and zoom.minPercent to static prefs, which creates a new "zoom" category on StaticPrefList.yaml.
Differential Revision: https://phabricator.services.mozilla.com/D41835
--HG--
extra : moz-landing-system : lando
Converts font.size.inflation.minTwips, font.size.inflation.emPerLine, and font.size.inflation.mappingIntercept to static prefs and removes their associated functions from nsLayoutUtils. There are associated member variables in PresShell, but since documentation specified that these variables are set specifically to prevent changes to the cache from being read until page reload, I made the decision to leave these and set them to the static prefs.
Differential Revision: https://phabricator.services.mozilla.com/D41656
--HG--
extra : moz-landing-system : lando
Right now, there are a lot of things that race to complete before
Gecko creates or first reads the profile. One of those things is
extracting system addons (the `assets/features/` directory of the APK)
to disk, ready for the Gecko profile code to enumerate them.
Bug 1534451 added a non-trivial amount of background
computation during `onCreate`. This tickled the existing race
conditions such that system addon extraction frequently loses the
race, making system addons unreliable.
In addition, for reasons unknown, `PostUpdateHandler` did its work
during `onStart`. But the Gecko profile was created/first read
earlier, in `onCreate`. This widened the race window.
This commit pulls the update handler into `onCreate`, which is at
least early enough for it to have a chance of winning the race; and it
makes the work synchronous, which is the simplest way to ensure that
it is actually in place before Gecko startup (and profile
creation/first read). Since system addons are our "get out of jail"
card in many situations, the cost of extracting earlier seems like a
good trade-off. That is, I'm sure the early disk access will appear
in profiles, and it may even regress Raptor -- but it's a good
trade-off.
Differential Revision: https://phabricator.services.mozilla.com/D41687
--HG--
extra : moz-landing-system : lando
The main part of the change is the change to ChildSHistory - make it possible to have Go() to be called asynchronously
and also let one to cancel pending history navigations. History object (window.history) can then use either the sync or
async Go(), depending on the dom.window.history.async pref.
LoadDelegate, which is used by GeckoView, needs special handling, since
it spins event loop nestedly. With session history loads and same-document loads we can just
bypass it.
To deal with same-document case, MaybeHandleSameDocumentNavigation is split to IsSameDocumentNavigation,
which collects relevant information about the request and returns true if same-document navigation should happen,
and then later HandleSameDocumentNavigation uses that information to trigger the navigation.
SameDocumentNavigationState is used to pass the information around.
referrer-policy-test-case.sub.js is buggy causing tests to pass only on Firefox with sync history API.
nested-context-navigations-iframe.html.ini is added because of https://bugzilla.mozilla.org/show_bug.cgi?id=1572932
Differential Revision: https://phabricator.services.mozilla.com/D41199
--HG--
extra : moz-landing-system : lando
This also applies the error listener just to the Javadoc tasks
(previously, it applied to the `apiGenerate*` tasks as well, 'cuz they
inherit from `Javadoc`).
Differential Revision: https://phabricator.services.mozilla.com/D41634
--HG--
extra : moz-landing-system : lando
This changes provide basic support for webextenion tabs and webNavigation listeners by implementing missing objects on which Fennec implementation was relying.
Differential Revision: https://phabricator.services.mozilla.com/D36575
--HG--
extra : moz-landing-system : lando
This makes prefs definition simpler, more consistent, and less error-prone.
The patch also changes the form of the "not Android" condition to one used more
widely in all.js.
Differential Revision: https://phabricator.services.mozilla.com/D41299
--HG--
extra : moz-landing-system : lando
It seems like we can't quite decide whether the change log for a version should
grow top-down or bottom-up. hg blame and the numbering of references seems to
somewhat favour the latter, though.
Differential Revision: https://phabricator.services.mozilla.com/D40881
--HG--
extra : moz-landing-system : lando
This issue is race condition of Gecko thread and InputConnection thread.
When inputting `[ENTER]` in VKB, Switftkey generates keyboard event (down and up), then set empty span to current position.
It means that the following occurs.
1. Inserting CR by [ENTER] key event of Swiftkey.
2. Swiftkey sets empty span with current selection position. Then GV sets new selection with it due to adding span.
3. By 1., text and selection are updated, then GV receives new selection position by 1.
4. Selection notification by 2. is received, then selection is back to previous position unfortunately.
Although we should use 1 and 3's selection, GV uses 4's selection since this is last notification. But 2's selection is current selection until we don't update text. So it is unnecessary to set same selection again by 2.
Also, most IMEs don't send key event by 1, and they replace with new text without 1 and 2 So this issue occurs on Switftkey only.
Differential Revision: https://phabricator.services.mozilla.com/D40926
--HG--
extra : moz-landing-system : lando
It seems like we can't quite decide whether the change log for a version should
grow top-down or bottom-up. hg blame and the numbering of references seems to
somewhat favour the latter, though.
Differential Revision: https://phabricator.services.mozilla.com/D40881
--HG--
extra : moz-landing-system : lando
I have landed bug 1527796 to support artifact build on Windows, but after bug 1515248 is landed, it is broken again. Path separator on Windows is '\', not '/'. So we should use leaf name instead.
Differential Revision: https://phabricator.services.mozilla.com/D40758
--HG--
extra : moz-landing-system : lando
This test makes the implicit assumption that the two events cannot happen near
instantaneously, but as evidence from the test results, sometimes they do. This
patch fixes the intermittent by waiting for both events at the same time.
Differential Revision: https://phabricator.services.mozilla.com/D40833
--HG--
extra : moz-landing-system : lando
1. Move all link referneces into single list to make is easier to spot duplicates
2. Remove duplicates
3. Update links that are broken
4. Create variable for javadoc_url so that broken relative paths are not a problem.
5. Add links to changelog entries that did not have them, but should have.
Differential Revision: https://phabricator.services.mozilla.com/D40830
--HG--
extra : moz-landing-system : lando
Before this version, apilint would not include CHANGELOG errors in the json
report. After Bug 1512487 we started ignoring apilint output (and erorr code)
and only consider the json report, so the CHANGELOG erorrs broke.
Updating to 0.2.5 makes it so the CHANGELOG errors are included in the json
report correctly. E.g.:
```
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
384:14 error The api changelog file is out of date. Please update the file
and modify the [api-version] line as follows: [api-version]:
a0b1e88e8bb3045a22c0942d736f4e9b4532bdeb wrong_api_version
(android-api-lint)
```
The apilint fix is here:
9cadbd0686
Differential Revision: https://phabricator.services.mozilla.com/D40655
--HG--
extra : moz-landing-system : lando
This is the first step in making it possible to return remote WindowProxy
objects from window.open() and related APIs.
This patch also incidentally fixes a bug where getContentWindowOrOpenURI
returned the top-level browser window rather than the new content window when
passed OPEN_NEWWINDOW for the `aWhere` parameter. This was not the expected
behavior, and was a potentially major footgun for any new users who expected
to always get the content window for the URL they were loading, rather than
sometimes getting a chrome browser window instead.
For now, that case just returns null, which is only a minor footgun, rather
than the major one we had before.
Differential Revision: https://phabricator.services.mozilla.com/D35688
--HG--
extra : moz-landing-system : lando
It's a pity that Mach's conditions facility can't handle subcommands,
but it's a deep enough limitation that it's not worth addressing for
this patch.
Differential Revision: https://phabricator.services.mozilla.com/D39540
--HG--
extra : moz-landing-system : lando
API lint is arguably the most valuable lint of all, but it's also hard
to fit into the Phab ecosystem, since there's no place to hang the
"API hash not correct" message in the case when the hash hasn't been
updated at all. Therefore, this commit doesn't convert it. See also
https://github.com/mozilla-mobile/gradle-apilint/issues/61 for adding
file/line information to API lint.
Differential Revision: https://phabricator.services.mozilla.com/D35277
--HG--
rename : mobile/android/config/mozconfigs/android-api-16-frontend/nightly => mobile/android/config/mozconfigs/android-api-16/nightly-android-lints
extra : moz-landing-system : lando
It's not worth accommodating all the ways to invoke commands from
Python, so expose the lock itself so that consumers can use
subprocess, Popen, etc as they choose.
Differential Revision: https://phabricator.services.mozilla.com/D35273
--HG--
extra : moz-landing-system : lando
This was Gradle-only and then !Gradle-only. Now Gradle is required
and this is unused.
Differential Revision: https://phabricator.services.mozilla.com/D31381
--HG--
extra : moz-landing-system : lando
Call GeckoThread.onPause() and onResume() on GeckoRuntime lifecycle events.
Differential Revision: https://phabricator.services.mozilla.com/D40078
--HG--
extra : moz-landing-system : lando
This patch augments FxA messages sent to native code with just enough information that we are able
to differentiate between "signin", "signup" and "reconnect" events.
Corresponding Leanplum events are sent on the receiving end of the FxA messages.
Differential Revision: https://phabricator.services.mozilla.com/D39989
--HG--
extra : moz-landing-system : lando
When privacy.spoof_english = 2, we should hide the user's
locale in content. So we use en-US default strings for HTML
form elements, such as a Submit button.
We also force GetLocalizedEllipsis() to always return the
ellipsis used by en-US.
Differential Revision: https://phabricator.services.mozilla.com/D35815
--HG--
extra : moz-landing-system : lando
The URL bar was expanding to cover the tab switcher button, meaning that a new tab could not be navigated to after opening.
This is needed so that members of the Gecko media team can replicate an issue in GVE that causes images not to be displayed in Fenix.
Differential Revision: https://phabricator.services.mozilla.com/D39678
--HG--
extra : moz-landing-system : lando
`layout.reflow.synthMouseMove` was added by Fennec/Maemo era (bug 657844) since this was low-end device. Since `layout.reflow.synthMouseMove` is false even if now, sampling rate of GeckoView's mouse event is still very sparse.
Since today is 2019, so we should change this to match sampling rate of mouse event with desktop.
Differential Revision: https://phabricator.services.mozilla.com/D39278
--HG--
extra : moz-landing-system : lando
This is to ensure that multiple completions cannot be attempted on the same `GeckoResult`, resulting in crashes.
Differential Revision: https://phabricator.services.mozilla.com/D36929
--HG--
extra : moz-landing-system : lando
This paves the way for us to use a dispatcher other than mDispatcher,
which will be useful in the MozPromise integration in the coming
patches.
Differential Revision: https://phabricator.services.mozilla.com/D39090
--HG--
extra : moz-landing-system : lando
This paves the way for us to use a dispatcher other than mDispatcher,
which will be useful in the MozPromise integration in the coming
patches.
Differential Revision: https://phabricator.services.mozilla.com/D39090
--HG--
extra : moz-landing-system : lando
This patch removes nsIClientAuthUserDecision and add another output parameter to nsIClientAuthDialogs.chooseCertificate.
Differential Revision: https://phabricator.services.mozilla.com/D38074
--HG--
extra : moz-landing-system : lando
Now using lastURI instead of principal and now we are using the right functions in order to test permissions.
Differential Revision: https://phabricator.services.mozilla.com/D39190
--HG--
extra : moz-landing-system : lando
This also updates apilint to 0.2.2 to ensure that future instances of this
problem will be caught automatically.
Differential Revision: https://phabricator.services.mozilla.com/D37812
--HG--
extra : moz-landing-system : lando
The cursor was trying to move to first record after it was closed which lead into
IllegalStateException.
In order to avoid this exception, we should simply check if the cursor was already
closed before trying to move to the first record.
Differential Revision: https://phabricator.services.mozilla.com/D38085
--HG--
extra : moz-landing-system : lando
This also updates apilint to 0.2.2 to ensure that future instances of this
problem will be caught automatically.
Differential Revision: https://phabricator.services.mozilla.com/D37812
--HG--
extra : moz-landing-system : lando
There's currently a bug in Android's framework that manifests by placing the
floating menu off-screen if a menu label overflows the menu's width.
https://issuetracker.google.com/issues/137169336
To overcome this we'll manually check and truncate any menu label that could
cause issues based on the floating menu style declared upstream.
Differential Revision: https://phabricator.services.mozilla.com/D37684
--HG--
extra : moz-landing-system : lando
* Add a new optional 'notifySaved' argument to promptToSavePassword
* Give the notification an attention style when showing a login doorhanger for an auto-saved login with a generated password
Differential Revision: https://phabricator.services.mozilla.com/D37661
--HG--
extra : moz-landing-system : lando
Summary:
The share drawable is used in multiple places in code.
Android would cache it and subsequently serve a now dirty version of it with
transformations potentially added.
By mutating it into a new drawable we ensure we'll always have it clean.
Reviewers: VladBaicu
Reviewed By: VladBaicu
Subscribers: emilio
Bug #: 1529557
Differential Revision: https://phabricator.services.mozilla.com/D37734
--HG--
extra : rebase_source : 864946cb3d5a256b26a380fbf6a0cbe70a20ca12
extra : histedit_source : 941d909f040426046d71028b21644d0652fa1238
In bug 1552607/D36382, RemoteDataDecoder always increases session ID but
CodecProxy only performs flush IPC when neccessary. This will cause the
ID numbers out of sync and prevent remote decoder from receiving any
more input. By reading the session ID in dequeued input samples, the
numbers can always be in sync.
Differential Revision: https://phabricator.services.mozilla.com/D37123
--HG--
extra : moz-landing-system : lando
This test is a little slow sometimes and times out (even though nothing is
going wrong). Doubling the timeout seems to be enough.
Differential Revision: https://phabricator.services.mozilla.com/D37673
--HG--
extra : moz-landing-system : lando
Some background information on this change:
DocShell loads about:blank when first starting up. This initial load can be
avoided by setting `nodefaultsrc` on the browser element, but this will still
cause some load events related to `about:blank` to fire anyway, as they are
specified in the DOM spec (see e.g. bz's Comment #2 Bug 1447406). In particular
`onSecurityChange` and `onLocationChange` are still fired, `onPageStart` and
onPageStop` are not.
These messages are unreliable and sometimes do not fire, to unrestand why it's
helpful to look at a timeline of the events when starting up a GeckoSession.
page about:blank ---------------------------------------------------------
nsDocShell --- startup --- onPageStart --- onLocationChange --- onPageStop -----
busyState idle ---------- busy ------------------------------------------ idle-
^ ^ ^ ^ ^
geckoview.js (0) (1) (2) (3) (4)
geckoview.js loads in parallel with nsDocShell startup process (and loading of
about:blank). This means that consumers of GeckoView might start receiving
navigation events at any of the points marked with (0) - (4). E.g. if geckoview
starts up at (4) a consumer waiting for onPageStop for `about:blank` will
actually wait forever (this is what happens before this change for our tests).
As it can be seen there's not really a way to detect in which of the (0) - (4)
state DocShell is when starting up geckoview.js. Checking for the busy state is
not enough as an `idle` busy state might mean that we're in (0) or (4).
Furthermore a consumer of geckoview has no way to know which onPageStop
messages to wait for after an initial loadUri as e.g. the following is what
would happen if geckoview.js happens to startup at (3):
- loadUri(hello.html)
- onPageStop (for about:blank)
- onLoadRequest (for hello.html)
which confuses any code that just waits for onPageStop.
Desktop deals with this in `TabProgressListener.onStateChange` where the
initial `about:blank` navigation is ignored and fake events are triggered at a
convenient time.
To patch implements a very similar behavior for geckoview, we ignore the
initial `about:blank` `onLoadRequest` call, set `nodefaultsrc` so `onPageStart`
and `onPageStop` events don't fire and fire the above calls when the
`GeckoViewProgress` module has finished loading.
This makes `about:blank` events deterministic with the exception of reloading
an empty `GeckoSession`, which will often not fire any extra events. To account
for that we load a dummy html page before the tests that used to rely on this
behavior (which would actually fail occasionally due to the startup race
condition explained above).
This makes the tests pass reliably on x86_64 (20/20 runs passed in try).
Differential Revision: https://phabricator.services.mozilla.com/D32586
--HG--
extra : moz-landing-system : lando
Right now listeners for a given native app receive messages from all
WebExtensions. This is wrong as listeners should be extension specific so that
only the intended extension can send messages to the app.
Differential Revision: https://phabricator.services.mozilla.com/D35948
--HG--
extra : moz-landing-system : lando
Reusing sessions doesn't actually save that much time and avoids a lot of
hard-to-debug intermittents.
Differential Revision: https://phabricator.services.mozilla.com/D32578
--HG--
extra : moz-landing-system : lando
Sometime the geolocation test fails because the position is not retrieved
quickly enough, this is OK as we're just trying to make sure that the
permission is correct.
Differential Revision: https://phabricator.services.mozilla.com/D32576
--HG--
extra : moz-landing-system : lando
Removed OpenH264 plugin from addons list for users that doesn't have it installed.
Differential Revision: https://phabricator.services.mozilla.com/D37237
--HG--
extra : moz-landing-system : lando
Domain highlighting needs to find the *last* instance of the base domain within
the domain part of the URL. Otherwise, there's a chance we mistakenly highlight
(parts of) a subdomain if it matches the base domain, too.
Differential Revision: https://phabricator.services.mozilla.com/D37311
--HG--
extra : moz-landing-system : lando
Used `fitCenter` and`adjustViewBounds` to ensure the images will be scaled to
fit their container while keeping their aspect ratio.
Increased resolution of some images used in the share menu to maths the others'
and also remove some bluriness of the previous' when they are enlarged.
They were losslessly optimized with an average of 18% savings.
Differential Revision: https://phabricator.services.mozilla.com/D37386
--HG--
extra : moz-landing-system : lando
The service would be restarted after System.exit(0) which would show the crash
feedback form again to the user.
That System.exit(0) was initially used to prevent a silent ANR because of the
Service being started from background on Android Oreo+ without a foreground
notification.
To overcome all this we'll also use a foreground notification on Android Oreo+
but with NotificationManager.IMPORTANCE_LOW to be non-intrusive.
Differential Revision: https://phabricator.services.mozilla.com/D36746
--HG--
extra : moz-landing-system : lando
Some tests still disabled due to either test environment weirdness or actual breakage.
Differential Revision: https://phabricator.services.mozilla.com/D36531
--HG--
extra : moz-landing-system : lando
Because IPC call runs asynchronously in both remote decoder process and
content process, ProcessOutput() for buffers prior to Flush() could be
scheduled to run after the flush promise is resolved, and Codec.queueInput()
could be preempted and processes prior sample after flush.
To help check the validness of buffers, a session ID increased by flush
is added to both RemoteDataDecoder and remote codec service and will be
passed through IPC. If the passed ID doesn't agree with current session
ID, it means the buffer doesn't belong to current session and should be
discard.
Differential Revision: https://phabricator.services.mozilla.com/D36382
--HG--
extra : moz-landing-system : lando
Some tests still disabled due to either test environment weirdness or actual breakage.
Differential Revision: https://phabricator.services.mozilla.com/D36531
--HG--
extra : moz-landing-system : lando