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

Unified Diff: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp

Issue 1471963007: Count usage of #svgView(...) and plain SVG <view> targets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing expected file Created 5 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 | « 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/svg/SVGSVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index ebcd2f6c5e610bcfdd5b7d26d8d122dd004cb891..d28b4b6165294a04c9f70fa229dd5e064dfe76f0 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -701,10 +701,12 @@ void SVGSVGElement::setupInitialView(const String& fragmentIdentifier, Element*
view->inheritViewAttributesFromElement(this);
- if (view->parseViewSpec(fragmentIdentifier))
+ if (view->parseViewSpec(fragmentIdentifier)) {
+ UseCounter::count(document(), UseCounter::SVGSVGElementFragmentSVGView);
m_useCurrentView = true;
- else
+ } else {
view->reset();
+ }
if (layoutObject && (hadUseCurrentView || m_useCurrentView))
markForLayoutAndParentResourceInvalidation(layoutObject);
@@ -745,6 +747,7 @@ void SVGSVGElement::inheritViewAttributes(SVGViewElement* viewElement)
{
SVGViewSpec* view = currentView();
m_useCurrentView = true;
+ UseCounter::count(document(), UseCounter::SVGSVGElementFragmentSVGViewElement);
view->inheritViewAttributesFromElement(this);
view->inheritViewAttributesFromElement(viewElement);
}
« 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