We've ignored clauses whose visual styles are not specified.
However, kinput2 with XIM protocol does not specify any styles
to non-selected clauses. Therefore, we fail to dispatch
eCompositionChange events if there is 2 or more clauses.
Note that the log in the bug indicates that we may set
selected clause type to`TextRangeType::eConvertedClause` and
last clause type to `TextRangeType::eSelectedClause` because
caret is always put at end of composition string. However,
this should not problem for now because nobody except plugins
on Windows refer this information.
Differential Revision: https://phabricator.services.mozilla.com/D23464
--HG--
extra : moz-landing-system : lando
A patch of mine starts calling nsLookAndFeel from xpcshell tests, which makes
gtk crash eventually.
Differential Revision: https://phabricator.services.mozilla.com/D23759
--HG--
extra : moz-landing-system : lando
The comment was correct, the base impl should always return false as we don't have an opinion about visibility.
Differential Revision: https://phabricator.services.mozilla.com/D23598
--HG--
extra : moz-landing-system : lando
On Wayland, `gtk_im_multicontext_get_context_id()` returns
`"wayland"`. However, we need to know actual IM which works
behind Wayland. Fortunately, `XMODIFIERS` env includes IME
name like "xim" case. Therefore, we can refer it instead.
Differential Revision: https://phabricator.services.mozilla.com/D23469
--HG--
extra : moz-landing-system : lando
* Removed dead code.
* Removed a duplicated field (`m_cRef`) from the derived class.
* Removed #ifdefs for older SDKs that we no longer support.
* Made access specifiers more restrictive.
* Added `override` and `final`.
* De-virtualized member functions unless it is neccessary.
Differential Revision: https://phabricator.services.mozilla.com/D21864
--HG--
extra : moz-landing-system : lando
eWindowType_child window (a window defined by GdkWindow only) is not supported on Wayland
as we need moz_container to provide wl_surface to draw into.
As a workaroud create a regular toplevel window instead of child on Wayland to enable
rendering and window manipulation.
Differential Revision: https://phabricator.services.mozilla.com/D23149
--HG--
extra : moz-landing-system : lando
`PresShell::EventHandler::HandleEventInternal()` may handle `Escape` key before
dispatching it in some cases. This requires too many lines for somebody who
investigate the method for the other events. Therefore, this patch moves it
into the new method.
Additionally, this patch creates `WidgetKeyboardEvent::CanTreatAsUserInput()`
and `WidgetKeyboardEvent::ShouldInteractionTimeRecorded()` because we should
manage similar checks in one place (we already have
`WidgetKeyboardEvent::CanUserGestureActivateTarget()`). Finally, their
conditions are not enough for what the comment wants to do there since they do
not check some modifier keys. Therefore, this patch makes them check all
possible modifier keys too.
Differential Revision: https://phabricator.services.mozilla.com/D21340
--HG--
extra : moz-landing-system : lando
Actually, we only support `text/unicode` mime type on Android clipboard backend. But Android API 16+ supports `text/html`, so we should support this type since Chrome/Blink already supports it.
Differential Revision: https://phabricator.services.mozilla.com/D22659
--HG--
extra : moz-landing-system : lando
Only Firefox has an operation to paste clipboard data as quoted text
(Control + middle button paste). Input Events Level 1 and Level 2 declared
new inputType value for this operation. Therefore, we should support it.
Differential Revision: https://phabricator.services.mozilla.com/D22067
--HG--
extra : moz-landing-system : lando
AutoVirtualProtect will be useful for following patches. This moves it out of
DllBlocklistWin.cpp and into WinHeaderOnlyUtils.h so it can be shared.
Differential Revision: https://phabricator.services.mozilla.com/D13197
--HG--
extra : moz-landing-system : lando
`carriage return` and `space` are common keys which user might use to start media, so we should take account them as supported user gesture inputs.
As their pseudo char code are zero, we have to check their key code in order to distinguish them from other controls keys such as shift, alt...
Differential Revision: https://phabricator.services.mozilla.com/D21253
--HG--
extra : moz-landing-system : lando
Invert screen pixels in `nsWindow`.
Update `RequestScreenPixels` in `nsWindow` to accept a `GeckoResult` as an argument and save as a `GlobalRef`.
Update `RecvScreenPixels` in `nsWindow` in order to invert the image before sending over JNI rather than requiring callers to invert the image themselves.
Complete the `GeckoResult` if there is one in `RecvScreenPixels` instead of making a callback to the compositor.
Remove `RecvScreenPixels` from `GeckoSession` and `GeckoSession.Compositor`.
Move `RecvScreenPixels` and `getPixels` to `GeckoDisplay`
Rename `getPixels` to `capturePixels`
Return Bitmap from `RecvScreenPixels`.
Return `GeckoResult` from `capturePixels`.
Add doc comments to new methods and classes.
Update FennecNativeDriver to use `GeckoView` and `GeckoResult`.
Update API docs and Changelog
Add tests
Differential Revision: https://phabricator.services.mozilla.com/D21833
--HG--
extra : moz-landing-system : lando
Based on the implementation and issues on prefers-reduced-motion, it
seems we have the same issue on the dark mode.
In child processes on MacOSX we don't spin native event loop at all.
Without native event loops, the global preference returned from
`SystemWantsDarkTheme()` doesn't return up-to-date value when the system
setting changed for some reasons.
To workaround this we call `SystemWantsDarkTheme()` only on the parent
process which spins native event loop or when it's the initial query on
the child process. And we give the up-to-date value to the child process
via an IPC call just like other cached values do.
Differential Revision: https://phabricator.services.mozilla.com/D21303
--HG--
extra : moz-landing-system : lando
Bug 1527804 did not expect multiple moz_container_unmap_wayland()/moz_container_map_wayland() calls. inital_draw_cb should not be cleared in multiple moz_container_unmap_wayland().
Differential Revision: https://phabricator.services.mozilla.com/D21522
--HG--
extra : moz-landing-system : lando
Invert screen pixels in `nsWindow`.
Update `RequestScreenPixels` in `nsWindow` to accept a `GeckoResult` as an argument and save as a `GlobalRef`.
Update `RecvScreenPixels` in `nsWindow` in order to invert the image before sending over JNI rather than requiring callers to invert the image themselves.
Complete the `GeckoResult` if there is one in `RecvScreenPixels` instead of making a callback to the compositor.
Remove `RecvScreenPixels` from `GeckoSession` and `GeckoSession.Compositor`.
Move `RecvScreenPixels` and `getPixels` to `GeckoDisplay`
Rename `getPixels` to `capturePixels`
Return Bitmap from `RecvScreenPixels`.
Return `GeckoResult` from `capturePixels`.
Add doc comments to new methods and classes.
Update FennecNativeDriver to use `GeckoView` and `GeckoResult`.
Update API docs and Changelog
Add tests
Differential Revision: https://phabricator.services.mozilla.com/D18944
--HG--
extra : moz-landing-system : lando
- Detect current desktop session and disable shape mask on Mutter/X.org due to Bug 1530252 (mutter bug).
- Use system titlebar on Mutter/X.org as we can't draw the titlebar reliably.
- Remove widget.default-hidden-titlebar from prefs. When it's defined it overrides default titlebar detection heuristics now.
- Don't use shape masks at all on Mutter/x.org. When system titlebar is hidden in this case (by user choice) it has opaque corners unless
argb visual is selected.
- Use Window manager decorations on Gnome Classic session, that works better than client decorations.
Differential Revision: https://phabricator.services.mozilla.com/D21203
--HG--
extra : moz-landing-system : lando
By this change, icons will never be shrunk to a smaller size. Windows will do
it appropriately.
Internet Explorer's icon handler will not paint the white background if the
icon is large enough. I'm also replicating the behavior.
--HG--
extra : source : 56eb23aaff3a5a0dbca8e41c534307c30e7351f4
Bug 1514156 expects that nsWindow::OnExposeEvent() is called after frame_callback_handler() called. But it did not happen during opening add-ons(gecko profiler). Then we need to trigger rendering directly from frame_callback_handler() call.
Differential Revision: https://phabricator.services.mozilla.com/D20272
--HG--
extra : moz-landing-system : lando
This patch introduces a new module in widget that implements a simple API to
retrieve system information about a process and its threads.
This function is wrapped into ChromeUtils.RequestProcInfo to return information
about processes started by Firefox.
The use case for this API is to monitor Firefox resources usage in projects
like the battery usage done by the data science team.
Differential Revision: https://phabricator.services.mozilla.com/D10069
--HG--
extra : moz-landing-system : lando
This patch introduces a new module in widget that implements a simple API to
retrieve system information about a process and its threads.
This function is wrapped into ChromeUtils.RequestProcInfo to return information
about processes started by Firefox.
The use case for this API is to monitor Firefox resources usage in projects
like the battery usage done by the data science team.
Differential Revision: https://phabricator.services.mozilla.com/D10069
--HG--
extra : moz-landing-system : lando
`TextInputHandler::HandleCommand()` dispatches `Tab` key events only when
it receives `insertTab:` or `intertBacktab:` command which are caused by
actual `Tab` key press.
However, these commands could be generated by IME or the system shortcut
keys are customized oddly.
This patch makes the method support such situation with dispatching fake
`keydown` and `keypress` events to emulate `Tab` key press for
mainly focus navigation.
Differential Revision: https://phabricator.services.mozilla.com/D20804
--HG--
extra : moz-landing-system : lando
Currently, when IME sends a command with committing composition,
TextInputHandler::HandleCommand() dispatches a *fake* `keypress` event
for making default event handler (e.g., focused editor) handle the
event. However, we stopped dispatching `keypress` events for
non-printable keys. Therefore, web apps cannot do that like us.
On macOS, simple conversion IMEs like Korean 2-set IME, behave
differently if active application is changed. E.g., on Safari,
some of them may never use composition string, but not so on
Chrome and Firefox. So, this is what the case we need to emulate
Safari's behavior.
Dispatching a fake `keydown` event for this purpose does **not**
conform to UI Events because `keydown` events should notify web
apps of **physical** key state changes. However, Chrome dispatches
fake `keydown` events intentionally. Therefore, we should follow
this hacky behavior for user experience.
Differential Revision: https://phabricator.services.mozilla.com/D20644
--HG--
extra : moz-landing-system : lando
We didn't dispatch keyboard events during composition. Therefore, we tried to
retrieve raw virtual keycode value when key messages come with `VK_PROCESS`
unexpectedly. However, the API, `ImmGetVirtualKey()`, is not usable for this
purpose because it always returns `VK_PROCESS` if the key messages have already
been handled by IME. So, we can just stop using it since we need to expose
such key messages as KeyboardEvent whose `key` value is `Process` and `keyCode`
value is `DOM_VK_PROCESS`.
Differential Revision: https://phabricator.services.mozilla.com/D20623
--HG--
extra : moz-landing-system : lando
There seem to be a number of problems with Direct2D on the Qualcomm
devices. This includes visual corruption from bug 1515823 and crashes
in CHwRasterizer::RasterizeEdges from 1515387.
Using this flag will cause GeckoWebExecutor.fetch() to not automatically
follow redirects, which is the default behavior if no flag is specified.
Differential Revision: https://phabricator.services.mozilla.com/D19523
--HG--
extra : moz-landing-system : lando
Previously we were using NS_GetLuminosity which asserts for non-opaque colors,
and my system theme happens to use a background color with alpha=0.999.
Luminosity judgements do get a bit more hand-wavy as colors get more
transparent, but it seems like we can still reasonably make an overall
"dark theme" judgement based on the RGB channels.
Differential Revision: https://phabricator.services.mozilla.com/D20748
--HG--
extra : moz-landing-system : lando
This patch enables the shape mask in CSD and Window manager decorations mode
when we're runnin on composited screen and mozilla.widget.use-argb-visuals is not set.
Also don't use shape mask with Wayland and GL backend. When shape mask is set,
advertise toplevel window transparency but don't advertise it
as alpha to GtkCompositorWidget.
Differential Revision: https://phabricator.services.mozilla.com/D20726
--HG--
extra : moz-landing-system : lando
Remoting to a different user isn't supported everywhere and being able to
remote to a different application entirely is kind of odd. I don't think it
makes sense to continue to support these operations.
Differential Revision: https://phabricator.services.mozilla.com/D19066
--HG--
extra : source : b4210f85c7e9c86ef0f173b5d2250c2862fec992
extra : intermediate-source : 35287afd3acea1602bed159dc879aa666e64b9c8
Remoting to a different user isn't supported everywhere and being able to
remote to a different application entirely is kind of odd. I don't think it
makes sense to continue to support these operations.
Differential Revision: https://phabricator.services.mozilla.com/D19066
--HG--
extra : rebase_source : df03e6d2233c4235308f2f8c8ec860e8827254e5
extra : source : b4210f85c7e9c86ef0f173b5d2250c2862fec992
nsSystemInfo is initialzied at first page load. Actually, content process uses
sync IPC to get Android OS information. But now, we can use Java code even if
on content process, so we should use JNI directly instead of sync IPC.
Also, nsSystemInfo still has unused extern android_sdk_version that is for
HoneyComp's DNS hack. So let's remote it.
Differential Revision: https://phabricator.services.mozilla.com/D20129
--HG--
extra : moz-landing-system : lando
Splitting part of OGLShaderProgram.h out into OGLShaderConfig.h makes it
easier to keep GLContext.h included in OGLShaderProgram.h for inlining
purposes.
Differential Revision: https://phabricator.services.mozilla.com/D20017
--HG--
extra : moz-landing-system : lando
InputEvent.dataTransfer should be set to non-null when InputEvent.inputType
is "insertFromPaste", "insertFromDrop" or "insertReplacementText" and
editor is an HTMLEditor instance:
https://rawgit.com/w3c/input-events/v1/index.html#dfn-datahttps://w3c.github.io/input-events/#dfn-data
("insertTranspose" and "insertFromYank" are not currently supported on Gecko.)
This patch makes nsContentUtils::DispatchInputEvent() take dataTransfer value
and EditorBase set it via AutoEditActionDataSetter like data value.
However, we need to create other constructors of DataTransfer to create its
read-only instances initialized with nsITransferable or nsAString. This will
be implemented by the following patch.
Differential Revision: https://phabricator.services.mozilla.com/D19297
--HG--
extra : moz-landing-system : lando
InputEvent.dataTransfer is declared by Input Events Level 1 and Level 2 (i.e.,
not UI Events). It's necessary for "beforeinput" event on contenteditable
elements because of with some InputEvent.inputType values on contenteditable,
InputEvent.dataTransfer is used instead of InputEvent.data.
According to the Chrome's behavior, if InputEvent.dataTransfer is created by
web apps, the DataTransfer object is mutable. Otherwise, i.e., the event
represents user input, the DataTransfer object is read only. We should follow
this behavior.
This is enabled by default.
Differential Revision: https://phabricator.services.mozilla.com/D19296
--HG--
extra : moz-landing-system : lando
Although neither Chrome nor Safari does not set InputEvent.data when the event
is caused by `document.execCommand()` with `backColor`, `foreColor` nor
`hiliteColor`, Safari supports styling color with touchbar and in that case,
Safari sets it (*1).
Additionally, currently Safari uses `rgb()` to represents a color value and
using same rule to serializing color value for CSS OM matches Safari's behavior
and can represent any valid color values.
This patch makes given color value parsed and then serialized with same code
in style system. If the value is `currentcolor`, `inherit`, `initial` or `reset`, sets
the value as-is for now. Additionally, when given value is invalid, sets the value
as-is for forward compatibility.
Note that automated tests will be added into input-events-exec-command.html
by the last patch.
1. https://github.com/w3c/input-events/issues/94#issuecomment-461061517
Differential Revision: https://phabricator.services.mozilla.com/D19295
--HG--
extra : moz-landing-system : lando
Although neither Chrome nor Safari does not set InputEvent.data value when
InputEvent.inputType is "fontName", but it's easy to implement. Therefore, this
patch implements it as declaration of Input Events.
This patch uses given value as-is. Perhaps, this shouldn't cause any problems
because such value can be set to Element.style.fontFamily without any changes.
Note that automated test will be added into WPT later.
Differential Revision: https://phabricator.services.mozilla.com/D19294
--HG--
extra : moz-landing-system : lando