Commit Graph
331 Commits
Author SHA1 Message Date
Tom Schuster 5fb4496e9e Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301246
2026-06-01 14:01:33 +00:00
Tom Schuster 86424bc2fa Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D300802
2026-06-01 14:01:29 +00:00
rperta 700e284d7c Revert "Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeMouseScrollEvent. r=masayuki,win-reviewers,gstoll" for causing build bustages
This reverts commit 312ba34b1e.

Revert "Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll"

This reverts commit cdcd922a07.

Revert "Bug 2039903 - Use proper types for PBrowser::SynthesizeNativeMouseEvent. r=masayuki"

This reverts commit 45369938ed.

Revert "Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll"

This reverts commit 479f174ddb.
2026-06-01 11:32:48 +00:00
Tom Schuster cdcd922a07 Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301246
2026-06-01 10:06:05 +00:00
Tom Schuster 479f174ddb Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D300802
2026-06-01 10:06:01 +00:00
Sylvestre Ledru 4f6b8b516d Bug 2023419 - Remove Emacs/Vim modelines from widget/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287877
2026-03-16 17:22:02 +00:00
serge-sans-paille e8c55440a6 Bug 2010520 - Use .inc extension for X macro files in widget/ r=geckoview-reviewers,win-reviewers,gstoll,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D279131
2026-01-17 20:37:51 +00:00
Greg Stoll 3d5e983c41 Bug 1995165 - support new Windows shortcuts to type em and en dashes r=win-reviewers,handyman
Windows 11 25H2 adds new shortcuts to type em and en dashes (Win+Shift+Minus
and Win+Minus respectively), and these weren't working in Firefox.

The problem was that our keyboard code wasn't expecting the Windows
key (also interpreted as the Meta key) to be a modifier that could
result in a keystroke. Adding these cases means everything works as
expected.

I tested this in the URL bar, on a page with an <input> and a <textarea>,
and with a sample page that showed keyup/down/press events, and everything
looked as I expected. I also ran a try build that didn't show anything
concerning: https://treeherder.mozilla.org/jobs?repo=try&revision=e31ce53cb3738e42b06c5ab6c8d1a2c8e80a0a6b

I don't think there's a way we can add a test for this.

Differential Revision: https://phabricator.services.mozilla.com/D270531
2025-10-30 13:17:04 +00:00
Masayuki Nakano 49cd614ea8 Bug 1983375 - part 2: Get rid of GetBoolName r=win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D261347
2025-08-20 10:41:01 +00:00
Alexandru Marc d683b2b2ed Revert "Bug 1983375 - part 2: Get rid of GetBoolName r=win-reviewers,gstoll" for causing non-unified build bustages @ nsNativeDragSource.cpp
This reverts commit 0062ee7423.

Revert "Bug 1983375 - part 1: Define `MOZ_LOG_ONLY_DEBUG` and variants in `Logging.h` and sort it out `GetBoolName` for making it more generic r=emilio,padenot"

This reverts commit b61fa4819b.
2025-08-20 07:45:10 +00:00
Masayuki Nakano 0062ee7423 Bug 1983375 - part 2: Get rid of GetBoolName r=win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D261347
2025-08-20 04:24:49 +00:00
Mathew Hodson 97decaf055 Bug 1868093 - Remove DeadKeyTable class from KeyboardLayout r=win-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D244462
2025-06-23 23:51:41 +00:00
David P 67cb51e0d5 Bug 1969993: Move various definitions of GetBoolName to Logging.h r=mccr8
Makes it easier to avoid unified build issues.

Differential Revision: https://phabricator.services.mozilla.com/D252240
2025-06-17 03:16:35 +00:00
Alexandru Marc 12647675a7 Revert "Bug 1969993: Add logging for DND operations on Windows r=win-reviewers,gstoll" for causing build bustages @ nsBaseDragService.cpp
This reverts commit aabd452dcf.

Revert "Bug 1969993: Move various definitions of GetBoolName to Logging.h r=mccr8"

