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

Unified Diff: chrome/renderer/searchbox_extension.cc

Issue 6363001: Makes chrome pass down the length of text as the end of the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add support for selection_end and fix selectionStart Created 9 years, 11 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 | « chrome/renderer/render_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox_extension.cc
diff --git a/chrome/renderer/searchbox_extension.cc b/chrome/renderer/searchbox_extension.cc
index 2e268640cceb4c6b70d682e850338c9673ac3bda..d58d36f7103e229f48706aee0cc90896b7c168ff 100644
--- a/chrome/renderer/searchbox_extension.cc
+++ b/chrome/renderer/searchbox_extension.cc
@@ -73,14 +73,13 @@ static const char kResizeEventName[] = "chrome.searchBox.onresize";
// Script sent as the user is typing and the provider supports instant.
// Params:
// . the text the user typed.
-// TODO: add support for the 3rd param. '46' forces the server to give us
-// verbatim results.
+// '46' forces the server to give us verbatim results.
static const char kUserInputScript[] =
"if (window.chrome.userInput)"
" window.chrome.userInput("
" window.chrome.searchBox.value,"
" window.chrome.searchBox.verbatim ? 46 : 0,"
- " 0);";
+ " window.chrome.searchBox.selectionStart);";
// Script sent when the page is committed and the provider supports instant.
// Params:
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698