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

29 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano ef2fb8753d Bug 1282669 Get rid of nsIMEUpdatePreference::DontNotifyChangesCausedByComposition() r=m_kato
I think that we can drop nsIMEUpdatePreference::DontNotifyChangesCausedByComposition(), i.e., nsIMEUpdatePreference::NOTIFY_CHANGES_CAUSED_BY_COMPOSITION because it's now used only by TSFTextStore but TSFTextStore ignores if SelectionChangeDataBase::mCausedByComposition or TextChangeDataBase::mCausedOnlyByComposition is true (for supporting async changes in e10s mode).  So, only issue is, dropping the flag might cause increasing computing TextChangeData cost during composition in TSF mode.  However, now, it's already enough fast and even if it'd cause performance regression, we could add a hack with TextComposition's offset information.  Therefore, we don't need to worry about the performance regression so seriously.

MozReview-Commit-ID: HNT3G4isONj

--HG--
extra : rebase_source : 164231023aa2a17ceab94d92fb49ba0a00dab429
2016-06-28 16:51:59 +09:00
Masayuki Nakano e1d8dafcd9 Bug 1282668 Get rid of nsIMEUpdatePreference::NOTIFY_SELECTION_CHANGE r=m_kato
Currently, all widgets request selection change notifications to IMEContentObserver.  Additionally, IMEContentObserver needs to listen selection changes for caching latest selection for eQuerySelectedText.  Therefore, it doesn't make sense to keep defining nsIMEUpdatePreference::NOTIFY_SELECTION_CHANGE.

If widgets didn't need selection change notifications, they could just ignore the unnecessary notifications.

