| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 77 } |
| 78 | 78 |
| 79 PassRefPtr<HTMLFormElement> HTMLFormElement::create(Document& document) | 79 PassRefPtr<HTMLFormElement> HTMLFormElement::create(Document& document) |
| 80 { | 80 { |
| 81 UseCounter::count(document, UseCounter::FormElement); | 81 UseCounter::count(document, UseCounter::FormElement); |
| 82 return adoptRef(new HTMLFormElement(document)); | 82 return adoptRef(new HTMLFormElement(document)); |
| 83 } | 83 } |
| 84 | 84 |
| 85 HTMLFormElement::~HTMLFormElement() | 85 HTMLFormElement::~HTMLFormElement() |
| 86 { | 86 { |
| 87 document().formController()->willDeleteForm(this); | 87 document().formController().willDeleteForm(this); |
| 88 } | 88 } |
| 89 | 89 |
| 90 bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style) | 90 bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style) |
| 91 { | 91 { |
| 92 if (!m_wasDemoted) | 92 if (!m_wasDemoted) |
| 93 return HTMLElement::rendererIsNeeded(style); | 93 return HTMLElement::rendererIsNeeded(style); |
| 94 | 94 |
| 95 ContainerNode* node = parentNode(); | 95 ContainerNode* node = parentNode(); |
| 96 RenderObject* parentRenderer = node->renderer(); | 96 RenderObject* parentRenderer = node->renderer(); |
| 97 // FIXME: Shouldn't we also check for table caption (see |formIsTablePart| b
elow). | 97 // FIXME: Shouldn't we also check for table caption (see |formIsTablePart| b
elow). |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 } | 768 } |
| 769 | 769 |
| 770 bool HTMLFormElement::shouldAutocomplete() const | 770 bool HTMLFormElement::shouldAutocomplete() const |
| 771 { | 771 { |
| 772 return !equalIgnoringCase(fastGetAttribute(autocompleteAttr), "off"); | 772 return !equalIgnoringCase(fastGetAttribute(autocompleteAttr), "off"); |
| 773 } | 773 } |
| 774 | 774 |
| 775 void HTMLFormElement::finishParsingChildren() | 775 void HTMLFormElement::finishParsingChildren() |
| 776 { | 776 { |
| 777 HTMLElement::finishParsingChildren(); | 777 HTMLElement::finishParsingChildren(); |
| 778 document().formController()->restoreControlStateIn(*this); | 778 document().formController().restoreControlStateIn(*this); |
| 779 m_didFinishParsingChildren = true; | 779 m_didFinishParsingChildren = true; |
| 780 } | 780 } |
| 781 | 781 |
| 782 void HTMLFormElement::copyNonAttributePropertiesFromElement(const Element& sourc
e) | 782 void HTMLFormElement::copyNonAttributePropertiesFromElement(const Element& sourc
e) |
| 783 { | 783 { |
| 784 m_wasDemoted = static_cast<const HTMLFormElement&>(source).m_wasDemoted; | 784 m_wasDemoted = static_cast<const HTMLFormElement&>(source).m_wasDemoted; |
| 785 HTMLElement::copyNonAttributePropertiesFromElement(source); | 785 HTMLElement::copyNonAttributePropertiesFromElement(source); |
| 786 } | 786 } |
| 787 | 787 |
| 788 void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, bool& retur
nValue0Enabled, RefPtr<RadioNodeList>& returnValue0, bool& returnValue1Enabled,
RefPtr<Element>& returnValue1) | 788 void HTMLFormElement::anonymousNamedGetter(const AtomicString& name, bool& retur
nValue0Enabled, RefPtr<RadioNodeList>& returnValue0, bool& returnValue1Enabled,
RefPtr<Element>& returnValue1) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 815 } | 815 } |
| 816 | 816 |
| 817 void HTMLFormElement::setDemoted(bool demoted) | 817 void HTMLFormElement::setDemoted(bool demoted) |
| 818 { | 818 { |
| 819 if (demoted) | 819 if (demoted) |
| 820 UseCounter::count(document(), UseCounter::DemotedFormElement); | 820 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 821 m_wasDemoted = demoted; | 821 m_wasDemoted = demoted; |
| 822 } | 822 } |
| 823 | 823 |
| 824 } // namespace | 824 } // namespace |
| OLD | NEW |