| Index: content/renderer/render_widget.h
|
| diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
|
| index bb917e53dbd4630419258f05aa4b0d9b24ba7d4f..5ba7aca8030502cd966b829ebb6268cf9618f865 100644
|
| --- a/content/renderer/render_widget.h
|
| +++ b/content/renderer/render_widget.h
|
| @@ -244,9 +244,9 @@ class CONTENT_EXPORT RenderWidget
|
| // |policy| see the comment on MessageDeliveryPolicy.
|
| void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy);
|
|
|
| - // Handle common setup/teardown for handling IME events.
|
| - void StartHandlingImeEvent();
|
| - void FinishHandlingImeEvent();
|
| + // Handle start and finish of IME event guard.
|
| + void OnImeEventGuardStart();
|
| + void OnImeEventGuardFinish(bool from_non_ime);
|
|
|
| // Returns whether we currently should handle an IME event.
|
| bool ShouldHandleImeEvent();
|
| @@ -661,8 +661,12 @@ class CONTENT_EXPORT RenderWidget
|
| // supporting overscroll IPC notifications due to fling animation updates.
|
| scoped_ptr<DidOverscrollParams>* handling_event_overscroll_;
|
|
|
| - // Are we currently handling an ime event?
|
| - bool handling_ime_event_;
|
| + // The number of IME events we are handling now.
|
| + int ime_guard_count_;
|
| + // We intentionally ignore text input update while we are handling IME events,
|
| + // but show_ime should be effective even if it was set in the middle of
|
| + // ignored state updates.
|
| + bool pending_show_ime_if_needed_;
|
|
|
| // Type of the input event we are currently handling.
|
| blink::WebInputEvent::Type handling_event_type_;
|
| @@ -759,6 +763,11 @@ class CONTENT_EXPORT RenderWidget
|
| // by script etc., not by user input.
|
| bool text_field_is_dirty_;
|
|
|
| + // AdapterInputConnection make real changes only when it's not originating
|
| + // from IME. We want non-keyboard events (e.g., long-press events) to be
|
| + // treated as NOT originating from IME, when we finish handling these events.
|
| + bool pending_update_from_non_ime_;
|
| +
|
| // Stores the history of text input infos from the last ACK'ed one from the
|
| // current one. The size is the number of pending ACKs plus one, since we
|
| // intentionally keep the last ack'd value to know what the browser is
|
|
|