Index: Source/core/html/RadioNodeList.cpp |
diff --git a/Source/core/html/RadioNodeList.cpp b/Source/core/html/RadioNodeList.cpp |
index 0522f12ec501a590bbf86057b4812471a0730461..f7cbfa982a2f55660b47bc3c18b2d3d583b25664 100644 |
--- a/Source/core/html/RadioNodeList.cpp |
+++ b/Source/core/html/RadioNodeList.cpp |
@@ -88,11 +88,7 @@ bool RadioNodeList::checkElementMatchesRadioNodeListFilter(Element* testElement) |
{ |
ASSERT(testElement->hasTagName(objectTag) || testElement->isFormControlElement()); |
if (ownerNode()->hasTagName(formTag)) { |
- HTMLFormElement* formElement = 0; |
- if (testElement->hasTagName(objectTag)) |
- formElement = toHTMLObjectElement(testElement)->form(); |
- else |
- formElement = toHTMLFormControlElement(testElement)->form(); |
+ HTMLFormElement* formElement = toHTMLElement(testElement)->formOwner(); |
if (!formElement || formElement != ownerNode()) |
return false; |
} |