diff options
author | nona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-13 07:01:35 +0000 |
---|---|---|
committer | nona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-13 07:01:35 +0000 |
commit | 58b48a0df2a0c66c3833811aa3f381c99eb34cba (patch) | |
tree | 986a02167a5bcf493372bb5176d7f114b2c2ae1b /content/port/browser | |
parent | b526ba45f02fddffa1aec3e8f1c81f1e9fe97176 (diff) | |
download | chromium_src-58b48a0df2a0c66c3833811aa3f381c99eb34cba.zip chromium_src-58b48a0df2a0c66c3833811aa3f381c99eb34cba.tar.gz chromium_src-58b48a0df2a0c66c3833811aa3f381c99eb34cba.tar.bz2 |
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
Diffstat (limited to 'content/port/browser')
-rw-r--r-- | content/port/browser/render_widget_host_view_port.h | 4 |
1 files changed, 3 insertions, 1 deletions
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<gfx::Rect>& 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. |