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

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: Update histograms.xml 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..75b4f479fd54f678acdf8c71d6480ab6bd369c11 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -701,16 +701,20 @@ 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);
return;
}
+ UseCounter::count(document(), UseCounter::SVGSVGElementFragment);
fs 2015/11/26 13:30:23 IIRC, this method still gets called when there's n
davve 2015/11/26 13:35:37 I only found one call-site, FrameView::processUrlF
fs 2015/11/26 13:38:36 Yes, in processUrlFragment we have: // If our
davve 2015/11/26 13:43:20 Ouch, a !m_frame->document()->isSVGDocument() ther
+
// Spec: If the SVG fragment identifier addresses a 'view' element within an SVG document (e.g., MyDrawing.svg#MyView
// or MyDrawing.svg#xpointer(id('MyView'))) then the closest ancestor 'svg' element is displayed in the viewport.
// Any view specification attributes included on the given 'view' element override the corresponding view specification
« 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