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

27022 Коммитов

Автор SHA1 Сообщение Дата
Michael Kaply ef06e673cd Bug 1645732 - Add telemetry for Linux window protocol. r=chutten,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D88696
2020-09-01 19:41:20 +00:00
Butkovits Atila 925221149f Backed out 7 changesets (bug 1651705) as requested by Aklotz. CLOSED TREE
Backed out changeset 60730e8394ae (bug 1651705)
Backed out changeset c441ae751191 (bug 1651705)
Backed out changeset c289f06ceba2 (bug 1651705)
Backed out changeset d4491ef94b3e (bug 1651705)
Backed out changeset 1cca90ffab83 (bug 1651705)
Backed out changeset 9b1ce53e6472 (bug 1651705)
Backed out changeset a31251ba4566 (bug 1651705)
2020-09-01 20:39:15 +03:00
Aaron Klotz 2e9a6ef484 Bug 1651705: Part 7 - Update MediaSessionSupport to work with NativeWeakPtr; r=geckoview-reviewers,agi
This patch is similar to part 4 but for MediaSessionSupport.

Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system. Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.

Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.

Differential Revision: https://phabricator.services.mozilla.com/D88088
2020-09-01 14:34:54 +00:00
Aaron Klotz 84f766366c Bug 1651705: Part 5 - GeckoEditableSupport updates to support `NativeWeakPtr`; r=m_kato,geckoview-reviewers
This patch is similar to part 4 but for `GeckoEditableSupport`.

Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system.  Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.

Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.

Differential Revision: https://phabricator.services.mozilla.com/D87364
2020-09-01 14:34:29 +00:00
Aaron Klotz 9f91f22103 Bug 1651705: Part 4 - Convert nsWindow to use NativeWeakPtr; r=geckoview-reviewers,agi
These conversions are pretty straight forward thanks to the type system.
Basically we take a `NativeWeakPtr`, call `Access()` on it, and if the
accessor is truthy, then we call whatever methods we need to call.

Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.

Differential Revision: https://phabricator.services.mozilla.com/D87363
2020-09-01 14:34:26 +00:00
Aaron Klotz be23c566ee Bug 1651705: Part 3 - Move nested classes out of nsWindow, switch over to NativeWeakPtr in those class definitions; r=geckoview-reviewers,agi
* Having `AndroidView` and `GeckoViewSupport` as nested classes inside of
  `nsWindow` make it impossible to forward declare them. We move those classes
  into their own headers. We also move `WindowEvent` into its own header.

* We remove the old `NativePtr` and `WindowPtr` implementations from `nsWindow`
  and convert the class definitions in this patch to use the new `NativeWeakPtr`.

* `GeckoViewSupport` had a unique quirk where it was owned by `nsWindow`
  instead of its Java counterpart. To make `GeckoViewSupport`'s ownership work
  like the other classes that use `NativeWeakPtr` (and to substantially simplify
  the implementation of `NativeWeakPtr` itself), I have reversed that: now
  `nsWindow` holds a `NativeWeakPtr` to `GeckoViewSupport`, while
  `GeckoViewSupport` is owned by its Java counterpart and holds a strong ref to
  the `nsWindow`.

* `GeckoViewSupport` no longer inherits from `SupportsWeakPtr`, since using it
  with `NativeWeakPtr` provides stronger and safer guarantees.

Differential Revision: https://phabricator.services.mozilla.com/D87362
2020-09-01 14:34:18 +00:00
Aaron Klotz b81093d5cb Bug 1651705: Part 2 - Create NativeWeakPtr to safely access native objects owned by Java objects across multiple threads; r=geckoview-reviewers,agi
* We rename the existing `NativePtr` struct to `NativePtrTraits`, as that is
  more descriptive of what that code actually does;
* We introduce `NativeWeakPtr` as a smart pointer type that holds a pointer
  to an object and allows its access in a thread-safe way. See comments.
* We replace some explicit uses of template types with type deduction via
  `auto` and `decltype(auto)`. This allows for more use of forward declarations.

