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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 return; | 412 return; |
413 String message; | 413 String message; |
414 if (renderer() && willValidate()) | 414 if (renderer() && willValidate()) |
415 message = validationMessage().stripWhiteSpace(); | 415 message = validationMessage().stripWhiteSpace(); |
416 | 416 |
417 m_hasValidationMessage = true; | 417 m_hasValidationMessage = true; |
418 ValidationMessageClient* client = &page->validationMessageClient(); | 418 ValidationMessageClient* client = &page->validationMessageClient(); |
419 if (message.isEmpty()) | 419 if (message.isEmpty()) |
420 client->hideValidationMessage(*this); | 420 client->hideValidationMessage(*this); |
421 else | 421 else |
422 client->showValidationMessage(*this, message); | 422 client->showValidationMessage(*this, message, customError() ? Validation
MessageClient::CustomMessage: ValidationMessageClient::CannedMessage); |
423 } | 423 } |
424 | 424 |
425 void HTMLFormControlElement::hideVisibleValidationMessage() | 425 void HTMLFormControlElement::hideVisibleValidationMessage() |
426 { | 426 { |
427 if (!m_hasValidationMessage) | 427 if (!m_hasValidationMessage) |
428 return; | 428 return; |
429 | 429 |
430 if (ValidationMessageClient* client = validationMessageClient()) | 430 if (ValidationMessageClient* client = validationMessageClient()) |
431 client->hideValidationMessage(*this); | 431 client->hideValidationMessage(*this); |
432 } | 432 } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 | 532 |
533 void HTMLFormControlElement::setFocus(bool flag) | 533 void HTMLFormControlElement::setFocus(bool flag) |
534 { | 534 { |
535 LabelableElement::setFocus(flag); | 535 LabelableElement::setFocus(flag); |
536 | 536 |
537 if (!flag && wasChangedSinceLastFormControlChangeEvent()) | 537 if (!flag && wasChangedSinceLastFormControlChangeEvent()) |
538 dispatchFormControlChangeEvent(); | 538 dispatchFormControlChangeEvent(); |
539 } | 539 } |
540 | 540 |
541 } // namespace Webcore | 541 } // namespace Webcore |
OLD | NEW |