Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1581)

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2235283003: Track composition range and character bounds on the browser side (Mac) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to fix some crashing tests Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
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 678f519a67a4fd12154592f58bea15e016b24e96..b5efbca882c000ca400e1dbbcab0da6c65a95299 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1490,11 +1490,12 @@ bool RenderWidgetHostViewAura::GetCompositionCharacterBounds(
if (!text_input_manager_ || !text_input_manager_->GetActiveWidget())
return false;
- const std::vector<gfx::Rect>* composition_character_bounds =
- text_input_manager_->GetCompositionCharacterBounds();
- if (index >= composition_character_bounds->size())
+ const TextInputManager::CompositionRangeInfo* composition_range_info =
+ text_input_manager_->GetCompositionRangeInfo();
+
+ if (index >= composition_range_info->character_bounds.size())
return false;
- *rect = ConvertRectToScreen(composition_character_bounds->at(index));
+ *rect = ConvertRectToScreen(composition_range_info->character_bounds[index]);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698