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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 void HTMLFormControlElement::updateVisibleValidationMessage() | 406 void HTMLFormControlElement::updateVisibleValidationMessage() |
407 { | 407 { |
408 Page* page = document().page(); | 408 Page* page = document().page(); |
409 if (!page) | 409 if (!page) |
410 return; | 410 return; |
411 String message; | 411 String message; |
412 if (renderer() && willValidate()) | 412 if (renderer() && willValidate()) |
413 message = validationMessage().stripWhiteSpace(); | 413 message = validationMessage().stripWhiteSpace(); |
414 if (!m_validationMessage) | 414 if (!m_validationMessage) |
415 m_validationMessage = ValidationMessage::create(this); | 415 m_validationMessage = ValidationMessage::create(this); |
416 m_validationMessage->updateValidationMessage(message); | 416 m_validationMessage->updateValidationMessage(message, customError()); |
417 } | 417 } |
418 | 418 |
419 void HTMLFormControlElement::hideVisibleValidationMessage() | 419 void HTMLFormControlElement::hideVisibleValidationMessage() |
420 { | 420 { |
421 if (m_validationMessage) | 421 if (m_validationMessage) |
422 m_validationMessage->requestToHideMessage(); | 422 m_validationMessage->requestToHideMessage(); |
423 } | 423 } |
424 | 424 |
425 bool HTMLFormControlElement::checkValidity(WillBeHeapVector<RefPtrWillBeMember<F
ormAssociatedElement> >* unhandledInvalidControls) | 425 bool HTMLFormControlElement::checkValidity(WillBeHeapVector<RefPtrWillBeMember<F
ormAssociatedElement> >* unhandledInvalidControls) |
426 { | 426 { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 | 502 |
503 void HTMLFormControlElement::setFocus(bool flag) | 503 void HTMLFormControlElement::setFocus(bool flag) |
504 { | 504 { |
505 LabelableElement::setFocus(flag); | 505 LabelableElement::setFocus(flag); |
506 | 506 |
507 if (!flag && wasChangedSinceLastFormControlChangeEvent()) | 507 if (!flag && wasChangedSinceLastFormControlChangeEvent()) |
508 dispatchFormControlChangeEvent(); | 508 dispatchFormControlChangeEvent(); |
509 } | 509 } |
510 | 510 |
511 } // namespace Webcore | 511 } // namespace Webcore |
OLD | NEW |