If a plugin process posts native key events to the widget, it needs to check if the key combination is reserved by chrome because if it's reserved by chrome, the reserved shortcut key handler should be executed and the event shouldn't be handled by the focused plugin.
This patches add eKeyDownOnPlugin and eKeyUpOnPlugin. nsXBLWindowKeyHandler will listen to them and handle them as normal keydown and keypress or keyup event. Note that these events won't be fired on content in the default event group and won't be sent to the remote process.
MozReview-Commit-ID: H5OKPLtVdr6
--HG--
extra : rebase_source : c6852423e47c40e9953b72061262730f7cce35d7
On Windows, applications cannot handle IME messages asynchronously. Therefore, we cannot put off to send IME messages to plugin even if there are some pending keyboard events which were posted to the parent process.
This patch makes PluginInstanceChild consume all key events which are returned from the parent process during IME composition. And when an IME composition is committed, mark pending key events as outdated.
MozReview-Commit-ID: 7P3LEJ6pDir
--HG--
extra : rebase_source : 42e304c45cd980f339b29526ab65854d196198ad
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved. However, posting all key events to the chrome process may make damage to the performance of text input. Therefore, this patch starts to post a key event whose key combination may be a shortcut key. However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.
For receiving response from widget, this patch defines nsIKeyEventInPluginCallback. It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply. Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process. However, if the widget is a PuppetWidget, it cannot return the result synchronously. Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks. Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().
MozReview-Commit-ID: G6brOU26NwQ
--HG--
extra : rebase_source : 8140456de278956d2d594e85c7b397ae366b4962
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
Before posting native key message from PluginInstanceChild, we need to check if the key combination could be a shortcut key, i.e., we need to check if Ctrl or Alt key is pressed. ModifierKeyState is a good class for checking it but it should be defined in an independent header file.
This patch separates the definition of ModifierKeyState to mozilla/widget/WinModifierKeyState.h and implement MaybeMatchShortcutKey() for PluginInstanceChild.
MozReview-Commit-ID: ZjLnJx02Ou
--HG--
rename : widget/windows/KeyboardLayout.h => widget/windows/WinModifierKeyState.h
extra : rebase_source : 66e9351a36dfa88f080ea78972ac0cb347bb174d
This patch separates Windows' message definition and related definitions from nsWindowDefs.h to mozilla/widget/WinMessages.h because the definitions are useful in plugin module but nsWindowDefs.h cannot be included from plugin module since it depends on some headers in under widget.
MozReview-Commit-ID: KNUAffLMKT1
--HG--
rename : widget/windows/nsWindowDefs.h => widget/windows/WinMessages.h
extra : rebase_source : ae9390e700ca97a0a4eea3b2977d4d5568ce9408
PluginInstanceChild::PluginWindowProcInternal() should use switch-case statement at checking each message because adding new message handler may make damage to the performance and switch-case statement is easier to read for Windows message handler.
MozReview-Commit-ID: KfL0LtHL6GV
--HG--
extra : rebase_source : 3d729cf0c34990019dcf52fad72c748f31ea4d71
When IMEContentObserver stopped observing contents, posting pending notifications to current thread may cause infinite loop because it's impossible to send notifications to widget until the IMEContentObserver is reinitialized.
When IMEContentObserver is reinitialized, pending notifications are automatically flushed. So, in such case, IMEContentObserver::IMEnotificationSender shouldn't clear the pending notifications but don't post the notifications to current thread immediately.
MozReview-Commit-ID: 5xXT3VB4Jjb
--HG--
extra : rebase_source : 5529f1921cffe14b32779199e6919f1252051dcb
1) Use prepared SQL insert statement for insertions
1.2) Use ON CONFLICT IGNORE for our inserts, to avoid failing on possible data clashes
2) Don't synthesize "visits since last sync" - it's bound to cause problems, for not much benefit
3) Fix up some minor issues, cleanup code and add sanity checks
4) If there's evidence Sync was enabled at some point, mark synthsized visits as remote. Otherwise, as local.
MozReview-Commit-ID: Gd94A6r4rW
--HG--
extra : rebase_source : e4f74e3d1d286e1107e5a1764ae8ea3fd5ff3ff2
See code comment (and related bug) for details.
MozReview-Commit-ID: EDzIBftjJRU
--HG--
extra : rebase_source : 94721323a4372010941dcce034093d3f0d1ac95c
With this change two new attention states are introduced, "severe" and "warning",
along with the previous "success" and "no attention" states. "No attention" is
still a falsy value in order to mitigate any add-on compatibility issues.
"severe" and "warning states" now display an icon badge to the downloads button
(or the hamburger button if the downloads button is tucked away).
MozReview-Commit-ID: 3gc9Ji7zCXY
Thanks to gkw for pointing this out.
DONTBUILD (NPOTB)
MozReview-Commit-ID: 4Hd3Nse2VCP
--HG--
extra : rebase_source : f50253b8eb28306ecd62635f292fb3f2b65574c8