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

Unified Diff: third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp

Issue 1438043012: Avoid int coercion of box-shadow args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp b/third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp
index fc1c64856c8bcca7584a393d12c788f95f820a97..7c16dc9a90c3e788fe36440b562ef4d324e9cdf5 100644
--- a/third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DrawLooperBuilder.cpp
@@ -67,9 +67,7 @@ void DrawLooperBuilder::addUnmodifiedContent()
void DrawLooperBuilder::addShadow(const FloatSize& offset, float blur, const Color& color,
ShadowTransformMode shadowTransformMode, ShadowAlphaMode shadowAlphaMode)
{
- // Negative blurs are not allowed, so just pin the value to 0
- if (blur < 0)
- blur = 0;
+ ASSERT(blur >= 0);
Justin Novosad 2015/11/16 23:07:19 Did a bit of digging... I find it hard to prove wi
f(malita) 2015/11/17 13:55:23 I can't spot the place where it gets sanitized eit
Justin Novosad 2015/11/17 14:19:03 This code is also used by 2d canvas, svg, and the
// Detect when there's no effective shadow.
if (!color.alpha())

Powered by Google App Engine
This is Rietveld 408576698