Differential Revision: https://phabricator.services.mozilla.com/D87361
2020-09-01 14:34:01 +00:00
Bogdan Tara e30a2f5c84 Backed out 2 changesets (bug 1580117) for mochitest and webrender failures CLOSED TREE
Backed out changeset aba57d4f19cb (bug 1580117)
Backed out changeset 70b864f4b6a5 (bug 1580117)
2020-09-01 15:15:29 +03:00
J. Ryan Stinnett 643a99c8fa Bug 1580117 - Pause composition for occluded windows on macOS. r=mstange
This pauses composition when a window becomes fully occluded.

This is particularly important for platforms like macOS, where minimized /
hidden windows historically would remain compositing, potentially on every vsync
if the hidden window contained animations. This should lead to a nice power
savings by skipping this unnecessary work.

This change affects both the WebRender and legacy compositor paths.

As bug 1580117 is believed to be a macOS specific issue, this is currently
implemented for macOS only, but could in the future be generalized to other
platforms as well (likely using size mode changes since other platforms do not
notify on occlusion change).

Differential Revision: https://phabricator.services.mozilla.com/D85954
2020-08-31 13:54:24 +00:00
Jonathan Kew 2d0ceb294d Bug 1662038 - Fix printer-name handling on macOS so it doesn't fail on the fake "Save to PDF" destination. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D88897
2020-09-01 10:41:30 +00:00
stransky 4256c8d7fc Bug 1656505 [Linux] Restore active texture when dmabuf texture is created and provide logging to dmabuf surfaces, r=jgilbert
- Restore active texture when dmabuf texture is created at DMABufSurfaceRGBA::CreateTexture()/DMABufSurfaceYUV::CreateTexture.
- Provide more logging for DMABufSurfaceRGBA surfaces.
- Implement DMABufSurfaceRGBA::DumpToFile() to save dmabuf surface content to png file.

Differential Revision: https://phabricator.services.mozilla.com/D88382
2020-09-01 07:24:46 +00:00
stransky 522172d522 Bug 1656505 [Linux] Use correct RGB/RGBA formats with dmabuf, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D88381
2020-09-01 07:24:38 +00:00
Erik Nordin a35b29686a Bug 1661993 - Use PWG Standardized paper names for GTK r=sfoster
This patch ensures that our fallback paper list (used for print saving
as PDF) will use PWG standardized names for the paper sizes for GTK
print settings.

Differential Revision: https://phabricator.services.mozilla.com/D88736
2020-08-31 21:03:36 +00:00
owlishDeveloper fd371ef45e Bug 1654722 - Add backend support for new OnExternalResponse API in GV r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D86617
2020-08-31 17:30:57 +00:00
Dzmitry Malyshau 313ddf80c5 Bug 1661505 - Blocklist WR on mac Intel HD3000 r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D88672
2020-08-29 02:58:56 +00:00
Bob Owen c2d5cc215c Bug 1660686: Add telemetry for time taken in print background tasks. r=jwatt, dr=tdsmith
Differential Revision: https://phabricator.services.mozilla.com/D88302
2020-08-31 14:36:45 +00:00
Sylvestre Ledru 9c192aa9ca Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 09:23:02 +00:00
Mihai Alexandru Michis 261d01524b Backed out changeset d0f173a90792 (bug 1519636) for causing bustages.
CLOSED TREE
2020-08-31 10:14:58 +03:00
Sylvestre Ledru 939dd426e6 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 06:51:21 +00:00
Olivier Tilloy f300a8180b Bug 1661715 - Move GTK function stubs to the correct section. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D88588
2020-08-30 23:15:30 +00:00
Edgar Chen e4efe37095 Bug 1653949 - Part 4: Add MouseExitFromWidget event to the delayed event queue if event handling is suppressed; r=smaug
So that we won't lost it if it happens in nested event loop.