This reverts commit b611c5a7f0.
2025-06-06 01:31:42 +00:00
David P b611c5a7f0 Bug 1969993: Move various definitions of GetBoolName to Logging.h r=mccr8
Makes it easier to avoid unified build issues.

Differential Revision: https://phabricator.services.mozilla.com/D252240
2025-06-05 23:08:30 +00:00
Serban Stanca 5f9183c061 Revert "Bug 1868093 - Remove DeadKeyTable class from KeyboardLayout r=win-reviewers,handyman" for causing mochitests crashes.
This reverts commit ff57ed07d5.
2025-05-26 10:05:16 +00:00
Mathew Hodson ff57ed07d5 Bug 1868093 - Remove DeadKeyTable class from KeyboardLayout r=win-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D244462
2025-05-26 09:16:58 +00:00
serge-sans-paille 262f78c07f Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-28 08:21:19 +00:00
Alexandru Marc a5eb905bf4 Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
serge-sans-paille 07101ac24d Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc 004e704b22 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille 2c916d4973 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Masayuki Nakano 58391a40e0 Bug 1919824 - Make NativeKey::GetFollowingCharMessage return false when removed dead char message is a fake one r=m_kato
In bug 1910287, we made the method accept `WM_DEADCHAR` message whose `wParam`
is `0` as a valid char message.  However, it may be different from found dead
char message at least for an Ethiopic Syllable input.

In the case, we found a WM_DEADCHAR whose `wParam` may not be `0`.  Then, we
remove the message from the queue.  However, the keyboard/IME makes us to
remove a dummy message whose wParam (inputting character) is NULL and scancode
is 0.  Finally, the found message keeps staying in the queue.  The crash report
comes after we started accepting WM_DEADCHAR with NULL character above.
However, we haven't handled only a part of dead key sequence but the user tried
to input Ethiopic Syllable.  Therefore, it's hard to guess that the user starts
using Firefox with the IME at the timing and the the user keeps using Firefox
with unfunctional IME.  Perhaps the IME does something different hack for us to
make itself available on Firefox.  Therefore, we should just return `false` as
what we did to make the caller give up removing the following messages.

Differential Revision: https://phabricator.services.mozilla.com/D223245
2024-09-27 04:03:36 +00:00
Masayuki Nakano 571066bab6 Bug 1913611 - Make ModifierKeyState::InitInputEvent and KeymapWrapper::InitInputEvent set WidgetMouseEventBase::mButtons of eContextMenu r=smaug
They do it only when given event class is expected one but they don't include
`ePointerEventClass` which is newly used for `eContextMenu` event since
bug 1675847.

Differential Revision: https://phabricator.services.mozilla.com/D219632
2024-08-22 21:51:33 +00:00
Masayuki Nakano cf58d40ee6 Bug 1910287 - Make NativeKey::GetFollowingCharMessage() return true even if wParam of WM_DEADCHAR is 0 r=m_kato
Although I don't know why Ergo-L keyboard layout behave differently on my
environment and the reporter's environment.  In the reporter's environment,
second dead key press causes `WM_DEADCHAR` with `0` `wParam`. Then,
`GetFollowingCharMessage()` returns `false` so that it's not stored into
`mFollowingCharMsgs`.  Then, `NativeKey::IsFollowedByDeadCharMessage()` returns
`false` and `NativeKey::mIsDeadKey` is set to `false`.  Therefore, `NativeKey`
dispatches only `eKeyDown` event but whose `.key` is `"g"` rather than
`DeadKey` and finally, fails to call `KeyboardLayout::ActivateDeadKeyState()`.
Therefore the following dead key sequence is not treated as so.

This patch makes it return `true` for such `WM_DEADCHAR` message so that the
`WM_KEYDOWN` message will be treated as a dead key sequence.

Differential Revision: https://phabricator.services.mozilla.com/D219317
2024-08-20 05:30:43 +00:00
Masayuki Nakano 512bd17ff6 Bug 1879765 - part 1: Make NativeKey consume printable eKeyDown event before dispatch if the key down is fired only with WM_SYSKEYDOWN r=m_kato
When a printable key is pressed with `Alt`, Windows notify us of `WM_SYSKEYDOWN`
and `WM_SYSCHAR`.  However, if the builtin IME for inputting a Unicode character
consumes some printable key presses, Windows does not notify us of `WM_SYSCHAR`.
Therefore, if `WM_SYSKEYDOWN` comes without `WM_SYSCHAR`, we should consume
the `eKeyDown` before dispatching the event so that the key press won't be
handled by access key of the menu nor the content.

