Граф коммитов

745699 Коммитов

Автор SHA1 Сообщение Дата
Lee Salzman 7d3755c3f6 Bug 1686244 - Accelerate radial gradients in SWGL. r=jrmuizel
The same optimization of looking for merged linear gradients can also be
applied to radial gradients by solving the quadratic equation to check
how large a span we can process within a given merged span. This allows
us to save a bunch of table lookup and some other math in the inner loops.

Differential Revision: https://phabricator.services.mozilla.com/D105858
2021-02-22 04:14:39 +00:00
Lee Salzman 6d46022aa7 Bug 1686244 - Accelerate linear gradients in SWGL. r=jrmuizel
For linear gradients, we are currently bottlenecked by looking up a gradient
table entry, doing interpolation, and converting to pixel formats for every
sample.

We can accelerate this by instead looking for contiguous segments of gradient
within the range of entries we need to sample and then interpolating these
as a single gradient. This also enables us to convert to relevant pixel formats
only when setting up this gradient, which greatly reduces the per-pixel processing
down to essentially a shift and add.

To enable this sort of crawling of the gradient table, the output gradients have
been modified such that each entry's step value will equal an adjacent entry's
step value if and only if they are from same gradient. We can ensure this by, in
the very rare case two segments of gradient have the same step, using the equivalent
of nextafter() to imperceptibly alter the value so that the invariant is maintained.

Differential Revision: https://phabricator.services.mozilla.com/D105716
2021-02-22 04:14:38 +00:00
Markus Stange 796dac2920 Bug 1422855 - Tickle the CVDisplayLink after display reconfigurations, to help it get unstuck. r=mattwoodrow
This fixes a problem where the callback just wouldn't be called for the duration
of about a minute after fast user switching. I'm hoping it'll also help with a
similar problem after screen lock and after sleep (bug 1682713).

The documentation for CVDisplayLinkStop says the following:

> In macOS 10.4 and later, the display link thread is automatically stopped if
> the user employs Fast User Switching. The display link is restarted when
> switching back to the original user.

This probably works for display links that were created before fast user
switching. However, we sometimes create a new CVDisplayLink while our user is
"in the background", and this new display link happily keeps running while we're
in the background. Then, when switching back to the original user, *that's* when
the display link is stopped. And then it eventually starts again. I'm not sure
what causes it to re-start.
Creating a CVDisplayLink while the machine is fast user switched to a different
user is probably not a well-excercised codepath. Things might work more reliably
if we keep reusing the same CVDisplayLink instance and just stop and start it
as needed. But that's a more risky change that I don't want to uplift.
Also, starting to listen for vsync while a different user is the "current" user
is probably a mistake anyway. We should find out if there's a way to suspend
compositing and drawing in that state. However, it seems that the window doesn't
enter the occluded state during this time, because in that case we would
de-activate the content docshell and not run requestAnimationFrame callbacks.
But the profiler clearly shows rAF running during the switched-away time.

I'm seeing the following display reconfiguration callbacks during fast user
switching, 2077750265 being the display link's current display:

```
[1] DisplayReconfiguration for 2077750265: BeginConfiguration
[2] DisplayReconfiguration for 1104977158: BeginConfiguration
[3] DisplayReconfiguration for 2077750265: Remove Disabled
[4] DisplayReconfiguration for 1104977158: Moved SetMain SetMode Add Enabled

[5] DisplayReconfiguration for 1104977158: BeginConfiguration
[6] DisplayReconfiguration for 2077750265: BeginConfiguration
[7] DisplayReconfiguration for 1104977158: Remove Disabled DesktopShapeChanged
[8] DisplayReconfiguration for 2077750265: Moved SetMain SetMode Add Enabled DesktopShapeChanged
```

With this patch, we restart the display link at notification 4 and 8.

In the future, we should switch to per-monitor (or per-window) vsync rather than
global vsync, and clean this whole situation up a little.

Differential Revision: https://phabricator.services.mozilla.com/D105868
2021-02-22 02:31:58 +00:00
Daisuke Akatsuka fabdafe56d Bug 1185358: Update untrimmedValue even if pasted value is changed. r=adw
Depends on D105726

