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

180 Коммитов

Автор SHA1 Сообщение Дата
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
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Jan Henning 7fb92b8c44 Bug 1478776 - Part 10: Add internal VisualViewport resize/scroll events. r=botond,nika
The VisualViewport events are all nice and shiny, but unfortunately not quite
what is needed for the session store.

Firstly, the spec wants the "scroll" event to be fired only when the *relative*
offset between visual and layout viewport changes. The session store however
records the absolute offset and as such is interested in when *that* changes.

Secondly, again as per the spec the events don't bubble, and with the default
DOMEventTargetHelper implementation they don't escape the VisualViewport during
capturing, either. This means that any event listener must be added directly on
the VisualViewport itself in order to capture any events.

This might have been intended because the events use the same names as the
normal "scroll"/"resize" events, and as such you cannot specify separate event
listeners for VisualViewport and non-VisualViewport "scroll" events if both
events end up being dispatched to the same element (you can only try to filter
after the fact by looking at the originalTarget of the event).

At the same time, the VisualViewport is attached to the inner Window, and so
each time you navigate, you also get a different VisualViewport object.
All of this might be totally fine from the perspective of a page script, because
in that case you won't care anyway about what happens when the current page goes
away.

From the session store perspective on the other hand (especially Fennec's non-
e10s session store design), this is rather unfortunate because we don't want to
have to keep registering event listeners
a) manually for each subframe
b) each time the page navigates

The event target chain problem could be solved by letting the scroll events
escape the VisualViewport during the capturing phase (which the spec doesn't say
anything about), but this would mean that any scroll listener attached to a
window/browser/... that uses capturing will now catch both layout and visual
viewport scroll events.

In some cases this might even be beneficial, but in others (e.g. bug 1498812
comment 21) I'd like to specifically decide which kind of scroll event to
capture. Having to look at event.originalTarget to distinguish the two kinds
might be defensible in test code, but in case this distinction would be needed
in production code as well, given the existence of a C++-based filtering helper
in nsSessionStoreUtils for another use case where (scroll) events need to be
filtered, JS-based scroll event filtering might be a bad idea.

Additionally, in any case this wouldn't solve the fundamental conflict between
the spec and the session store about *when* the "scroll" event should be fired
in the first place.

Hence I'd like to introduce a separate set of events with distinct event names,
which will be dispatched according to the requirements of our internal users
(i.e. currently the session store). To avoid potential web compatibility issues
down the road, for now these events will be dispatched only to event listeners
registered in the system group (allowing *all* Chrome event listeners cannot be
done because checking the Chrome status of each event target might be too
expensive for frequently dispatched events).

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

--HG--
extra : moz-landing-system : lando
2018-12-20 22:14:42 +00:00
Jan Henning c3352661fc Bug 1478776 - Part 8: Add an event flag for dispatching to system group only. r=smaug
The semantics of the VisualViewport resize/scroll events aren't quite what is
needed for internal browser usage, so we need a separate set of events that can
be used e.g. by the session store. To avoid future web compatibility issues,
that event should be kept internal, however none of the existing
options to achieve that are suitable:
- mNoContentDispatch can actually end up being dispatched to content after all
  and as per its comment preferably shouldn't be used any more for new features
- mOnlySystemGroupDispatchInContent would work perfectly, except that it
  shouldn't be used for frequent events, which the resize/scroll events
  arguably are
- mOnlyChromeDispatch doesn't work for the Desktop session store's content
  script, plus it might have the same performance problems as
  mOnlySystemGroupDispatchInContent

Therefore, I propose to introduce a new mOnlySystemGroupDispatch event flag,
which skips the comparatively expensive IsCurrentTargetChrome() check and relies
only on the event listener having been registered in the system group.

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