Differential Revision: https://phabricator.services.mozilla.com/D207956
2024-05-16 02:36:03 +00:00
Tamas Szentpeteri 26e6238bd3 Backed out 2 changesets (bug 1879765) for causing failures on test_nsITextInputProcessor.xhtml. CLOSED TREE
Backed out changeset 6214b15c2021 (bug 1879765)
Backed out changeset 87e77d284071 (bug 1879765)
2024-05-15 15:15:50 +03:00
Masayuki Nakano cf3633bf54 Bug 1879765 - part 1: Make NativeKey consume printable eKeyDown event before dispatch if the key down is fired only with WM_SYSKEYDOWN r=m_kato
When a printable key is pressed with `Alt`, Windows notify us of `WM_SYSKEYDOWN`
and `WM_SYSCHAR`.  However, if the builtin IME for inputting a Unicode character
consumes some printable key presses, Windows does not notify us of `WM_SYSCHAR`.
Therefore, if `WM_SYSKEYDOWN` comes without `WM_SYSCHAR`, we should consume
the `eKeyDown` before dispatching the event so that the key press won't be
handled by access key of the menu nor the content.

Differential Revision: https://phabricator.services.mozilla.com/D207956
2024-05-15 05:42:32 +00:00
Masayuki Nakano e09aa81dfb Bug 1878224 - Put it off to load keyboard layout when first needed r=m_kato
As far as I've tested on Win 11, we can put it off to load it when first needed
of the keyboard layout data.  `ToUnicodeEx` API changes the dead key state and
it's called a lot in `KeyboardLayout::LoadLayout`, however, this patch does
not newly call `LoadLayout` after `TranslateMessage` API at least while handling
a key message.  Therefore, this should be safe but regressions of this change
could be serious, so this makes it enabled only in early beta and earlier for
now.

Differential Revision: https://phabricator.services.mozilla.com/D200600
2024-02-07 00:24:16 +00:00
Stanca Serban 126ee455e4 Backed out changeset 26e3ad3bf78e (bug 1878224) for causing build bustages. CLOSED TREE 2024-02-06 11:45:20 +02:00
Masayuki Nakano 053db02855 Bug 1878224 - Put it off to load keyboard layout when first needed r=m_kato
As far as I've tested on Win 11, we can put it off to load it when first needed
of the keyboard layout data.  `ToUnicodeEx` API changes the dead key state and
it's called a lot in `KeyboardLayout::LoadLayout`, however, this patch does
not newly call `LoadLayout` after `TranslateMessage` API at least while handling
a key message.  Therefore, this should be safe but regressions of this change
could be serious, so this makes it enabled only in early beta and earlier for
now.

Differential Revision: https://phabricator.services.mozilla.com/D200600
2024-02-06 05:13:00 +00:00
Masayuki Nakano 269b283387 Bug 1874727 - Make NativeKey::ComputeInputtingStringWithKeyboardLayout() compute shortcut candidates when both Ctrl and Alt are pressed r=m_kato
It does not compute shortcut candidates when both `Ctrl` and `Alt` are pressed.
This was valid before bug 900750, but when the method is called, now, `Ctrl`
and `Alt` are unset if `AltGr` is pressed and that introduces a character or
a dead character.
https://searchfox.org/mozilla-central/rev/8b6cf2a8352979c781dfd90c46a9f4f7135fabea/widget/windows/KeyboardLayout.cpp#1663-1666,1683,1688-1689

Therefore, it should be safe to compute shortcut candidates when `Ctrl` and
`Alt` are pressed even though such shortcut keys shouldn't be used from i18n
point of view.

