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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 updateVisibleValidationMessage(); | 468 updateVisibleValidationMessage(); |
469 } | 469 } |
470 } | 470 } |
471 | 471 |
472 void HTMLFormControlElement::setCustomValidity(const String& error) | 472 void HTMLFormControlElement::setCustomValidity(const String& error) |
473 { | 473 { |
474 FormAssociatedElement::setCustomValidity(error); | 474 FormAssociatedElement::setCustomValidity(error); |
475 setNeedsValidityCheck(); | 475 setNeedsValidityCheck(); |
476 } | 476 } |
477 | 477 |
| 478 bool HTMLFormControlElement::validationMessageShadowTreeContains(Node* node) con
st |
| 479 { |
| 480 return m_validationMessage && m_validationMessage->shadowTreeContains(node); |
| 481 } |
| 482 |
478 void HTMLFormControlElement::dispatchBlurEvent(PassRefPtr<Node> newFocusedNode) | 483 void HTMLFormControlElement::dispatchBlurEvent(PassRefPtr<Node> newFocusedNode) |
479 { | 484 { |
480 HTMLElement::dispatchBlurEvent(newFocusedNode); | 485 HTMLElement::dispatchBlurEvent(newFocusedNode); |
481 hideVisibleValidationMessage(); | 486 hideVisibleValidationMessage(); |
482 } | 487 } |
483 | 488 |
484 HTMLFormElement* HTMLFormControlElement::virtualForm() const | 489 HTMLFormElement* HTMLFormControlElement::virtualForm() const |
485 { | 490 { |
486 return FormAssociatedElement::form(); | 491 return FormAssociatedElement::form(); |
487 } | 492 } |
488 | 493 |
489 bool HTMLFormControlElement::isDefaultButtonForForm() const | 494 bool HTMLFormControlElement::isDefaultButtonForForm() const |
490 { | 495 { |
491 return isSuccessfulSubmitButton() && form() && form()->defaultButton() == th
is; | 496 return isSuccessfulSubmitButton() && form() && form()->defaultButton() == th
is; |
492 } | 497 } |
493 | 498 |
494 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node
* node) | 499 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node
* node) |
495 { | 500 { |
496 for (; node; node = node->parentNode()) { | 501 for (; node; node = node->parentNode()) { |
497 if (node->isElementNode() && toElement(node)->isFormControlElement()) | 502 if (node->isElementNode() && toElement(node)->isFormControlElement()) |
498 return static_cast<HTMLFormControlElement*>(node); | 503 return static_cast<HTMLFormControlElement*>(node); |
499 } | 504 } |
500 return 0; | 505 return 0; |
501 } | 506 } |
502 | 507 |
503 } // namespace Webcore | 508 } // namespace Webcore |
OLD | NEW |