It has been deprecated since GTK 3.12 as it can not reliable work on
modern X11 compositors.
On Wayland, the equivalent functionally is part of the core protocol
via frame callbacks.
While on it, mark a call to `gtk_widget_set_double_buffered` explicitly
limited to X11.
Differential Revision: https://phabricator.services.mozilla.com/D84624
- Fallback to utf-8 when charset is not set for text/html.
- Move GetHTMLCharset() call out of ConvertHTMLtoUCS2() and use charset param there.
- Make GetHTMLCharset()/ConvertHTMLtoUCS2() return bool.
Depends on D84492
Differential Revision: https://phabricator.services.mozilla.com/D84493
This is timing issue when using iFLYTEC keyboard in Xiaomi App Store.
Although replace text transaction often dispatch dummy text change, it may be
unnecessary when other text change is already in text change queue. This issue
occurs if dummy text change is dispatched in the queue and other text change
is also dispatched in the queue.
`AddIMETextChange` merges old text change with newer text change when its range
is overlapped, but it doesn't consider range is same. So if same range, we
should adjust old end simply.
GV-junit test case emulates this situation, but since this is timing issue,
we won't reproduce this by this test case. But it is useful to check future
regressions.
Differential Revision: https://phabricator.services.mozilla.com/D84140
Actually, altough TSF and IMEStateManager have the logging for InputContext,
I would like to use common logging code using `ToString.h`.
Differential Revision: https://phabricator.services.mozilla.com/D84287
Migrate DRM pixel format setup from nsWaylandDiplay to nsDMABufDevice so we don't need nsWaylandDisplay connection
to create a dmabuf surface.
It reduces wayland display connections, saves resources and allows to create dmabuf surfaces on X11 EGL config.
Differential Revision: https://phabricator.services.mozilla.com/D84900
Recently we create sync during dmabuf surface import which may fail as GL context may be missing.
In this patch we postpone sync creation until the sync is actually used at DMABufSurface::FenceWait().
Differential Revision: https://phabricator.services.mozilla.com/D84693
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.
Differential Revision: https://phabricator.services.mozilla.com/D83674
we only draw quads, and for quads we have a fixed vertex buffer with positions.
If we get stop using instancing, we'll no longer have the luxury of 4 vertices there.
Given that they are trivial to compute, it seems simpler to just do that in the shader today.
So this PR is a required step on the way to instance-less rendering.
It appears that we are hitting a driver bug with Intel on macOS, where scissored clears don't work properly if we render without per-vertex attributes.
It doesn't make a ton of sense, but switching to quad clears appears to fix it for me. Added the corresponding entry to the wiki - https://github.com/servo/webrender/wiki/Driver-issues#bug-1652763---glitches-on-macos-intel-with-clears
Differential Revision: https://phabricator.services.mozilla.com/D83391
For initial implementation of remote backbuffer, I took a simple approach of
just BitBlt-ing the entire backbuffer contents to the window.
This now only updates the bounding rectangle of the dirty region.
Differential Revision: https://phabricator.services.mozilla.com/D84351
This includes adding nsPrinterWin and nsPaperWin, so that we can retrieve
information from the printer device lazily.
Differential Revision: https://phabricator.services.mozilla.com/D84009
At some point it might be good to move all of the interaction with the native
Windows printer API into some sort of wrapper class, but this keeps it simple
for now.
Differential Revision: https://phabricator.services.mozilla.com/D84008
* Use clearer pref names.
* Default (and only support) IPDL dispatching.
* Make DispatchCommands async-only.
* Sync ipdl command per sync webgl entrypoint.
* Eat the boilerplate cost, since there's not too many.
* Run SerializedSize off same path as Serialize.
* All shmem uploads go through normal DispatchCommands.
* Defer pruning of dead code for now so we can iterate quickly.
* Use Read/Write(begin,end) instead of (begin,size).
* This would have prevented a bug where we read/wrote N*sizeof(T)*sizeof(T).
Differential Revision: https://phabricator.services.mozilla.com/D81495
Avoid using a separate list of pointer-to-pointers to the members to hold the
functions. Also use a macro to actually invoke this, which will be useful when
we allow having a hard-dependency on CUPS for OS X.
Differential Revision: https://phabricator.services.mozilla.com/D84022
Cleans up the code a bit to make actually used fallback code easier to spot
and update the required GTK version so deprecation warnings are more accurate.
Also make `gdk_window_set_opaque_region` always available - we can now assume
it to be present in all supported versions.
Differential Revision: https://phabricator.services.mozilla.com/D82804
This timestamp is provided by the system on macOS, and estimated as "the next
vsync" on all other platforms.
On macOS, the output time increments in very consistent amounts. The timestamp
is independent of when exactly the vsync callback ends up running, so it is less
vulnerable to unfortunate thread scheduling.
This makes it a more reliable source for picking video frames, for example.
Differential Revision: https://phabricator.services.mozilla.com/D83828
This patch adds detection for XWayland, as that is sometimes an
important distinction when debugging WebRender bugs. For all intents and
purposes, it should work the same as X11, but sometimes does not.
This patch also fixes the desktop environment detection for a few corner
cases. Budgie, in particular, claims to be a GNOME variant, which is not
correct for our purposes, and DWM wasn't detected at all.
Differential Revision: https://phabricator.services.mozilla.com/D83876
This is regression by bug 1618759 and bug 1197722.
By bug 1197722, we use registry value whether opening software keyboard even if
desktop mode. But this fix isn't enough.
Also, before landing bug 1618759, since TSF manages software keyboard state on
newer Windows 10 version such as Windows 10 RS1, bug 1197722's fix isn't used.
Then, after landing bug 1618759, since we use `EnableDesktopModeAutoInvoke`
again, this issue occurs.
Since `EnableDesktopModeAutoInvoke` is available if in HKLM, we should read
HKLM's key too.
Differential Revision: https://phabricator.services.mozilla.com/D83489
Uses of `-moz-appearance: none` are changed to `appearance: none`.
Uses of other values that are simply reverting the appearance back to
its default are changed to `appearance: auto`.
Uses of values in UA sheets that are defining the inherent appearance of
widgets are changed to:
appearance: auto;
-moz-default-appearance: <value>;
since those values are either no longer supported on (-moz-)appearance,
or are still supported but only in some limited form.
There are some uses of `-moz-appearance: textfield` on <input
type=number> elements that are renamed to `appearance: textfield`.
Differential Revision: https://phabricator.services.mozilla.com/D83430
With these changes, on my Linux analysis with ClangBuildAnalyzer, the
top two expensive headers, DOMTypes.h and TabMessageUtils.h are no longer
among the 30 most expensive headers.
Differential Revision: https://phabricator.services.mozilla.com/D82935
we only draw quads, and for quads we have a fixed vertex buffer with positions.
If we get stop using instancing, we'll no longer have the luxury of 4 vertices there.
Given that they are trivial to compute, it seems simpler to just do that in the shader today.
So this PR is a required step on the way to instance-less rendering.
It appears that we are hitting a driver bug with Intel on macOS, where scissored clears don't work properly if we render without per-vertex attributes.
It doesn't make a ton of sense, but switching to quad clears appears to fix it for me. Added the corresponding entry to the wiki - https://github.com/servo/webrender/wiki/Driver-issues#bug-1652763---glitches-on-macos-intel-with-clears
Differential Revision: https://phabricator.services.mozilla.com/D83391
As reported, Microsoft ChangJie is not async layout handling aware. As far as
I've tested, other IMEs for both Simplified and Traditional Chinese TIPs on
Win10. So, we should take the hack back in Nightly channel for ChangJie
even when it runs on new Win10 build.
Differential Revision: https://phabricator.services.mozilla.com/D83286
- Add macOS-specific function to retrieve the paper list for a given printer.
- Add JS test to ensure papers are initialized with valid values.
Differential Revision: https://phabricator.services.mozilla.com/D82598
- Add macOS-specific function to retrieve the paper list for a given printer.
- Add JS test to ensure papers are initialized with valid values.
Differential Revision: https://phabricator.services.mozilla.com/D82598
Same as the previous patch, it can be split to computation part and
modifying the DOM tree part. Then, the former can be in `TextFragmentData`
and the latter can be done by the caller which is only
`WSRunObject::InsertText()`.
Depends on D82699
Differential Revision: https://phabricator.services.mozilla.com/D82700
- Add macOS-specific function to retrieve the paper list for a given printer.
- Add JS test to ensure papers are initialized with valid values.
Differential Revision: https://phabricator.services.mozilla.com/D82598
The `systemDefaultPrinter` attribute in `nsIPrinterList` currently has
only one usage: to retrieve the printer's name. This patch changes the
attribute to be the name instead of the whole printer until such
funcationality is needed.
Differential Revision: https://phabricator.services.mozilla.com/D82951
Currently `nsWindow::UpdateNonClientMargins()` calls DPI-unaware `GetSystemMetrics()` to get the window frame sizes and `nsWindow::ProcessMessage()` simply multiplies them by the screen scale ratio. This is wrong as the frame sizes do not increase in linear scale (8 in 100% scale while 13 in 200% scale). This patch uses DPI-aware `GetSystemMetricsForDpi()` to correct this.
Differential Revision: https://phabricator.services.mozilla.com/D81447
If the device key is empty, we are most likely in a remote desktop environment. In this case we set the devicekey to an empty string so it can be handled later and not early out.
Differential Revision: https://phabricator.services.mozilla.com/D81782
CLOSED TREE
Backed out changeset 51d7c644a1e6 (bug 1650163)
Backed out changeset 3d2b6908447a (bug 1650163)
Backed out changeset 79141707d47b (bug 1650163)
The goal here is to make it so that we don't special case the device on Mac
so that we can switch GPUs without needing to reset any state.
There a couple of parts to this:
1. Disable texture storage so that we can use BGRA textures and don't need swizzling.
2. Use the recommended GL_UNSIGNED_INT_8_8_8_8_REV for BGRA on desktop GL.
3. Disable swizzling.
4. Always do the PBO workaround.
Differential Revision: https://phabricator.services.mozilla.com/D82223
If client script wants to commit composition string per input, it sometimes
use the following script.
```
let input = document.getElementById('input');
input.addEventListener('input', () => {
input.blur();
input.focus();
});
```
Since `blur` will commit composition string, this script can commit text. But
since Gecko has an optimization for this situation, focus won't be lost
completely.
Although GeckoView synchronizes Java text and selection with Gecko text when
getting focus, this sample may be failed due to timing issue. `blur` tries to
commit string, but result is never returned since focus is lost as temporary
(although text is finally committed in Gecko.). Then, GeckoView are waiting
for result that is never returned forever, So this synchronization is failed.
When getting focus again, we should synchronize it at force.
Differential Revision: https://phabricator.services.mozilla.com/D80147
Suppose the current artwork is <img A, img B, img C> and Firefox is
currently fetching img B, whose index is 1 in the artwork. If the
artwork is updated to <img D, img B> before img B is fetched, then
Firefox will skip fetching a new image since img B is also an acceptable
choice in the new artwork. However, if Firefox fails to fetch img B, in
the current implementation, a new image at (previous index + 1) would be
fetched, as a fallback plan. In the above case, the index is 2, which is
out of the bound of the new artwork.
Instead of caching the previous index of an image in the artwork and
using the the previous index plus 1 as the index of the next available
image, the index of the next available image should be reset every time
when artwork is updated
Differential Revision: https://phabricator.services.mozilla.com/D81960
- Add new interface for `nsIPrinter`.
- Add readonly attribute for printer name.
- Add implementation of interface: `nsPrinter`.
- Rename `nsIPrinterEnumerator` to `nsIPrinterList`.
- Refactor `nsIPrinterList` to use `nsIPrinter`.
Differential Revision: https://phabricator.services.mozilla.com/D81414
I can't see any reason why we need this. If we do indeed need it then our content scrollbars are broken because this only reconstructs frames in the parent. I read through bug 868498 and I didn't see a clear reason this was needed. Perhaps because of some bug with re-styling native anonymous content that has since been fixed?
Differential Revision: https://phabricator.services.mozilla.com/D80586
Patch by Robert Mader [:rmader]
This enables support for EGL on X11, toggled by setting the
MOZ_X11_EGL env variable. It allows running the Webrender
and OpenGL compositors basically like we do with GLX by default.
Note that that there are several things missing:
- no pixmap sharing support (not clear if we want/need it)
- it still uses GLX for several things like finding the X11 visual, VSync and glxtest.
It includes some cleanups, mostly in order to decouple the X11
and Wayland implementations a bit more.
Differential Revision: https://phabricator.services.mozilla.com/D76417
`mThumbnailUrl` is always reset after `ClearThubnamil` or `SetThumbnail`
is called. Setting `mThumbnailUrl` in these functions makes sure it
always has the correct value.
Differential Revision: https://phabricator.services.mozilla.com/D81572
`RefreshDisplay` always comes after `SetMusicMetadata`, `SetThumbnail`,
or `ClearThumbnail`. Merging the `RefreshDisplay` into these functions
makes sure the the code in `RefreshDisplay` and those functions will be
executed together.
Differential Revision: https://phabricator.services.mozilla.com/D81571
The current image cache mechanism fails in the following example:
Suppose the artwork for track 1, 2 are <img A, img B> and <img C, img A>
respectively. If the initial metadata in a media session is for track 1
and the current active image is img A, when switching the metadata of
the media session from track 1 to 2, the image will be reset to img C in
the current implementation. However, there is no need to update the
active image since img A is also an acceptable choice for track 2.
This patch reduce the image reset for above case. The image will only be
updated if the request one is different from the one in use.
Differential Revision: https://phabricator.services.mozilla.com/D80524
This Win32 API will need to be remoted for Win32k lockdown. As it falls under
the <uxtheme.h> system header, I believe it makes the most sense to centralize
it as "nsUXThemeData::IsAppThemed()", and then turn that into a remoted API.
Differential Revision: https://phabricator.services.mozilla.com/D80564
SPI_GETFLATMENU uses the newly-added WinContentSystemParameters and adds
the ability to update theme-related variables when they change.
Differential Revision: https://phabricator.services.mozilla.com/D80071
No longer called. This was done as an optimization for OOP iframes, but
it affects the scrollport so it's clearly not sound (the visible rect
shouldn't affect the layout scroll port).
If very tall OOP iframes are a problem somehow, it's something that we
need to deal with in another place. It was, in fact, removed for
top-level remote iframes because of bug 1554861 and other regressions.
Depends on D80731
Differential Revision: https://phabricator.services.mozilla.com/D80732