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

398 Коммитов

Автор SHA1 Сообщение Дата
Olli Pettay 5d21de32ac Bug 1807812 - Remove WidgetEventTime::mTime, r=masayuki,geckoview-reviewers,m_kato
HTMLSelectEventListener changes are needed, since currently that code works somewhat by accident given that
mTime often contains totally bogus values, like PR_IntervalNow(). Those changes then reveal issues also in
browser_editAddressDialog.js.

Differential Revision: https://phabricator.services.mozilla.com/D165618
2023-01-02 12:31:40 +00:00
Matthias Camenzind c9300fab1e Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-15 23:13:00 +00:00
Cosmin Sabou 7089ec234d Backed out changeset 3b9e2c9256f8 (bug 1803966) for causing regressions on bugs 1786514, 1792516 and 1789145. 2022-12-08 01:52:10 +02:00
Olli Pettay 02dc105128 Bug 1803966 - Consider to not trigger the paint of the initial about:blank so eagerly when doing a process switch, r=emilio
This is a micro-optimization to process switching.  Often the paint delayes child process to send back information that it is ready to receive data from the parent process.
There are be other tiny issues like this too.

Differential Revision: https://phabricator.services.mozilla.com/D163789
2022-12-07 00:34:34 +00:00
Sandor Molnar a1e9c1d43b Backed out 4 changesets (bug 1786048) for causing multiple failures. CLOSED TREE
Backed out changeset ae94135e68ef (bug 1786048)
Backed out changeset f505df8a481a (bug 1786048)
Backed out changeset 999a18d6f33e (bug 1786048)
Backed out changeset e71e8644b8a9 (bug 1786048)
2022-12-02 20:30:07 +02:00
Matthias Camenzind 562af0a9b4 Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-02 16:47:46 +00:00
Marian-Vasile Laza bec56391bf Backed out 4 changesets (bug 1786048) for causing bc failures on browser_modal_resize.js. CLOSED TREE
Backed out changeset 318a2d2e6e39 (bug 1786048)
Backed out changeset 17a9990d6d19 (bug 1786048)
Backed out changeset 205f129c648a (bug 1786048)
Backed out changeset 0750c885a688 (bug 1786048)
2022-12-01 05:00:38 +02:00
Matthias Camenzind 81ce314e5c Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-11-30 19:37:16 +00:00
Nika Layzell 91a521bf3a Bug 1781129 - Part 1: Use BigBuffer for IPCDataTransfer, r=edgar
The IPCDataTransfer type is used to transfer Clipboard/Drag & Drop payloads
over IPC to allow them to be written to or read from the relevant system
interfaces. Previously, the system which was used was somewhat complex, and
tried to use Shmem in some cases to store buffers out of line. Now that
BigBuffer is available, it can be simplified substantially.

In addition, this change removed the memory buffer overload of GetSurfaceData,
as the only consumer was using it to immediately send the payload over IPC as a
nsCString. It was changed to instead use `BigBuffer` as that is more efficient
in a large buffer situation, and reduces the number of required copies.

Differential Revision: https://phabricator.services.mozilla.com/D151852
2022-08-26 16:08:05 +00:00
Marian-Vasile Laza 9274b092fe Backed out 4 changesets (bug 1781129) for causing mochitest failures on test_bug490879.html. CLOSED TREE
Backed out changeset 37da1d18cde9 (bug 1781129)
Backed out changeset 1ae213bfa43e (bug 1781129)
Backed out changeset dcebc98ea1f1 (bug 1781129)
Backed out changeset 0df2f2832755 (bug 1781129)
2022-08-22 23:07:56 +03:00
Nika Layzell 6c8af6eff5 Bug 1781129 - Part 1: Use BigBuffer for IPCDataTransfer, r=edgar
The IPCDataTransfer type is used to transfer Clipboard/Drag & Drop payloads
over IPC to allow them to be written to or read from the relevant system
interfaces. Previously, the system which was used was somewhat complex, and
tried to use Shmem in some cases to store buffers out of line. Now that
BigBuffer is available, it can be simplified substantially.

In addition, this change removed the memory buffer overload of GetSurfaceData,
as the only consumer was using it to immediately send the payload over IPC as a
nsCString. It was changed to instead use `BigBuffer` as that is more efficient
in a large buffer situation, and reduces the number of required copies.

