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

Unified Diff: Source/web/WebFormControlElement.cpp

Issue 1208063002: [Autofill/Autocomplete Feature] Substring matching instead of prefix matching (Blink). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « Source/core/html/HTMLTextFormControlElement.cpp ('k') | public/web/WebFormControlElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFormControlElement.cpp
diff --git a/Source/web/WebFormControlElement.cpp b/Source/web/WebFormControlElement.cpp
index c02f22746b3a2a526bd8c456180361cd503ab958..666174dc8fe3d23a21178dd2f1a36185fe3407e7 100644
--- a/Source/web/WebFormControlElement.cpp
+++ b/Source/web/WebFormControlElement.cpp
@@ -180,6 +180,23 @@ WebFormElement WebFormControlElement::form() const
return WebFormElement(constUnwrap<HTMLFormControlElement>()->form());
}
+void WebFormControlElement::setSuggestedValueStart(int start)
+{
+ if (isHTMLInputElement(*m_private))
+ unwrap<HTMLInputElement>()->setSuggestedValueStart(start);
+ if (isHTMLTextAreaElement(*m_private))
+ unwrap<HTMLTextAreaElement>()->setSuggestedValueStart(start);
+}
+
+int WebFormControlElement::suggestedValueStart() const
+{
+ if (isHTMLInputElement(*m_private))
+ return constUnwrap<HTMLInputElement>()->suggestedValueStart();
+ if (isHTMLTextAreaElement(*m_private))
+ return constUnwrap<HTMLTextAreaElement>()->suggestedValueStart();
+ return 0;
+}
+
WebFormControlElement::WebFormControlElement(const PassRefPtrWillBeRawPtr<HTMLFormControlElement>& elem)
: WebElement(elem)
{
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.cpp ('k') | public/web/WebFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698