Index: Source/core/html/RadioNodeList.cpp |
diff --git a/Source/core/html/RadioNodeList.cpp b/Source/core/html/RadioNodeList.cpp |
index 09dd0a09b23609923d2cdaba2d802fa6786d21c5..ed779091cace08edf3a8b04832103a73e8e427fb 100644 |
--- a/Source/core/html/RadioNodeList.cpp |
+++ b/Source/core/html/RadioNodeList.cpp |
@@ -105,8 +105,11 @@ bool RadioNodeList::checkElementMatchesRadioNodeListFilter(const Element& testEl |
bool RadioNodeList::elementMatches(const Element& element) const |
{ |
- if (m_onlyMatchImgElements) |
- return isHTMLImageElement(element); |
+ if (m_onlyMatchImgElements) { |
+ if (!isHTMLImageElement(element)) |
+ return false; |
+ return toHTMLElement(element).formOwner() == ownerNode(); |
+ } |
if (!isHTMLObjectElement(element) && !element.isFormControlElement()) |
return false; |
@@ -118,4 +121,3 @@ bool RadioNodeList::elementMatches(const Element& element) const |
} |
} // namespace |
- |