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 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 517 return false; | 517 return false; |
| 518 // An event handler can deref this object. | 518 // An event handler can deref this object. |
| 519 RefPtrWillBeRawPtr<HTMLFormControlElement> protector(this); | 519 RefPtrWillBeRawPtr<HTMLFormControlElement> protector(this); |
| 520 RefPtrWillBeRawPtr<Document> originalDocument(document()); | 520 RefPtrWillBeRawPtr<Document> originalDocument(document()); |
| 521 bool needsDefaultAction = dispatchEvent(Event::createCancelable(EventTypeNam es::invalid)); | 521 bool needsDefaultAction = dispatchEvent(Event::createCancelable(EventTypeNam es::invalid)); |
| 522 if (needsDefaultAction && unhandledInvalidControls && inDocument() && origin alDocument == document()) | 522 if (needsDefaultAction && unhandledInvalidControls && inDocument() && origin alDocument == document()) |
| 523 unhandledInvalidControls->append(this); | 523 unhandledInvalidControls->append(this); |
| 524 return false; | 524 return false; |
| 525 } | 525 } |
| 526 | 526 |
| 527 bool HTMLFormControlElement::isSubmittableElement() | |
| 528 { | |
| 529 if (this->formControlType() == "fieldset") | |
|
tkent
2015/06/25 11:30:02
No, HTMLFormControlElement should not have knowled
tanay.c
2015/06/25 12:04:56
Done.
| |
| 530 return false; | |
| 531 | |
| 532 return true; | |
| 533 } | |
| 534 | |
| 527 void HTMLFormControlElement::showValidationMessage() | 535 void HTMLFormControlElement::showValidationMessage() |
| 528 { | 536 { |
| 529 scrollIntoViewIfNeeded(false); | 537 scrollIntoViewIfNeeded(false); |
| 530 RefPtrWillBeRawPtr<HTMLFormControlElement> protector(this); | 538 RefPtrWillBeRawPtr<HTMLFormControlElement> protector(this); |
| 531 focus(); | 539 focus(); |
| 532 updateVisibleValidationMessage(); | 540 updateVisibleValidationMessage(); |
| 533 } | 541 } |
| 534 | 542 |
| 535 bool HTMLFormControlElement::reportValidity() | 543 bool HTMLFormControlElement::reportValidity() |
| 536 { | 544 { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 641 dispatchFormControlChangeEvent(); | 649 dispatchFormControlChangeEvent(); |
| 642 } | 650 } |
| 643 | 651 |
| 644 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element & source) | 652 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element & source) |
| 645 { | 653 { |
| 646 HTMLElement::copyNonAttributePropertiesFromElement(source); | 654 HTMLElement::copyNonAttributePropertiesFromElement(source); |
| 647 setNeedsValidityCheck(); | 655 setNeedsValidityCheck(); |
| 648 } | 656 } |
| 649 | 657 |
| 650 } // namespace blink | 658 } // namespace blink |
| OLD | NEW |