Differential Revision: https://phabricator.services.mozilla.com/D198659
2024-01-22 23:33:50 +00:00
Jens Stutte a5bf15c8a2 Bug 1839051 - Use nsTArray::Sort in KeyboardLayout. r=xpcom-reviewers,emilio,win-reviewers,rkraesig
Depends on D181891

Differential Revision: https://phabricator.services.mozilla.com/D182724
2023-12-11 06:53:28 +00:00
Iulian Moraru 7a59e75c46 Backed out 8 changesets (bug 1839051) for causing assertion failures on NotificationController.cpp. CLOSED TREE
Backed out changeset 94a4c163e417 (bug 1839051)
Backed out changeset 5204b97e40bc (bug 1839051)
Backed out changeset 8443a22a399d (bug 1839051)
Backed out changeset 2ab1e27d5945 (bug 1839051)
Backed out changeset 20a850a4fd7e (bug 1839051)
Backed out changeset 658568fe9662 (bug 1839051)
Backed out changeset 82525b11a7c3 (bug 1839051)
Backed out changeset 720e6863c41a (bug 1839051)
2023-12-04 22:34:25 +02:00
Jens Stutte 3731770a6d Bug 1839051 - Use nsTArray::Sort in KeyboardLayout. r=xpcom-reviewers,emilio,win-reviewers,rkraesig
Depends on D181891

Differential Revision: https://phabricator.services.mozilla.com/D182724
2023-12-04 18:33:41 +00:00
Emilio Cobos Álvarez c1cbae5730 Bug 1863035 - Implement a native WinRegistry key. r=win-reviewers,rkraesig
Use it to implement nsIWindowsRegKey, and to replace existing native
callers like WinUtils and nsLookAndFeel.

Differential Revision: https://phabricator.services.mozilla.com/D192756
2023-11-20 10:08:09 +00:00
Masatoshi Kimura 1ffc0764f4 Bug 1852806 - Remove macros for older Windows SDK from widget/windows/. r=handyman
Depends on D188031

Differential Revision: https://phabricator.services.mozilla.com/D188032
2023-09-15 03:19:28 +00:00
Cosmin Sabou eab17df623 Backed out 15 changesets (bug 1852806) for causing mda failures on test_video_low_power_telemetry.html. CLOSED TREE
Backed out changeset faea1f4cb9a9 (bug 1852806)
Backed out changeset 4db93c374f9b (bug 1852806)
Backed out changeset 7e40e0e04921 (bug 1852806)
Backed out changeset b0a66c4269ce (bug 1852806)
Backed out changeset 4ff3545936f9 (bug 1852806)
Backed out changeset 02c0a8eb3fd6 (bug 1852806)
Backed out changeset ae2c7b33acfb (bug 1852806)
Backed out changeset 2b89ba254a1a (bug 1852806)
Backed out changeset dfa4f73fc548 (bug 1852806)
Backed out changeset daffcc4c1877 (bug 1852806)
Backed out changeset 33855bcdf15e (bug 1852806)
Backed out changeset 694f29707f3e (bug 1852806)
Backed out changeset 1891eda22a59 (bug 1852806)
Backed out changeset 1b854941389c (bug 1852806)
Backed out changeset 2f7cfe04be59 (bug 1852806)
2023-09-15 09:48:27 +03:00
Masatoshi Kimura 22c1cfabaa Bug 1852806 - Remove macros for older Windows SDK from widget/windows/. r=handyman
Depends on D188031

Differential Revision: https://phabricator.services.mozilla.com/D188032
2023-09-15 03:19:28 +00:00
Masayuki Nakano 66135593c4 Bug 1840519 - Make typing surrogate pair behavior switchable with prefs r=m_kato,smaug
A lone surrogate should not appear in `DOMString` at least when the attribute
values of events because of ill-formed UTF-16 string.

`TextEventDispatcher` does not handle surrogate pairs correctly. It should not
split surrogate pairs when it sets `KeyboardEvent.key` value for avoiding the
problem in some DOM API wrappers, e.g., Rust-running-as-wasm.

