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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2352333002: Add more use counters for document.createTouch (Closed)
Patch Set: back out Touch changes Created 4 years, 3 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
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 d7947014be21f8f85fd63fe3e2ce07c9e86a90f7..eee018daa1c7a4f3c3a30fdbb2198a8fdf15497c 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5521,6 +5521,9 @@ Touch* Document::createTouch(DOMWindow* window, EventTarget* target, int identif
if (!std::isfinite(force))
force = 0;
+ if (radiusX || radiusY || rotationAngle || force)
+ UseCounter::count(*this, UseCounter::DocumentCreateTouchMoreThanSevenArguments);
+
// FIXME: It's not clear from the documentation at
// http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html
// when this method should throw and nor is it by inspection of iOS behavior. It would be nice to verify any cases where it throws under iOS

Powered by Google App Engine
This is Rietveld 408576698