| 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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 450 |
| 451 void HTMLFormControlElement::setNeedsValidityCheck() | 451 void HTMLFormControlElement::setNeedsValidityCheck() |
| 452 { | 452 { |
| 453 bool newIsValid = valid(); | 453 bool newIsValid = valid(); |
| 454 if (willValidate() && newIsValid != m_isValid) { | 454 if (willValidate() && newIsValid != m_isValid) { |
| 455 // Update style for pseudo classes such as :valid :invalid. | 455 // Update style for pseudo classes such as :valid :invalid. |
| 456 setNeedsStyleRecalc(); | 456 setNeedsStyleRecalc(); |
| 457 } | 457 } |
| 458 m_isValid = newIsValid; | 458 m_isValid = newIsValid; |
| 459 | 459 |
| 460 // Updates only if this control already has a validtion message. | 460 // Updates only if this control already has a validation message. |
| 461 if (m_validationMessage && m_validationMessage->isVisible()) { | 461 if (m_validationMessage && m_validationMessage->isVisible()) { |
| 462 // Calls updateVisibleValidationMessage() even if m_isValid is not | 462 // Calls updateVisibleValidationMessage() even if m_isValid is not |
| 463 // changed because a validation message can be chagned. | 463 // changed because a validation message can be chagned. |
| 464 updateVisibleValidationMessage(); | 464 updateVisibleValidationMessage(); |
| 465 } | 465 } |
| 466 } | 466 } |
| 467 | 467 |
| 468 void HTMLFormControlElement::setCustomValidity(const String& error) | 468 void HTMLFormControlElement::setCustomValidity(const String& error) |
| 469 { | 469 { |
| 470 FormAssociatedElement::setCustomValidity(error); | 470 FormAssociatedElement::setCustomValidity(error); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 501 String fullName = name(); | 501 String fullName = name(); |
| 502 String trimmedName = fullName.stripWhiteSpace(); | 502 String trimmedName = fullName.stripWhiteSpace(); |
| 503 if (!trimmedName.isEmpty()) | 503 if (!trimmedName.isEmpty()) |
| 504 return trimmedName; | 504 return trimmedName; |
| 505 fullName = getIdAttribute(); | 505 fullName = getIdAttribute(); |
| 506 trimmedName = fullName.stripWhiteSpace(); | 506 trimmedName = fullName.stripWhiteSpace(); |
| 507 return trimmedName; | 507 return trimmedName; |
| 508 } | 508 } |
| 509 | 509 |
| 510 } // namespace Webcore | 510 } // namespace Webcore |
| OLD | NEW |