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

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

Issue 2354413003: Implement support for Mac Zoom following focus and caret (Closed)
Patch Set: Clean up and add comments Created 4 years, 3 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/text_input_manager.cc
diff --git a/content/browser/renderer_host/text_input_manager.cc b/content/browser/renderer_host/text_input_manager.cc
index 6ba3e857ba744ff019b2661d72d26ebd3b007d28..3c15100c4446230bd9cdf8a6d281c18e373776a9 100644
--- a/content/browser/renderer_host/text_input_manager.cc
+++ b/content/browser/renderer_host/text_input_manager.cc
@@ -152,7 +152,7 @@ void TextInputManager::SelectionBoundsChanged(
// views).
gfx::Point anchor_origin_transformed =
view->TransformPointToRootCoordSpace(params.anchor_rect.origin());
-#if defined(USE_AURA)
+
gfx::SelectionBound anchor_bound, focus_bound;
anchor_bound.SetEdge(gfx::PointF(anchor_origin_transformed),
@@ -192,7 +192,7 @@ void TextInputManager::SelectionBoundsChanged(
selection_region_map_[view].anchor = anchor_bound;
selection_region_map_[view].focus = focus_bound;
-#else
+
if (params.anchor_rect == params.focus_rect) {
selection_region_map_[view].caret_rect.set_origin(
anchor_origin_transformed);
@@ -202,7 +202,7 @@ void TextInputManager::SelectionBoundsChanged(
anchor_origin_transformed);
selection_region_map_[view].first_selection_rect.set_size(
params.anchor_rect.size());
-#endif // USE_AURA
+
FOR_EACH_OBSERVER(Observer, observer_list_,
OnSelectionBoundsChanged(this, view));
}

Powered by Google App Engine
This is Rietveld 408576698