From 58b48a0df2a0c66c3833811aa3f381c99eb34cba Mon Sep 17 00:00:00 2001 From: "nona@chromium.org" Date: Wed, 13 Jun 2012 07:01:35 +0000 Subject: Add IPC argument to handle composition character bounds into ViewHostMsg_ImeCompositionRangeChanged. What for: Using this argument, browser can acquire the composition character boundary rectangles. This information is used by Japanese input method editor to show its window at the correct position. This is used not only for fixing http://crbug.com/120597 but also for supporting IMR_QUERYCHARPOSITION message in Windows Chrome. To support IMR_QUERYCHARPOSITION(Ref 1) message, input method editor can also show its window at the correct position(Ref 2). Performance: There is no performance concern for latin language users because this IPC is only emitted if the user uses an input method editor. Even if the user uses an input method editor, the cost of this IPC is small because this IPC will be emitted at the same frequency as key typing. Data size: The data size to be transferred is small: it is the composition string length (typically less than a few dozen characters) times sizeof(gfx::Rect). Ref 1. http://msdn.microsoft.com/en-us/library/windows/desktop/dd318634(v=vs.85).aspx Ref 2. https://bug-87911-attachments.webkit.org/attachment.cgi?id=144954 (In Ref2, Safari works well for all IMEs. Firefox works well except ATOK. Chrome doesn't work for all IMEs.) BUG=120597 TEST=try bots. Review URL: https://chromiumcodereview.appspot.com/10543024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141866 0039d316-1c4b-4281-b951-d872f2087c98 --- content/port/browser/render_widget_host_view_port.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'content/port') diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h index 310be75..3578a96 100644 --- a/content/port/browser/render_widget_host_view_port.h +++ b/content/port/browser/render_widget_host_view_port.h @@ -94,7 +94,9 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView { virtual void ImeCancelComposition() = 0; // Updates the range of the marked text in an IME composition. - virtual void ImeCompositionRangeChanged(const ui::Range& range) {} + virtual void ImeCompositionRangeChanged( + const ui::Range& range, + const std::vector& character_bounds) {} // Informs the view that a portion of the widget's backing store was scrolled // and/or painted. The view should ensure this gets copied to the screen. -- cgit v1.1