OLD | NEW |
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 Loading... |
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); |
| 445 updatePlaceholderVisibility(false); |
| 446 setNeedsStyleRecalc(); |
| 447 setFormControlValueMatchesRenderer(true); |
| 448 } |
| 449 |
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 Loading... |
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 } |
OLD | NEW |