Differential Revision: https://phabricator.services.mozilla.com/D105727
2021-02-22 01:54:05 +00:00
Daisuke Akatsuka feba0e3455 Bug 1185358: Replace any whitespace chars with space. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D105726
2021-02-22 01:54:05 +00:00
Hiroyuki Ikezoe 6cb8765851 Bug 1542057 - A test that wheel events on an unscrollable OOP iframe are handoff-ed properly. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D105699
2021-02-21 22:26:10 +00:00
Hiroyuki Ikezoe c8f4391928 Bug 1542057 - Drop redundant </head>s. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D105698
2021-02-21 22:26:09 +00:00
Mark Banner 70a9414c72 Bug 1687628 - Add tests for additional telemetry on Baidu. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D104378
2021-02-21 19:15:01 +00:00
Makoto Kato 6b58ba4928 Bug 1650705 - Don't dispatch unnecessary input event when we dispatch composition start with selected text. r=geckoview-reviewers,agi
Actually, before starting composition, we always remove current selected
text. So it causes that input event is fired by this operation. This is
different of Blink.

`TextEventDispatcher` can set composition string using selected text when
starting composition. So we can reduce this input event.

Also, I mistake bug 1499076 fix. By this fix, we always fires input event
when having selected text even if it is unnecessary. This changeset has
this fix too.

Differential Revision: https://phabricator.services.mozilla.com/D105464
2021-02-21 17:12:13 +00:00
Markus Stange c8ce16e429 Bug 1694002 - Tweak swipe threshold values to require more "deliberate" swiping. r=spohl
This reduces the required swipe distance, but increases how much velocity is
needed to fling the page over the threshold.
On the touchpad, the result feels more similar to Safari now, in my testing.
With the magic mouse, it's still really easy to accidentally trigger a swipe
with a horizontal fling; it seems easier to accumulate a lot of velocity quickly
with the magic mouse.

Differential Revision: https://phabricator.services.mozilla.com/D105873
2021-02-21 00:41:32 +00:00
Markus Stange 70b5de2b6d Bug 1694000 - Restrict the MOZ_CRASH for uncaught exceptions in the event loop to the Nightly channel. r=spohl
This reduces risk while we gather an inventory of exceptions that are outside
our control and which we want to ignore.

We still log all (non-ignored) exceptions in Beta/Release builds, we just don't
crash for them. So if something else later causes a crash, we will still see the
information in crash reports.

Depends on D105871

Differential Revision: https://phabricator.services.mozilla.com/D105872
2021-02-20 22:11:34 +00:00
Markus Stange 055d05d001 Bug 1694000 - Ignore "Missing Touches." exception when it bubbles up to the event loop. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D105871
2021-02-20 22:11:34 +00:00
Dragana Damjanovic b529ea9b90 Bug 1692569 - Make sure that we still can write 0RTT data before trying to write them. r=necko-reviewers,valentin
nss and necko may be out of sync about 0RTT state because IsAlive drives the handshake, but nsHttpConnection is not informed about the handshake progress.

Differential Revision: https://phabricator.services.mozilla.com/D105842
2021-02-20 21:04:00 +00:00
championshuttler 501ee430fa Bug 1691327 - Update sphinxcontrib-mermaid to v0.6.2 by renovate DONTBUILD.r=sylvestre,firefox-source-docs-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D105660
2021-02-20 19:12:01 +00:00
stransky 6d59f634f7 Bug 1693849 [PipeWire] Always check allocated video buffer size, r=ng
Differential Revision: https://phabricator.services.mozilla.com/D105802
2021-02-20 17:12:56 +00:00
Butkovits Atila 7bb1cc6abf Bug 1676659 - disable browser_preview_switch_print_selected.js for frequent failures. r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D105413
2021-02-20 15:33:00 +00:00
Mats Palmgren 2381162c81 Bug 1691205 - Initialize the intrinsic block-size to zero in case there is no :root frame. r=TYLin
Note that this only happens for chrome: documents that have been
invasively styled by userChrome.css sheets.  Content documents
are never intrinsically sized, and our own chrome: sheets that
use intrinsic sizing never set 'display:none' on the :root as
far as I know.  I think this is an argument for removing support
for userChrome.css.

