| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 RadioNodeList::~RadioNodeList() | 48 RadioNodeList::~RadioNodeList() |
| 49 { | 49 { |
| 50 #if !ENABLE(OILPAN) | 50 #if !ENABLE(OILPAN) |
| 51 ownerNode().nodeLists()->removeCache(this, type(), m_name); | 51 ownerNode().nodeLists()->removeCache(this, type(), m_name); |
| 52 #endif | 52 #endif |
| 53 } | 53 } |
| 54 | 54 |
| 55 static inline HTMLInputElement* toRadioButtonInputElement(Element& element) | 55 static inline HTMLInputElement* toRadioButtonInputElement(Element& element) |
| 56 { | 56 { |
| 57 if (!isHTMLInputElement(element)) | 57 if (!isHTMLInputElement(element)) |
| 58 return 0; | 58 return nullptr; |
| 59 HTMLInputElement& inputElement = toHTMLInputElement(element); | 59 HTMLInputElement& inputElement = toHTMLInputElement(element); |
| 60 if (inputElement.type() != InputTypeNames::radio || inputElement.value().isE
mpty()) | 60 if (inputElement.type() != InputTypeNames::radio || inputElement.value().isE
mpty()) |
| 61 return 0; | 61 return nullptr; |
| 62 return &inputElement; | 62 return &inputElement; |
| 63 } | 63 } |
| 64 | 64 |
| 65 String RadioNodeList::value() const | 65 String RadioNodeList::value() const |
| 66 { | 66 { |
| 67 if (shouldOnlyMatchImgElements()) | 67 if (shouldOnlyMatchImgElements()) |
| 68 return String(); | 68 return String(); |
| 69 unsigned length = this->length(); | 69 unsigned length = this->length(); |
| 70 for (unsigned i = 0; i < length; ++i) { | 70 for (unsigned i = 0; i < length; ++i) { |
| 71 const HTMLInputElement* inputElement = toRadioButtonInputElement(*item(i
)); | 71 const HTMLInputElement* inputElement = toRadioButtonInputElement(*item(i
)); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (!isHTMLObjectElement(element) && !element.isFormControlElement()) | 123 if (!isHTMLObjectElement(element) && !element.isFormControlElement()) |
| 124 return false; | 124 return false; |
| 125 | 125 |
| 126 if (isHTMLInputElement(element) && toHTMLInputElement(element).type() == Inp
utTypeNames::image) | 126 if (isHTMLInputElement(element) && toHTMLInputElement(element).type() == Inp
utTypeNames::image) |
| 127 return false; | 127 return false; |
| 128 | 128 |
| 129 return checkElementMatchesRadioNodeListFilter(element); | 129 return checkElementMatchesRadioNodeListFilter(element); |
| 130 } | 130 } |
| 131 | 131 |
| 132 } // namespace | 132 } // namespace |
| OLD | NEW |