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

1326 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano a40e30eab7 Bug 1400189 - Give same priority to composition events and selectionset event as keyboard events at sending those events from the main process to a remote process r=stone
When sending keyboard events from TabParent to its remote process, TabParent
may give higher priority to them than composition events and selectionset event.

Therefore, the event order between keyboard events and composition events (and
selection set event) may be broken.  Keyboard events which should cause
inputting some characters are ignored if keyboard events are fired before
compositionend event accidentally.

This patch gives same priority to composition events and selectionset event
as keyboard event for avoiding breaking the event order.

MozReview-Commit-ID: 53jubwuHVvw

--HG--
extra : rebase_source : ddba2cce5980a354a47ded68e69ef973c00dac4b
2017-09-29 22:03:25 +09:00
Arthur Edelstein 0671721301 Bug 1404174 - Fix ubsan runtime error for nsEventStatus enum. r=kats
--HG--
extra : rebase_source : ba9d1f9bbec0c3baac6d5ce9505926982e53bf8f
2017-09-28 18:06:00 -04:00
Bevis Tseng da72a5478c Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm
--HG--
extra : rebase_source : ffccc53b6b1055d7cfeb281ee145b897807a7810
2017-09-13 11:59:35 +08:00
Nicholas Nethercote 3aa25724fe Bug 1402255 - Change nsIBaseWindow::title from wstring to AString. r=janv.
Because nsAString is nicer to work with than char16_t*. The patch relatedly
changes nsIEmbeddingSiteWindow::title and nsIWindowMediator::updateWindowTitle
as well.

--HG--
extra : rebase_source : 0bf332dec3e09af6c39c676f8795b368768a6046
2017-09-25 13:10:51 +10:00
sotaro 445bba2d46 Bug 1401849 - Fix TabChild::mLayersConnected handling r=dvander 2017-09-25 09:22:29 +09:00
Stone Shih 7c72086a7b Bug 1401450 - Fix incorrect guid and input block id when sending coalesced mouse move event. r=smaug. 2017-09-20 12:59:08 +08:00
Masayuki Nakano e1f1db7272 Bug 1396725 - IMEStateManager doesn't need to manage whether menu keyboard listener is installed in different process r=smaug
Currently, IMEStateManager::OnChangeFocusInternal() tries to sync the state
whether menu keyboard listener is installed between itself and active remote
process -- When menu keyboard listener is installed, it posts a message to
_only_ active remote process.  When menu keyboard listener is uninstalled,
it posts a message to _only_ active remote process.  So, it's not guaranteed
that active remote process at installing and uninstalling may be different.
If it's different, IMEStateManager in the old remote process believes that
menu keyboard listener is still installed.  This is what the cause of IME
unavailable in a remote process.

Current approach must be wrong.  IMEStateManager should manage menu keyboard
listener state only in the process which the listener is installed in.  Then,
when menu keyboard listener is uninstalled, IMEStateManager needs to restore
the latest input context in the remote process without asking the remote
process.

Therefore, this patch does:

* stops IMEStateManager::OnChangeFocusInternal() posting message when menu
  keyboard listener is installed and uninstalled.
* removes the message sender and receiver from PBrowser.
* cache the latest input context of active remote process in
  IMEStateManager::SetInputContextForChildProcess().
* make IMEStateManager::SetInputContextForChildProcess() not set input context
  when menu keyboard listener is installed in the process.
* tries to restore latest input context in the remote process in
  IMEStateManager::OnChangeFocusInternal().  If there is no cached input
  context, it does nothing and waits next SetInputContextForChildProcess() call.
* clears the cache when IMEStateManager::OnChangeFocusInternal() changes
  active remote process to different one or nullptr.

So, this must improve performance at activating and inactivating memubar and
opening and closing popup menu in the main process.

MozReview-Commit-ID: EelKSPlaXdw

--HG--
extra : rebase_source : db7334b3c0d3ce87868450ee3179692027975bd6
2017-09-07 11:46:08 +09:00
Kirk Steuber 1ebc4af503 Bug 1348280 - Remove LayerManager type assertions from TabChild r=kats
As per https://bugzilla.mozilla.org/show_bug.cgi?id=1348280#c22 TabChild should not assert that it gets a certain type of LayerManager. Additionally, GetLayerManager should not be called in assertions since that code has side effects.

MozReview-Commit-ID: F4pwuUTjHQf

