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: third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp

Issue 2104893005: UseCounter: Count usage of textarea[maxlength] and textarea[minlength] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp b/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
index d33479ff18b4b187cf42f8690f334278e00a6441..924d4db8765e4c888dcfb13aaf9e9c88bdff7a45 100644
--- a/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
@@ -41,6 +41,7 @@
#include "core/events/Event.h"
#include "core/frame/FrameHost.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/UseCounter.h"
#include "core/html/FormData.h"
#include "core/html/forms/FormController.h"
#include "core/html/parser/HTMLParserIdioms.h"
@@ -192,8 +193,10 @@ void HTMLTextAreaElement::parseAttribute(const QualifiedName& name, const Atomic
} else if (name == accesskeyAttr) {
// ignore for the moment
} else if (name == maxlengthAttr) {
+ UseCounter::count(document(), UseCounter::TextAreaMaxLength);
setNeedsValidityCheck();
} else if (name == minlengthAttr) {
+ UseCounter::count(document(), UseCounter::TextAreaMinLength);
setNeedsValidityCheck();
} else {
HTMLTextFormControlElement::parseAttribute(name, oldValue, value);
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698