Chromium Code Reviews| 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, 2008, 2009 Apple Inc. All rights reserv ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. |
| 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 718 HTMLFormControlElement* control = toHTMLFormControlElement(elements[i]); | 718 HTMLFormControlElement* control = toHTMLFormControlElement(elements[i]); |
| 719 if (control->isSuccessfulSubmitButton()) | 719 if (control->isSuccessfulSubmitButton()) |
| 720 return control; | 720 return control; |
| 721 } | 721 } |
| 722 | 722 |
| 723 return 0; | 723 return 0; |
| 724 } | 724 } |
| 725 | 725 |
| 726 void HTMLFormElement::setNeedsValidityCheck() | 726 void HTMLFormElement::setNeedsValidityCheck() |
| 727 { | 727 { |
| 728 // For now unconditionally order style recalculation, which triggers | 728 // For now unconditionally order style recalculation, which triggers |
|
dglazkov
2014/10/24 17:13:25
Is this comment still valid?
rune
2014/10/24 20:12:26
Yes. With this CL we still recalculate style witho
| |
| 729 // validity recalculation. In the near future, implement validity cache and | 729 // validity recalculation. In the near future, implement validity cache and |
| 730 // recalculate style only if it changed. | 730 // recalculate style only if it changed. |
| 731 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::createW ithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Invalid)); | 731 pseudoStateChanged(CSSSelector::PseudoValid); |
| 732 pseudoStateChanged(CSSSelector::PseudoInvalid); | |
| 732 } | 733 } |
| 733 | 734 |
| 734 bool HTMLFormElement::checkValidity() | 735 bool HTMLFormElement::checkValidity() |
| 735 { | 736 { |
| 736 return !checkInvalidControlsAndCollectUnhandled(0); | 737 return !checkInvalidControlsAndCollectUnhandled(0); |
| 737 } | 738 } |
| 738 | 739 |
| 739 bool HTMLFormElement::checkInvalidControlsAndCollectUnhandled(WillBeHeapVector<R efPtrWillBeMember<FormAssociatedElement> >* unhandledInvalidControls) | 740 bool HTMLFormElement::checkInvalidControlsAndCollectUnhandled(WillBeHeapVector<R efPtrWillBeMember<FormAssociatedElement> >* unhandledInvalidControls) |
| 740 { | 741 { |
| 741 RefPtrWillBeRawPtr<HTMLFormElement> protector(this); | 742 RefPtrWillBeRawPtr<HTMLFormElement> protector(this); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 859 } | 860 } |
| 860 | 861 |
| 861 void HTMLFormElement::setDemoted(bool demoted) | 862 void HTMLFormElement::setDemoted(bool demoted) |
| 862 { | 863 { |
| 863 if (demoted) | 864 if (demoted) |
| 864 UseCounter::count(document(), UseCounter::DemotedFormElement); | 865 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 865 m_wasDemoted = demoted; | 866 m_wasDemoted = demoted; |
| 866 } | 867 } |
| 867 | 868 |
| 868 } // namespace | 869 } // namespace |
| OLD | NEW |