Differential Revision: https://phabricator.services.mozilla.com/D104715
2021-02-20 04:25:25 +00:00
Nika Layzell 25d1d214ab Bug 1691410 - Add support for reverting racy changes in CanSet, r=kmag
In some cases, a content process may think they should be able to make a change
to a synced field, but in the meantime something in the parent process has
changed and the change can no longer be applied. This was the cause of a number
of issues around the in-flight process ID, and can cause issues such as crashes
if the CanSet method was made too strict.

This patch introduces a new possible return type from `CanSet` which allows
requesting a `Revert`. A reverted field change will either be cancelled at the
source (if the CanSet fails in the setting process), or will be cancelled by
sending a new transaction back to the source process reverting the change to
ensure consistency.

In addition, some additional logging is added which made it easier to locate the
underlying bug and verify the correctness of the change.

The current primary use-case for this new feature is the CurrentInnerWindowId
field which can be updated by the previous process' docshell after the parent
process has already performed a switch to a new process. This can lead to the
current WindowContext being inaccurate for a BrowsingContext in some edge cases
as we allow the flawed set due the in-flight process ID matching.

This patch changes the logic to no longer check the in-flight process ID, and
instead revert any changes to the CurrentInnerWindowId field coming from a
process which is not currently active in the BrowsingContext.

No tests were added as it is very timing-sensitive, and difficult to create the
specific scenario, however without these changes my patch for bug 1663757
consistently causes geckoview-junit crashes due to currentWindowGlobal being
incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D105553
2021-02-20 03:55:06 +00:00
Kate Hudson 5ed61e3b12 Bug 1692230 - Move nimbus code to its own directory r=andreio
Differential Revision: https://phabricator.services.mozilla.com/D105567
2021-02-20 02:51:12 +00:00
Kirk Steuber 72ce961859 Bug 1690062 - r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D105382
2021-02-20 00:49:02 +00:00
Emilio Cobos Álvarez 8aefb5feca Bug 1689327 - Resizers for non-themed scrollable content shouldn't be themed. r=NeilDeakin
Right now the resizer inside a random <div style="overflow: hidden"> is
the themed one, and that seems unintended.

I'm not sure how to best test this since resizers are sized to a
scrollbar width, so I can't just position an <img src=resizer.svg>.

I noticed this while looking at bug 1689253.

Differential Revision: https://phabricator.services.mozilla.com/D103304
2021-02-20 00:15:42 +00:00
Emilio Cobos Álvarez 6825bbc8f8 Bug 1693688 - Make the non-native theme not return minimum sizes for checkboxes (and most other widgets). r=spohl,mstange
This matches closer what Chrome and Safari do (Safari paints outside of
the box when this happens, but the layout box still respects the
author), see:

  data:text/html,<button style="padding: 0; width: 0">
  data:text/html,<input type=checkbox style="width: 0">

Etc. For checkboxes, this matches what OSX does, too.

Since we still want checkboxes to be slightly larger than what they'd be
otherwise, we add a hook to tweak it when non-native theme is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D105798
2021-02-20 00:13:10 +00:00
Timothy Nikkel f108651215 Bug 1692997. Add test. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D105735
2021-02-19 23:15:29 +00:00
Eitan Isaacson 6e8749d0da Bug 1693597 - P2: Rename ProxyAccessible to RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105671
2021-02-19 23:14:33 +00:00
Eitan Isaacson 6e49732365 Bug 1693597 - P1: Rename Accessible to LocalAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105670
2021-02-19 23:14:32 +00:00
Eitan Isaacson f48f468cb7 Bug 1693607 - [Linux] Add braces around statements. r=morgan
This is a collaboration between clang-tidy and clang-format.

clang-tidy uses compiled code paths, so this patch is linux specific.

