OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 Motorola Mobility, Inc. All rights reserved. | 2 * Copyright (c) 2012 Motorola Mobility, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "NodeRareData.h" | 34 #include "NodeRareData.h" |
35 | 35 |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 using namespace HTMLNames; | 38 using namespace HTMLNames; |
39 | 39 |
40 RadioNodeList::RadioNodeList(Node* rootNode, const AtomicString& name) | 40 RadioNodeList::RadioNodeList(Node* rootNode, const AtomicString& name) |
41 : LiveNodeList(rootNode, RadioNodeListType, InvalidateForFormControls, rootN
ode->hasTagName(formTag) ? NodeListIsRootedAtDocument : NodeListIsRootedAtNode) | 41 : LiveNodeList(rootNode, RadioNodeListType, InvalidateForFormControls, rootN
ode->hasTagName(formTag) ? NodeListIsRootedAtDocument : NodeListIsRootedAtNode) |
42 , m_name(name) | 42 , m_name(name) |
43 { | 43 { |
| 44 ScriptWrappable::init(this); |
44 } | 45 } |
45 | 46 |
46 RadioNodeList::~RadioNodeList() | 47 RadioNodeList::~RadioNodeList() |
47 { | 48 { |
48 ownerNode()->nodeLists()->removeCacheWithAtomicName(this, RadioNodeListType,
m_name); | 49 ownerNode()->nodeLists()->removeCacheWithAtomicName(this, RadioNodeListType,
m_name); |
49 } | 50 } |
50 | 51 |
51 static inline HTMLInputElement* toRadioButtonInputElement(Node* node) | 52 static inline HTMLInputElement* toRadioButtonInputElement(Node* node) |
52 { | 53 { |
53 ASSERT(node->isElementNode()); | 54 ASSERT(node->isElementNode()); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 if (HTMLInputElement* inputElement = testElement->toInputElement()) { | 106 if (HTMLInputElement* inputElement = testElement->toInputElement()) { |
106 if (inputElement->isImageButton()) | 107 if (inputElement->isImageButton()) |
107 return false; | 108 return false; |
108 } | 109 } |
109 | 110 |
110 return checkElementMatchesRadioNodeListFilter(testElement); | 111 return checkElementMatchesRadioNodeListFilter(testElement); |
111 } | 112 } |
112 | 113 |
113 } // namspace | 114 } // namspace |
114 | 115 |
OLD | NEW |