diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-19 04:21:00 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-19 04:21:00 +0000 |
commit | bbf6b6f98654d0d6ad47ee43fb770dbd93bc7c59 (patch) | |
tree | 5ddf8a4d53bcd5a00452d9b64160b3e995d9ea8d /content | |
parent | 6666c6d40943a0b5be1a3cda9dfdc4c9160048f8 (diff) | |
download | chromium_src-bbf6b6f98654d0d6ad47ee43fb770dbd93bc7c59.zip chromium_src-bbf6b6f98654d0d6ad47ee43fb770dbd93bc7c59.tar.gz chromium_src-bbf6b6f98654d0d6ad47ee43fb770dbd93bc7c59.tar.bz2 |
Make plug-in text fields open the win 8 on-screen keyboard on touch.
This broke when we changed the algorithm used to determine whether the on-screen
keyboard should open on Win 8 - it now relies on having an accurate bounds rectangle
for the current focused text control. This isn't available for plug-ins, so we just
use the whole document size as a quick fix.
This will cause any touch event in a plug-in that causes a text field in the plug-in
to get focus to open the OSK. However, it's possible that touching outside of the
text field could cause the OSK to appear - see http://crbug.com/140993 for an example
where this has happened.
A better fix would be to get the bounds rect of the focused control from plug-ins,
but this is better than nothing for now.
Tested with PDF.
BUG=156534
Review URL: https://chromiumcodereview.appspot.com/11195047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162935 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/renderer/renderer_accessibility_focus_only.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/content/renderer/renderer_accessibility_focus_only.cc b/content/renderer/renderer_accessibility_focus_only.cc index d78e125..53020eb 100644 --- a/content/renderer/renderer_accessibility_focus_only.cc +++ b/content/renderer/renderer_accessibility_focus_only.cc @@ -118,6 +118,8 @@ void RendererAccessibilityFocusOnly::HandleFocusedNodeChanged( if (!node.isNull() && node.isElementNode()) { child.location = gfx::Rect( const_cast<WebNode&>(node).to<WebElement>().boundsInViewportSpace()); + } else if (render_view_->HasIMETextFocus()) { + child.location = notification.acc_tree.location; } else { child.location = gfx::Rect(); } |