Changeset 205659 in webkit


Ignore:
Timestamp:
Sep 8, 2016 1:54:24 PM (8 years ago)
Author:
Simon Fraser
Message:

Don't run transitions to or from undefined Lengths
https://bugs.webkit.org/show_bug.cgi?id=161750
rdar://problem/28170460

Reviewed by Zalan Bujtas.

Source/WebCore:

For properties like max-height whose default value is 'none', we would erroneously
attempt to run transitions/animations, and then assert when one of the endpoints
was undefined.

So don't attempt to blend such Length values, just as do when they are auto.

Fixes some transitions on apple.com and developer.apple.com.

Test: transitions/transition-to-from-undefined.html

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimation::blendProperties):

  • platform/Length.cpp:

(WebCore::blend):

LayoutTests:

  • transitions/transition-to-from-undefined-expected.txt: Added.
  • transitions/transition-to-from-undefined.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205657 r205659  
     12016-09-08  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Don't run transitions to or from undefined Lengths
     4        https://bugs.webkit.org/show_bug.cgi?id=161750
     5        rdar://problem/28170460
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * transitions/transition-to-from-undefined-expected.txt: Added.
     10        * transitions/transition-to-from-undefined.html: Added.
     11
    1122016-09-08  Myles C. Maxfield  <mmaxfield@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r205657 r205659  
     12016-09-08  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Don't run transitions to or from undefined Lengths
     4        https://bugs.webkit.org/show_bug.cgi?id=161750
     5        rdar://problem/28170460
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        For properties like max-height whose default value is 'none', we would erroneously
     10        attempt to run transitions/animations, and then assert when one of the endpoints
     11        was undefined.
     12
     13        So don't attempt to blend such Length values, just as do when they are auto.
     14
     15        Fixes some transitions on apple.com and developer.apple.com.
     16
     17        Test: transitions/transition-to-from-undefined.html
     18
     19        * page/animation/CSSPropertyAnimation.cpp:
     20        (WebCore::CSSPropertyAnimation::blendProperties):
     21        * platform/Length.cpp:
     22        (WebCore::blend):
     23
    1242016-09-08  Myles C. Maxfield  <mmaxfield@apple.com>
    225
  • trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp

    r205181 r205659  
    15481548    AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
    15491549    if (wrapper) {
    1550         wrapper->blend(anim, dst, a, b, progress);
    15511550#if !LOG_DISABLED
    15521551        wrapper->logBlend(a, b, dst, progress);
    15531552#endif
     1553        wrapper->blend(anim, dst, a, b, progress);
    15541554        return !wrapper->animationIsAccelerated() || !anim->isAccelerated();
    15551555    }
  • trunk/Source/WebCore/platform/Length.cpp

    r200622 r205659  
    299299Length blend(const Length& from, const Length& to, double progress)
    300300{
    301     if (from.isAuto() || to.isAuto())
     301    if (from.isAuto() || from.isUndefined() || to.isAuto() || to.isUndefined())
    302302        return to;
    303303
Note: See TracChangeset for help on using the changeset viewer.