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
For content like:
<select>
<optgroup style="overflow: scroll">
<option>
the existing rules would match the <xul:scrollbar> elements that are
generated for the <optgroup>, since they use descendant selectors after
the `select:not([size]):not([multiple])`, even though the intention
(probably!) is to match only the scrollbars created for the <select>
itself.
On Android, we don't actually render <select> elements in the page;
instead we use some system UI popup. So in practice the difference in
rendering here isn't relevant. (It's possible we could remove these
rules entirely.)
Differential Revision: https://phabricator.services.mozilla.com/D36449
--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
We don't run any tests on these builds, since they are just used to
generate the profile data for the final build. We can save some time by
skipping all test related code.
Differential Revision: https://phabricator.services.mozilla.com/D36511
--HG--
extra : moz-landing-system : lando
This patch works around a case where the node that we want to set a11y
focus to is input focused, and the gecko a11y virtual cursor is set to
it.
In gecko a11y we don't have a distinction of hover/a11y focus like in
Android, the virtual cursor is already set to the position through the
explore by touch and sends a HOVER_ENTER to android. An accessibility
service will typically listen for thos events and then explicitly
request a11y focus on the node. Since it is internally already set, it
would result in a no-op and no event will be dispatched.
Differential Revision: https://phabricator.services.mozilla.com/D36141
--HG--
extra : moz-landing-system : lando
Now checking the global view tree observer to see if it's alive in order to unsubscribe from further
notifications.
Differential Revision: https://phabricator.services.mozilla.com/D36485
--HG--
extra : moz-landing-system : lando
Create test entries via update introduces performance overhead.
We can store them directly in LookupCache and do not save test entries
to disk.
Differential Revision: https://phabricator.services.mozilla.com/D34576
--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
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
See https://stackoverflow.com/a/24026735.
Adding the `docs` package requirement is not ideal, but it's not worth
the effort to install it only in automation (or in the relevant task),
and it's not *that* large: 1.0G on my macOS installation.
Differential Revision: https://phabricator.services.mozilla.com/D35834
--HG--
extra : moz-landing-system : lando
If the theme is persisted as an xpi we'll use GeckoJarReader to read get the
image from inside the archive otherwise read it directly.
Differential Revision: https://phabricator.services.mozilla.com/D35808
--HG--
extra : moz-landing-system : lando
According to the documentation -
https://developer.android.com/reference/android/app/Service.html
"The Intent supplied to Context.startService(Intent) may be null if the service
is being restarted after its process has gone away, and it had previously
returned anything except START_STICKY_COMPATIBILITY."
We will ignore the case when the system restarts our Service as we only expect
it to be properly started by us, in the event of a crash.
Differential Revision: https://phabricator.services.mozilla.com/D35790
--HG--
extra : moz-landing-system : lando
Classic deadlock situation possible because getDatabaseHelperForProfile(..)
would lock on [PerProfileDatabase] and then try to on [GeckoProfile] while at
the same time it would be possible for another thread which already had the
[GeckoProfile] lock to call this method and so try to acquire the
[PerProfileDatabase] lock.
The simplest solution to resolve this and the one I went with is to ensure that
one of those threads will not need both locks and it turns out that the
getDatabaseHelperForProfile method can easily be refactored to use only the
GeckoProfile lock, change which would not significantly increase the block of
code synchronized with the same key.
Differential Revision: https://phabricator.services.mozilla.com/D35646
--HG--
extra : moz-landing-system : lando
Fixed an issue where we were trying to set some attributes on a null object due to the fact that
the view had not finished rendering.
Differential Revision: https://phabricator.services.mozilla.com/D35515
--HG--
extra : moz-landing-system : lando
Our Restarter Service would have issues on Android Q:
It would run on a separate process that allowed it to kill the app's process
but when trying to restart the app it would fail because it would've been a
background Service and as such it would've been restricted from starting other
Android Application components.
To make it work on Android Q we would need to migrate it to a foreground
service or piggy-back the SYSTEM_ALERT_WINDOW permission given by the user for
the Tab Queue functionality.
The chosen solution is simpler and not affected by any of those limitations.
Depends on D35402
Differential Revision: https://phabricator.services.mozilla.com/D35403
--HG--
extra : moz-landing-system : lando
Fix for the following scenario:
- "Don't keep activities" checked
- Change system language
Upon detecting a locale change in BrowserApp's onCreate() we would call
finish() and then return before calling super.onCreate().
This patch introdues the call to super.onCreate() before returning and ensures
that the app will die cleanly so that upon restarting Gecko can reinit add-ons
that touch the UI.
Differential Revision: https://phabricator.services.mozilla.com/D35402
--HG--
extra : moz-landing-system : lando
Updated existing "suggestedsites_*" drawables to better match current websites
favicons.
Added new "suggestedsites_*" drawables that are to be used by the localized
Top Sites.
All images are added in density qualified drawable folders which based on my
testing need to range between 90x90px for mdpi to 360x360px for xxxhdpi.
Depends on D34680
Differential Revision: https://phabricator.services.mozilla.com/D34681
--HG--
extra : moz-landing-system : lando
Our Restarter Service would have issues on Android Q:
It would run on a separate process that allowed it to kill the app's process
but when trying to restart the app it would fail because it would've been a
background Service and as such it would've been restricted from starting other
Android Application components.
To make it work on Android Q we would need to migrate it to a foreground
service or piggy-back the SYSTEM_ALERT_WINDOW permission given by the user for
the Tab Queue functionality.
The chosen solution is simpler and not affected by any of those limitations.
Depends on D35402
Differential Revision: https://phabricator.services.mozilla.com/D35403
--HG--
extra : moz-landing-system : lando
Fix for the following scenario:
- "Don't keep activities" checked
- Change system language
Upon detecting a locale change in BrowserApp's onCreate() we would call
finish() and then return before calling super.onCreate().
This patch introdues the call to super.onCreate() before returning and ensures
that the app will die cleanly so that upon restarting Gecko can reinit add-ons
that touch the UI.
Differential Revision: https://phabricator.services.mozilla.com/D35402
--HG--
extra : moz-landing-system : lando
A lot of failures occurs in `org.mozilla.geckoview.test.TextInputDelegateTest.inputConnection` when getting composition string. This tests doesn't wait for `compositionupdate`, so we should listen this event to wait for updating composition string.
Differential Revision: https://phabricator.services.mozilla.com/D34812
--HG--
extra : moz-landing-system : lando
This is just a small step on the path towards support for more
vehicles via the configuration files introduced by Bug 1552519. It's
enough to invoke GeckoView example.
Differential Revision: https://phabricator.services.mozilla.com/D34952
--HG--
extra : moz-landing-system : lando
With this changes we must now support 3 Onboarding versions.
With this changes we must now support 3 Onboarding versions.
Latest Onboarding UX will use a new title for the "Sync screen", new subtext,
new image and new text for the signin button.
This will be presented only if all this new Strings are localized.
Refactored the existing OnboardingStringUtil to serve as a central point of
getting the right resources to be used and querying the Onboarding UX version
the app should offer.
Added to SyncPanel the missing logic to hide the space otherwise occupied by
the Onboarding screen message, when there is no message.
(now behaving the same as the other Onboarding screens.)
Applied a lossless compression for the new sync image which resulted in a 26.5%
size reduction.
Removed the lint suppression initially necessary for when first added the
updated Sync Strings which were not used at the moment.
Differential Revision: https://phabricator.services.mozilla.com/D35012
--HG--
rename : mobile/android/base/java/org/mozilla/gecko/util/OnboardingStringUtil.java => mobile/android/base/java/org/mozilla/gecko/util/OnboardingResources.java
extra : moz-landing-system : lando
add a webcompat intervention for TinyMCE 3.0 thru 3.4.4 to overwrite tiny_mce.js and tiny_mce_src.js such that isGecko=false
Differential Revision: https://phabricator.services.mozilla.com/D34776
--HG--
extra : moz-landing-system : lando
With this changes we must now support 3 Onboarding versions.
Latest Onboarding UX will use a new title for the "Sync screen", new subtext,
new image and new text for the signin button.
This will be presented only if all this new Strings are localized.
Refactored the existing OnboardingStringUtil to serve as a central point of
getting the right Strings to be used and querying the Onboarding UX version the
app should offer.
Applied a lossless compression for the new sync image which resulted in a 26.5%
size reduction.
Removed the lint suppression initially necessary for when first added the
updated Sync Strings which were not used at the moment.
Differential Revision: https://phabricator.services.mozilla.com/D35012
--HG--
rename : mobile/android/base/java/org/mozilla/gecko/util/OnboardingStringUtil.java => mobile/android/base/java/org/mozilla/gecko/util/OnboardingStringsUtil.java
extra : moz-landing-system : lando
Default app behavior for when a crash occurs involves starting an Activity that
lets users submit a crash report and maybe provide additional info.
In the event of a crash we want to restore for the user all previous tabs, this
Activity being the component that saves the CRASHED status that will trigger
the restore process.
On Android Q, when a crash notification is posted but ignored by the user, upon
starting the app would not know it crashed and it would not try restoring tabs.
Executing the "save CRASHED status" logic whenever a crash occurs, irrespective
of if we'll show the Activity or just post a notification ensures users will
always have their previous tabs restored.
Differential Revision: https://phabricator.services.mozilla.com/D34826
--HG--
extra : moz-landing-system : lando