On the other hand, `.charCode` is an unsigned long attribute and web apps
may use `String.fromCharCode(event.charCode)` to convert the input to string,
and unfortunately, `fromCharCode` does not support Unicode character code
points over `0xFFFF`.  Therefore, we may need to keep dispatching 2 `keypress`
events per surrogate pair for the backward compatibility.

Therefore, this patch creates 2 prefs.  One is for using single-keypress
event model and double-keypress event model.  The other is for the latter,
whether `.key` value never has ill-formed UTF-16 or it's allowed.

If using the single-keypress event model --this is compatible with Safari and
Chrome in non-Windows platforms--, one `keypress` event is dispatched for
typing a surrogate pair.  Then, its `.charCode` is over `0xFFFF` which can
work with `String.fromCodePoint()` instead of `String.fromCharCode()` and
`.key` value is set to simply the surrogate pair (i.e., its length is 2).

If using the double-keypress event model and disallowing ill-formed UTF-16
--this is the new default behavior for both avoiding ill-formed UTF-16 string
creation and keeping backward compatibility with not-maintained web apps using
`String.fromCharCode`--, 2 `keypress` events are dispatched.  `.charCode` for
first one is the code of the high-surrogate, but `.key` is the surrogate pair.
Then, `.charCode` for second one is the low-surrogate and `.key` is empty
string.  In this mode, `TextEditor` and `HTMLEditor` ignores the second
`keypress`.  Therefore, web apps can cancel it only with the first `keypress`,
but it indicates the `keypress` introduces a surrogate pair with `.key`
attribute.

Otherwise, if using the double-keypress event model and allowing ill-formed
UTF-16 --this is the traditional our behavior and compatible with Chrome in
Windows--, 2 `keypress` events are dispatched with same `.charCode` values as
the previous mode, but first `.key` is the high-surrogate and the other's is
the low surrogate.  Therefore, web apps can cancel either one of them or
both of them.

Finally, this patch makes `TextEditor` and `HTMLEditor` handle text input
with `keypress` events properly.  Except in the last mode, `beforeinput` and
`input` events are fired once and their `data` values are the surrogate pair.
On the other hand, in the last mode, 2 sets of `beforeinput` and `input` are
fired and their `.data` values has only the surrogate so that ill-formed
UTF-16 values.

Note that this patch also fixes an issue on Windows.  Windows may send a high
surrogate and a low surrogate with 2 sets of `WM_KEYDOWN` and `WM_KEYUP` whose
virtual keycode is `VK_PACKET` (typically, this occurs with `SendInput` API).
For handling this correctly, this patch changes `NativeKey` class to make it
just store the high surrogate for the first `WM_KEYDOWN` and `WM_KEYUP` and use
it when it'll receive another `WM_KEYDOWN` for a low surrogate.

Differential Revision: https://phabricator.services.mozilla.com/D182142
2023-08-23 01:16:59 +00:00
Masayuki Nakano 33c777c972 Bug 1266437 - Drop "OS" modifier r=smaug,m_kato,karlt,Gijs
On Windows, Windows logo key was mapped to "OS" modifier, and on Linux,
it's same and the key is called "Super" and "Hyper".  That conformed to the
older UI Events spec.

However, UI Events declares that they should be mapped to "Meta" now and Chrome
handles it as the spec in Windows and Linux.  Therefore, we should align the
behavior to them.

Note that we've treated the legacy "Meta" modifier on Linux as DOM "Meta"
modifier state, and we'll keep this as-is because in Sun/Solaris keyboard
layout, they keys are mapped to the legacy "Meta".

Finally, the following check only `IsMeta()` but not `IsOS()`.  I think that
they should've checked `IsOS()` too.  Therefore, they will behave differently
in Windows and Linux.
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/base/Element.cpp#3287-3288
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLInputElement.cpp#3762-3764
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLInputElement.cpp#3796-3806
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLLabelElement.cpp#127-128
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/widget/gtk/nsGtkKeyUtils.cpp#1461-1462

Note that `KEY_NAME_INDEX_OS` will be removed in the patch for bug 1232918.

