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

27031 Коммитов

Автор SHA1 Сообщение Дата
Emily McDonough 8958e7dd89 Bug 1662518 part 2 - Get CUPS server version info for each printer. r=emilio,jwatt
Differential Revision: https://phabricator.services.mozilla.com/D89035
2020-09-02 23:49:04 +00:00
Noemi Erli 3403bbb58e Backed out 4 changesets (bug 1650583) for causing build bustages in rules.mk CLOSED TREE
Backed out changeset 033e491241b1 (bug 1650583)
Backed out changeset e6a03fea3aad (bug 1650583)
Backed out changeset b24be6b2d8cd (bug 1650583)
Backed out changeset bbb04547d367 (bug 1650583)
2020-09-03 02:33:34 +03:00
Martin Stransky df2e9adc7a Bug 1650583 [Linux/EGL] Use GLContextEGL::FindVisual() in nsWindow::Create to set visual for GdkWindow, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D87637
2020-09-02 19:45:37 +00:00
Nathan Froyd 3b58be4ab2 Bug 1662809 - don't copy entire blocklist entries during blocklist parsing; r=aosmond
Like an earlier patch in the series, this uses `Split()` to return dependent
substrings into the blocklist string, rather than copying each individual
entry out for parsing.  We also, in passing, eliminate a copy from the
converted UTF8 string into an entirely separate string.

Depends on D89169

Differential Revision: https://phabricator.services.mozilla.com/D89170
2020-09-02 17:04:51 +00:00
Nathan Froyd b1a57a4701 Bug 1662809 - don't copy key-value pairs from blocklist entries during parsing; r=aosmond
Instead of splitting the entire entry into an `nsTArray`, we can use
`nsTSubstring::Split` to provide dependent strings into the entry.  We copy
the actual keys and values later, so this should be perfectly safe.

Depends on D89168

Differential Revision: https://phabricator.services.mozilla.com/D89169
2020-09-02 16:58:33 +00:00
Nathan Froyd 61491490cb Bug 1662809 - don't copy split values when parsing gfx blocklists; r=aosmond
There's a lot of string splitting here, which needlessly copies, and then
there's a lot of copies out of the split arrays.  This patch at least
addresses the latter by using references where possible.

Differential Revision: https://phabricator.services.mozilla.com/D89168
2020-09-02 16:58:10 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Tony Crisci 3c2aa8f90e Bug 1648874 - Send DBus reply to MPRIS commands r=chunmin
Use g_dbus_method_invocation_return_value() to return a reply to DBus
clients that call service methods. Sending a reply is required by the
DBus specification and failing to do so may cause subtle bugs in
clients.

Differential Revision: https://phabricator.services.mozilla.com/D88737
2020-09-02 14:50:54 +00:00
Nicklas Boman 72bf374f5c Bug 1659828 - Get rid of `virtualMemorySize` in ProcInfo r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D89013
2020-09-02 12:56:46 +00:00
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