| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 HTMLElement::dispatchChangeEvent(); | 290 HTMLElement::dispatchChangeEvent(); |
| 291 setChangedSinceLastFormControlChangeEvent(false); | 291 setChangedSinceLastFormControlChangeEvent(false); |
| 292 } | 292 } |
| 293 | 293 |
| 294 void HTMLFormControlElement::dispatchFormControlInputEvent() | 294 void HTMLFormControlElement::dispatchFormControlInputEvent() |
| 295 { | 295 { |
| 296 setChangedSinceLastFormControlChangeEvent(true); | 296 setChangedSinceLastFormControlChangeEvent(true); |
| 297 HTMLElement::dispatchInputEvent(); | 297 HTMLElement::dispatchInputEvent(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 HTMLFormElement* HTMLFormControlElement::formOwner() const |
| 301 { |
| 302 return FormAssociatedElement::form(); |
| 303 } |
| 304 |
| 300 bool HTMLFormControlElement::isDisabledFormControl() const | 305 bool HTMLFormControlElement::isDisabledFormControl() const |
| 301 { | 306 { |
| 302 if (m_disabled) | 307 if (m_disabled) |
| 303 return true; | 308 return true; |
| 304 | 309 |
| 305 if (m_ancestorDisabledState == AncestorDisabledStateUnknown) | 310 if (m_ancestorDisabledState == AncestorDisabledStateUnknown) |
| 306 updateAncestorDisabledState(); | 311 updateAncestorDisabledState(); |
| 307 return m_ancestorDisabledState == AncestorDisabledStateDisabled; | 312 return m_ancestorDisabledState == AncestorDisabledStateDisabled; |
| 308 } | 313 } |
| 309 | 314 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 FormAssociatedElement::setCustomValidity(error); | 496 FormAssociatedElement::setCustomValidity(error); |
| 492 setNeedsValidityCheck(); | 497 setNeedsValidityCheck(); |
| 493 } | 498 } |
| 494 | 499 |
| 495 void HTMLFormControlElement::dispatchBlurEvent(Element* newFocusedElement) | 500 void HTMLFormControlElement::dispatchBlurEvent(Element* newFocusedElement) |
| 496 { | 501 { |
| 497 HTMLElement::dispatchBlurEvent(newFocusedElement); | 502 HTMLElement::dispatchBlurEvent(newFocusedElement); |
| 498 hideVisibleValidationMessage(); | 503 hideVisibleValidationMessage(); |
| 499 } | 504 } |
| 500 | 505 |
| 501 HTMLFormElement* HTMLFormControlElement::virtualForm() const | |
| 502 { | |
| 503 return FormAssociatedElement::form(); | |
| 504 } | |
| 505 | |
| 506 bool HTMLFormControlElement::isSuccessfulSubmitButton() const | 506 bool HTMLFormControlElement::isSuccessfulSubmitButton() const |
| 507 { | 507 { |
| 508 return canBeSuccessfulSubmitButton() && !isDisabledFormControl(); | 508 return canBeSuccessfulSubmitButton() && !isDisabledFormControl(); |
| 509 } | 509 } |
| 510 | 510 |
| 511 bool HTMLFormControlElement::isDefaultButtonForForm() const | 511 bool HTMLFormControlElement::isDefaultButtonForForm() const |
| 512 { | 512 { |
| 513 return isSuccessfulSubmitButton() && form() && form()->defaultButton() == th
is; | 513 return isSuccessfulSubmitButton() && form() && form()->defaultButton() == th
is; |
| 514 } | 514 } |
| 515 | 515 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 527 String fullName = name(); | 527 String fullName = name(); |
| 528 String trimmedName = fullName.stripWhiteSpace(); | 528 String trimmedName = fullName.stripWhiteSpace(); |
| 529 if (!trimmedName.isEmpty()) | 529 if (!trimmedName.isEmpty()) |
| 530 return trimmedName; | 530 return trimmedName; |
| 531 fullName = getIdAttribute(); | 531 fullName = getIdAttribute(); |
| 532 trimmedName = fullName.stripWhiteSpace(); | 532 trimmedName = fullName.stripWhiteSpace(); |
| 533 return trimmedName; | 533 return trimmedName; |
| 534 } | 534 } |
| 535 | 535 |
| 536 } // namespace Webcore | 536 } // namespace Webcore |
| OLD | NEW |