Differential Revision: https://phabricator.services.mozilla.com/D86953
2020-08-27 17:19:07 +00:00
Edgar Chen 85d4338685 Bug 1653949 - Part 3: Dispatch MouseExitFromWidget event with proper ExitFrom type based on the "direction" of movement; r=smaug
There are three cases,
- Move to inner OOP frame.
- Move to outer OOP frame.
- Move to an OOP frame that is in different sub-tree.

We could use common BrowserParent ancestor to determine which case is and
dispatch MouseExitFromWidget event with proper ExitFrom type.

Depends on D84748

Differential Revision: https://phabricator.services.mozilla.com/D84761
2020-08-29 21:11:41 +00:00
Edgar Chen 55691da377 Bug 1653949 - Part 2: Add ePuppet to WidgetMouseEvent::ExitFrom; r=smaug
eTopLevel is reused in content process to indicates that the mouse leaves
the puppet widget rendering area, now we add a separated type, ePuppet, for it.

Differential Revision: https://phabricator.services.mozilla.com/D84748
2020-08-27 17:19:14 +00:00
Edgar Chen 36ccda1d13 Bug 1653949 - Part 1: Change mExitFrom in WidgetMouseEvent to be Maybe<ExitFrom>; r=smaug
mExitFrom now contains a value only when mMessage is eMouseExitFromWidget

Differential Revision: https://phabricator.services.mozilla.com/D88225
2020-08-27 17:19:03 +00:00
Erik Nordin 3e0abcedbe Bug 1661823 - Fix Default Print Settings Unwriteable Margins Units r=AlaskanEmily
Print settings stores margin units in TWIPS, but the API expects inches.
This was causing an extra conversion from inches to TWIPS on values that
were already in TWIPS.

Differential Revision: https://phabricator.services.mozilla.com/D88674
2020-08-28 21:53:34 +00:00
Noemi Erli 1b5c9ebf54 Backed out changeset ca085d770da4 (bug 1660686) for causing bustage in PrintBackgroundTask.h CLOSED TREE 2020-08-29 01:28:14 +03:00
Toshihito Kikuchi 3b8a3fad8f Bug 1657208 - Dynamic-load urlmon.dll for x86 system. r=freddyb,mhowell
Our data indicates a few users of x86 system hit failure to load urlmon.dll
for unknown reasons.  Since we don't always require urlmon.dll,
we delay-load it, which causes a crash if loading urlmon.dll fails.

A proposed fix is to dynamically load urlmon.dll on x86.

Differential Revision: https://phabricator.services.mozilla.com/D88534
2020-08-28 21:27:22 +00:00
Bob Owen f571086162 Bug 1660686: Add telemetry for time taken in print background tasks. r=jwatt, dr=tdsmith
Differential Revision: https://phabricator.services.mozilla.com/D88302
2020-08-28 19:31:07 +00:00
Bob Owen c17154d7f3 Bug 1661731: Fix use of nsAutoPrinter in nsPrinterWin::DefaultSettings. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D88621
2020-08-28 18:44:12 +00:00
Emily McDonough 08abe47ebf Bug 1661785 - Check for both CUPS_PRINT_COLOR_MODE_COLOR and CUPS_PRINT_COLOR_MODE_AUTO for CUPS color printing support. r=nordzilla
This may fix bug 1660658. It's pretty harmless if it turns out to be redundant
to make this check.

Differential Revision: https://phabricator.services.mozilla.com/D88654
2020-08-28 19:15:21 +00:00
Narcis Beleuzu 3361c24c23 Backed out 7 changesets (bug 1651705) for mochitest failures on test_resizers_resizing_elements.html . CLOSED TREE
Backed out changeset 7fd32a3fb6e7 (bug 1651705)
Backed out changeset de4edbcb15c1 (bug 1651705)
Backed out changeset 531e71369f68 (bug 1651705)
Backed out changeset 84590e96de88 (bug 1651705)
Backed out changeset 7d9d2d44b2ee (bug 1651705)
Backed out changeset 9ffca762753c (bug 1651705)
Backed out changeset 2d79f4348b36 (bug 1651705)
2020-08-28 23:06:39 +03:00
Aaron Klotz 5dfb75acf7 Bug 1651705: Part 7 - Update MediaSessionSupport to work with NativeWeakPtr; r=geckoview-reviewers,agi
This patch is similar to part 4 but for MediaSessionSupport.

Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system. Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.

Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.

