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

246 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 912a5bc76d Bug 1678553 - part 13: Make `WidgetQueryContentEvent` use `Maybe` to store some data r=m_kato,geckoview-reviewers
Sorry for this big patch.

This makes `WidgetQueryContentEvent::Reply` is stored with `Maybe` to get
rid of `WidgetQueryContentEvent`.  And `Reply` stores offset and string
with `Maybe` and ``OffsetAndData<uint32_t>`, and also tentative caret offset
with `Maybe`.  Then, we can get rid of `WidgetQueryContentEvent::NOT_FOUND`.

Note that I tried to make `OffsetAndData` have a method to create `NSRange`
for cocoa widget.  However, it causes the column limit`to 100 or longer
and that causes unrelated changes in `TextEvents.h` and `IMEData.h`.
Therefore, I create an inline function in `TextInputHandler.mm` instead.

Differential Revision: https://phabricator.services.mozilla.com/D98264
2020-12-02 05:32:19 +00:00
Masayuki Nakano 88f679f680 Bug 1678553 - part 12: Make `ContentCache` store character rects with `Maybe` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D97981
2020-11-27 14:48:03 +00:00
Masayuki Nakano 6401c74b8d Bug 1678553 - part 11: Make `ContentCache` store its `Caret` with `Maybe` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D97980
2020-11-27 14:47:50 +00:00
Masayuki Nakano 0c4e9ae15a Bug 1678553 - part 10: Make `ContentCache` store its `Selection` with `Maybe` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D97979
2020-11-27 14:47:37 +00:00
Masayuki Nakano 85b84f8248 Bug 1677684 - part 2: Make `ContentCache` cache character rects in last commit composition string for undoing the commit r=m_kato
Usually, IME sets selection and considers candidate list position at starting
new composition.  However, Apple Japanese IME sometimes consider the candidate
list position at retrieving the character rects before setting selection.
Therefore, we need to store last commit string's character rects, but don't
need to store it in long time because Kakutei-Undo is supported by Japanese
IMEs and they work only immediately after committing a composition.  E.g.,
after moving caret, it won't be available.

Depends on D97838

Differential Revision: https://phabricator.services.mozilla.com/D97839
2020-11-24 01:31:46 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Markus Stange fc8aedee99 Bug 1615858 - Add MultiTouchInput::SingleTouchData::mHistoricalData. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D95649
2020-11-03 16:46:19 +00:00
Makoto Kato e82e9e223d Bug 1425291 - Part 3. Add autocapitalize to InputContext. r=masayuki
Autocapitalize isn't applied if type is url, email or password. If these types,
truncate autocapitalize value in InputContext not to pass it to widget.

Differential Revision: https://phabricator.services.mozilla.com/D86676
2020-09-15 14:27:00 +00:00
Edgar Chen 36ccda1d13 Bug 1653949 - Part 1: Change mExitFrom in WidgetMouseEvent to be Maybe<ExitFrom>; r=smaug
mExitFrom now contains a value only when mMessage is eMouseExitFromWidget

Differential Revision: https://phabricator.services.mozilla.com/D88225
2020-08-27 17:19:03 +00:00
Cosmin Sabou 403893bc7e Backed out 5 changesets (bug 1653949) for assertion failures on EventStateManager.cpp. CLOSED TREE
Backed out changeset ad7c35ab2a40 (bug 1653949)
Backed out changeset 31cb90ef998a (bug 1653949)
Backed out changeset 03e65cbd2a11 (bug 1653949)
Backed out changeset a87ac2a7db70 (bug 1653949)
Backed out changeset 390dd2c04cd4 (bug 1653949)
2020-08-27 20:13:20 +03:00
Edgar Chen 363e80d673 Bug 1653949 - Part 1: Change mExitFrom in WidgetMouseEvent to be Maybe<ExitFrom>; r=smaug
mExitFrom now contains a value only when mMessage is eMouseExitFromWidget

