Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: Source/core/html/RadioNodeList.cpp

Issue 106423005: Only 'form associated' elements have a potential form owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use 'error' instead of 'click' events when testing form ownership Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLObjectElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/core/html/HTMLObjectElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698