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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp

Issue 1535803003: Add two UseCounters for form.imageName and form.elements.imageName. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 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
Index: third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp b/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp
index e7ced66a415c5138e1f42d662c686cb7ec3cf94d..bbdceba87fcbd018e9c2b8664e8cb8703e9da901 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp
@@ -202,10 +202,14 @@ void HTMLFormControlsCollection::namedGetter(const AtomicString& name, RadioNode
return;
if (namedItems.size() == 1) {
+ if (isHTMLImageElement(*namedItems[0]))
+ UseCounter::count(document(), UseCounter::FormControlsCollectionNameAccessForImageElement);
returnValue.setElement(namedItems.at(0));
return;
}
+ // This path never returns a RadioNodeList for <img> because
+ // onlyMatchingImgElements flag is false by default.
returnValue.setRadioNodeList(ownerNode().radioNodeList(name));
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698