Differential Revision: https://phabricator.services.mozilla.com/D88088
2020-08-27 20:14:56 +00:00
Aaron Klotz dfbdba70df Bug 1651705: Part 5 - GeckoEditableSupport updates to support `NativeWeakPtr`; r=m_kato,geckoview-reviewers
This patch is similar to part 4 but for `GeckoEditableSupport`.

Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system.  Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.

Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.

Differential Revision: https://phabricator.services.mozilla.com/D87364
2020-08-27 20:14:45 +00:00
Aaron Klotz c5bf10fd43 Bug 1651705: Part 4 - Convert nsWindow to use NativeWeakPtr; r=geckoview-reviewers,agi
These conversions are pretty straight forward thanks to the type system.
Basically we take a `NativeWeakPtr`, call `Access()` on it, and if the
accessor is truthy, then we call whatever methods we need to call.

Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.

Differential Revision: https://phabricator.services.mozilla.com/D87363
2020-08-27 20:14:34 +00:00
Aaron Klotz 6a8ee84bc1 Bug 1651705: Part 3 - Move nested classes out of nsWindow, switch over to NativeWeakPtr in those class definitions; r=geckoview-reviewers,agi
* Having `AndroidView` and `GeckoViewSupport` as nested classes inside of
  `nsWindow` make it impossible to forward declare them. We move those classes
  into their own headers. We also move `WindowEvent` into its own header.

* We remove the old `NativePtr` and `WindowPtr` implementations from `nsWindow`
  and convert the class definitions in this patch to use the new `NativeWeakPtr`.

* `GeckoViewSupport` had a unique quirk where it was owned by `nsWindow`
  instead of its Java counterpart. To make `GeckoViewSupport`'s ownership work
  like the other classes that use `NativeWeakPtr` (and to substantially simplify
  the implementation of `NativeWeakPtr` itself), I have reversed that: now
  `nsWindow` holds a `NativeWeakPtr` to `GeckoViewSupport`, while
  `GeckoViewSupport` is owned by its Java counterpart and holds a strong ref to
  the `nsWindow`.

* `GeckoViewSupport` no longer inherits from `SupportsWeakPtr`, since using it
  with `NativeWeakPtr` provides stronger and safer guarantees.

Differential Revision: https://phabricator.services.mozilla.com/D87362
2020-08-27 20:14:18 +00:00
Aaron Klotz 738041c798 Bug 1651705: Part 2 - Create NativeWeakPtr to safely access native objects owned by Java objects across multiple threads; r=geckoview-reviewers,agi
* We rename the existing `NativePtr` struct to `NativePtrTraits`, as that is
  more descriptive of what that code actually does;
* We introduce `NativeWeakPtr` as a smart pointer type that holds a pointer
  to an object and allows its access in a thread-safe way. See comments.
* We replace some explicit uses of template types with type deduction via
  `auto` and `decltype(auto)`. This allows for more use of forward declarations.

Differential Revision: https://phabricator.services.mozilla.com/D87361
2020-08-27 20:14:06 +00:00
Jonathan Kew 307030428e Bug 1659856 - followup - Also handle duplex field in nsPrintSettingsWin::InitWithInitializer. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D88585
2020-08-28 13:30:14 +00:00
Cosmin Sabou 403893bc7e Backed out 5 changesets (bug 1653949) for assertion failures on EventStateManager.cpp. CLOSED TREE
Backed out changeset ad7c35ab2a40 (bug 1653949)
Backed out changeset 31cb90ef998a (bug 1653949)
Backed out changeset 03e65cbd2a11 (bug 1653949)
Backed out changeset a87ac2a7db70 (bug 1653949)
Backed out changeset 390dd2c04cd4 (bug 1653949)
2020-08-27 20:13:20 +03:00
Edgar Chen bc49d1ce72 Bug 1653949 - Part 4: Add MouseExitFromWidget event to the delayed event queue if event handling is suppressed; r=smaug
So that we won't lost it if it happens in nested event loop.

