| 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 435 |
| 436 insertBefore(document().createTextNode(value), firstChild(), IGNORE_EXCEPTIO
N); | 436 insertBefore(document().createTextNode(value), firstChild(), IGNORE_EXCEPTIO
N); |
| 437 | 437 |
| 438 if (!m_isDirty) | 438 if (!m_isDirty) |
| 439 setNonDirtyValue(value); | 439 setNonDirtyValue(value); |
| 440 } | 440 } |
| 441 | 441 |
| 442 int HTMLTextAreaElement::maxLength() const | 442 int HTMLTextAreaElement::maxLength() const |
| 443 { | 443 { |
| 444 bool ok; | 444 bool ok; |
| 445 int value = getAttribute(maxlengthAttr).string().toInt(&ok); | 445 int value = getAttribute(maxlengthAttr).toInt(&ok); |
| 446 return ok && value >= 0 ? value : -1; | 446 return ok && value >= 0 ? value : -1; |
| 447 } | 447 } |
| 448 | 448 |
| 449 void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionState& exceptionSt
ate) | 449 void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionState& exceptionSt
ate) |
| 450 { | 450 { |
| 451 if (newValue < 0) | 451 if (newValue < 0) |
| 452 exceptionState.throwDOMException(IndexSizeError, "The value provided ("
+ String::number(newValue) + ") is not positive or 0."); | 452 exceptionState.throwDOMException(IndexSizeError, "The value provided ("
+ String::number(newValue) + ") is not positive or 0."); |
| 453 else | 453 else |
| 454 setIntegralAttribute(maxlengthAttr, newValue); | 454 setIntegralAttribute(maxlengthAttr, newValue); |
| 455 } | 455 } |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 { | 564 { |
| 565 return true; | 565 return true; |
| 566 } | 566 } |
| 567 | 567 |
| 568 bool HTMLTextAreaElement::supportsAutofocus() const | 568 bool HTMLTextAreaElement::supportsAutofocus() const |
| 569 { | 569 { |
| 570 return true; | 570 return true; |
| 571 } | 571 } |
| 572 | 572 |
| 573 } | 573 } |
| OLD | NEW |