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

31690 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen f66fe92ddb Bug 1834073 - Part 2: Make HasDataMatchingFlavors supports kFindClipboard type; r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D179188
2023-05-31 14:19:37 +00:00
Edgar Chen bf27701a7b Bug 1834073 - Part 1: Add utility function to get cocoa Pasteboard; r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D179187
2023-05-31 14:19:37 +00:00
Iulian Moraru 3cfea4753c Backed out changeset 9fce1abd1c50 (bug 1833244) for causing build bustages on nsDeviceContextAndroid.h. CLOSED TREE 2023-05-31 16:31:53 +03:00
Jonathan Watt d4e8510ca6 Bug 1833244 p1. Create infrastructure to pass page dimensions to PrintTarget::BeginPage. r=dholbert
OS print drivers/devices know nothing about page dimensions unless we tell
them. Previously, the physical page dimensions (including orientation) have
always been the same, so communicating their dimensions once at the start of
a print has been enough. In preparation for supporting different "physical"
page dimensions (in the immediate future only different page orientations) when
we save to PDF, we need to have the infrastructure to pass dimensions through
on a page-by-page basis. This patch adds that.

None of the PrintTarget subclasses do anything with this extra information yet,
but in a follow-up patch PrintTargetPDF will use this information to create
PDFs with mixed page orientations.

Depends on D179395

Differential Revision: https://phabricator.services.mozilla.com/D179423
2023-05-31 13:02:26 +00:00
stransky 63d3ba0ce4 Bug 1835797 [Linux] Don't launch vaapitest on software backends r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D179529
2023-05-31 09:52:53 +00:00
David Turner 8ab689c9e9 Bug 1833354 - Add build options for VAAPI and V4L2. r=media-playback-reviewers,glandium,stransky
Add separate options to control whether we build VA-API and/or V4L2
hardware video decode.  These options default to enabled on the
platforms where these decoders are used.

The downstream MOZ_WAYLAND_USE_HWDECODE build option is used within the
FFmpeg platform and is only set when building against a supported
version of the FFmpeg libraries (i.e. not for ffmpeg57).

Differential Revision: https://phabricator.services.mozilla.com/D178945
2023-05-31 06:13:29 +00:00
Mike Hommey a293eb2299 Bug 1834945 - Include chromium-config.mozbuild in widget/uikit, to get ipdl headers. r=firefox-build-system-reviewers,nalexander
Same as other widgets.

Differential Revision: https://phabricator.services.mozilla.com/D179028
2023-05-30 20:01:36 +00:00
Ray Kraesig 06d7f9c03e Bug 1834612 - [1/1] Restrict DComp-disabling mitigation to Windows 10 r=ahale,gfx-reviewers
Bug 1704954 disabled DirectComposition for users with NVIDIA graphics
hardware and mixed monitor refresh rates on Windows 10 and 11, as a
mitigation for bug 1638709. However, that bug is almost -- perhaps
entirely -- unknown on Windows 11 (q.v. for details), and the fallback
path it uses has been shown to cause issues there (bug 1763981).

Restrict the mitigation to only occur on Windows 10, where bug 1638709
is exhibited, but where no issues with the fallback path are known.

This also effectively reverts bug 1816001, which it obviates.

Differential Revision: https://phabricator.services.mozilla.com/D178848
2023-05-30 16:22:43 +00:00
Brad Werth eea7eafab2 Bug 1821892: Block R600 hardware with Mesa drivers in all channels. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D179155
2023-05-30 14:42:53 +00:00
Emilio Cobos Álvarez 34bff4f0ed Bug 1574291 - Render restore button, not just icon, when drawing titlebar. r=stransky
And attach it to the maximized headerbar, not to the regular one. Breeze
styles the button with background-image rather than icon-source.

Differential Revision: https://phabricator.services.mozilla.com/D179389
2023-05-30 11:34:37 +00:00
Emilio Cobos Álvarez 7b9a90e89c Bug 1834042 - Expose screen edge slop to chrome code. r=stransky,webidl,smaug
To be used by session restore.

Differential Revision: https://phabricator.services.mozilla.com/D179110
2023-05-30 09:43:59 +00:00
stransky d938e937bf Bug 1777430 [Linux] Enable VA-API HW video decoding for Intel devices r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D178760
2023-05-26 20:45:30 +00:00
stransky 7bc2921054 Bug 1825181 [Linux] Use base::SharedMemory as backend for wl_shm pool r=jld
Differential Revision: https://phabricator.services.mozilla.com/D178767
2023-05-26 07:04:26 +00:00
Martin Stransky fdbe79306e Bug 1826778 [Linux] Lock cursor type set by widget code r=emilio
If we set resize cursor on widget level keep it locked and prevent layout
to switch it back to default (by synthetic mouse events for instance)
until resize is finished.

