| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 setNeedsWillValidateCheck(); | 294 setNeedsWillValidateCheck(); |
| 295 HTMLElement::removedFrom(insertionPoint); | 295 HTMLElement::removedFrom(insertionPoint); |
| 296 FormAssociatedElement::removedFrom(insertionPoint); | 296 FormAssociatedElement::removedFrom(insertionPoint); |
| 297 document().removeFormAssociation(this); | 297 document().removeFormAssociation(this); |
| 298 } | 298 } |
| 299 | 299 |
| 300 void HTMLFormControlElement::willChangeForm() | 300 void HTMLFormControlElement::willChangeForm() |
| 301 { | 301 { |
| 302 FormAssociatedElement::willChangeForm(); | 302 FormAssociatedElement::willChangeForm(); |
| 303 formOwnerSetNeedsValidityCheck(); | 303 formOwnerSetNeedsValidityCheck(); |
| 304 if (formOwner() && canBeSuccessfulSubmitButton()) |
| 305 formOwner()->invalidateDefaultButtonStyle(); |
| 304 } | 306 } |
| 305 | 307 |
| 306 void HTMLFormControlElement::didChangeForm() | 308 void HTMLFormControlElement::didChangeForm() |
| 307 { | 309 { |
| 308 FormAssociatedElement::didChangeForm(); | 310 FormAssociatedElement::didChangeForm(); |
| 309 formOwnerSetNeedsValidityCheck(); | 311 formOwnerSetNeedsValidityCheck(); |
| 312 if (formOwner() && inDocument() && canBeSuccessfulSubmitButton()) |
| 313 formOwner()->invalidateDefaultButtonStyle(); |
| 310 } | 314 } |
| 311 | 315 |
| 312 void HTMLFormControlElement::formOwnerSetNeedsValidityCheck() | 316 void HTMLFormControlElement::formOwnerSetNeedsValidityCheck() |
| 313 { | 317 { |
| 314 if (HTMLFormElement* form = formOwner()) { | 318 if (HTMLFormElement* form = formOwner()) { |
| 315 form->pseudoStateChanged(CSSSelector::PseudoValid); | 319 form->pseudoStateChanged(CSSSelector::PseudoValid); |
| 316 form->pseudoStateChanged(CSSSelector::PseudoInvalid); | 320 form->pseudoStateChanged(CSSSelector::PseudoInvalid); |
| 317 } | 321 } |
| 318 } | 322 } |
| 319 | 323 |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 dispatchFormControlChangeEvent(); | 666 dispatchFormControlChangeEvent(); |
| 663 } | 667 } |
| 664 | 668 |
| 665 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) | 669 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) |
| 666 { | 670 { |
| 667 HTMLElement::copyNonAttributePropertiesFromElement(source); | 671 HTMLElement::copyNonAttributePropertiesFromElement(source); |
| 668 setNeedsValidityCheck(); | 672 setNeedsValidityCheck(); |
| 669 } | 673 } |
| 670 | 674 |
| 671 } // namespace blink | 675 } // namespace blink |
| OLD | NEW |