--HG--
extra : rebase_source : 8f9a54102de5889f2eff60e50f541776a3666aa4
2017-08-30 12:39:26 -07:00
Stone Shih c803058e5f Bug 1395361: Avoid using mCoalescedMouseEventFlusher after it's destroyed. r=smaug.
MozReview-Commit-ID: Fbu3zfERY0P
2017-08-31 12:00:08 +08:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Bill McCloskey a9ed818bea Bug 1383333 - Keep track of foreground TabChildren (r=kanru)
MozReview-Commit-ID: 1hT3BHzoZVA
2017-08-25 10:28:23 -07:00
Stone Shih 2c638fc04f Bug 1389314 Part2: Support enabling and disabling the input priority events in runtime. r=smaug.
MozReview-Commit-ID: 3a2TNVqguVb
2017-07-28 15:14:54 +08:00
Stone Shih 7646d41f1d Bug 1361067 Part2: Coalesce mouse move events to be once per refresh cycle. r=smaug.
MozReview-Commit-ID: 6jwQxxNIC2n
2017-08-11 14:58:08 +08:00
Stone Shih 3cadc1130d Bug 1361067 Part1: Refactor coalescing mouse wheel events. r=smaug.
MozReview-Commit-ID: 3NJJ77zAxNJ
2017-08-13 14:08:48 +08:00
Bill McCloskey 9edd615af7 Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm)
This patch refactors the nsThread event queue to clean it up and to make it easier to restructure. The fundamental concepts are as follows:

Each nsThread will have a pointer to a refcounted SynchronizedEventQueue. A SynchronizedEQ takes care of doing the locking and condition variable work when posting and popping events. For the actual storage of events, it delegates to an AbstractEventQueue data structure. It keeps a UniquePtr to the AbstractEventQueue that it uses for storage.

Both SynchronizedEQ and AbstractEventQueue are abstract classes. There is only one concrete implementation of SynchronizedEQ in this patch, which is called ThreadEventQueue. ThreadEventQueue uses locks and condition variables to post and pop events the same way nsThread does. It also encapsulates the functionality that DOM workers need to implement their special event loops (PushEventQueue and PopEventQueue). In later Quantum DOM work, I plan to have another SynchronizedEQ implementation for the main thread, called SchedulerEventQueue. It will have special code for the cooperatively scheduling threads in Quantum DOM.

There are two concrete implementations of AbstractEventQueue in this patch: EventQueue and PrioritizedEventQueue. EventQueue replaces the old nsEventQueue. The other AbstractEventQueue implementation is PrioritizedEventQueue, which uses multiple queues for different event priorities.

The final major piece here is ThreadEventTarget, which splits some of the code for posting events out of nsThread. Eventually, my plan is for multiple cooperatively scheduled nsThreads to be able to share a ThreadEventTarget. In this patch, though, each nsThread has its own ThreadEventTarget. The class's purpose is just to collect some related code together.

One final note: I tried to avoid virtual dispatch overhead as much as possible. Calls to SynchronizedEQ methods do use virtual dispatch, since I plan to use different implementations for different threads with Quantum DOM. But all the calls to EventQueue methods should be non-virtual. Although the methods are declared virtual, all the classes used are final and the concrete classes involved should all be known through templatization.

MozReview-Commit-ID: 9Evtr9oIJvx
2017-08-16 20:55:43 -07:00
Stone Shih de7f705042 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Stone Shih 7de447a25a Backed out changeset 46d8f42863af (bug 1351148) 2017-08-11 15:19:44 +08:00
Stone Shih 9d1d77d849 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Bill McCloskey 55f153be76 Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug)
MozReview-Commit-ID: HOSmqr5Vpwh
2017-07-28 13:11:59 -07:00
Carsten "Tomcat" Book de369deb98 Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
Carsten "Tomcat" Book bd7b184c91 Backed out changeset e3e924da5d5f (bug 1383328) 2017-07-28 09:20:05 +02:00
Bevis Tseng a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Bill McCloskey fff3f0890c Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug)
MozReview-Commit-ID: HOSmqr5Vpwh
2017-07-25 19:52:36 -07:00
Michael Layzell 6968a2e955 Bug 1382093 - Null check docShell in InternalSetDocShellIsActive, r=smaug
MozReview-Commit-ID: JHtmTSomFlb
2017-07-25 11:35:55 -04: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 6c68caecd7 Bug 1333459 - part1: Move methods of EventStateManager which check modifiers of access key to WidgetKeyboardEvent r=smaug
EventStateManager checks if every keypress event's modifiers match with access key modifiers which are in prefs. Moving related methods of this to WidgetKeyboardEvent makes EventStateManager simpler and we can hide the NS_MODIFIER_* constants (they may make developers confused between Modifiers of WidgetInputEvent) into WidgetEventImpl.cpp.

MozReview-Commit-ID: 23NUQ51lJ1M

--HG--
extra : rebase_source : 341f3764ef62575577572d8b349159e2d5512b26
2017-07-06 17:36:19 +09:00
Ryan VanderMeulen f4e3a91992 Merge m-c to inbound. a=merge 2017-07-21 09:40:28 -04:00
Samael Wang e90e4d4b15 Bug 1350643 - Part 7: Remove sync GetDPI/DefaultScale/WidgetRounding. Use primary screen's value until RecvShow. r=kanru
MozReview-Commit-ID: GlDMNecWp3j

