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 29 matching lines...) Expand all Loading... |
40 RadioNodeList::RadioNodeList(ContainerNode& rootNode, const AtomicString& name,
CollectionType type) | 40 RadioNodeList::RadioNodeList(ContainerNode& rootNode, const AtomicString& name,
CollectionType type) |
41 : LiveNodeList(rootNode, type, InvalidateForFormControls, isHTMLFormElement(
rootNode) ? NodeListIsRootedAtDocument : NodeListIsRootedAtNode) | 41 : LiveNodeList(rootNode, type, InvalidateForFormControls, isHTMLFormElement(
rootNode) ? NodeListIsRootedAtDocument : NodeListIsRootedAtNode) |
42 , m_name(name) | 42 , m_name(name) |
43 , m_onlyMatchImgElements(type == RadioImgNodeListType) | 43 , m_onlyMatchImgElements(type == RadioImgNodeListType) |
44 { | 44 { |
45 ScriptWrappable::init(this); | 45 ScriptWrappable::init(this); |
46 } | 46 } |
47 | 47 |
48 RadioNodeList::~RadioNodeList() | 48 RadioNodeList::~RadioNodeList() |
49 { | 49 { |
| 50 #if !ENABLE(OILPAN) |
50 ownerNode().nodeLists()->removeCache(this, m_onlyMatchImgElements ? RadioImg
NodeListType : RadioNodeListType, m_name); | 51 ownerNode().nodeLists()->removeCache(this, m_onlyMatchImgElements ? RadioImg
NodeListType : RadioNodeListType, m_name); |
| 52 #endif |
51 } | 53 } |
52 | 54 |
53 static inline HTMLInputElement* toRadioButtonInputElement(Node& node) | 55 static inline HTMLInputElement* toRadioButtonInputElement(Node& node) |
54 { | 56 { |
55 ASSERT(node.isElementNode()); | 57 ASSERT(node.isElementNode()); |
56 if (!isHTMLInputElement(node)) | 58 if (!isHTMLInputElement(node)) |
57 return 0; | 59 return 0; |
58 HTMLInputElement& inputElement = toHTMLInputElement(node); | 60 HTMLInputElement& inputElement = toHTMLInputElement(node); |
59 if (!inputElement.isRadioButton() || inputElement.value().isEmpty()) | 61 if (!inputElement.isRadioButton() || inputElement.value().isEmpty()) |
60 return 0; | 62 return 0; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 return false; | 113 return false; |
112 | 114 |
113 if (isHTMLInputElement(element) && toHTMLInputElement(element).isImageButton
()) | 115 if (isHTMLInputElement(element) && toHTMLInputElement(element).isImageButton
()) |
114 return false; | 116 return false; |
115 | 117 |
116 return checkElementMatchesRadioNodeListFilter(element); | 118 return checkElementMatchesRadioNodeListFilter(element); |
117 } | 119 } |
118 | 120 |
119 } // namespace | 121 } // namespace |
120 | 122 |
OLD | NEW |