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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

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_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index e3b446e0ac6eb767a26470c2316a58d024e4a335..dcac2b67633e29b535283ca218ced44280a1ad00 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -899,14 +899,16 @@ void RenderWidgetHostViewMac::OnImeCancelComposition(
[cocoa_view_ cancelComposition];
}
-void RenderWidgetHostViewMac::ImeCompositionRangeChanged(
- const gfx::Range& range,
- const std::vector<gfx::Rect>& character_bounds) {
+void RenderWidgetHostViewMac::OnImeCompositionRangeChanged(
+ TextInputManager* text_input_manager,
+ RenderWidgetHostViewBase* updated_view) {
+ const TextInputManager::CompositionRangeInfo* info =
+ GetTextInputManager()->GetCompositionRangeInfo();
// The RangeChanged message is only sent with valid values. The current
// caret position (start == end) will be sent if there is no IME range.
- [cocoa_view_ setMarkedRange:range.ToNSRange()];
- composition_range_ = range;
- composition_bounds_ = character_bounds;
+ [cocoa_view_ setMarkedRange:info->range.ToNSRange()];
+ composition_range_ = info->range;
+ composition_bounds_ = info->character_bounds;
}
void RenderWidgetHostViewMac::RenderProcessGone(base::TerminationStatus status,

Powered by Google App Engine
This is Rietveld 408576698