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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 6 * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
| 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 |
| 11 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
| 12 * | 12 * |
| 13 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 * Library General Public License for more details. | 16 * Library General Public License for more details. |
| 17 * | 17 * |
| 18 * You should have received a copy of the GNU Library General Public License | 18 * You should have received a copy of the GNU Library General Public License |
| 19 * along with this library; see the file COPYING.LIB. If not, write to | 19 * along with this library; see the file COPYING.LIB. If not, write to |
| 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
| 22 * | 22 * |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef HTMLFormControlsCollection_h | 25 #ifndef HTMLFormControlsCollection_h |
| 26 #define HTMLFormControlsCollection_h | 26 #define HTMLFormControlsCollection_h |
| 27 | 27 |
| 28 #include "core/html/FormAssociatedElement.h" | |
| 29 #include "core/html/HTMLCollection.h" | 28 #include "core/html/HTMLCollection.h" |
| 30 #include "core/html/HTMLElement.h" | 29 #include "core/html/HTMLElement.h" |
| 30 #include "core/html/ListedElement.h" | |
| 31 #include "core/html/RadioNodeList.h" | 31 #include "core/html/RadioNodeList.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class HTMLImageElement; | 35 class HTMLImageElement; |
| 36 class RadioNodeListOrElement; | 36 class RadioNodeListOrElement; |
| 37 | 37 |
| 38 // This class is just a big hack to find form elements even in malformed HTML | 38 // This class is just a big hack to find form elements even in malformed HTML |
| 39 // elements. The famous <table><tr><form><td> problem. | 39 // elements. The famous <table><tr><form><td> problem. |
| 40 | 40 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 54 void namedGetter(const AtomicString& name, RadioNodeListOrElement&); | 54 void namedGetter(const AtomicString& name, RadioNodeListOrElement&); |
| 55 | 55 |
| 56 DECLARE_VIRTUAL_TRACE(); | 56 DECLARE_VIRTUAL_TRACE(); |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 explicit HTMLFormControlsCollection(ContainerNode&); | 59 explicit HTMLFormControlsCollection(ContainerNode&); |
| 60 | 60 |
| 61 void updateIdNameCache() const override; | 61 void updateIdNameCache() const override; |
| 62 void supportedPropertyNames(Vector<String>& names) override; | 62 void supportedPropertyNames(Vector<String>& names) override; |
| 63 | 63 |
| 64 const FormAssociatedElement::List& formControlElements() const; | 64 const ListedElement::List& formListedElements() const; |
|
tkent
2016/12/04 12:57:10
formListedElement() -> listedElement()
| |
| 65 const HeapVector<Member<HTMLImageElement>>& formImageElements() const; | 65 const HeapVector<Member<HTMLImageElement>>& formImageElements() const; |
| 66 HTMLElement* virtualItemAfter(Element*) const override; | 66 HTMLElement* virtualItemAfter(Element*) const override; |
| 67 void invalidateCache(Document* oldDocument = 0) const override; | 67 void invalidateCache(Document* oldDocument = 0) const override; |
| 68 | 68 |
| 69 mutable Member<HTMLElement> m_cachedElement; | 69 mutable Member<HTMLElement> m_cachedElement; |
| 70 mutable unsigned m_cachedElementOffsetInArray; | 70 mutable unsigned m_cachedElementOffsetInArray; |
| 71 }; | 71 }; |
| 72 DEFINE_TYPE_CASTS(HTMLFormControlsCollection, | 72 DEFINE_TYPE_CASTS(HTMLFormControlsCollection, |
| 73 LiveNodeListBase, | 73 LiveNodeListBase, |
| 74 collection, | 74 collection, |
| 75 collection->type() == FormControls, | 75 collection->type() == FormControls, |
| 76 collection.type() == FormControls); | 76 collection.type() == FormControls); |
| 77 | 77 |
| 78 } // namespace blink | 78 } // namespace blink |
| 79 | 79 |
| 80 #endif // HTMLFormControlsCollection_h | 80 #endif // HTMLFormControlsCollection_h |
| OLD | NEW |