Changeset 187461 in webkit


Ignore:
Timestamp:
Jul 27, 2015 4:25:01 PM (9 years ago)
Author:
Simon Fraser
Message:

Rename AnimationBase::isTransformFunctionListValid()
https://bugs.webkit.org/show_bug.cgi?id=147334

Reviewed by Sam Weinig.

isTransformFunctionListValid() was a confusing name for this state. It's true
when the transform function lists for an animation or transition are matched,
so rename it to transformFunctionListsMatch().

No behavior change.

  • page/animation/AnimationBase.h:

(WebCore::AnimationBase::transformFunctionListsMatch):
(WebCore::AnimationBase::isTransformFunctionListValid): Deleted.

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • page/animation/ImplicitAnimation.cpp:

(WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
(WebCore::ImplicitAnimation::validateTransformFunctionList):

  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
(WebCore::KeyframeAnimation::validateTransformFunctionList):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r187458 r187461  
     12015-07-27  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Rename AnimationBase::isTransformFunctionListValid()
     4        https://bugs.webkit.org/show_bug.cgi?id=147334
     5
     6        Reviewed by Sam Weinig.
     7       
     8        isTransformFunctionListValid() was a confusing name for this state. It's true
     9        when the transform function lists for an animation or transition are matched,
     10        so rename it to transformFunctionListsMatch().
     11
     12        No behavior change.
     13
     14        * page/animation/AnimationBase.h:
     15        (WebCore::AnimationBase::transformFunctionListsMatch):
     16        (WebCore::AnimationBase::isTransformFunctionListValid): Deleted.
     17        * page/animation/CSSPropertyAnimation.cpp:
     18        (WebCore::blendFunc):
     19        * page/animation/ImplicitAnimation.cpp:
     20        (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
     21        (WebCore::ImplicitAnimation::validateTransformFunctionList):
     22        * page/animation/KeyframeAnimation.cpp:
     23        (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
     24        (WebCore::KeyframeAnimation::validateTransformFunctionList):
     25
    1262015-07-27  Alex Christensen  <achristensen@webkit.org>
    227
  • trunk/Source/WebCore/page/animation/AnimationBase.h

    r185097 r187461  
    186186    }
    187187
    188     // FIXME: rename this using the "lists match" terminology.
    189     bool isTransformFunctionListValid() const { return m_transformFunctionListValid; }
     188    bool transformFunctionListsMatch() const { return m_transformFunctionListsMatch; }
    190189    bool filterFunctionListsMatch() const { return m_filterFunctionListsMatch; }
    191190#if ENABLE(FILTERS_LEVEL_2)
     
    257256    AnimationState m_animationState { AnimationState::New };
    258257    bool m_isAccelerated { false };
    259     bool m_transformFunctionListValid { false };
     258    bool m_transformFunctionListsMatch { false };
    260259    bool m_filterFunctionListsMatch { false };
    261260#if ENABLE(FILTERS_LEVEL_2)
  • trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp

    r186391 r187461  
    117117static inline TransformOperations blendFunc(const AnimationBase* animation, const TransformOperations& from, const TransformOperations& to, double progress)
    118118{
    119     if (animation->isTransformFunctionListValid())
     119    if (animation->transformFunctionListsMatch())
    120120        return to.blendByMatchingOperations(from, progress);
    121121    return to.blendByUsingMatrixInterpolation(from, progress, is<RenderBox>(*animation->renderer()) ? downcast<RenderBox>(*animation->renderer()).borderBoxRect().size() : LayoutSize());
  • trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp

    r184908 r187461  
    119119    LayoutRect endBounds = bounds;
    120120
    121     if (isTransformFunctionListValid()) {
     121    if (transformFunctionListsMatch()) {
    122122        if (!computeTransformedExtentViaTransformList(rendererBox, *m_fromStyle, startBounds))
    123123            return false;
     
    261261void ImplicitAnimation::validateTransformFunctionList()
    262262{
    263     m_transformFunctionListValid = false;
     263    m_transformFunctionListsMatch = false;
    264264   
    265265    if (!m_fromStyle || !m_toStyle)
     
    280280
    281281    // Transform lists match.
    282     m_transformFunctionListValid = true;
     282    m_transformFunctionListsMatch = true;
    283283}
    284284
  • trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp

    r187121 r187461  
    231231       
    232232        bool canCompute;
    233         if (isTransformFunctionListValid())
     233        if (transformFunctionListsMatch())
    234234            canCompute = computeTransformedExtentViaTransformList(rendererBox, *keyframe.style(), keyframeBounds);
    235235        else
     
    365365void KeyframeAnimation::validateTransformFunctionList()
    366366{
    367     m_transformFunctionListValid = false;
     367    m_transformFunctionListsMatch = false;
    368368   
    369369    if (m_keyframes.size() < 2 || !m_keyframes.containsProperty(CSSPropertyTransform))
     
    400400    }
    401401
    402     // Keyframes are valid
    403     m_transformFunctionListValid = true;
     402    m_transformFunctionListsMatch = true;
    404403}
    405404
Note: See TracChangeset for help on using the changeset viewer.