Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 38f7ad29e6c594c1cc17abd4e7ca0a12f465d8bc..1616dd6796371cbf7736758e8b299bfc3d454aee 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -4393,6 +4393,8 @@ bool Document::execCommand(const String& commandName, bool, const String& value, |
exceptionState.throwDOMException(InvalidStateError, "execCommand is only supported on HTML documents."); |
return false; |
} |
+ if (focusedElement() && isHTMLTextFormControlElement(*focusedElement())) |
+ UseCounter::count(*this, UseCounter::ExecCommandOnInputOrTextarea); |
// We don't allow recursive |execCommand()| to protect against attack code. |
// Recursive call of |execCommand()| could be happened by moving iframe |