⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 106718 in webkit


Ignore:
Timestamp:
Feb 3, 2012, 5:30:43 PM (15 years ago)
Author:
vangelis@chromium.org
Message:

Merge 106672 - REGRESSION (r105401-105403): Blue flash on css border transition
https://bugs.webkit.org/show_bug.cgi?id=77491

Reviewed by Simon Fraser.

Source/WebCore:

The new blend function added with r105403 takes unsigned as parameters therefore
we have to be careful to not overflow in case the to is less than from (animating
from 400 to 0 for example).

Test: animations/animation-border-overflow.html

  • platform/animation/AnimationUtilities.h:

(WebCore::blend):

LayoutTests:

  • animations/animation-border-overflow-expected.txt: Added.
  • animations/animation-border-overflow.html: Added.

TBR=alexis.menard@openbossa.org
Review URL: https://chromiumcodereview.appspot.com/9328025

Location:
branches/chromium/1025
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/chromium/1025/Source/WebCore/platform/animation/AnimationUtilities.h

    r105403 r106718  
    3838inline unsigned blend(unsigned from, unsigned to, double progress)
    3939{
    40     return static_cast<unsigned>(lround(static_cast<double>(from) + static_cast<double>(to - from) * progress));
     40    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));
    4141}
    4242
Note: See TracChangeset for help on using the changeset viewer.