--HG--
extra : rebase_source : 1f8573df8845c100172f41febc5a84bbcd069769
2017-05-19 18:20:18 +08:00
Andrew Osmond 094c212d54 Bug 1350408 - Gracefully handle failures in WebRenderLayerManager::Initialize to allow reinit. r=kats 2017-07-18 09:35:07 -04:00
Stone Shih 9573b6e439 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Carsten "Tomcat" Book 7857fa0a5e merge mozilla-inbound to mozilla-central a=merge 2017-07-06 11:18:05 +02:00
Botond Ballo 8b7ba8ac1c Bug 1377020 - Use MOZ_DEFINE_ENUM instead of a sentinel enumerator for enumerations in gfx/layers. r=kats
MozReview-Commit-ID: IUQDb0VIAwQ

--HG--
extra : rebase_source : 50d05ab09a5fb03d16c044edd38f0f3e0dba7ada
2017-06-30 21:18:55 -04: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
Kartikaya Gupta e436c26203 Bug 1370089 - Assume APZ is enabled in TabChild if we are queried before we have the compositor options. r=dvander a=bustage
MozReview-Commit-ID: KHvAvGCQQUr

--HG--
extra : source : 4ded92f42403ecd4582638f2209c534e64350c60
2017-06-30 14:51:33 -04:00
sotaro 1deee6448b Bug 1377024 - Add support of device reset test from about:support r=kats,dvander 2017-06-29 11:46:36 -07:00
Wes Kocher bfc45b98b9 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9XdoB5MuVz6
2017-07-05 17:17:41 -07:00
Bevis Tseng ac00d80880 Bug 1378298 - Make TabChildGlobal override DispatcherTrait using TabChild::TabGroup(). r=billm 2017-07-05 16:23:23 +08:00
Michael Layzell 17143c4e93 Bug 1350633 - Remove the Msg_GetWidgetNativeData sync IPC, r=billm, r=jimm
MozReview-Commit-ID: Bql29wgVDZ5
2017-06-28 12:25:32 -04:00
Michael Layzell 971bb7abef Bug 1343728 - Part 1: Add the ability to temporarially delay remote docshells from becoming active, r=smaug
MozReview-Commit-ID: KAaeu5ETc0x
2017-06-28 12:25:26 -04:00
Carsten "Tomcat" Book 152c0296f8 Backed out changeset e9dfba832730 (bug 1343728) for incomplete backout / making bug 1375293 worse on a CLOSED TREE
--HG--
extra : amend_source : 4c9ee2458a3413a2fe6f0b3e7785d1b2f211137f
2017-06-28 15:53:58 +02:00
Carsten "Tomcat" Book 6365f16e57 Backed out changeset a1e773337202 (bug 1350633) 2017-06-28 15:52:01 +02:00
Michael Layzell 3c82b8c224 Bug 1350633 - Remove the Msg_GetWidgetNativeData sync IPC, r=billm, r=jimm
MozReview-Commit-ID: Bql29wgVDZ5
2017-06-27 16:24:48 -04:00
Michael Layzell c7ffb02592 Bug 1343728 - Part 1: Add the ability to temporarially delay remote docshells from becoming active, r=smaug
MozReview-Commit-ID: KAaeu5ETc0x
2017-06-27 16:24:48 -04:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Wes Kocher b9d43d4afd Backed out 4 changesets (bug 1343728) for failures in test_group_mouseevents.html a=backout
Backed out changeset 2029cb6bce86 (bug 1343728)
Backed out changeset 0169e09f6030 (bug 1343728)
Backed out changeset 831e95b29f66 (bug 1343728)
Backed out changeset d5630ef01b17 (bug 1343728)

MozReview-Commit-ID: 2RRBTmp5FGj
2017-06-21 17:13:49 -07:00
Wes Kocher 0439cd545d Backed out changeset 36d662fbab77 (bug 1350633) for failures in test_group_mouseevents.html a=backout
MozReview-Commit-ID: Gh9eflBppgq
2017-06-21 17:12:20 -07:00
Michael Layzell f02a75cf86 Bug 1350633 - Remove the Msg_GetWidgetNativeData sync IPC, r=billm, r=jimm
MozReview-Commit-ID: Bql29wgVDZ5
2017-06-21 14:23:16 -04:00
Michael Layzell e1e38ff7fb Bug 1343728 - Part 1: Add the ability to temporarially delay remote docshells from becoming active, r=smaug
MozReview-Commit-ID: KAaeu5ETc0x
2017-06-21 14:23:10 -04:00
Sebastian Hengst adb899a58e Backed out changeset 5573f2f7d796 (bug 1343728) for failing various tests, e.g. mochitest test_animations_reverse.html. r=backout on a CLOSED TREE 2017-06-16 22:21:45 +02:00