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

Unified Diff: Source/core/dom/DOMImplementation.cpp

Issue 141363002: Count DOMImplementation.hasFeature usage and cases where it returns false (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 11 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 | « Source/core/dom/DOMImplementation.h ('k') | Source/core/dom/DOMImplementation.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMImplementation.cpp
diff --git a/Source/core/dom/DOMImplementation.cpp b/Source/core/dom/DOMImplementation.cpp
index cbd66aabd8afd88fc2da30bc36285b5ec092b27c..e85a2d044a6ecc3e03a501f44f19566a13c8bde0 100644
--- a/Source/core/dom/DOMImplementation.cpp
+++ b/Source/core/dom/DOMImplementation.cpp
@@ -46,6 +46,7 @@
#include "core/html/TextDocument.h"
#include "core/loader/FrameLoader.h"
#include "core/frame/Frame.h"
+#include "core/frame/UseCounter.h"
#include "core/page/Page.h"
#include "core/svg/SVGDocument.h"
#include "platform/ContentType.h"
@@ -177,6 +178,15 @@ bool DOMImplementation::hasFeature(const String& feature, const String& version)
return true;
}
+bool DOMImplementation::hasFeatureForBindings(const String& feature, const String& version)
+{
+ if (!hasFeature(feature, version)) {
+ UseCounter::count(m_document, UseCounter::DOMImplementationHasFeatureReturnFalse);
+ return false;
+ }
+ return true;
+}
+
PassRefPtr<DocumentType> DOMImplementation::createDocumentType(const AtomicString& qualifiedName,
const String& publicId, const String& systemId, ExceptionState& exceptionState)
{
« no previous file with comments | « Source/core/dom/DOMImplementation.h ('k') | Source/core/dom/DOMImplementation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698