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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 m_wasFocusedByMouse = false; | 628 m_wasFocusedByMouse = false; |
629 HTMLElement::dispatchBlurEvent(newFocusedElement, type, sourceCapabilities); | 629 HTMLElement::dispatchBlurEvent(newFocusedElement, type, sourceCapabilities); |
630 hideVisibleValidationMessage(); | 630 hideVisibleValidationMessage(); |
631 } | 631 } |
632 | 632 |
633 bool HTMLFormControlElement::isSuccessfulSubmitButton() const | 633 bool HTMLFormControlElement::isSuccessfulSubmitButton() const |
634 { | 634 { |
635 return canBeSuccessfulSubmitButton() && !isDisabledFormControl(); | 635 return canBeSuccessfulSubmitButton() && !isDisabledFormControl(); |
636 } | 636 } |
637 | 637 |
638 bool HTMLFormControlElement::isDefaultButtonForForm() const | 638 bool HTMLFormControlElement::matchesDefaultPseudoClass() const |
639 { | 639 { |
640 // HTMLFormElement::defaultButton() traverses the tree. So we check | 640 // HTMLFormElement::findDefaultButton() traverses the tree. So we check |
641 // canBeSuccessfulSubmitButton() first for early return. | 641 // canBeSuccessfulSubmitButton() first for early return. |
642 return canBeSuccessfulSubmitButton() && form() && form()->defaultButton() ==
this; | 642 return canBeSuccessfulSubmitButton() && form() && form()->findDefaultButton(
) == this; |
643 } | 643 } |
644 | 644 |
645 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node
* node) | 645 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node
* node) |
646 { | 646 { |
647 if (!node) | 647 if (!node) |
648 return nullptr; | 648 return nullptr; |
649 return Traversal<HTMLFormControlElement>::firstAncestorOrSelf(*node); | 649 return Traversal<HTMLFormControlElement>::firstAncestorOrSelf(*node); |
650 } | 650 } |
651 | 651 |
652 String HTMLFormControlElement::nameForAutofill() const | 652 String HTMLFormControlElement::nameForAutofill() const |
(...skipping 15 matching lines...) Expand all Loading... |
668 dispatchFormControlChangeEvent(); | 668 dispatchFormControlChangeEvent(); |
669 } | 669 } |
670 | 670 |
671 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) | 671 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) |
672 { | 672 { |
673 HTMLElement::copyNonAttributePropertiesFromElement(source); | 673 HTMLElement::copyNonAttributePropertiesFromElement(source); |
674 setNeedsValidityCheck(); | 674 setNeedsValidityCheck(); |
675 } | 675 } |
676 | 676 |
677 } // namespace blink | 677 } // namespace blink |
OLD | NEW |