Differential Revision: https://phabricator.services.mozilla.com/D88225
2020-08-26 14:19:46 +00:00
Timothy Nikkel 9bd1260501 Bug 1658001. Populate wheelEvent.mLineOrPageDeltaY in PinchGestureInput::ToWidgetWheel for pinch gestures produced from direct manipulation. r=kats
We do this analogously to how PanGestureInput does it except that the delta's that we compute mLineOrPageDeltaY from are computed by us instead of provided to us.

mLineOrPageDeltaY being non-zero is what EventStateManager::DispatchLegacyMouseScrollEvents uses to decide to send legacy mouse events, so we need to populate it to get those legacy events to send.

This fix is Windows only on purpose as pinches on macOS don't seem to send wheel events (Windows sends ctrl+wheel). When Linux gets implemented it will need to be determined what to do.

Differential Revision: https://phabricator.services.mozilla.com/D86495
2020-08-11 09:08:06 +00:00
Kagami Sascha Rosylight c2e026792f Bug 1643464 - Part 3: Rename LEFT/RIGHT_BUTTON as PRIMARY/SECONDARY_BUTTON r=masayuki,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D80333
2020-06-19 17:50:43 +00:00
Kartikaya Gupta 67a28c6551 Bug 1627708 - Add a PinchGestureSource enum that indicates the source of a PinchGestureInput event. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77828
2020-06-06 00:32:19 +00:00
Timothy Nikkel 005270cdd1 Bug 1619187. Handle content prevent defaulting pinch gestures. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73217
2020-05-02 23:03:20 +00:00
Cosmin Sabou b9a814e53b Backed out changeset 70d9a096070b (bug 1619187) for causing Gtest failures. CLOSED TREE 2020-05-02 03:29:43 +03:00
Timothy Nikkel f9e267a4a7 Bug 1619187. Handle content prevent defaulting pinch gestures. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73217
2020-05-01 23:21:08 +00:00
Masayuki Nakano c90d6c80b3 Bug 1569512 - Make `PresShell` ignore synthesized `mousemove` events coming from another process if the child process stores mouse location of synthesized mouse events for tests r=smaug
The reason of intermittent failure of `test_bug656379-2.html` is, synthesized
`mousemove` event coming from the parent process causes `mouseout` and
`mouseleave` events of the last synthesized `mousemove` in the test.  The
reason is, synthesized `mousemove` for tests makes `PresShell` in the content
process record the cursor location, but won't make it `PresShell` in the
parent process do it.  Therefore, parent process may synthesize `mousemove`
event for the system cursor position which does not match with the synthesized
mouse location in the content process.  Therefore, `:hover` state may be
updated unexpectedly.

This patch makes `WidgetEvent::mFlags` have a flag to indicate whether it
came from another process.  Then, makes `PresShell::HandleEvent()` ignore
synthesized `mousemove` events coming from another process only when the
recorded mouse location was set by a mouse event synthesized for tests.

Differential Revision: https://phabricator.services.mozilla.com/D65282

--HG--
extra : moz-landing-system : lando
2020-03-05 21:34:28 +00:00
Kartikaya Gupta d633586fcc Bug 1618545 - Delete obsolete/unused code relating to Fennec's experimental ui.zoomedview feature. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65022

--HG--
extra : moz-landing-system : lando
2020-03-03 15:27:50 +00:00
Mihai Alexandru Michis 27d7312e19 Backed out changeset 469d7894f720 (bug 1618545) for causing bustages in src/layout/base/PositionedEventTargeting.cpp
CLOSED TREE
2020-03-03 14:52:13 +02:00
Kartikaya Gupta 432394ae9f Bug 1618545 - Delete obsolete/unused code relating to Fennec's experimental ui.zoomedview feature. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65022

--HG--
extra : moz-landing-system : lando
2020-03-02 21:53:50 +00:00
Masayuki Nakano 351bd16f96 Bug 1615532 - Make line style in TextRangeStyle an enum class and sync it with GeckoEditable.IME_RANGE_LINE_* r=m_kato
At bug 1614208, the line style value mapping was changed, but
`GeckoEditable.IME_RANGE_LINE_*` are not updated.

This patch makes the style in `TextRangeStyle` an enum class for making it
type safer, and updates `GeckoEditable.IME_RANGE_LINE_*`, and finally, adds
`FYI` comments in `TextRangeStyle` to make developers realize it requires
manual update.

