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

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

Issue 2161043002: Route Text Layout Change IPCs to the Active RenderWidgetHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 284533c8122b0257a8b835f96de284d305bb3a0b..cd367417f00dbf837dd8fb272a4cac0560b773b2 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1606,14 +1606,14 @@ void RenderWidgetHostViewAura::OnInputMethodChanged() {
bool RenderWidgetHostViewAura::ChangeTextDirectionAndLayoutAlignment(
base::i18n::TextDirection direction) {
- // TODO(wjmaclean): can host_ ever be null?
- if (!host_)
+ if (!GetTextInputManager() && !GetTextInputManager()->GetActiveWidget())
return false;
- host_->UpdateTextDirection(
- direction == base::i18n::RIGHT_TO_LEFT ?
- blink::WebTextDirectionRightToLeft :
- blink::WebTextDirectionLeftToRight);
- host_->NotifyTextDirection();
+
+ GetTextInputManager()->GetActiveWidget()->UpdateTextDirection(
+ direction == base::i18n::RIGHT_TO_LEFT
+ ? blink::WebTextDirectionRightToLeft
+ : blink::WebTextDirectionLeftToRight);
+ GetTextInputManager()->GetActiveWidget()->NotifyTextDirection();
return true;
}
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698