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

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

Issue 120443003: Add autofill preview support for Textarea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 12 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/HTMLTextAreaElement.h ('k') | Source/web/WebTextAreaElement.cpp » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } 426 }
427 427
428 void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionState& exceptionSt ate) 428 void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionState& exceptionSt ate)
429 { 429 {
430 if (newValue < 0) 430 if (newValue < 0)
431 exceptionState.throwDOMException(IndexSizeError, "The value provided (" + String::number(newValue) + ") is not positive or 0."); 431 exceptionState.throwDOMException(IndexSizeError, "The value provided (" + String::number(newValue) + ") is not positive or 0.");
432 else 432 else
433 setIntegralAttribute(maxlengthAttr, newValue); 433 setIntegralAttribute(maxlengthAttr, newValue);
434 } 434 }
435 435
436 const String& HTMLTextAreaElement::suggestedValue() const
437 {
438 return m_suggestedValue;
439 }
440
441 void HTMLTextAreaElement::setSuggestedValue(const String& value)
442 {
443 m_suggestedValue = value;
444 setInnerTextValue(m_suggestedValue);
Ilya Sherman 2013/12/29 03:15:08 I'm wondering whether you need more of HTMLTextAre
445 setNeedsStyleRecalc();
446 setFormControlValueMatchesRenderer(true);
447 }
448
449
Ilya Sherman 2013/12/29 03:15:08 nit: Please remove the second blank line -- there
436 String HTMLTextAreaElement::validationMessage() const 450 String HTMLTextAreaElement::validationMessage() const
437 { 451 {
438 if (!willValidate()) 452 if (!willValidate())
439 return String(); 453 return String();
440 454
441 if (customError()) 455 if (customError())
442 return customValidationMessage(); 456 return customValidationMessage();
443 457
444 if (valueMissing()) 458 if (valueMissing())
445 return locale().queryString(blink::WebLocalizedString::ValidationValueMi ssing); 459 return locale().queryString(blink::WebLocalizedString::ValidationValueMi ssing);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 } 540 }
527 placeholder->setTextContent(placeholderText); 541 placeholder->setTextContent(placeholderText);
528 } 542 }
529 543
530 bool HTMLTextAreaElement::isInteractiveContent() const 544 bool HTMLTextAreaElement::isInteractiveContent() const
531 { 545 {
532 return true; 546 return true;
533 } 547 }
534 548
535 } 549 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.h ('k') | Source/web/WebTextAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698