Differential Revision: https://phabricator.services.mozilla.com/D105669
2021-02-19 23:14:32 +00:00
Aaron Klotz a16fdc090e Bug 1581971: Part 7 - Fix path quirk with x86 lldb-server detection; r=bustage CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D105836
2021-02-19 22:32:10 +00:00
Emma Malysz 6369fb568d Bug 1692214, hide library button by default in proton toolbar r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D105076
2021-02-19 22:14:21 +00:00
Ting-Yu Lin 60b5c8e185 Bug 1693409 Part 2 - Don't enforce table's min-content inline-size when resolving flex base size. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D105685
2021-02-19 22:12:19 +00:00
Ting-Yu Lin bd20c4341d Bug 1693409 Part 1 - Assert nsTableFrame::ComputeSize()'s aWM parameter is the same as the frame's writing mode. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D105684
2021-02-19 22:12:19 +00:00
Kris Wright 1106f750e1 Bug 1693639 - run WPT sequentially on tsan r=jmaher
Tsan is prone to timeouts and running these tests sequentially reduces the likelihood of Bug 1644147.

Differential Revision: https://phabricator.services.mozilla.com/D105678
2021-02-19 22:10:29 +00:00
Haik Aftandilian 8a14bd779c Bug 1692220 - Add a test to ensure the com.apple.FontRegistry dir is readable from content processes r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D105822
2021-02-19 21:57:00 +00:00
Jonathan Kew 6a82712eab Bug 1692220 - Allow content-process read access to libFontRegistry caches. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D105801
2021-02-19 21:56:59 +00:00
Michael Cooper 1aaf619aea Bug 1693402 - Add telemetry to determine source of unenrollFailed events r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D105541
2021-02-19 21:48:21 +00:00
Aaron Klotz 31c74eb891 Bug 1581971: Part 6 - Support mach run --debug with lldb for Android; r=mhentges
* We add new options to the Android variant of `mach run`:
  * `--debug`: enables running with a debugger;
  * `--debugger`: Allows the user to override the default debugger (`lldb`).
                  The provided argument must still be `lldb` compatible; this
                  is for enabling the ability to specify some kind of wrapper
                  script or other debugger front-end, if desired;
  * `--debugger-args`: Additional arguments to pass to the debugger's command line;
  * `--no-attach`: Runs the app and prepares the device for debugging, but does
                   not actually attach any debuggers. The required ports are
                   printed to the log, and then `mach` exits, thus allowing for
                   the user to manually connect.
  * `--use-existing-process`: This allows the user to attach to an existing
                              process, instead of killing existing process(es)
                              and starting from scratch. This is useful for
                              users who want to attach to an existing process
                              that is already in a desired state.

When debugging is enabled:

BEFORE the app starts:
* `verify_android_device` will install `lldb-server` if necessary;
* We run `am set-debug-app -w --persistent` to ensure that the app is set as the
  device's debug app. Since we pass `-w`, when Android starts the target app, it
  will wait for `jdb` to attach before proceeding.

AFTER the app starts:
* We start `lldb-server` and obtain the name of its socket file;
* We obtain the pid of the parent process. Alternatively, if
  `--use-existing-process` was specified and there are already extant child
  processes, we prompt the user to choose which process to which they would
  initially like to attach.
* We forward a local TCP port for `jdb` debugging.
* We run `jdb` in the background to connect to the process and then quit.
  This is solely for the purpose of dismissing Android's "waiting for debugger"
  dialog.
* In the foreground, we run `lldb`, specifying a set of initial commands that
  are required to for symbol resolution and to automatically connect to the
  target pid.


Why `lldb`? I chose it for consistency with Android Studio. Somebody else is
welcome to implement `gdb` support if they wish. :-)

Differential Revision: https://phabricator.services.mozilla.com/D94384
2021-02-19 21:07:20 +00:00
Aaron Klotz 4cef0c49f7 Bug 1581971: Part 5 - Update android_device.py to support installing and running lldb-server; r=gbrown,jmaher
In `verify_android_device`, when `debugger` is true, we setup `lldb-server`. We
also add a new method, `run_lldb_server`, for actually starting `lldb-server`.

Both cases call into a new function, `_setup_or_run_lldb_server`.

For setup functionality, this function copies `lldb-server` to the device and
then sets up its perms within the target app's data directory.

For run functionality, this function sets some environment variables and
(re)creates directories and log files as needed. Finally it starts the server
and returns to the caller the absolute path to the socket file on the device.
The client provides that path to `lldb` in order to connect to the server.

