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

Unified Diff: webkit/glue/webview_impl.cc

Issue 9621: Improving the form autofill menu behavior (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | webkit/port/platform/chromium/PopupMenuChromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webview_impl.cc
===================================================================
--- webkit/glue/webview_impl.cc (revision 5031)
+++ webkit/glue/webview_impl.cc (working copy)
@@ -422,8 +422,15 @@
// Give autocomplete a chance to consume the key events it is interested in.
if (autocomplete_popup_ &&
autocomplete_popup_->isInterestedInEventForKey(event.key_code)) {
- if (autocomplete_popup_->handleKeyEvent(MakePlatformKeyboardEvent(event)))
+ if (autocomplete_popup_->handleKeyEvent(MakePlatformKeyboardEvent(event))) {
+#if defined(OS_WIN)
+ // We need to ignore the next CHAR event after this otherwise pressing
+ // enter when selecting an item in the menu will go to the page.
+ if (WebInputEvent::KEY_DOWN == event.type)
+ suppress_next_keypress_event_ = true;
+#endif
return true;
+ }
return false;
}
@@ -1524,6 +1531,7 @@
autocomplete_popup_ =
WebCore::PopupContainer::create(autocomplete_popup_client_.get(),
false);
+ autocomplete_popup_->setTextOnIndexChange(false);
autocomplete_popup_->show(focused_node->getRect(), frame->view(), 0);
}
}
« no previous file with comments | « no previous file | webkit/port/platform/chromium/PopupMenuChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698