| 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 bool ok; | 426 bool ok; |
| 427 int value = getAttribute(maxlengthAttr).string().toInt(&ok); | 427 int value = getAttribute(maxlengthAttr).string().toInt(&ok); |
| 428 return ok && value >= 0 ? value : -1; | 428 return ok && value >= 0 ? value : -1; |
| 429 } | 429 } |
| 430 | 430 |
| 431 void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionState& exceptionSt
ate) | 431 void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionState& exceptionSt
ate) |
| 432 { | 432 { |
| 433 if (newValue < 0) | 433 if (newValue < 0) |
| 434 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError); | 434 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError); |
| 435 else | 435 else |
| 436 setAttribute(maxlengthAttr, String::number(newValue)); | 436 setIntegralAttribute(maxlengthAttr, newValue); |
| 437 } | 437 } |
| 438 | 438 |
| 439 String HTMLTextAreaElement::validationMessage() const | 439 String HTMLTextAreaElement::validationMessage() const |
| 440 { | 440 { |
| 441 if (!willValidate()) | 441 if (!willValidate()) |
| 442 return String(); | 442 return String(); |
| 443 | 443 |
| 444 if (customError()) | 444 if (customError()) |
| 445 return customValidationMessage(); | 445 return customValidationMessage(); |
| 446 | 446 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 return !valueMissing(candidate) && !tooLong(candidate, IgnoreDirtyFlag); | 481 return !valueMissing(candidate) && !tooLong(candidate, IgnoreDirtyFlag); |
| 482 } | 482 } |
| 483 | 483 |
| 484 void HTMLTextAreaElement::accessKeyAction(bool) | 484 void HTMLTextAreaElement::accessKeyAction(bool) |
| 485 { | 485 { |
| 486 focus(); | 486 focus(); |
| 487 } | 487 } |
| 488 | 488 |
| 489 void HTMLTextAreaElement::setCols(int cols) | 489 void HTMLTextAreaElement::setCols(int cols) |
| 490 { | 490 { |
| 491 setAttribute(colsAttr, String::number(cols)); | 491 setIntegralAttribute(colsAttr, cols); |
| 492 } | 492 } |
| 493 | 493 |
| 494 void HTMLTextAreaElement::setRows(int rows) | 494 void HTMLTextAreaElement::setRows(int rows) |
| 495 { | 495 { |
| 496 setAttribute(rowsAttr, String::number(rows)); | 496 setIntegralAttribute(rowsAttr, rows); |
| 497 } | 497 } |
| 498 | 498 |
| 499 bool HTMLTextAreaElement::shouldUseInputMethod() | 499 bool HTMLTextAreaElement::shouldUseInputMethod() |
| 500 { | 500 { |
| 501 return true; | 501 return true; |
| 502 } | 502 } |
| 503 | 503 |
| 504 bool HTMLTextAreaElement::matchesReadOnlyPseudoClass() const | 504 bool HTMLTextAreaElement::matchesReadOnlyPseudoClass() const |
| 505 { | 505 { |
| 506 return isReadOnly(); | 506 return isReadOnly(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 529 } | 529 } |
| 530 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION); | 530 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION); |
| 531 } | 531 } |
| 532 | 532 |
| 533 bool HTMLTextAreaElement::isInteractiveContent() const | 533 bool HTMLTextAreaElement::isInteractiveContent() const |
| 534 { | 534 { |
| 535 return true; | 535 return true; |
| 536 } | 536 } |
| 537 | 537 |
| 538 } | 538 } |
| OLD | NEW |