REGRESSION (r105401-105403): Blue flash on css border transition
[WebKit.git] / Source / WebCore / platform / animation / AnimationUtilities.h
index aebca46..87dabe6 100644 (file)
@@ -37,7 +37,7 @@ inline int blend(int from, int to, double progress)
 
 inline unsigned blend(unsigned from, unsigned to, double progress)
 {
-    return static_cast<unsigned>(lround(static_cast<double>(from) + static_cast<double>(to - from) * progress));
+    return static_cast<unsigned>(lround(to > from ? static_cast<double>(from) + static_cast<double>(to - from) * progress : static_cast<double>(from) - static_cast<double>(from - to) * progress));
 }
 
 inline double blend(double from, double to, double progress)