Differential Revision: https://phabricator.services.mozilla.com/D62883

--HG--
extra : moz-landing-system : lando
2020-02-17 07:53:46 +00:00
Timothy Nikkel 26ba83c620 Bug 1601936. Ensure ScrollWheelInput::mAPZAction is transferred over ipc. r=botond
https://hg.mozilla.org/mozilla-central/rev/cb713d188609 (bug 1458063) added mAPZAction to ScrollWheelInput but didn't add the code to transfer it over ipc.

Differential Revision: https://phabricator.services.mozilla.com/D56182

--HG--
extra : moz-landing-system : lando
2019-12-06 16:56:36 +00:00
Cameron McCormack 7052f624b5 Bug 1578147 - Align the Rust and C++ representations of WritingMode. r=emilio,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44412

--HG--
extra : moz-landing-system : lando
2019-09-09 04:49:55 +00:00
myfreeweb 01916974b0 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
--HG--
extra : rebase_source : 69a374c26bcb8781e83aeb26058a2de349313bbc
extra : amend_source : 521bb6f2b5799bfca5f8b8b5bbe9e4fef1f2dd1e
2019-06-20 16:18:45 -04:00
Razvan Maries 6fbdaf61c3 Backed out changeset f9699ae30f4d (bug 1213601) on jrmuizel's request. 2019-05-26 18:12:56 +03:00
myfreeweb e6dc1a7382 Bug 1213601 - Implement kinetic/inertial scrolling (fling) for Gtk touchpads. r=botond,karlt
--HG--
extra : rebase_source : c89a97e40aa59e1038530becdb53c2d7b992db7b
2019-05-24 13:31:34 -04:00
Kartikaya Gupta a8a0dd9a5a Bug 1524232 - Add a mechanism for dispatching synthesized mousemove events to an OOP iframe. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D29731

--HG--
extra : moz-landing-system : lando
2019-05-06 08:12:21 +00:00
Srujana Peddinti 0260a4f6e1 Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource r=masayuki
Renamed all class member instances from WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource

Differential Revision: https://phabricator.services.mozilla.com/D25322

--HG--
extra : moz-landing-system : lando
2019-04-21 18:19:43 +00:00
Srujana Peddinti aa45d8b79b Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::hitCluster to WidgetMouseEventBase::mHitCluster r=masayuki
Renamed all class member instances from WidgetMouseEventBase::hitCluster to WidgetMouseEventBase::mHitCluster

Differential Revision: https://phabricator.services.mozilla.com/D25318

--HG--
extra : moz-landing-system : lando
2019-04-21 18:19:20 +00:00
Srujana Peddinti 1f5de9021a Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::pressure to WidgetMouseEventBase::mPressure r=masayuki
Renamed all class member instances from WidgetMouseEventBase::pressure to WidgetMouseEventBase::mPressure

Differential Revision: https://phabricator.services.mozilla.com/D25314

--HG--
extra : moz-landing-system : lando
2019-04-21 18:19:18 +00:00
Srujana Peddinti 5f185eb5aa Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::button to WidgetMouseEventBase::mButton. r=masayuki
Renamed all class member instances from WidgetMouseEventBase::button to WidgetMouseEventBase::mButton.

Differential Revision: https://phabricator.services.mozilla.com/D25309

--HG--
extra : moz-landing-system : lando
2019-04-21 18:17:10 +00:00
Srujana Peddinti 614949385a Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::buttons to WidgetMouseEventBase::mButtons r=masayuki
Renamed all class member instances from  WidgetMouseEventBase::buttons to WidgetMouseEventBase::mButtons

Differential Revision: https://phabricator.services.mozilla.com/D25297

--HG--
extra : moz-landing-system : lando
2019-04-21 19:42:37 +00:00
Henri Sivonen 862a7144a9 Bug 1524226 - Add LayersId field to WidgetEvent and InputData. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D20169

--HG--
extra : moz-landing-system : lando
2019-02-26 07:15:43 +00:00
Eitan Isaacson da315919ab Bug 1515774 - Introduce mScreenOffset for pinch and multitouch events. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D17043

