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

Unified Diff: Source/core/svg/graphics/SVGImage.cpp

Issue 805743003: Add UseCounter for SMIL animation in image. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: move to SVGImage::dataChanged instead Created 6 years 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/frame/UseCounter.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/graphics/SVGImage.cpp
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index ad41c4869b097d7c5af06458bd72018f4fb87f07..dbbde30203e75fc51893e8ca4b6b3b8cd8486f6d 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -430,6 +430,11 @@ bool SVGImage::dataChanged(bool allDataReceived)
TRACE_EVENT0("blink", "SVGImage::dataChanged::load");
loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data(), AtomicString("image/svg+xml", AtomicString::ConstructFromLiteral),
AtomicString("UTF-8", AtomicString::ConstructFromLiteral), KURL(), ForceSynchronousLoad)));
+
+ SVGSVGElement* rootElement = svgRootElement(m_page.get());
+ if (rootElement && rootElement->timeContainer()->hasAnimations())
+ UseCounter::count(frame->document(), UseCounter::SVGSMILAnimationInImage);
+
// Set the intrinsic size before a container size is available.
m_intrinsicSize = containerSize();
}
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698