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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.cpp ('k') | public/web/WebFormControlElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 bool WebFormControlElement::isActivatedSubmit() const 173 bool WebFormControlElement::isActivatedSubmit() const
174 { 174 {
175 return constUnwrap<HTMLFormControlElement>()->isActivatedSubmit(); 175 return constUnwrap<HTMLFormControlElement>()->isActivatedSubmit();
176 } 176 }
177 177
178 WebFormElement WebFormControlElement::form() const 178 WebFormElement WebFormControlElement::form() const
179 { 179 {
180 return WebFormElement(constUnwrap<HTMLFormControlElement>()->form()); 180 return WebFormElement(constUnwrap<HTMLFormControlElement>()->form());
181 } 181 }
182 182
183 void WebFormControlElement::setSuggestedValueStart(int start)
184 {
185 if (isHTMLInputElement(*m_private))
186 unwrap<HTMLInputElement>()->setSuggestedValueStart(start);
187 if (isHTMLTextAreaElement(*m_private))
188 unwrap<HTMLTextAreaElement>()->setSuggestedValueStart(start);
189 }
190
191 int WebFormControlElement::suggestedValueStart() const
192 {
193 if (isHTMLInputElement(*m_private))
194 return constUnwrap<HTMLInputElement>()->suggestedValueStart();
195 if (isHTMLTextAreaElement(*m_private))
196 return constUnwrap<HTMLTextAreaElement>()->suggestedValueStart();
197 return 0;
198 }
199
183 WebFormControlElement::WebFormControlElement(const PassRefPtrWillBeRawPtr<HTMLFo rmControlElement>& elem) 200 WebFormControlElement::WebFormControlElement(const PassRefPtrWillBeRawPtr<HTMLFo rmControlElement>& elem)
184 : WebElement(elem) 201 : WebElement(elem)
185 { 202 {
186 } 203 }
187 204
188 WebFormControlElement& WebFormControlElement::operator=(const PassRefPtrWillBeRa wPtr<HTMLFormControlElement>& elem) 205 WebFormControlElement& WebFormControlElement::operator=(const PassRefPtrWillBeRa wPtr<HTMLFormControlElement>& elem)
189 { 206 {
190 m_private = elem; 207 m_private = elem;
191 return *this; 208 return *this;
192 } 209 }
193 210
194 WebFormControlElement::operator PassRefPtrWillBeRawPtr<HTMLFormControlElement>() const 211 WebFormControlElement::operator PassRefPtrWillBeRawPtr<HTMLFormControlElement>() const
195 { 212 {
196 return toHTMLFormControlElement(m_private.get()); 213 return toHTMLFormControlElement(m_private.get());
197 } 214 }
198 215
199 } // namespace blink 216 } // namespace blink
OLDNEW
« 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