Note that all widgets don't need selection change notifications if a plugin has focus and IMEContentObserver cannot observe selection changes in the plugin.  Therefore, if IMEContentObserver is initialized with a plugin, it shouldn't listen selection changes (and doesn't need to notify widgets of selection changes).

MozReview-Commit-ID: FOVFFgA2nOz

--HG--
extra : rebase_source : 3e16d5023835f99f82934e754d2e7db70474f9ee
2016-06-28 15:23:12 +09:00
Masayuki Nakano 54e57600e1 Bug 1275906 part.2 TextComposition should use IMEContentObserver for sending NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED if the editor which has the composition is in the active IMEContentObserver r=smaug
For sending NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED after the other change notifications which was caused by the user input, we need to use IMEContentObserver::IMENotificationSender because it sends the notifications when it's safe to do it.

This patch makes TextComposition use IMEContentObserver to send the notification.  However, if there is no active IMEContentObserver, e.g., composition events are fired on unfocused window, TextComposition sends it by itself (same as current implementation).

If IMEContentObserver stops observing when it has pending NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED, it cannot send the notification (i.e., it is discarded completely in such case). However, in such case, IMEContentObserver sends NOTIFY_IME_OF_BLUR.  So, anyway, native IME handler should treat the blur notification as it including NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED.

On the other hand, we're buggy if composition events are fired in non-active window.  Even in such case, IMEContentObserver should be created for active editor in each document and it notifies IME of the changes. But this is out of the scope of this bug.

MozReview-Commit-ID: 7Q0ZsJTh4hX

--HG--
extra : rebase_source : 6417f991fa8c0fbe3f25b27bacf4257e5485aecc
2016-06-01 22:14:41 +09:00
Masayuki Nakano e67330e0b4 Bug 1275906 part.1 Rename NOTIFY_IME_OF_COMPOSITION_UPDATE to NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED r=m_kato
It's not clear to me what NOTIFY_IME_OF_COMPOSITION_UPDATE means only from the name. For making the name clearer, this patch renames it to NOTIFY_IME_OF_COMPOSITION_EVENT_HANDLED and add some explanation to the definition.

MozReview-Commit-ID: 8ySYCNJ1Ytz

--HG--
extra : rebase_source : 3331b8f48e8b460c7f9b088064dcda9488f3403c
2016-05-31 11:39:15 +09:00
Masayuki Nakano a58a540708 Bug 1251063 PuppetWidget should cache InputContext which is set with SetInputContext() and use it in GetInputContext() only when it is the widget which has active input context in the process r=smaug
PuppetWidget::GetInputContext() needs to communicate with its parent process with synchronous IPC. This is very expensive for focus move.

Currently, IMEStateManager uses nsIWidget::GetInputContext() only for checking the IME enabled state.  Therefore, it's enough to cache input context when nsIWidget::SetInputContext() is called.  Then, we can avoid to communicate with synchronous IPC with PuppetWidget::GetInputContext() in most cases.

This patch makes IMEStateManager stores the last widget which sets input context.  When PuppetWidget uses its input context cache, it should check if it is the last widget to set input context with IMEStateManager since an input context may be shared with other widgets and another one may have update the input context.  I.e., PuppetWidget's input context cache may be already outdated after IMEStateManager sets input context with another widget.

This patch gives up to support retrieving IME open state from child process. However, perhaps, this is not necessary for everybody including add-on developers because the only user of IME open state in child process is nsIDOMWindowUtils. So, add-ons can send IME open state from chrome process instead.  If this decision is wrong, unfortunately, we should support it again in another bug.  It's easy to support with creating another nsIWidget::GetInputContext() or adding additional argument to it.

MozReview-Commit-ID: B2d2CCTsPKj

--HG--
extra : rebase_source : 4117330ba7871753176da960063b612e96f11752
2016-05-28 11:27:56 +09:00
Gijs Kruitbosch b499a37faf Bug 1239744 - no longer automatically show an on-screen keyboard for programmatic focus changes, tidy up osk logic in IMEHandler, r=masayuki
--HG--
extra : rebase_source : 013c2759f4faca65ed3de79ca1d7f0b97e6375cb
2016-02-09 19:39:55 +00:00
Makoto Kato ba11a89326 Bug 1243268 - Support ImmSetCandidateWindow(CFS_EXCLUDE) on plugin process. r=masayuki 2016-02-02 17:05:56 +09:00
Masayuki Nakano 05ae69e6a5 Bug 1242331 part.4 Add TextChangeDataBase::mIncludingChangesWithoutComposition r=smaug 2016-01-28 13:28:54 +09:00
Masayuki Nakano 1e9d12bfdb Bug 1242331 part.3 Rename TextChangeDataBase::mOccurredDuringComposition to mIncludingChangesDuringComposition r=smaug 2016-01-28 13:28:53 +09:00
Masayuki Nakano 26c28dca6c Bug 1242331 part.2 Rename TextChangeDataBase::mCausedByComposition to mCausedOnlyByComposition r=smaug 2016-01-28 13:28:53 +09:00
Masayuki Nakano 430cba8f7f Bug 1242331 part.1 Remove unused methods of IMENotification r=smaug 2016-01-28 13:28:53 +09:00
Masayuki Nakano 6c313126b6 Bug 1234120 part.1 IMEHandler should request all notifications which are requested by either IMMHander or TSFTextStore when IMM is available in TSF mode r=m_kato 2015-12-22 14:58:48 +09:00
Carsten "Tomcat" Book b25476080d merge mozilla-inbound to mozilla-central a=merge 2015-12-11 11:38:17 +01:00
Masayuki Nakano da7a2f4f8d Bug 1179632 part.2 WidgetCompositionEvent should store NativeIMEContext which caused the event and PuppetWidget should store it for GetNativeIMEContext() r=smaug, sr=smaug 2015-12-11 15:15:57 +09:00
Masayuki Nakano 6cad726628 Bug 1179632 part.1 native IME context should not be stored in InputContext but should be able to retrieve with nsIWidget::GetNativeData() r=smaug 2015-12-11 15:15:57 +09:00
Gijs Kruitbosch 297357597f Bug 1224605 - also show the OSK when tapping in focused inputs, r=masayuki
--HG--
extra : commitid : Dk5EQ4MMs4X
extra : rebase_source : 3bfa3f930a95904d2b179b58f3735f2e1cae1dc0
2015-12-08 09:56:27 -05:00
Gijs Kruitbosch aaf54987f1 Bug 1221947 - part 2: add TOUCH cause to IME Handling and use it to avoid checking for a keyboard, r=masayuki
--HG--
extra : commitid : 210bhfz78Nm
extra : rebase_source : a3ee068abd8cb0fc2c83be7d5e5442bf74979ecd
extra : histedit_source : 29daad4b99ad4d41663cc026983dffa7449029dc
2015-11-12 16:36:19 +00:00
Chris Peterson a11badd07b Bug 1219139 - Fix -Wimplicit-fallthrough warnings in dom/events and widget/IMEData.h. r=masayuki
widget/IMEData.h:428:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels

dom/events/EventStateManager.cpp:601:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/events/EventStateManager.cpp:654:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/events/EventStateManager.cpp:714:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/events/EventStateManager.cpp:1239:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/events/EventStateManager.cpp:3045:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/events/EventStateManager.cpp:4173:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-10-26 20:46:27 -07:00
Masayuki Nakano 35aa5312ba Bug 1184890 part.1 SelectionChangeDataBase and TextChangeDataBase should have a flag which indicates whether the change occurred during composition or not r=smaug 2015-10-27 07:21:37 +09:00
Masayuki Nakano c985d88dab Bug 1203364 IMEContentObserver should notify IME of selection change with the latest change reason r=smaug 2015-09-14 23:28:43 +09:00
Masayuki Nakano 1a4e1c06f7 Bug 1200980 part.3 IMEContentObserver should use its selection cache at handling NS_QUERY_SELECTED_TEXT r=smaug 2015-09-08 12:54:14 +09:00
Masayuki Nakano 6ecfef2cde Bug 895274 part.5 Rename NS_EVENT_NULL to eVoidEvent r=smaug 2015-08-29 08:58:26 +09:00
Masayuki Nakano 0d22745cda Bug 895274 part.3 Make the enum of event messages a named enum IGNORE IDL r=smaug 2015-08-26 21:56:59 +09:00
Masayuki Nakano 733d9feaed Bug 1198594 The copy constructor of IMENotification should initialize mMessage before calling Assign() r=smaug 2015-08-26 20:01:05 +09:00
Masayuki Nakano d2cd0b82ed Bug 1189396 part.4 IMEContentObserver should cache the selection data at notifying IME of selection change r=smaug 2015-08-22 01:43:41 +09:00
Masayuki Nakano a8be9560f4 Bug 1189396 part.3 Make IMENotification::SelectionChangeData useful even outside of IMENotification r=smaug 2015-08-22 01:43:41 +09:00
Masayuki Nakano 3407deaa8e Bug 1189396 part.2 Implement IMENotification::SelectionChangeData::Assign() to copy its members r=smaug 2015-08-22 01:43:41 +09:00
Masayuki Nakano 90a7fb66b4 Bug 1189396 part.1 Implement IMENotification::SelectionChangeData::Clear() to initialize its members r=smaug 2015-08-22 01:43:41 +09:00
Masayuki Nakano 9f892563ed Bug 1192156 Separate IME specific structs, classes and enums from nsIWidget.h to IMEData.h r=roc
--HG--
rename : widget/nsIWidget.h => widget/IMEData.h
2015-08-09 00:47:19 +09:00