Differential Revision: https://phabricator.services.mozilla.com/D179049
2023-05-26 06:58:35 +00:00
Masayuki Nakano e28f43b439 Bug 1825693 - Make `ContentCacheInChild::CacheTextRects` stop emplacing `Selection` r=m_kato
It creates no range `Selection` if `mSelection` has not been emplaced.
However, we don't want `Selection` in the case because `mText` may be nothing
and that violates the dependency.  Therefore, it should stop creating
`Selection` in the case.

Note that first character rect will be cached later even if there is no
`Selection`.  However, this should not occur in usual case because `focus`
notification should've already initialized `mText` and `mSelection`.

Differential Revision: https://phabricator.services.mozilla.com/D178731
2023-05-26 01:24:36 +00:00
Masayuki Nakano 5f53d66d00 Bug 1825693 - Make `PuppetWidget` stop trying to cache `Selection` directly r=m_kato
Currently, `PuppetWidget` calls `ContentCacheInChild::CacheSelection` directly.
However, `mText` can be `Nothing` or `mText` can be outdated, but `mSelection`
becomes the latest one.  Therefore, we may notify the parent process with
invalid data combination.

The callers in `PuppetWidget` are:
1. `NotifyIMEOfCompositionUpdate`
2. `NotifyIMEOfPositionChange`

I think that the former does not need to cache anything here because
`IMEContentObserver` should've updated the text/selection changes.  However,
stopping caching everything at this point is risky.  In the most cases, outdated
data appears as odd IME UI position.  Therefore, let's keep updating only caret
and text rectangles.

The latter is reported with new crash reports which is crashed by a
`MOZ_DIAGNOSTIC_ASSERT` failure added by the previous patch.  In the case,
if `mText` and `mSelection` has not been cached, we don't need to notify
the parent process with them because they will be sent later.  And also even
if they are not available, it may be useful that the character rectangles not
related to `Selection` (e.g., the first character rect).  Therefore, let's
keep caching same things as the former case.

Therefore, this patch makes `CacheSelection` a private method and add
`CacheCaretAndTextRects` for them.

Differential Revision: https://phabricator.services.mozilla.com/D178145
2023-05-26 01:24:36 +00:00
Masayuki Nakano 4c5f7cf636 Bug 1825693 - Make `ContentCache` stop assigning invalid data r=m_kato,nika
There are some crash reports crashed in TSF module which may be caused by
passing invalid selection range (e.g., out of bounds of text).  However,
the cache is created in the child process and that causes the invalid cache
creation does not appear in the crash reports.  Therefore, let's try to
crash as soon as possible if `ContentCache` has invalid data.

Note that this does not detect all of the invalid cases because it's hard to
(re-)understand the edge cases.  Therefore, this tries to detect the cases
checked in `ContentCacheInParent::HandleQueryContentEvent` (*1) and some other
obvious odd cases.

1. https://searchfox.org/mozilla-central/rev/0ffaecaa075887ab07bf4c607c61ea2faa81b172/widget/ContentCache.cpp#776-778

Differential Revision: https://phabricator.services.mozilla.com/D176747
2023-05-26 01:24:35 +00:00
Brad Werth 16f11f015a Bug 1407461 Part 2: Allow hardware acceleration for Windows drivers with mismatched DLL and registry versions in all channels. r=gfx-reviewers,jrmuizel
The presence of "DriverVersionMismatch" does not seem to be an outlying
indicator in crash reports for Intel 965 Express hardware. This patch
allows hardware WebRender in all channels for that hardware, and we'll
deal with individual driver bugs as they appear.

Differential Revision: https://phabricator.services.mozilla.com/D179147
2023-05-25 21:02:55 +00:00
Mike Hommey 04d95a11e2 Bug 1833998 - Switch Firefox builds to macOS 13.3 SDK. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D178500
2023-05-25 09:48:54 +00:00
Sandor Molnar c06a989790 Backed out changeset 6a96bb1f430f (bug 1817723) for causing reftest crashes. CLOSED TREE 2023-05-24 17:31:13 +03:00
Sean Feng a7d8029535 Bug 1817723 - Allow HTMLEditor can receive events when the focus is switched between elements in the same shadow tree. r=masayuki
The EditorEventListener for HTMLEditor is registered on document,
which is problematic because it can't receive events when the focus is
switched between elements in the same shadow tree due to shadow dom
encapsulation.