--HG--
extra : moz-landing-system : lando
2019-01-31 16:46:10 +00:00
Brindusan Cristian e17de7336e Backed out 4 changesets (bug 1515774) for mochitest failrues at test_group_touchevents-3.html and test_touch_action.html.
Backed out changeset 45c6f07160d9 (bug 1515774)
Backed out changeset 3d97f1e46c1a (bug 1515774)
Backed out changeset 69c8787c67d6 (bug 1515774)
Backed out changeset 8e17cc234256 (bug 1515774)
2019-01-30 04:39:55 +02:00
Eitan Isaacson 8ae47905e7 Bug 1515774 - Introduce mScreenOffset for pinch and multitouch events. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D17043

--HG--
extra : moz-landing-system : lando
2019-01-29 21:11:35 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jim Chen 594f82583c Bug 1466910 - 1. Forward more InputContext members through e10s; r=masayuki
Some InputContext members are not forwarded through
PBrowser::SetInputContext.

MozReview-Commit-ID: C1bGYq4w8zT

--HG--
extra : rebase_source : 1481f08c7593fe9dceb3b96bbfe480a1c58ecf9d
2018-06-19 16:31:24 -04:00
Masayuki Nakano a20855c9f5 Bug 1441821 - NativeKey shouldn't mark eKeyDown and eKeyPress as "skippable in remote process" if message is not caused by physical key press r=m_kato,smaug
Currently, TabChild discards eKeyDown and eKeyPress events which are marked as
"repeated" and were dispatched after the latest eKeyDown event comes into the
process.  However, keyboard layout utils may generate native key events
as "repeated" even if each native key is important to input proper text.

So, TabChild shouldn't decide if coming keyboard event is skippable only with
mIsRepeat.  For solving this issue, this patch adds
mMaybeSkippableInRemoteProcess to WidgetKeyboardEvent and makes
TabChild::SkipRepeatedKeyEvent() check
WidgetKeyboardEvent::CanSkipInRemoteProcess() instead.

On Windows, there are two ways to generate keyboard input messages.  One is
using SendMessage() or PostMessage().  The other is SendInput() API.  In both
ways, utils can make their input as repeated key messages.

The former case must be safe for this issue since such utils need to set 31st
bit of lParam to 1 explicitly.

On the other hand, in the latter case, the utils probably need to append
KEYEVENTF_KEYUP into KEYBDINPUT::dwFlags.  Otherwise, only first call is
treated as non-repeated event.

So, when given message does not came from physical key operation, NativeKey
should set WidgetKeyboardEvent::mMaybeSkippableInRemoteProcess to false
even if WidgetKeyboardEvent::mIsRepeat is true.

MozReview-Commit-ID: 3rinrOjx8Tf

--HG--
extra : rebase_source : 26b6d869260176fc7ef535323b83001bb4b725c2
2018-06-06 23:35:16 +09:00
Zhang Junzhi fe2d79f73f Bug 1358017 - Part 4: Implements the auto-dir scrolling feature(without the "honour root" functionality) in APZ r=kats
This commit implements the auto-dir scrolling functionality in APZ, based on
part 1 to part 3. However, the functionality of mousewheel.autodir.honourroot
will be implemented in a future.

MozReview-Commit-ID: 9xai99x71gh

--HG--
extra : rebase_source : 118d188f730e3fb91d147b076a053cb04e622e55
2018-03-16 19:23:53 +08:00
Zhang Junzhi 414177f87e Bug 1358017 - Part 1: Adds some comments, renames some identifiers and refactors some other trivial things. r=kats,masayuki
Do some work in preparation for implementing actual functionalities for this
bug. No actual functionality change is involved in this commit.

MozReview-Commit-ID: 5aLhr38n1N4

--HG--
extra : rebase_source : 15cfc2cea5b7668367dd3bd4a0746ae8c61b7d20
2018-03-15 16:31:07 +08:00
Alex Gaynor ee407135b4 Bug 1453397 - use ContiguousEnumSerializer for serialization of enums in IPC for IMEs; r=masayuki
MozReview-Commit-ID: Enfhhu2HnH5