Both cases use `ADBDevice.batch_execute` to run several commands. The
`LLDB_SERVER_INSTALL_COMMANDS_SCRIPT` and `LLDB_SERVER_START_COMMAND_SCRIPT`
commands are intended to produce the same result as the `start_lldb_server.sh`
script that is provided by Android SDK.

Differential Revision: https://phabricator.services.mozilla.com/D94383
2021-02-19 21:07:19 +00:00
Aaron Klotz 06c23d6183 Bug 1581971: Part 4 - Change Android's priority debugger to lldb; r=ahal
`./mach run --debug` is being enabled for `lldb` only, so it should be
the preferred debugger instead of `gdb`.

Differential Revision: https://phabricator.services.mozilla.com/D94382
2021-02-19 21:07:19 +00:00
Aaron Klotz ea70bcd068 Bug 1581971: Part 3 - ADBDevice changes to support mach run --debug; r=gbrown,jmaher
- We make `pidof` public and we change it to guarantee that its resulting list
  of pids consists of integers.
- We update `forward` and its dependencies to return the value of the port
  that was assigned by `adb` so that clients may learn which port to use when
  forwarding from `'tcp:0'`

Differential Revision: https://phabricator.services.mozilla.com/D94381
2021-02-19 21:07:19 +00:00
Aaron Klotz 9ed94dd8f0 Bug 1581971: Part 2 - Add configure support for lldb-server on Android; r=firefox-build-system-reviewers,mhentges
We want to find the full path to the correct `lldb-server` in the NDK.
We reference this variable in a later patch when preparing the device for
debugging.

Differential Revision: https://phabricator.services.mozilla.com/D94380
2021-02-19 21:07:18 +00:00
Aaron Klotz 7847613f0d Bug 1581971: Part 1 - Bump Android NDK requirement to 21d; r=snorp,firefox-build-system-reviewers,mhentges
NDK 21 includes `lldb-server`, which we need in order to support
`./mach run --debug` with `lldb`.

The Android SDK manager no longer includes a standalone `lldb` package; perhaps
it was deprecated? Anyway, this appears to currently be the best way to get
`lldb-server` into a location that is easy to find during build configuration.

Differential Revision: https://phabricator.services.mozilla.com/D94379
2021-02-19 21:07:18 +00:00
MuraliAchanti 6c503d3275 Bug 1442053 - Change the following global variables from the C string to the C++ ones:pendingDirectory,crashReporterPath,memoryReportPath,libraryPath and eventsDirectory. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D105222
2021-02-19 20:50:23 +00:00
Dragana Damjanovic 66692fa536 Bug 1693738 - Extend HTTP3_CONNECTION_CLOSE_CODE telemetry and add more detail codes for the internal errors r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D105725
2021-02-19 20:37:24 +00:00
Jan Varga c3fd525400 Bug 1693741 - Retry removing or renaming of origin directories in StorageOperationBase::MaybeRenameOrigin; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D105733
2021-02-19 19:48:31 +00:00
Jan Varga e24a1a0c30 Bug 1693737 - Add CallWithDelayedRetriesIfAccessDenied helper method; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D105732
2021-02-19 19:48:30 +00:00
Jan Varga 6db13a4be0 Bug 1693741 - Share code for origin renaming between storage upgrade classes; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D105731
2021-02-19 19:48:30 +00:00
Jan Varga 9343d732ed Bug 1693741 - Check for existing targets before renaming origin directories during storage upgrade from v0.0 to v1.0; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D105730
2021-02-19 19:48:30 +00:00
Jan Varga 657351f5cb Bug 1693741 - Handle origin renaming during storage upgrade from v0.0 to v1.0 in a dedicated method; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D105729
2021-02-19 19:48:29 +00:00
Jan Varga 8a075076ba Bug 1693741 - Remove redundant GetLeafName calls; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D105728
2021-02-19 19:48:29 +00:00
Noemi Erli 73493a49e5 Backed out 2 changesets (bug 1693688) for causing failures in browser_options-view-01.js CLOSED TREE
Backed out changeset d0bd198837ee (bug 1693688)
Backed out changeset e0b1f4b79d4b (bug 1693688)
2021-02-19 23:39:07 +02:00
Csoregi Natalia 5dcfe271e9 Merge mozilla-central to autoland on a CLOSED TREE 2021-02-19 23:28:28 +02:00