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

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

Issue 24071003: Add toSVGImage fuction, and use it as much as we can. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/rendering/RenderImage.cpp ('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.h
diff --git a/Source/core/svg/graphics/SVGImage.h b/Source/core/svg/graphics/SVGImage.h
index aa5aaebd417556097ea99b0be88295afc6b82951..b75dd70e29e7640c280a63b9b1c680dac7d2ace0 100644
--- a/Source/core/svg/graphics/SVGImage.h
+++ b/Source/core/svg/graphics/SVGImage.h
@@ -102,6 +102,12 @@ private:
IntSize m_intrinsicSize;
};
+inline SVGImage* toSVGImage(Image* image)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!image || image->isSVGImage());
+ return static_cast<SVGImage*>(image);
+}
+
class ImageObserverDisabler {
WTF_MAKE_NONCOPYABLE(ImageObserverDisabler);
public:
« no previous file with comments | « Source/core/rendering/RenderImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698