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

Unified Diff: Source/core/svg/SVGLengthContext.cpp

Issue 1083083005: Avoid ASSERT_NOT_REACHED in blink::floatValueForLength. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGLengthContext.cpp
diff --git a/Source/core/svg/SVGLengthContext.cpp b/Source/core/svg/SVGLengthContext.cpp
index 22c7d580dce1f7b6ad11b329d4f800c804024fa3..cbbbc4ccb11222e305bf87f1fab896dd11c8c648 100644
--- a/Source/core/svg/SVGLengthContext.cpp
+++ b/Source/core/svg/SVGLengthContext.cpp
@@ -176,6 +176,10 @@ float SVGLengthContext::valueForLength(const Length& length, const ComputedStyle
float SVGLengthContext::valueForLength(const Length& length, float zoom, float dimension)
{
ASSERT(zoom != 0);
+ // isIntrinsic can occur for 'width' and 'height', but has no
+ // real meaning for svg.
+ if (length.isIntrinsic())
+ return 0;
return floatValueForLength(length, dimension * zoom) / zoom;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698