Changeset 106672 in webkit


Ignore:
Timestamp:
Feb 3, 2012 10:21:22 AM (12 years ago)
Author:
alexis.menard@openbossa.org
Message:

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.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106671 r106672  
     12012-02-03  Alexis Menard  <alexis.menard@openbossa.org>
     2
     3        REGRESSION (r105401-105403): Blue flash on css border transition
     4        https://bugs.webkit.org/show_bug.cgi?id=77491
     5
     6        Reviewed by Simon Fraser.
     7
     8        * animations/animation-border-overflow-expected.txt: Added.
     9        * animations/animation-border-overflow.html: Added.
     10
    1112012-02-03  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r106670 r106672  
     12012-02-03  Alexis Menard  <alexis.menard@openbossa.org>
     2
     3        REGRESSION (r105401-105403): Blue flash on css border transition
     4        https://bugs.webkit.org/show_bug.cgi?id=77491
     5
     6        Reviewed by Simon Fraser.
     7
     8        The new blend function added with r105403 takes unsigned as parameters therefore
     9        we have to be careful to not overflow in case the to is less than from (animating
     10        from 400 to 0 for example).
     11
     12        Test: animations/animation-border-overflow.html
     13
     14        * platform/animation/AnimationUtilities.h:
     15        (WebCore::blend):
     16
    1172012-02-03  Justin Novosad  <junov@chromium.org>
    218
  • trunk/Source/WebCore/platform/animation/AnimationUtilities.h

    r105403 r106672  
    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.