Commit 8969bb3f authored by yusufo@chromium.org's avatar yusufo@chromium.org

Use textInputInfo instead of textInputType in getTextInputType

For the given repro case, textInputType seems to get stuck in the
previous input type whereas textInputInfo is checking whether
an editor exists for the focused frame and exiting early with
with TextInputType set to None. Switching to using textInputInfo
in getTextInputType, as the comments in the header suggests the use of
textInputType by itself as an API should be deprecated anyway.

BUG=162831


Review URL: https://chromiumcodereview.appspot.com/11419218

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170558 0039d316-1c4b-4281-b951-d872f2087c98
parent 981f4a69
......@@ -1843,10 +1843,8 @@ ui::TextInputType RenderWidget::WebKitToUiTextInputType(
}
ui::TextInputType RenderWidget::GetTextInputType() {
if (webwidget_) {
WebKit::WebTextInputType type = webwidget_->textInputType();
return WebKitToUiTextInputType(type);
}
if (webwidget_)
return WebKitToUiTextInputType(webwidget_->textInputInfo().type);
return ui::TEXT_INPUT_TYPE_NONE;
}
......
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