Differential Revision: https://phabricator.services.mozilla.com/D151852
2022-08-22 15:38:14 +00:00
Marian-Vasile Laza 0bebd4fea4 Backed out 4 changesets (bug 1781129) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 8557305bcd46 (bug 1781129)
Backed out changeset df6f98df9559 (bug 1781129)
Backed out changeset 905393f66985 (bug 1781129)
Backed out changeset 0d0f19a4db70 (bug 1781129)
2022-08-02 23:29:56 +03:00
Nika Layzell 5eebe3259a Bug 1781129 - Part 1: Use BigBuffer for IPCDataTransfer, r=edgar
The IPCDataTransfer type is used to transfer Clipboard/Drag & Drop payloads
over IPC to allow them to be written to or read from the relevant system
interfaces. Previously, the system which was used was somewhat complex, and
tried to use Shmem in some cases to store buffers out of line. Now that
BigBuffer is available, it can be simplified substantially.

In addition, this change removed the memory buffer overload of GetSurfaceData,
as the only consumer was using it to immediately send the payload over IPC as a
nsCString. It was changed to instead use `BigBuffer` as that is more efficient
in a large buffer situation, and reduces the number of required copies.

Differential Revision: https://phabricator.services.mozilla.com/D151852
2022-08-02 18:09:40 +00:00
Marian-Vasile Laza 00079e8784 Backed out 4 changesets (bug 1781129) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 4a92d58726aa (bug 1781129)
Backed out changeset bce3f99441c0 (bug 1781129)
Backed out changeset fc135243503e (bug 1781129)
Backed out changeset 726458f976ff (bug 1781129)
2022-08-02 20:32:01 +03:00
Nika Layzell 452233a5a1 Bug 1781129 - Part 1: Use BigBuffer for IPCDataTransfer, r=edgar
The IPCDataTransfer type is used to transfer Clipboard/Drag & Drop payloads
over IPC to allow them to be written to or read from the relevant system
interfaces. Previously, the system which was used was somewhat complex, and
tried to use Shmem in some cases to store buffers out of line. Now that
BigBuffer is available, it can be simplified substantially.

In addition, this change removed the memory buffer overload of GetSurfaceData,
as the only consumer was using it to immediately send the payload over IPC as a
nsCString. It was changed to instead use `BigBuffer` as that is more efficient
in a large buffer situation, and reduces the number of required copies.

Differential Revision: https://phabricator.services.mozilla.com/D151852
2022-08-02 17:15:41 +00:00
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
Emilio Cobos Álvarez ee23efc9b5 Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel
In bug 1773342 I made OS text scale factor behave like a full zoom
factor which applies to all pages (including the browser chrome). That's
generally straight forward but it makes some callsites that use unzoomed
CSS coordinates misbehave (or behave correctly accidentally actually in
some other cases).

The main fix here is making
nsIBaseWindow::UnscaledDevicePixelsPerCSSPixel() and
nsIScreen::GetDefaultCSSScaleFactor() account for OS zoom as necessary.
However, I also went through the relevant code and cleaned it up to use
typed units and operations when possible.

The setup means:

 * nsIWidget::GetDefaultScale() doesn't account for OS full zoom.
 * nsIBaseWindow and nsIScreen does.

These are the places where this should matter and stuff can get
confused, but this works surprisingly well for all callers (except one
nsDeviceContext one which we use only for PuppetWidget and we can
remove by falling back to 1.0 like all other widgets until the update
comes).

Differential Revision: https://phabricator.services.mozilla.com/D149033
2022-06-14 15:01:52 +00:00
Norisz Fay 60ea7706bd Backed out changeset da5c71190673 (bug 1773813) for causing build bustages CLOSED TREE 2022-06-14 15:13:58 +03:00
Emilio Cobos Álvarez c64d0fcaa6 Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel
In bug 1773342 I made OS text scale factor behave like a full zoom
factor which applies to all pages (including the browser chrome). That's
generally straight forward but it makes some callsites that use unzoomed
CSS coordinates misbehave (or behave correctly accidentally actually in
some other cases).

The main fix here is making
nsIBaseWindow::UnscaledDevicePixelsPerCSSPixel() and
nsIScreen::GetDefaultCSSScaleFactor() account for OS zoom as necessary.
However, I also went through the relevant code and cleaned it up to use
typed units and operations when possible.

The setup means:

 * nsIWidget::GetDefaultScale() doesn't account for OS full zoom.
 * nsIBaseWindow and nsIScreen does.

These are the places where this should matter and stuff can get
confused, but this works surprisingly well for all callers (except one
nsDeviceContext one which we use only for PuppetWidget and we can
remove by falling back to 1.0 like all other widgets until the update
comes).

Differential Revision: https://phabricator.services.mozilla.com/D149033
2022-06-14 11:37:25 +00:00
Chris Martin 80881746de Bug 1763023 - Push nsBaseWidget::mSizeMode into child classes r=handyman
This member is no longer used on Windows, and having it in the
base class doesn't provide a real abstraction anyway since
the child classes will break if anything about it is changed.

Differential Revision: https://phabricator.services.mozilla.com/D145132
2022-05-02 14:06:17 +00:00
Emilio Cobos Álvarez 88681fbb2f Bug 1767165 - Fix dragend coordinates in child processes after bug 1756241. r=tnikkel
Bug 1756241 changed nsDragService::mDragEndPoint to be relative to the
window. I didn't realize, but that point is passed as-is to child
widgets. Changing the widget event to actually have a widget made the
point be interpreted as widget-relative (which is correct in the parent
process, but not in the child process). Account for this and fix the
mDragEndPoint documentation while at it.

Differential Revision: https://phabricator.services.mozilla.com/D145182
2022-05-02 10:09:41 +00:00
Masayuki Nakano 91e18f14d8 Bug 1760160 - Make `ContentCacheInChild` stop storing content if editable element has already been blurred r=m_kato
It's designed for caching content information of focused editor.  However, at
sending focus notification to the main process, the editor may have already
been blurred but `IMEContentObserver` may have not known it yet.  In this edge
case, only query selection succeeds since IMEContentObserver still has a cache,
but query the others failed because of root content node check of
`IMEContentObserver::HandleQueryContentEvent`.  If a content process meets this
case, it should not send focus notification and stop storing the content since
IME shouldn't get focus nor query non-editable content.

On the other hand, the reported testcase reproduces this with a fuzzing API
called **in** the content process. Therefore, I have no idea how to reproduce
it without the API. That's the reason why this patch does not contain new tests.

Differential Revision: https://phabricator.services.mozilla.com/D141821
2022-04-07 00:58:49 +00:00
Timothy Nikkel 4cac1c7814 Bug 1763121. nsIDOMWindowUtils::sendNativeTouchpadPan should use an observer to notify when the event has been sent to the destination widget. r=hiro
Otherwise we can return without the widget even seeing the event. This is how other test functions are implemented.

We need this to make the test in bug 1757928 pass.