We fix this by moving the EditorEventListener to nsWindowRoot so the
events can always be received.

Differential Revision: https://phabricator.services.mozilla.com/D178215
2023-05-24 13:31:57 +00:00
Emilio Cobos Álvarez 825b7b76e5 Bug 1833403 - Simplify some appearance code. r=stransky,mac-reviewers,handyman,devtools-reviewers,mstange
I was looking into simplifying our scrollbar styles:

 * StyleAppearance::Resizer is not used in content, and some of the
   values were only for <xul:window> which are not supported anymore.

 * Statusbarpanel and Resizerpanel aren't used. Statusbar is only used
   once on macOS so we only need to keep it there.

Differential Revision: https://phabricator.services.mozilla.com/D178374
2023-05-24 11:13:58 +00:00
Edgar Chen 3a6c9d70ce Bug 1834710 - Have a generic way to initialize clipboard capabilities; r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D173009
2023-05-24 10:46:43 +00:00
Sandor Molnar c7daca2e34 Backed out changeset e8b6a5dbf398 (bug 1817723) for causing mochitest failures in editor/libeditor/EditorEventListener.cpp CLOSED TREE 2023-05-24 10:03:39 +03:00
Sean Feng df6c9aefca Bug 1817723 - Allow HTMLEditor can receive events when the focus is switched between elements in the same shadow tree. r=masayuki
The EditorEventListener for HTMLEditor is registered on document,
which is problematic because it can't receive events when the focus is
switched between elements in the same shadow tree due to shadow dom
encapsulation.

We fix this by moving the EditorEventListener to nsWindowRoot so the
events can always be received.

Differential Revision: https://phabricator.services.mozilla.com/D178215
2023-05-23 22:57:16 +00:00
Iulian Moraru 729b189a97 Backed out changeset f020820671c4 (bug 1833403) for causing reftest failures on resizer-bottomend.xhtml. CLOSED TREE 2023-05-24 01:48:48 +03:00
Emilio Cobos Álvarez 6a17b5fdf8 Bug 1833403 - Simplify some appearance code. r=stransky,mac-reviewers,handyman,devtools-reviewers,mstange
I was looking into simplifying our scrollbar styles:

 * StyleAppearance::Resizer is not used in content, and some of the
   values were only for <xul:window> which are not supported anymore.

 * Statusbarpanel and Resizerpanel aren't used. Statusbar is only used
   once on macOS so we only need to keep it there.

Differential Revision: https://phabricator.services.mozilla.com/D178374
2023-05-23 15:43:45 +00:00
Emilio Cobos Álvarez 1937b308ec Bug 1834042 - Make nsWindow::ConstrainPosition account for decorations. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D178545
2023-05-23 10:30:05 +00:00
Norisz Fay 52188d9733 Backed out changeset e2d6154400a7 (bug 1833403) for causing reftest failures on resizer-bottomend.xhtml 2023-05-23 01:03:26 +03:00
Butkovits Atila 2fc1fdfb88 Backed out changeset ff1720f8fc34 (bug 1834042) for causing Android bustages at nsWindow.h. CLOSED TREE 2023-05-23 00:54:10 +03:00
Emilio Cobos Álvarez 05b4470d2d Bug 1833403 - Simplify some appearance code. r=stransky,mac-reviewers,handyman,devtools-reviewers,mstange
I was looking into simplifying our scrollbar styles:

 * StyleAppearance::Resizer is not used in content, and some of the
   values were only for <xul:window> which are not supported anymore.

 * Statusbarpanel and Resizerpanel aren't used. Statusbar is only used
   once on macOS so we only need to keep it there.

Differential Revision: https://phabricator.services.mozilla.com/D178374
2023-05-22 20:39:11 +00:00
Emilio Cobos Álvarez 56a0e2aa64 Bug 1834042 - Make nsWindow::ConstrainPosition account for decorations. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D178545
2023-05-22 20:36:27 +00:00
sotaro 51c6d82beb Bug 1833809 - Block FEATURE_REUSE_DECODER_DEVICE with Intel Skylake r=gfx-reviewers,lsalzman
Blocked driver version is borrowed from FEATURE_HW_DECODED_VIDEO_ZERO_COPY block list. From Bug 1831329,  the block list range of FEATURE_HW_DECODED_VIDEO_ZERO_COPY might have same problem.