--HG--
extra : rebase_source : 39d1e2f7fc111683e652e9b80c147521c923ff16
2018-04-11 12:26:33 -04:00
Julian Hector 465eaf30eb Bug 1401111 - Use ContiguousEnumSerializer for EventMessage ParamTraits; r=botond 2017-12-01 13:00:56 -05:00
Botond Ballo 1b91441c7c Bug 951793 - Obey overscroll-behavior for swipe navigation. r=mstange
MozReview-Commit-ID: i2BuiAfG71
2017-11-25 01:29:15 +01:00
Sebastian Hengst 6d4637aebb Backed out 15 changesets (bug 951793) because it landed before the necessary servo changes. r=backout requested by emilio on a CLOSED TREE
Backed out changeset ca8c86e229df (bug 951793)
Backed out changeset 6eef6403fa71 (bug 951793)
Backed out changeset a5e529f52fb1 (bug 951793)
Backed out changeset 054e837609d0 (bug 951793)
Backed out changeset 713a3c9617ce (bug 951793)
Backed out changeset 884913aa1668 (bug 951793)
Backed out changeset c3340b84e534 (bug 951793)
Backed out changeset 50fe3c6ac486 (bug 951793)
Backed out changeset be4e22e5c257 (bug 951793)
Backed out changeset 7055bd5dfc4e (bug 951793)
Backed out changeset fa6da1e723cf (bug 951793)
Backed out changeset 386f77004d89 (bug 951793)
Backed out changeset fa82cdc01408 (bug 951793)
Backed out changeset 867d8ea5355c (bug 951793)
Backed out changeset e61ac8e48971 (bug 951793)
2017-11-25 01:01:41 +02:00
Botond Ballo 3ddd46e5f1 Bug 951793 - Obey overscroll-behavior for swipe navigation. r=mstange
MozReview-Commit-ID: i2BuiAfG71

--HG--
extra : rebase_source : 9fd9b60db5c6e5f01033f6dca934024ce488cedb
2017-10-23 18:27:24 -04:00
Masayuki Nakano 16fd3a84a4 Bug 143038 Make users can scroll contents horizontally with vertical wheel operation with a modifier r=smaug
This patch declares a new default action, "horizontal scroll", this scrolls
content horizontally with deltaY of wheel events and ignores deltaX and deltaZ.
This is used for default action with Shift key in default setting except on
macOS. On macOS, legacy mouse's vertical wheel operation with Shift key causes
native horizontal wheel event.  Therefore, we don't need to use this new
default action on macOS.  Additionally, old default action with Shift key,
navigating history, is moved to with Alt key.  This makes same settings between
macOS and the others.  So, this is better for users who use macOS and another
OS and web app developers who check wheel events only on macOS or other
platform(s).

For simpler implementation, default action handlers moves deltaY values to
deltaX values temporarily *only* while they handle wheel events.  This is
performed by AutoWheelDeltaAdjuster and restored after handling it
automatically.

So, in other words, even if default action is "horizontal scroll", web apps
receives wheel events whose deltaY is not zero but its content will be
scrolled horizontally.  This is same as Chromium, so, this behavior shouldn't
cause any incompatible behavior with it.

MozReview-Commit-ID: E4X3yZzLEAl

--HG--
extra : rebase_source : e20d854c6b0a181ad4c9e7304bd9ad14256481ff
2017-10-05 01:12:35 +09:00
Stone Shih 6ac2c9bb8f Bug 1405669 - [Pointer Event] Avoid creating temporarily variable when serializing WidgetPointerHelper. r=masayuki
MozReview-Commit-ID: 6PdO2RjUXWN

--HG--
extra : rebase_source : 2b0f3ac3cf187fb3e960ff92fd2fd8ce95d8cade
2017-09-21 16:17:30 +08:00
Ehsan Akhgari 7fe0be04ed Bug 1386411 - Part 3: Inline some helper functions in Selection.cpp; r=bzbarsky 2017-08-03 17:05:19 -04:00