Changeset 123837 in webkit


Ignore:
Timestamp:
Jul 26, 2012 9:32:08 PM (12 years ago)
Author:
mikelawther@chromium.org
Message:

Make transitions work between different Length types
https://bugs.webkit.org/show_bug.cgi?id=92220

Reviewed by Simon Fraser.

Source/WebCore:

Use the existing CSS calc machinery for blending between two calculations
to blend between two Lengths of differing types.

Test: transitions/mixed-type.html

  • platform/Length.cpp:

(WebCore::Length::blendMixedTypes):

  • platform/Length.h:

(WebCore::Length::blend):
(Length):

LayoutTests:

  • transitions/mixed-type-expected.txt: Added.
  • transitions/mixed-type.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r123836 r123837  
     12012-07-26  Mike Lawther  <mikelawther@chromium.org>
     2
     3        Make transitions work between different Length types
     4        https://bugs.webkit.org/show_bug.cgi?id=92220
     5
     6        Reviewed by Simon Fraser.
     7
     8        * transitions/mixed-type-expected.txt: Added.
     9        * transitions/mixed-type.html: Added.
     10
    1112012-07-26  Yoshifumi Inoue  <yosin@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r123835 r123837  
     12012-07-26  Mike Lawther  <mikelawther@chromium.org>
     2
     3        Make transitions work between different Length types
     4        https://bugs.webkit.org/show_bug.cgi?id=92220
     5
     6        Reviewed by Simon Fraser.
     7
     8        Use the existing CSS calc machinery for blending between two calculations
     9        to blend between two Lengths of differing types.
     10
     11        Test: transitions/mixed-type.html
     12
     13        * platform/Length.cpp:
     14        (WebCore::Length::blendMixedTypes):
     15        * platform/Length.h:
     16        (WebCore::Length::blend):
     17        (Length):
     18
    1192012-07-26  Dan Bernstein  <mitz@apple.com>
    220
  • trunk/Source/WebCore/platform/Length.cpp

    r123419 r123837  
    203203}
    204204       
    205 Length Length::blendCalculation(const Length& from, double progress) const
     205Length Length::blendMixedTypes(const Length& from, double progress) const
    206206{
    207207    if (progress <= 0.0)
  • trunk/Source/WebCore/platform/Length.h

    r121351 r123837  
    232232        // Blend two lengths to produce a new length that is in between them.  Used for animation.
    233233        if (from.type() == Calculated || type() == Calculated)
    234             return blendCalculation(from, progress);
     234            return blendMixedTypes(from, progress);
    235235       
    236236        if (!from.isZero() && !isZero() && from.type() != type())
    237             return *this;
     237            return blendMixedTypes(from, progress);
    238238
    239239        if (from.isZero() && isZero())
     
    293293    }
    294294
    295     Length blendCalculation(const Length& from, double progress) const;
     295    Length blendMixedTypes(const Length& from, double progress) const;
    296296
    297297    int calculationHandle() const
Note: See TracChangeset for help on using the changeset viewer.