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

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

Issue 2213503002: Tracking SelectionBounds for all RenderWidgets on the Browser Side (Mac) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 5991147c90829ff2176083ab224bce3e3859276d..879f8fb7a06e586db9c5e5c491e87e1674b54774 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1491,7 +1491,11 @@ gfx::Rect RenderWidgetHostViewAura::ConvertRectFromScreen(
gfx::Rect RenderWidgetHostViewAura::GetCaretBounds() const {
if (!text_input_manager_ || !text_input_manager_->GetActiveWidget())
return gfx::Rect();
- return ConvertRectToScreen(text_input_manager_->GetSelectionBoundsRect());
+
+ const TextInputManager::SelectionRegion* region =
+ text_input_manager_->GetSelectionRegion();
+ return ConvertRectToScreen(
+ gfx::RectBetweenSelectionBounds(region->anchor, region->focus));
}
bool RenderWidgetHostViewAura::GetCompositionCharacterBounds(

Powered by Google App Engine
This is Rietveld 408576698