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

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

Issue 1890613002: Support createImageBitmap from a SVG image (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 8 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 | « third_party/WebKit/Source/core/svg/graphics/SVGImage.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
index 1e2a4d913e4257302da47d10620e9cddfa12c8b6..5a98371c294ec28d9d6d2d7f33e14781d6089124 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -168,6 +168,11 @@ static float resolveHeightForRatio(float width, const FloatSize& intrinsicRatio)
return width * intrinsicRatio.height() / intrinsicRatio.width();
}
+bool SVGImage::hasIntrinsicDimensions() const
+{
+ return !concreteObjectSize(FloatSize()).isEmpty();
+}
+
FloatSize SVGImage::concreteObjectSize(const FloatSize& defaultObjectSize) const
{
SVGSVGElement* svg = svgRootElement(m_page.get());
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/SVGImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698