--HG--
extra : moz-landing-system : lando
2018-12-20 21:35:39 +00:00
Olli Pettay b977d23eb2 Bug 1089326, make <button> hit testing similar to other elements which may have some content, and for click target find the common (interactive) ancestor, r=masayuki
--HG--
extra : rebase_source : 80caab4e074d552c38b62842fe3102fb6735dfd9
2018-12-11 23:35:40 +02: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
Masayuki Nakano abe138f771 Bug 1504911 - part 1: Make all "input" event dispatcher in C++ use new utility method r=smaug
Currently, a lot of code dispatch "input" event and some of them dispatch
"input" event with wrong interface and/or values.  Therefore this patch
creates nsContentUtils::DispatchInputEvent() to make all of them dispatch
correct event.

Unfortunately, due to bug 1506439, we cannot set pointer to refcountable
classes of MOZ_CAN_RUN_SCRIPT method to nullptr.  Therefore, this patch
creates temporary RefPtr<TextEditor> a lot even though it makes damage to
the performance if it's in a hot path.

This patch makes eEditorInput event dispatched with
InternalEditorInputEvent when "input" event should be dispatched with
dom::InputEvent.  However, this patch uses WidgetEvent whose message is
eUnidentifiedEvent and setting WidgetEvent::mSpecifiedEventType to
nsGkAtoms::oninput when "input" event should be dispatched with
dom::Event because we need to keep that eEditorInput and
InternalEditorInputEvent are mapped each other.

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

--HG--
extra : moz-landing-system : lando
2018-11-21 03:59:02 +00:00
Kartikaya Gupta f366022cd6 Bug 1504793 - Remove out-of-date sentence from comment. r=botond
DONTBUILD because comment-only change.

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