Differential Revision: https://phabricator.services.mozilla.com/D178607
2023-05-22 19:25:59 +00:00
stransky 262ab63a40 Bug 1833354 [Linux] Add surface dump and YUV plane clear debug code to DMABufSurfaceYUV r=emilio DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D178623
2023-05-22 18:00:19 +00:00
stransky 081833d34c Bug 1829542 [Linux] Remove GlobalRefRelease() from GlobalRefCountDelete() r=emilio
- Remove GlobalRefRelease() from GlobalRefCountDelete(). It matches current scenario where GlobalRefCountCreate() is created an unreferenced counter
  so we also should delete it without unref.
- Call explicitly GlobalRefCountDelete() from ~VideoFrameSurface() to avoid bogus error messages. DMABufSurface may be used by other parts of gecko
  even when video decoder is deleted so we don't care about DMABufSurface ref state here.
- Explicitly call GlobalRefRelease()/GlobalRefCountDelete() from ~DMABufSurface(). That matches DMABufSurface() life time scenario:
   - GlobalRefAdd/GlobalRefRelease in DMABUFSurfaceImage class / RDD process.
   - GlobalRefCountImport()/~DMABufSurface() if DMABufSurface is transfered via. IPC bridge to content/render/compositor process.
- Add DmabufRef MOZ_LOG

Depends on D178282

Differential Revision: https://phabricator.services.mozilla.com/D178283
2023-05-22 07:53:25 +00:00
stransky 75033b7344 Bug 1829542 [Linux] Disable copy of DMABufSurface class r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D178282
2023-05-22 07:53:25 +00:00
Mark Banner 130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Drew Willcoxon a4643c3877 Bug 1834135 - Improve the menuarrow and menu separator colors in non-native Mac menus in the dark appearance. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D178514
2023-05-19 22:20:03 +00:00
Ray Kraesig 2ec1920e09 Bug 1833982 - [1/1] Fix MinGW builds r=gstoll
MinGW builds don't have <shobjidl_core.h>, but do have <shobjidl.h>.
Substitute appropriately.

Differential Revision: https://phabricator.services.mozilla.com/D178550
2023-05-19 16:38:39 +00:00
Iulian Moraru 645bd13854 Backed out 2 changesets (bug 1825693) for causing reftest failures related to ContentCache::Selection. CLOSED TREE
Backed out changeset 6a854fc8f509 (bug 1825693)
Backed out changeset f0646a32d694 (bug 1825693)
2023-05-19 04:15:46 +03:00
Masayuki Nakano 718cc92528 Bug 1825693 - Make `PuppetWidget` stop trying to cache `Selection` directly r=m_kato
Currently, `PuppetWidget` calls `ContentCacheInChild::CacheSelection` directly.
However, `mText` can be `Nothing` or `mText` can be outdated, but `mSelection`
becomes the latest one.  Therefore, we may notify the parent process with
invalid data combination.

The callers in `PuppetWidget` are:
1. `NotifyIMEOfCompositionUpdate`
2. `NotifyIMEOfPositionChange`

I think that the former does not need to cache anything here because
`IMEContentObserver` should've updated the text/selection changes.  However,
stopping caching everything at this point is risky.  In the most cases, outdated
data appears as odd IME UI position.  Therefore, let's keep updating only caret
and text rectangles.

The latter is reported with new crash reports which is crashed by a
`MOZ_DIAGNOSTIC_ASSERT` failure added by the previous patch.  In the case,
if `mText` and `mSelection` has not been cached, we don't need to notify
the parent process with them because they will be sent later.  And also even
if they are not available, it may be useful that the character rectangles not
related to `Selection` (e.g., the first character rect).  Therefore, let's
keep caching same things as the former case.

Therefore, this patch makes `CacheSelection` a private method and add
`CacheCaretAndTextRects` for them.

Depends on D176747

Differential Revision: https://phabricator.services.mozilla.com/D178145
2023-05-18 23:56:07 +00:00
Masayuki Nakano a6448bb218 Bug 1825693 - Make `ContentCache` stop assigning invalid data r=m_kato,nika
There are some crash reports crashed in TSF module which may be caused by
passing invalid selection range (e.g., out of bounds of text).  However,
the cache is created in the child process and that causes the invalid cache
creation does not appear in the crash reports.  Therefore, let's try to
crash as soon as possible if `ContentCache` has invalid data.

Note that this does not detect all of the invalid cases because it's hard to
(re-)understand the edge cases.  Therefore, this tries to detect the cases
checked in `ContentCacheInParent::HandleQueryContentEvent` (*1) and some other
obvious odd cases.