Differential Revision: https://phabricator.services.mozilla.com/D183480
2023-08-07 01:03:58 +00:00
Cristian Tuns 02ef83ec78 Backed out 2 changesets (bug 1266437, bug 1232918) for causing mochitest failures in test_autoplay_policy_key_blacklist.html CLOSED TREE
Backed out changeset 33e3c6593d4b (bug 1232918)
Backed out changeset 1b56e99dd221 (bug 1266437)
2023-08-03 23:29:52 -04:00
Masayuki Nakano 861dcd8b88 Bug 1266437 - Drop "OS" modifier r=smaug,m_kato,karlt,Gijs
On Windows, Windows logo key was mapped to "OS" modifier, and on Linux,
it's same and the key is called "Super" and "Hyper".  That conformed to the
older UI Events spec.

However, UI Events declares that they should be mapped to "Meta" now and Chrome
handles it as the spec in Windows and Linux.  Therefore, we should align the
behavior to them.

Note that we've treated the legacy "Meta" modifier on Linux as DOM "Meta"
modifier state, and we'll keep this as-is because in Sun/Solaris keyboard
layout, they keys are mapped to the legacy "Meta".

Finally, the following check only `IsMeta()` but not `IsOS()`.  I think that
they should've checked `IsOS()` too.  Therefore, they will behave differently
in Windows and Linux.
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/base/Element.cpp#3287-3288
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLInputElement.cpp#3762-3764
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLInputElement.cpp#3796-3806
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLLabelElement.cpp#127-128
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/widget/gtk/nsGtkKeyUtils.cpp#1461-1462

Note that `KEY_NAME_INDEX_OS` will be removed in the patch for bug 1232918.

Differential Revision: https://phabricator.services.mozilla.com/D183480
2023-08-04 00:10:11 +00:00
serge-sans-paille 71d5bc785e Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-04-01 08:31:12 +00:00
Cristian Tuns 29ebb2f54e Backed out 12 changesets (bug 1825325, bug 1825336, bug 1825333, bug 1825332, bug 1825324, bug 1824557, bug 1825328, bug 1825335, bug 1825330, bug 1825329, bug 1825327, bug 1825331) for causing build bustages in nsClipboard.cpp CLOSED TREE
Backed out changeset 9de3ed24d3a0 (bug 1825336)
Backed out changeset aef787728f19 (bug 1825335)
Backed out changeset a04c341244c1 (bug 1825333)
Backed out changeset e3ad15f762ba (bug 1825332)
Backed out changeset eed23da92a27 (bug 1825331)
Backed out changeset 8213bb54376e (bug 1825330)
Backed out changeset 747ec5ac4994 (bug 1825329)
Backed out changeset e91ff431f92d (bug 1825328)
Backed out changeset 59c18d13768b (bug 1825327)
Backed out changeset 538096d99e49 (bug 1825325)
Backed out changeset c76eb9d9b095 (bug 1825324)
Backed out changeset 8b81410eb686 (bug 1824557)
2023-03-31 12:58:53 -04:00
serge-sans-paille 1bf9d22652 Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Depends on D173637

Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-03-31 13:29:44 +00:00
Andrew McCreight 291afe14f4 Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.

Differential Revision: https://phabricator.services.mozilla.com/D158213
2022-09-28 15:17:46 +00:00
Mike Hommey 4e33cd6454 Bug 1766561 - Fix various formatting errors. r=media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,rkraesig,alwu,padenot,kershaw
- Missing/Extra formatting directives
- Typos in formatting directives
- Non-literal strings used as formatting strings
- Wrong types passed as argument
- Swapped/Wrong arguments
- Commas between parts of unique formatting strings

Differential Revision: https://phabricator.services.mozilla.com/D144921
2022-05-03 20:49:10 +00:00
Mike Hommey aa2063e939 Bug 1766561 - Use proper formatting directives in various places. r=gfx-reviewers,nika,necko-reviewers,mhowell,rkraesig,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144920
2022-05-03 20:49:09 +00:00
Mike Hommey 30f26f1da0 Bug 1766561 - Add missing z modifier for size_t formatting. r=gfx-reviewers,necko-reviewers,keeler,rkraesig,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144918
2022-05-03 20:49:09 +00:00