Commit ebf14d39 authored by bashi@chromium.org's avatar bashi@chromium.org

Revert 96149 - Enable/disable input methods according to |text_input_type_| when a view

is selected so that input methods don't eat keyboard shortcuts.

BUG=80772
TEST=manual

Review URL: http://codereview.chromium.org/7554005

TBR=bashi@chromium.org
Review URL: http://codereview.chromium.org/7604029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96162 0039d316-1c4b-4281-b951-d872f2087c98
parent b7f853e2
......@@ -209,11 +209,6 @@ LRESULT CALLBACK PluginWrapperWindowProc(HWND window, unsigned int message,
return ::DefWindowProc(window, message, wparam, lparam);
}
bool ShouldEnableIME(ui::TextInputType type) {
return type != ui::TEXT_INPUT_TYPE_NONE &&
type != ui::TEXT_INPUT_TYPE_PASSWORD;
}
} // namespace
// RenderWidgetHostView --------------------------------------------------------
......@@ -292,10 +287,6 @@ void RenderWidgetHostViewWin::DidBecomeSelected() {
tab_switch_paint_time_ = TimeTicks::Now();
is_hidden_ = false;
EnsureTooltip();
if (ShouldEnableIME(text_input_type_))
ime_input_.EnableIME(m_hWnd);
else
ime_input_.DisableIME(m_hWnd);
render_widget_host_->WasRestored();
}
......@@ -607,7 +598,8 @@ void RenderWidgetHostViewWin::ImeUpdateTextInputState(
// as true. We need to support "can_compose_inline=false" for PPAPI plugins
// that may want to avoid drawing composition-text by themselves and pass
// the responsibility to the browser.
bool is_enabled = ShouldEnableIME(type);
bool is_enabled = (type != ui::TEXT_INPUT_TYPE_NONE &&
type != ui::TEXT_INPUT_TYPE_PASSWORD);
if (text_input_type_ != type) {
text_input_type_ = type;
if (is_enabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment