summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authornona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-04 02:44:52 +0000
committernona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-04 02:44:52 +0000
commit6d984a840d09d76803d5363e8e9a83235f6cedee (patch)
treeeb813d031aade16af268b311ab78d87636420f20 /content
parentc849c65ec4bc668bb45542fa73285fed3430f6f2 (diff)
downloadchromium_src-6d984a840d09d76803d5363e8e9a83235f6cedee.zip
chromium_src-6d984a840d09d76803d5363e8e9a83235f6cedee.tar.gz
chromium_src-6d984a840d09d76803d5363e8e9a83235f6cedee.tar.bz2
Introduce GetCompositionCharacterBounds.
This function retrieves character boundaries in composition text. This is necessary for Japanese input method to show suggest window which is aligned with composition text. This CL only adds function for native widget but it isn't used yet. This CL is not ready for RenderWidgetHostViewAura because the webkit is not ready for this feature. https://bugs.webkit.org/show_bug.cgi?id=87911 This function is similar to IMR_QUERYCHARPOSITION message in Windows or firstRectForCharacterRange in MacOSX. IMR_QUERYCHARPOSITION: http://msdn.microsoft.com/en-us/library/windows/desktop/dd318634(v=vs.85).aspx firstRectForCharacterRange: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSTextInputClient_Protocol/Reference/Reference.html BUG=120597 TEST=run unit_tests,ui_unittests,views_unittests Review URL: https://chromiumcodereview.appspot.com/10451002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.cc8
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 453e5d7..1a8db6d 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -840,6 +840,14 @@ gfx::Rect RenderWidgetHostViewAura::GetCaretBounds() {
end.y() - origin.y());
}
+bool RenderWidgetHostViewAura::GetCompositionCharacterBounds(uint32 index,
+ gfx::Rect* rect) {
+ // TODO(nona): implement this method. Need patch to WebKit.
+ // https://bugs.webkit.org/show_bug.cgi?id=87911
+ DCHECK(rect);
+ return false;
+}
+
bool RenderWidgetHostViewAura::HasCompositionText() {
return has_composition_text_;
}
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 0e3fa6e..737401c 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -135,6 +135,8 @@ class RenderWidgetHostViewAura
virtual ui::TextInputType GetTextInputType() const OVERRIDE;
virtual bool CanComposeInline() const OVERRIDE;
virtual gfx::Rect GetCaretBounds() OVERRIDE;
+ virtual bool GetCompositionCharacterBounds(uint32 index,
+ gfx::Rect* rect) OVERRIDE;
virtual bool HasCompositionText() OVERRIDE;
virtual bool GetTextRange(ui::Range* range) OVERRIDE;
virtual bool GetCompositionTextRange(ui::Range* range) OVERRIDE;