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

Unified Diff: Source/core/svg/SVGTests.cpp

Issue 712813002: Count internal use of DOMImplementation::hasFeature() returning false (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 1 month 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 | « Source/core/svg/SVGTests.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGTests.cpp
diff --git a/Source/core/svg/SVGTests.cpp b/Source/core/svg/SVGTests.cpp
index 9da4a2a8719a21d36181824575484b06ba4881a6..a12fee422fb8e9d6249b2856c7fd4186dc8222bf 100644
--- a/Source/core/svg/SVGTests.cpp
+++ b/Source/core/svg/SVGTests.cpp
@@ -24,8 +24,9 @@
#include "core/SVGNames.h"
#include "core/dom/DOMImplementation.h"
-#include "platform/Language.h"
+#include "core/frame/UseCounter.h"
#include "core/svg/SVGElement.h"
+#include "platform/Language.h"
namespace blink {
@@ -47,15 +48,19 @@ bool SVGTests::hasExtension(const String&)
return false;
}
-bool SVGTests::isValid() const
+bool SVGTests::isValid(Document& document) const
{
if (m_requiredFeatures->isSpecified()) {
const Vector<String>& requiredFeatures = m_requiredFeatures->value()->values();
Vector<String>::const_iterator it = requiredFeatures.begin();
Vector<String>::const_iterator itEnd = requiredFeatures.end();
for (; it != itEnd; ++it) {
- if (it->isEmpty() || !DOMImplementation::hasFeature(*it, String()))
+ if (it->isEmpty())
return false;
+ if (!DOMImplementation::hasFeature(*it, String())) {
+ UseCounter::count(document, UseCounter::DOMImplementationHasFeatureReturnFalseInternal);
+ return false;
+ }
}
}
« no previous file with comments | « Source/core/svg/SVGTests.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698