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

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: mac theme update, subpixel test 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);
// Detect when there's no effective shadow.
if (!color.alpha())
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainterMac.mm ('k') | third_party/WebKit/Source/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698