| 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 15 matching lines...) Expand all Loading... |
| 26 #include "core/html/HTMLFormElement.h" | 26 #include "core/html/HTMLFormElement.h" |
| 27 | 27 |
| 28 #include "bindings/core/v8/ScriptController.h" | 28 #include "bindings/core/v8/ScriptController.h" |
| 29 #include "bindings/core/v8/ScriptEventListener.h" | 29 #include "bindings/core/v8/ScriptEventListener.h" |
| 30 #include "bindings/core/v8/V8DOMActivityLogger.h" | 30 #include "bindings/core/v8/V8DOMActivityLogger.h" |
| 31 #include "core/HTMLNames.h" | 31 #include "core/HTMLNames.h" |
| 32 #include "core/dom/Attribute.h" | 32 #include "core/dom/Attribute.h" |
| 33 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
| 34 #include "core/dom/ElementTraversal.h" | 34 #include "core/dom/ElementTraversal.h" |
| 35 #include "core/dom/IdTargetObserverRegistry.h" | 35 #include "core/dom/IdTargetObserverRegistry.h" |
| 36 #include "core/dom/NodeListsNodeData.h" |
| 36 #include "core/events/AutocompleteErrorEvent.h" | 37 #include "core/events/AutocompleteErrorEvent.h" |
| 37 #include "core/events/Event.h" | 38 #include "core/events/Event.h" |
| 38 #include "core/events/GenericEventQueue.h" | 39 #include "core/events/GenericEventQueue.h" |
| 39 #include "core/events/ScopedEventQueue.h" | 40 #include "core/events/ScopedEventQueue.h" |
| 40 #include "core/frame/LocalDOMWindow.h" | 41 #include "core/frame/LocalDOMWindow.h" |
| 41 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
| 42 #include "core/frame/UseCounter.h" | 43 #include "core/frame/UseCounter.h" |
| 43 #include "core/frame/csp/ContentSecurityPolicy.h" | 44 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 44 #include "core/html/HTMLCollection.h" | 45 #include "core/html/HTMLCollection.h" |
| 45 #include "core/html/HTMLDialogElement.h" | 46 #include "core/html/HTMLDialogElement.h" |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 void HTMLFormElement::didAssociateByParser() | 583 void HTMLFormElement::didAssociateByParser() |
| 583 { | 584 { |
| 584 if (!m_didFinishParsingChildren) | 585 if (!m_didFinishParsingChildren) |
| 585 return; | 586 return; |
| 586 m_hasElementsAssociatedByParser = true; | 587 m_hasElementsAssociatedByParser = true; |
| 587 UseCounter::count(document(), UseCounter::FormAssociationByParser); | 588 UseCounter::count(document(), UseCounter::FormAssociationByParser); |
| 588 } | 589 } |
| 589 | 590 |
| 590 PassRefPtrWillBeRawPtr<HTMLFormControlsCollection> HTMLFormElement::elements() | 591 PassRefPtrWillBeRawPtr<HTMLFormControlsCollection> HTMLFormElement::elements() |
| 591 { | 592 { |
| 592 return toHTMLFormControlsCollection(ensureCachedHTMLCollection(FormControls)
.get()); | 593 return ensureCachedCollection<HTMLFormControlsCollection>(FormControls); |
| 593 } | 594 } |
| 594 | 595 |
| 595 void HTMLFormElement::collectAssociatedElements(Node& root, FormAssociatedElemen
t::List& elements) const | 596 void HTMLFormElement::collectAssociatedElements(Node& root, FormAssociatedElemen
t::List& elements) const |
| 596 { | 597 { |
| 597 elements.clear(); | 598 elements.clear(); |
| 598 for (HTMLElement* element = Traversal<HTMLElement>::firstWithin(root); eleme
nt; element = Traversal<HTMLElement>::next(*element)) { | 599 for (HTMLElement* element = Traversal<HTMLElement>::firstWithin(root); eleme
nt; element = Traversal<HTMLElement>::next(*element)) { |
| 599 FormAssociatedElement* associatedElement = 0; | 600 FormAssociatedElement* associatedElement = 0; |
| 600 if (element->isFormControlElement()) | 601 if (element->isFormControlElement()) |
| 601 associatedElement = toHTMLFormControlElement(element); | 602 associatedElement = toHTMLFormControlElement(element); |
| 602 else if (isHTMLObjectElement(*element)) | 603 else if (isHTMLObjectElement(*element)) |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 } | 827 } |
| 827 | 828 |
| 828 void HTMLFormElement::setDemoted(bool demoted) | 829 void HTMLFormElement::setDemoted(bool demoted) |
| 829 { | 830 { |
| 830 if (demoted) | 831 if (demoted) |
| 831 UseCounter::count(document(), UseCounter::DemotedFormElement); | 832 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 832 m_wasDemoted = demoted; | 833 m_wasDemoted = demoted; |
| 833 } | 834 } |
| 834 | 835 |
| 835 } // namespace | 836 } // namespace |
| OLD | NEW |