Chromium Code Reviews| 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 |