Differential Revision: https://phabricator.services.mozilla.com/D142943
2022-04-05 22:53:35 +00:00
Emilio Cobos Álvarez 9f85342dbb Bug 1758357 - Fix PuppetWidget::SetCursor to avoid sending cursor updates to the parent process over and over. r=mstange
I accidentally regressed this in bug 1705877, so we'd always
force-update the cursor :(

Differential Revision: https://phabricator.services.mozilla.com/D141863
2022-03-23 15:31:02 +00:00
Emilio Cobos Álvarez ef103031be Bug 1759204 - Introduce ShmemImage to easily pass images via IPC. r=aosmond
This shares code with the transferable / cursor stuff which are the
other two non-rendering callers that deal with images over IPC.

We're going to introduce a consumer of this new type in a second, but
this was worth getting reviewed separately.

Differential Revision: https://phabricator.services.mozilla.com/D141110
2022-03-15 18:14:07 +00:00
Masayuki Nakano d450beac6f Bug 1191862 - part 1: Make `nsIWidget::NativeKeyBindingsType` independent from `nsIWidget` and defined in an independent header file r=smaug
I'd like to use it in `IMEData.h`.  However, adding new include into it may
cause bustage with MinGW, and it's included by `nsIWidget.h` because `nsIWidget`
requires some classes defined in `IMEData.h`.  Therefore, I'd like to make a
new header file for avoiding the include hell.

Differential Revision: https://phabricator.services.mozilla.com/D138007
2022-02-15 08:00:05 +00:00
Masayuki Nakano 47397b7081 Bug 1746104 - part 6-2: Make constructors of `ContentCache::Selection` take `IMENotification::SelectionChangeData` or `WidgetQueryContentEvent` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D137428
2022-02-07 22:33:40 +00:00
Makoto Kato 3da88d8e66 Bug 1743780 - Get rid of PuppetScreenManager and PuppetScreen. r=emilio
Now we use `mozilla::widget::ScreenManager` even if on content process, so no
one uses `PuppetScreen` and `PuppetScreenManager`.

And I would like to remove `Hal.h` reference from `PuppetWidget`, so I remove
unused method.

Differential Revision: https://phabricator.services.mozilla.com/D132564
2021-12-01 15:07:14 +00:00
Emilio Cobos Álvarez 6c858f9e0c Bug 1736441 - Remove a bunch of dead plugins code from widget/. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D128863
2021-10-19 11:19:13 +00:00
Marian-Vasile Laza 0f2876e6ca Backed out changeset 115b43608ec1 (bug 1736441) for causing build bustages on nsWindow.cpp. CLOSED TREE 2021-10-19 13:54:23 +03:00
Emilio Cobos Álvarez c70d201838 Bug 1736441 - Remove a bunch of dead plugins code from widget/. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D128863
2021-10-19 10:06:50 +00:00
Jeff Muizelaar 6ff665fec1 Bug 1736086 - Rename CreateBasicLayerManager to CreateFallbackRenderer. r=gfx-reviewers,mstange
That's what it actually does now

Differential Revision: https://phabricator.services.mozilla.com/D128634
2021-10-16 00:02:45 +00:00
Kagami Sascha Rosylight 6c8d3ce28a Bug 1728171 - Part 2: Add button parameter to utils.sendNativePenInput r=cmartin,edgar
Differential Revision: https://phabricator.services.mozilla.com/D124172
2021-09-06 11:50:34 +00:00
Matt Woodrow d41e38aec0 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124433
2021-09-05 22:36:45 +00:00
Matt Woodrow 3d0a5489ce Bug 1728914 - Remove widget code references to AsLayerManager and access WebRender directly. r=gfx-reviewers,aosmond,jrmuizel
Depends on D124415

Differential Revision: https://phabricator.services.mozilla.com/D124416
2021-09-05 02:16:36 +00:00
Matt Woodrow d751b43176 Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 04:59:57 +00:00
Butkovits Atila c83e348e26 Backed out 2 changesets (bug 1727488, bug 1727489) for causing bustages on KnowsCompositor.cpp. CLOSED TREE
Backed out changeset 5a00db1b7a6a (bug 1727489)
Backed out changeset 13686567e748 (bug 1727488)
2021-08-26 04:49:16 +03:00
Matt Woodrow 0d4e9aa48a Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 00:25:21 +00:00
Matt Woodrow 7755c29fd8 Bug 1727423 - Remove BasicLayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123555
2021-08-25 07:35:17 +00:00
criss 58591696b7 Backed out 2 changesets (bug 1727423) for causing build bustages
Backed out changeset 9b2ca95a6527 (bug 1727423)
Backed out changeset 1f01fcbd46a8 (bug 1727423)
2021-08-25 04:41:35 +03:00
Matt Woodrow 59e71b6c78 Bug 1727423 - Remove BasicLayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123555
2021-08-25 01:04:26 +00:00
Jeff Muizelaar 2937dbb0e1 Bug 1727395 - Remove unused ClientLayerManager.h includes. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D123518
2021-08-24 19:27:26 +00:00
Matt Woodrow 2cd0480476 Bug 1726063 - Remove support for non-WR compositor initialization. r=jrmuizel,aosmond
Depends on D122796

Differential Revision: https://phabricator.services.mozilla.com/D122798
2021-08-17 23:19:44 +00:00
Matt Woodrow f8ba1239ca Bug 1726063 - Remove option to use BasicLayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D122796
2021-08-17 23:19:44 +00:00
Timothy Nikkel 5014725e77 Bug 1678771. Add test. r=hiro
We implement a new nsIDOMWindowUtils function sendNativeTouchpadPan to do this. It is only implemented on Windows here.

Depends on D122048

Differential Revision: https://phabricator.services.mozilla.com/D122049
2021-08-08 22:04:18 +00:00
Timothy Nikkel 5eefc2666f Bug 1678771. Rename TouchpadPinchPhase to TouchpadGesturePhase. r=hiro
So we can use it for sending pan gestures too.

Depends on D114358

Differential Revision: https://phabricator.services.mozilla.com/D122048
2021-08-08 22:04:17 +00:00
Matt Woodrow 9558b10a83 Bug 1722258 - Add FallbackRenderer to replace BasicLayerManager usage. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120921
2021-08-05 06:48:34 +00:00
Matt Woodrow 4b6db2ad05 Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120920
2021-08-05 06:48:34 +00:00
Csoregi Natalia bc4c680c8d Backed out 3 changesets (bug 1722258) for causing Bug 1722935. a=backout
Backed out changeset cf8a1175abd1 (bug 1722258)
Backed out changeset 41176d476eb7 (bug 1722258)
Backed out changeset 4149d596d03d (bug 1722258)
2021-07-29 20:19:48 +03:00
Matt Woodrow 0c782c8447 Bug 1722258 - Add FallbackRenderer to replace BasicLayerManager usage. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120921
2021-07-28 20:58:23 +00:00