| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 int HTMLTextAreaElement::maxLength() const | 438 int HTMLTextAreaElement::maxLength() const |
| 439 { | 439 { |
| 440 bool ok; | 440 bool ok; |
| 441 int value = getAttribute(maxlengthAttr).string().toInt(&ok); | 441 int value = getAttribute(maxlengthAttr).string().toInt(&ok); |
| 442 return ok && value >= 0 ? value : -1; | 442 return ok && value >= 0 ? value : -1; |
| 443 } | 443 } |
| 444 | 444 |
| 445 void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionState& es) | 445 void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionState& es) |
| 446 { | 446 { |
| 447 if (newValue < 0) | 447 if (newValue < 0) |
| 448 es.throwDOMException(IndexSizeError); | 448 es.throwUninformativeAndGenericDOMException(IndexSizeError); |
| 449 else | 449 else |
| 450 setAttribute(maxlengthAttr, String::number(newValue)); | 450 setAttribute(maxlengthAttr, String::number(newValue)); |
| 451 } | 451 } |
| 452 | 452 |
| 453 String HTMLTextAreaElement::validationMessage() const | 453 String HTMLTextAreaElement::validationMessage() const |
| 454 { | 454 { |
| 455 if (!willValidate()) | 455 if (!willValidate()) |
| 456 return String(); | 456 return String(); |
| 457 | 457 |
| 458 if (customError()) | 458 if (customError()) |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 RefPtr<HTMLDivElement> newElement = HTMLDivElement::create(document()); | 538 RefPtr<HTMLDivElement> newElement = HTMLDivElement::create(document()); |
| 539 placeholder = newElement.get(); | 539 placeholder = newElement.get(); |
| 540 placeholder->setPart(AtomicString("-webkit-input-placeholder", AtomicStr
ing::ConstructFromLiteral)); | 540 placeholder->setPart(AtomicString("-webkit-input-placeholder", AtomicStr
ing::ConstructFromLiteral)); |
| 541 placeholder->setAttribute(idAttr, ShadowElementNames::placeholder()); | 541 placeholder->setAttribute(idAttr, ShadowElementNames::placeholder()); |
| 542 userAgentShadowRoot()->insertBefore(placeholder, innerTextElement()->nex
tSibling()); | 542 userAgentShadowRoot()->insertBefore(placeholder, innerTextElement()->nex
tSibling()); |
| 543 } | 543 } |
| 544 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION); | 544 placeholder->setTextContent(placeholderText, ASSERT_NO_EXCEPTION); |
| 545 } | 545 } |
| 546 | 546 |
| 547 } | 547 } |
| OLD | NEW |