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

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

Issue 354813004: Add missing owner check to form's "named property retrieval" over images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Shorten out single-use local binding; no change in functionality. Created 6 years, 6 months 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 | « LayoutTests/fast/forms/form-radio-img-node-list-expected.txt ('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 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
-
« no previous file with comments | « LayoutTests/fast/forms/form-radio-img-node-list-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698