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

Side by Side Diff: Source/core/html/HTMLSelectElement.cpp

Issue 138433002: Add Autofill preview support for <select> input fields (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 setSelectedIndex(optionIndex); 261 setSelectedIndex(optionIndex);
262 return; 262 return;
263 } 263 }
264 optionIndex++; 264 optionIndex++;
265 } 265 }
266 } 266 }
267 267
268 setSelectedIndex(-1); 268 setSelectedIndex(-1);
269 } 269 }
270 270
271 String HTMLSelectElement::suggestedValue() const
272 {
273 return m_suggestedValue;
274 }
275
276 void HTMLSelectElement::setSuggestedValue(const String& value)
277 {
278 m_suggestedValue = value;
279
280 setValue(value);
281 }
282
283 // Original selected option value before autofill preview
284 String HTMLSelectElement::originalValue() const
285 {
286 return m_originalValue;
287 }
288
289 void HTMLSelectElement::setOriginalValue(const String& value)
290 {
291 m_originalValue = value;
292 }
293
271 bool HTMLSelectElement::isPresentationAttribute(const QualifiedName& name) const 294 bool HTMLSelectElement::isPresentationAttribute(const QualifiedName& name) const
272 { 295 {
273 if (name == alignAttr) { 296 if (name == alignAttr) {
274 // Don't map 'align' attribute. This matches what Firefox, Opera and IE do. 297 // Don't map 'align' attribute. This matches what Firefox, Opera and IE do.
275 // See http://bugs.webkit.org/show_bug.cgi?id=12072 298 // See http://bugs.webkit.org/show_bug.cgi?id=12072
276 return false; 299 return false;
277 } 300 }
278 301
279 return HTMLFormControlElementWithState::isPresentationAttribute(name); 302 return HTMLFormControlElementWithState::isPresentationAttribute(name);
280 } 303 }
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 remove(index); 1592 remove(index);
1570 return true; 1593 return true;
1571 } 1594 }
1572 1595
1573 bool HTMLSelectElement::isInteractiveContent() const 1596 bool HTMLSelectElement::isInteractiveContent() const
1574 { 1597 {
1575 return true; 1598 return true;
1576 } 1599 }
1577 1600
1578 } // namespace 1601 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698