--HG--
extra : moz-landing-system : lando
2018-11-05 23:36:14 +00:00
Olli Pettay ddda29dcf1 Bug 1484371 - make *enter/*leave events uncomposed, r=masayuki
--HG--
extra : rebase_source : 508dc487915b352682887e1a4650fc396564d532
2018-08-22 16:08:17 +03:00
Olli Pettay 7146d67afe Bug 1472887, focusin/out should be composed, and mark chrome event target chain items as chrome, r=masayuki 2018-07-09 17:40:01 +03:00
Masayuki Nakano 36f73c43d8 Bug 1435717 - Make calling WidgetEvent::PreventDefault*() stop cross process forwarding too r=smaug
Currently, if an event is consumed in the main process, EventStateManager
does not send it to remote process.  However, this is unexpected behavior
for some WidgetKeyboardEvent dispatchers.  OS sometimes has consumed native
key events before sending applications.  For example, Alt key on Windows
should activate menu bar of focused window but Alt key may be consumed before
focused window receives the event.  In such case, we mark Alt keyboard event
as "consumed before dispatch", and chrome treat it like as its preventDefault()
is called in web content.  (Note that for compatibility with other browsers,
the consumed state is not exposed to web content.  So, Event.defaultPrevented
returns false in web content.)

Therefore, we need to treat "consumed" state and "cross process forwarding"
state separately.  This patch makes calling WidgetEvent::PreventDefault()
always stops cross process forwarding for backward compatibility.  Additionally,
for the special case mentioned above, this patch makes
WidgetEvent::PreventDefaultBeforeDispatch() take additional argument,
|aIfStopCrossProcessForwarding|.  If this is CrossProcessForwarding::eStop,
the event won't be sent to remote process as same as calling PreventDefault().
Otherwise, CrossProcessForwarding::eHold, PreventDefaultBeforeDispatch() call
does not change "cross process forwarding" state.  I.e., if the event's
StopCrossProcessForwarding() and PreventDefault() are not called until
EventStateManager::PostHandleEvent(), the event will be sent to remote process
as usual.

MozReview-Commit-ID: IQGWJvXetxV

--HG--
extra : rebase_source : 4ccdd500e80b8fe29e469ac3b85578e1c07c8358
2018-06-25 18:17:18 +09:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Olli Pettay b9ac198b01 Bug 1413102 - Ensure Shadow DOM boundaries are dealt properly in event handling, r=masayuki 2018-02-15 12:08:42 +02:00
Dorel Luca 12fe7a2577 Backed out changeset 2320b7fd9266 (bug 1413102) for Mochitest failure on dom/tests/mochitest/pointerlock/test_pointerlock-api.html 2018-02-14 20:44:19 +02:00
Olli Pettay 6a7af9eddf Bug 1413102 - Ensure Shadow DOM boundaries are dealt properly in event handling, r=masayuki
--HG--
extra : rebase_source : 72130abec4634f60f9c8f9b9bcd7630ef26097e1
2018-02-14 14:16:15 +02:00
Hiroyuki Ikezoe 2e4cb19d33 Bug 1433008 - Make WidgetEvent movable. r=masayuki
The copy-assignment in this patch is used in the copy-constructor.
Note that we can't simply use '= default' implementation since we need to use
MOZ_COUNT_CTOR() in the move constructor.

MozReview-Commit-ID: 8HTMaTONBuN

--HG--
extra : rebase_source : 7da0586e0772a2d71455492412d40780c59558e5
2018-01-30 09:26:48 +09:00
Tim Huang 98af9c6f96 Bug 1222285 - Part 2: Making the keyboard events of modifier keys been suppressed when 'privacy.resistFingerprinting' is true. r=arthuredelstein,masayuki
This patch makes 'Shift', 'Alt', 'Contorl' and 'AltGraph' been suppressed for content
when fingerprinting resistance is enabled. Chrome can still get these events.

The reason behind this is that websites can still observe key combinations to
tell which keyboard layout is using even we spoof the keyboardEvent.code,
keyboardEvent.keyCode and modifier states. For example, the AZERTY France
keyboard, the digit keys of it requires the user press the Shift key. So, it is
easy to differentiate AZERTY and QWERTY keyboard by observing whether a Shift key
generates its own before the digit keys. There are similar issues for 'Alt' and
'AltGraph' as well.

MozReview-Commit-ID: 3CwCgvey4lK

--HG--
extra : rebase_source : 225a34ab188f6cca288a6c0e9874261df7db629f
2017-08-31 11:14:14 +08:00
Olli Pettay ddf5c731fa Bug 1425441 - Move relatedTarget to WidgetEvent, r=stone
--HG--
extra : rebase_source : 75b00efa0af5989e41763fbecac6fd8794c870c6
2017-12-18 19:08:11 +02:00
Olli Pettay d78d3295c5 Bug 1412775 - Implement Event.composedPath, r=stone
--HG--
extra : rebase_source : a970c4a0daac4a7a02cec34733131734eb93b151
2017-12-18 18:07:36 +02:00
James Willcox bacda12532 Bug 1409113 - Add nsIPresShell::HasHandledUserInput() r=masayuki
MozReview-Commit-ID: 3Yr5UmFJx5h
2017-11-22 10:09:04 -06:00
Masayuki Nakano 93977460e2 Bug 1406446 - part 1: InputContextAction should treat focus change during handling a user input as caused by user input even if it's caused by JS r=smaug
Currently, widget doesn't show VKB when input context change is caused by JS.
However, if it's caused by an event handler of a user input, user may expect
to open VKB.  For example, if a touch event in fake editor causes moving
focus to actual editable node, user expect to show VKB.

Therefore, InputContextAction should declare two causes.  One is unknown but
occurred during handling non-keyboard event.  The other is unknown but occurred
during handling keyboard event.

However, EventStateManager doesn't have an API to check if it's being handling
a keyboard event.  Therefore, this patch adds it first.
AutoHandlingUserInputStatePusher sends event type to StartHandlingUserInput()
and StopHandlingUserInput() of EventStateManager and sUserKeyboardEventDepth
manages the number of nested keyboard event handling.  Therefore,
EventStateManager::IsHandlingKeyboardInput() can return if it's handling a
keyboard event.

IMEStateManager uses this new API to adjust the cause of changes of input
context.

Finally, InputContextAction::IsUserInput() is renamed to IsHandlingUserInput()
for consistency with EventStateManager and starts to return true when the
input context change is caused by script while it's handling a user input.

MozReview-Commit-ID: 5JsLqdqeGah

--HG--
extra : rebase_source : 9fcf7687d1bf90eeebbf6eac62d4488ff64b083c
2017-10-24 02:46:15 +09:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Stone Shih 6cbc21aa58 Bug 1355497: Ignore preventDefault on pointerdown by WebExtensions. r=smaug.
Prevent default on pointerdown will stop firing the subsequent mouse events. Ignore the case that preventDefault by WebExtensions to avoid breaking some websites.

MozReview-Commit-ID: 9ztW1WfEg9a
2017-07-10 16:42:01 +08:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Masayuki Nakano c8d5ce8e59 Bug 1333459 - part4: Make EventStateManager resets "waiting reply from remote process" when the focused content isn't in remote process r=smaug
On macOS, we fall back eKeyPress event to native menu.  Therefore, widget always requests a reply from remote process because it's difficult to check if the eKeyPress event will be sent to a remote process actually.  If it's not sent to any remote processes, PresShell needs to dispatch the event into the DOM tree.  Additionally, even if it's marked as "waiting reply from remote process", it needs to dispatch the DOM event in the main process first because we need to check if the key combination is reserved by chrome (if it's reserved, the eKeyPress event shouldn't be fired in the remote process).

Therefore, this patch makes EventStateManager::PreHandleEvent() resets the state when focused content isn't in any remote processes and the event's propagation hasn't been stopped.

Additionally, this patch makes PresShell::HandleEventInternal() checks WidgetEvent::PropgationStopped() with WidgetEvent::IsWaitingReplyFromRemoteProcess() before dispatching the event into the DOM tree.

MozReview-Commit-ID: FmgL3rCuQ8y

--HG--
extra : rebase_source : aa8d6b924fc78d1d9dd35a35c92976c35c758657
2017-07-21 17:22:08 +09:00
Masayuki Nakano 0ebdc75b7b Bug 1333459 - part2-3: Make nsMenuBarListener::KeyPress() wait reply from remote process if the eKeyPress event will be sent to a remote process later r=smaug
nsMenuBarListener::KeyPress() is eKeyEvent listener in the system event group.  If the target is a remote process, it shouldn't handle accesskey immediately because preceding eKeyDown event may be consumed in the remote process or eKeyPress event itself may be consumed in the remote process.

This patch makes nsMenuBarListener::KeyPress() mark eKeyPress event as "waiting reply from remote process" only when the event matches with a menu item's accesskey and it will be send to a remote process later.  Then, reply event should be handled in this method if it's available.

MozReview-Commit-ID: KOpCVgElnca

--HG--
extra : rebase_source : 881ec01f5c8e21c790bf9a8c3167d6c3f932524a
2017-07-19 18:39:34 +09:00
Masayuki Nakano 44d5a33919 Bug 1333459 - part2-2: EventStateManager should check if it needs to wait reply from remote content before handling access keys r=smaug
Currently, access key is handled in EventStateManager::PreHandleEvent() with eKeyPress event, i.e., before dispatching it into the DOM tree, if the access key is registered in EventStateManager.  So, the main process does not check if the preceding eKeyDown event is consumed in focused remote process.

When preceding eKeyDown event is consumed in the main process, eKeyPress event won't be dispatched by widget.  However, if remote process has focus, it's impossible widget to stop dispatching eKeyPress event because preceding eKeyDown event hasn't been handled in the focused remote process yet.  Therefore, main process needs to post eKeyPress event to check if preceding eKeyDown event was consumed.  When eKeyPress event is marked as "waiting reply from remote process", TabChild sends it back to the main process only when preceding eKeyDown event wasn't consumed.  So, only when eKeyPress event is back to the main process, main process should handle accesskey with it.

This patch makes EventStateManager::PreHandleEvent() check if a remote target has focus before handling accesskey.  If a remote process has accesskey and there is an accesskey matching with eKeyPress event, it marks the event as "waiting reply from remote content" and stop propagation in the process.

Finally, when eKeyPress event is sent back to TabParent, TabParent::RecvReplyKeyEvent() calls EventStateManager::HandleAccessKey() before dispatching the reply event into the DOM tree.

MozReview-Commit-ID: KsOkakaIVzb

--HG--
extra : rebase_source : 7e0c6966a1bde085e34d45bca4b0166b9fc2f3f1
2017-07-22 10:50:41 +09:00
Masayuki Nakano 5533f095cb Bug 1377653 - part3: WidgetEvent::mFlags should have a bool flag if it's been posted to at least one remote process r=smaug
Currently, it's not been managed yet that whether an event is posted to at least one remote process.  So, for managing the state, BaseEventFlags should have a new bool flag and WidgetEvent and BaseEventFlags should have helper methods for it.

Additionally, this fixes a bug of nsGUIEventIPC.h. In a lot of ParamTraits, static_cast<Foo> is used for using base class's ParamTraits.  However, it causes creating temporary instance with copy constructor.  Therefore, WidgetEvent::MarkAsPostedToRemoteProcess() call in ParamTraits<mozilla::WidgetEvent>::Write() didn't work as expected.

MozReview-Commit-ID: DdafsbVfrya

--HG--
extra : rebase_source : 94205f3a7b36455c3c9f607c35866be033e627c1
2017-07-05 18:59:44 +09:00
Masayuki Nakano 57f359b0de Bug 1377653 - part2: Add helper methods to WidgetEvent and BaseEventFlags to manage propagation state between parent process and remote process r=smaug
Currently, we have 2 bool flags (and optional 2 bool flags with related purpose) for managing propagation state between parent process and remote process.  However, it's really complicated.  Actually, setting these flags and referring the flags is usually follow explanation.

So, for making simpler, WidgetEvent and BaseEventFlags should have some utility methods for making them as self documented code.

This patch moves WidgetKeyboardEvent::mIsReserved to BaseEventFlags::mIsReservedByChrome.  That allows us to manage the cross process event propagation state in same place.

MozReview-Commit-ID: IXEDQJ4GpAZ

--HG--
extra : rebase_source : 5b63ac4f1d15e40e8bfc88423e336de28caa8ab6
2017-07-05 13:58:41 +09:00
Ryan Hunt c1312e5abc Bug 1351783 part 12 - Create and sync focus sequence numbers. r=kats,botond,dvander
Focus can change at any moment in a document. This causes non-determinism and
correctness problems for doing keyboard apz scrolling. To get around this, we
will maintain deterministic behavior for focus changes initiated by input events
and see if we can get away with more non-determinism for things like `setTimeout`

In order to do this, we disable async keyboard scrolling when an input event is
processed that could have a event listener. We then attach a sequence number to
that input event and dispatch it to content. In content, we record the highest
sequence number that we have processed from an event, and send that on each focus
update. Using this, we can determine in APZ if we have a current focus target or
if we are still waiting for an input event to be processed and focus to be
reconfirmed.

MozReview-Commit-ID: CWcu8YEFQz4

--HG--
extra : rebase_source : 8c54a619bd4f5ee892f0cc8768a10f3e1e4e0b59
extra : histedit_source : 601ca293a028787883841adc6b40e62c0cc829e5
2017-06-05 19:45:31 -05:00
Michael Layzell b24cba603e Bug 1369627 - Part 2: Send DimensionInfo down to the content process synchronously when creating a new window, r=smaug
MozReview-Commit-ID: GlzJ491RLUE
2017-06-15 14:34:48 -04:00
Aryeh Gregor b03daa975a Bug 1314388 - Remove SVGZoomEvent; r=longsonr,smaug
Some code in SVGSVGElement.cpp might be unnecessary now, but Robert said
to leave it for a followup.

MozReview-Commit-ID: 8PpRGeGrREJ
2017-04-04 15:36:22 +03:00
Olli Pettay 92bb395acd Bug 1339758, click() and similar can return 0 from various coordinate properties, r=masayuki
--HG--
extra : rebase_source : 71547cc6655c39ffeba89676d315bdb9bacc5ff4
2017-03-23 12:57:44 +02:00
Masayuki Nakano 733c1003b2 Bug 1314053 part.5 WidgetEvent shouldn't mark event as consumed if it's not cancelable r=smaug
Currently, EventListenerManager calls WidgetEvent::PreventDefault() when the status is nsEventStatus_eConsumeNoDefault. That causes unexpected state of events.  So, WidgetEvent should do nothing when it's not cancelable but PreventDefault() is called.

MozReview-Commit-ID: AjuXCyQpBbi

--HG--
extra : rebase_source : 031c0e129f875b51c58a991b9da9db236ad53ff7
2017-01-12 21:14:43 +09:00
Masayuki Nakano 7ab96b2cef Bug 1314053 part.2 Change EditorBase::IsAcceptableInputEvent()'s argument from nsIDOMEvent* to WidgetGUIEvent* r=smaug
MozReview-Commit-ID: Jo6EwQubUAM

--HG--
extra : rebase_source : 098b23946f349bbe7641a2059538ffb20ae4f5bb
2017-01-17 17:17:06 +09:00
Masayuki Nakano 36ead639f1 Bug 1332191 Move CrossProcessSafeEvent() in EventStateManager.cpp to WidgetEvent::CanBeSentToRemoteProcess() r=smaug
It doesn't make sense to check this in a static method of EventStateManager.cpp.  Instead, it should be a class method of WidgetEvent.  Then, everybody can check this in everywhere.

This patch adds mFlags.mNoCrossProcessBoundaryForwarding because when it's true, any events shouldn't be sent to remote process.

MozReview-Commit-ID: oCuxAwotDA

--HG--
extra : rebase_source : 0de8d65f83924859a38c513aff8da17d8571774d
2017-01-19 16:46:59 +09:00
Kevin Wern b2052e9ddc Bug 1304044 - implement auxclick r=smaug
After click events with button 2 or 3 are fired, fire auxclick, a new
event intended to represent a non-primary mouse click. Because this
event, based on the design examples and blink's implementation, is
intended to be used with content listeners, always dispatch on content
listeners--not just those that force all events to be dispatched (i.e.
document/window). This diverges from the behavior of our click events
from non-primary buttons.

Eventually, we hope this will replace click events for non-primary
buttons. For now, leave those events for compatibility reasons.

Additionally, add handling of this new event, where necessary.

MozReview-Commit-ID: 8osozM4h6Ya

--HG--
extra : rebase_source : 558261dd0d0b9241efa84ca168c50455850af03a
2016-11-30 19:48:02 -05:00
Jessica Jong 8b1856afb0 Bug 1321245 - Request native key bindings for delayed keypress events. r=smaug
--HG--
extra : rebase_source : c273efdca1731a5b09b01c5848b7a34fd1a71e43
2016-12-02 00:41:00 -05:00
Jessica Jong 3f2c55024c Bug 1309587 - PreventDefault() on suppressed/delayed key events that are sent back to parent. r=smaug
--HG--
extra : rebase_source : 0762ef1284c063c9716a963bf40ff5cc82b48326
2016-11-21 06:55:00 -05:00
Stone Shih 5d6aec8c60 Bug 1315862 Part1: Stop dispatching pointer events in the system group. r=masayuki,smaug
MozReview-Commit-ID: 8Xqp3bxlRFt

--HG--
extra : rebase_source : 25afbefb19e5ae613e9e493ea2f275a36004d523
2016-11-11 18:02:37 +08:00
Stone Shih 6ec033ea44 Bug 1303704 Part1: [Pointer Event] Implement prevent default behavior of pointerdown. r=masayuki
MozReview-Commit-ID: AbO5cBjIwfJ

--HG--
extra : rebase_source : c11b3c0385c28665de20a8b69100ebc33e5b47de
2016-09-20 14:33:08 +08:00
Stone Shih ce7f1ca7af Bug 1292063 - Part 3: Add mComposedInNativeAnonymousContent to determine which events can cross the boundary of native anonymous content. r=smaug
--HG--
extra : rebase_source : 6b3fcc52b2a099944cc1a0427a36624394fb3b2e
2016-09-12 18:15:16 +08:00
Stone Shih d76caea5e4 Bug 1292063 - Part 1: Add Event.composed. r=smaug
--HG--
extra : rebase_source : 105f9cfddb083d48d3da25fa13bf9a3b4c2637f6
2016-08-31 11:16:11 +08:00
Masayuki Nakano 97735168f1 Bug 1297013 part.2 Implement some helper methods to log constants related to event handling r=smaug
This patch implements some helper methods to log constants related to event handling.

ToString(KeyNameIndex) and ToString(CodeNameIndex) converts the enum itmes to human readable string.  They use WidgetKeyboardEvent's helper class which returns Unicode text.  Therefore, this need to convert from UTF16 to UTF8.  That's the reason why these methods don't return |const char*|.

GetDOMKeyCodeName(uint32_t) returns DOM keycode name if it's defined.  Otherwise, returns hexadecimal value.  For generating switch-case statement, VirtualKeyCodeList.h shouldn't include ",".  Therefore, this patch removes "," from VirtualKeyCodeList.h and append it at defining NS_DEFINE_VK.  Additionally, the last item of enum and array should not end with ",".  Therefore, this adds dummy last item at each of them.  Finally, some of the keyCode values are shared between 2 keys.  Therefore, it needs to support NS_DISALLOW_SAME_KEYCODE for switch-case generator.  See the comment in the file for more detail.

GetModifiersName(Modifiers) returns all modifier names included in the given value.

MozReview-Commit-ID: 9i2ftFOTpDn

--HG--
extra : rebase_source : 458a4d28624dc10dd4454f2e7708d746d1fcb045
2016-09-15 00:48:47 +09:00
Michelangelo De Simone 0b2d2c0e55 Bug 1120059 - Remove unnecessary MOZ_EXPLICIT_CONVERSION macros. r=jwalden
MozReview-Commit-ID: 7CX1VnBRDpk

--HG--
extra : rebase_source : 36be7e6c91d2767c5a610a2806f89efa69ff1c74
2016-07-13 15:07:52 -07:00
Matt Woodrow 63c2013a9f Bug 1163212 - The resize event should not be cancelable. r=smaug
--HG--
extra : rebase_source : aef9af37dc8a1fdcc481ad9a69e4bf59a5e7a2bb
2016-05-27 10:35:48 +12:00
Kartikaya Gupta a412581b20 Bug 1266066 - Implement DOM support for the 'passive' event listener flag. r=smaug
MozReview-Commit-ID: EvSCDxYC7g6
2016-05-12 14:50:22 -04:00
L. David Baron 71a0554018 Bug 1270649 - Rename mExceptionHasBeenRisen to mExceptionWasRaised. r=smaug
risen is the past participle of rise; raised is the past participle of
raise, which is what is done to exceptions.

See:
https://en.wiktionary.org/wiki/rise#Verb
https://en.wiktionary.org/wiki/raise#Verb (definition 2, though not sure
  if the use for exceptions is from 2.3 or 2.5)

(I wonder if mExceptionRaised would be simpler, though.)

MozReview-Commit-ID: 8Ynup8aDcLT
2016-05-08 22:16:42 -07:00
Stone Shih 547b61eae3 Bug 386743 - Set default event bubbling/cancelable flags in the WidgetEvent constructor. r=smaug 2016-04-13 14:16:42 +08:00
Masayuki Nakano d2c8ff21a8 Bug 1257759 part.4 Rename WidgetGUIEvent::PluginEvent to NativeEventData for using this class to send native event from plugin process to content and/or chrome process r=smaug
PluginInstanceChild needs to send native key event to the chrome process via a content process.  So, IPC needs a platform independent class/struct which can store native event.  This purpose is exactly same as the purpose of WidgetGUIEvent::PluginEvent.  Therefore, we can use it for this case too.

This patch renames WidgetGUIEvent::PluginEvent to NativeEventData but this patch does NOT remove WidgetGUIEvent::PluginEvent.  Instead of that, it's defined as an alias of NativeEventData since PluginEvent is clearer name for the original purpose and it's used by plugin module.

MozReview-Commit-ID: 3nrHfb8gk8m

--HG--
extra : rebase_source : b0b5a863360bf0893b161d70124d3a83aa2c3386
2016-04-05 14:23:13 +09:00