Differential Revision: https://phabricator.services.mozilla.com/D86953
2020-08-25 23:27:21 +00:00
Edgar Chen bbb093555e Bug 1653949 - Part 3: Dispatch MouseExitFromWidget event with proper ExitFrom type based on the "direction" of movement; r=smaug
There are three cases,
- Move to inner OOP frame.
- Move to outer OOP frame.
- Move to an OOP frame that is in different sub-tree.

We could use common BrowserParent ancestor to determine which case is and
dispatch MouseExitFromWidget event with proper ExitFrom type.

Differential Revision: https://phabricator.services.mozilla.com/D84761
2020-08-27 11:48:30 +00:00
Edgar Chen c4125fd9d4 Bug 1653949 - Part 2: Add ePuppet to WidgetMouseEvent::ExitFrom; r=smaug
eTopLevel is reused in content process to indicates that the mouse leaves
the puppet widget rendering area, now we add a separated type, ePuppet, for it.

Differential Revision: https://phabricator.services.mozilla.com/D84748
2020-08-26 20:31:46 +00:00
Edgar Chen 363e80d673 Bug 1653949 - Part 1: Change mExitFrom in WidgetMouseEvent to be Maybe<ExitFrom>; r=smaug
mExitFrom now contains a value only when mMessage is eMouseExitFromWidget

Differential Revision: https://phabricator.services.mozilla.com/D88225
2020-08-26 14:19:46 +00:00
Emilio Cobos Álvarez 2b38c4883a Bug 1661436 - Fix documentation and simplify nsIPrintSettingsService.globalPrintSettings. r=jwatt
It always returns a new print settings object, so the docs are just
wrong. At that point it is just an alias of thew newPrintSettings
attribute, so document it as such.

Differential Revision: https://phabricator.services.mozilla.com/D88399
2020-08-27 11:05:32 +00:00
Emilio Cobos Álvarez 19fd1264ab Bug 1661388 - Factor out the default print settings code. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D88397
2020-08-27 10:58:19 +00:00
stransky 57352e6ba7 Bug 1660100 [Linux/Gtk] Add CSD decorations size only to windows without system titlebar, r=jhorak
- Revert Bug 1658885 - use Gtk styles to get CSD sizes.
- Add CSD decoration sizes to titlebar-less windows only.

Differential Revision: https://phabricator.services.mozilla.com/D88139
2020-08-27 08:10:42 +00:00
Jonathan Watt f396b19f55 Bug 1661339. Run the background tasks for gathering printer capabilities on the IO thread pool. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88327
2020-08-26 20:55:47 +00:00
stransky 34a22ef587 Bug 1661209 [Linux] Remove DMABufSurfaceRGBA::CreateWLBuffer() and DMABufSurfaceRGBA::Resize() and related wl_buffer code, r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D88249
2020-08-26 19:19:48 +00:00
Toshihito Kikuchi 739b831899 Bug 1630444: Part1 - Put LauncherError behind MOZ_USE_LAUNCHER_ERROR. r=aklotz
This patch defines a new macro `MOZ_USE_LAUNCHER_ERROR` and keeps
the use of `LauncherError` behind `MOZ_USE_LAUNCHER_ERROR` instead of
`MOZILLA_INTERNAL_API` so that we can selectively use `LauncherError`
in locations where `MOZILLA_INTERNAL_API` is defined.

Differential Revision: https://phabricator.services.mozilla.com/D83638
2020-08-26 19:01:44 +00:00
Emily McDonough 17e4e64589 Bug 1660909 - Fix a crash in NamedPrinter on CUPS r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88093
2020-08-25 21:57:11 +00:00
Jonathan Kew ce188ee8a7 Bug 1659856 - patch 3 - Handle duplex setting in nsPrintSettingsX for macOS. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D87960
2020-08-26 14:26:57 +00:00