1. https://searchfox.org/mozilla-central/rev/0ffaecaa075887ab07bf4c607c61ea2faa81b172/widget/ContentCache.cpp#776-778

Differential Revision: https://phabricator.services.mozilla.com/D176747
2023-05-18 23:56:06 +00:00
Ray Kraesig 68ee8294e7 Bug 1833450 - [4/4] Windows nsFilePicker: abort on failure to extract names from shell items r=handyman
The one functional change in this patchset: if a name cannot be
extracted from any IShellItem during multiple-selection, fail the entire
operation instead of only quietly dropping the failed items.

(The vast majority of IShellItem instances have filesystem paths -- even
if they're shell-generated nonce paths, sometimes -- so there's not
likely to be any effective difference here for any end-user.)

Depends on D178204

Differential Revision: https://phabricator.services.mozilla.com/D178480
2023-05-18 22:29:53 +00:00
Ray Kraesig d65140658c Bug 1833450 - [3/4] Windows nsFilePicker: convert to use IPC-able Command structs r=gstoll,handyman
Convert `nsFilePicker` to use the `Command` structs introduced in the
first commit in this patchset. No functional changes -- this should be a
straight reorganization of internal code.

Additionally, remove from `WinUtils` the now-unused function
`GetShellItemPath`, whose functionality has been moved into `Command`'s
associated functions' translation unit. (This function was added to
WinUtils in 2012 as part of supporting the Windows Vista file picker
(bug 718374). It's not overtly filepicker-specific, but in the past
eleven years, no other code has ever used it.)

Differential Revision: https://phabricator.services.mozilla.com/D178204
2023-05-18 22:29:53 +00:00
Ray Kraesig 7e4941fcde Bug 1833450 - [2/4] Windows nsFilePicker: prefatory cleanup r=gstoll,handyman
Perform some cleanup on `nsFilePicker` before refactoring to use the
`Command` type from the previous commit:

- Remove stray `typedef`s/`using`s.
- Remove an unused member `mFilterList`.
- Eliminate the private class `ComDlgFilterSpec`, mostly replacing it
  with a plain `nsTArray`.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D178203
2023-05-18 22:29:53 +00:00
Ray Kraesig 1989fc2047 Bug 1833450 - [1/4] Windows nsFilePicker: Add IPC-able Windows-file-dialog commands r=gstoll,handyman
In preparation for moving the file picker dialog's invocation out-of-
process (bug 1677170), create an IPC-compatible `Command` type -- a
reification of the method calls we actually perform to set up the file
dialog -- along with supporting functionality to apply those commands to
an IFileDialog, as needed.

No functional changes, as this type isn't yet created by anything:
that's left for a later commit in this patchset.

Differential Revision: https://phabricator.services.mozilla.com/D178202
2023-05-18 22:29:52 +00:00
Emilio Cobos Álvarez 96ec01bce7 Bug 1651463 - Add CSD offset in MoveResize as needed. r=stransky
gtk_window_move undoes that...

Differential Revision: https://phabricator.services.mozilla.com/D178385
2023-05-18 13:37:25 +00:00
Drew Willcoxon 929e1e4d77 Bug 1831760 - Use a native popup menu for positioned popups on Mac. r=dao,mstange
This does two things:

* Modify `nsXULPopupManager::ShowPopup()` so it calls `ShowPopupAsNativeMenu()`
  as long as an anchor wasn't passed in, and only on Mac.
* Modify `-[MOZMenuOpeningCoordinator _openMenu:atScreenPosition:forView:withAppearance:]`
  so it also takes a `aIsContextMenu` param. If the param is true, we synthesize
  a right-click event and pop up a context menu as usual. If it's false, we use
  `-[NSMenu popUpMenuPositioningItem:atLocation:inView:]` instead.

The reason this works is because `-[NSMenu popUpMenuPositioningItem:atLocation:inView:]`
opens the menu in a sensible place when the x-y coords are near the right edge
of the screen. In contrast, `+[NSMenu popUpContextMenu:withEvent:forView:]` will
anchor the menu's top-right corner to the mouse cursor when near the right edge.

Differential Revision: https://phabricator.services.mozilla.com/D177355
2023-05-18 05:51:19 +00:00
Steven Michaud 1e83d36cf6 Bug 1801419 - Explicitly load and initialize SidecarCore framework. r=mac-reviewers,spohl
Differential Revision: https://phabricator.services.mozilla.com/D177186
2023-05-17 20:06:07 +00:00