Ignore:
Timestamp:
Jan 7, 2022, 10:48:40 AM (3 years ago)
Author:
[email protected]
Message:

Expose iterators on AnimationList
https://bugs.webkit.org/show_bug.cgi?id=234957

Reviewed by Antti Koivisto.

  • animation/WebAnimationUtilities.cpp:

(WebCore::compareCSSAnimations):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueListForAnimationOrTransitionProperty):
(WebCore::animationShorthandValue):

  • css/makeprop.pl:

(generateAnimationPropertyInitialValueSetter):

  • platform/animation/AnimationList.h:

(WebCore::AnimationList::begin const):
(WebCore::AnimationList::end const):
(WebCore::AnimationList::rbegin const):
(WebCore::AnimationList::rend const):

  • style/Styleable.cpp:

(WebCore::Styleable::updateCSSAnimations const):
(WebCore::compileTransitionPropertiesInStyle):
(WebCore::updateCSSTransitionsForStyleableAndProperty):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r287712 r287762  
    14751475    auto list = CSSValueList::createCommaSeparated();
    14761476    if (animationList) {
    1477         for (size_t i = 0; i < animationList->size(); ++i)
    1478             ComputedStyleExtractor::addValueForAnimationPropertyToList(list.get(), property, &animationList->animation(i));
     1477        for (const auto& animation : *animationList)
     1478            ComputedStyleExtractor::addValueForAnimationPropertyToList(list.get(), property, animation.ptr());
    14791479    } else
    14801480        ComputedStyleExtractor::addValueForAnimationPropertyToList(list.get(), property, nullptr);
     
    14861486    auto parentList = CSSValueList::createCommaSeparated();
    14871487    if (animationList) {
    1488         for (size_t i = 0; i < animationList->size(); ++i) {
    1489             const auto& animation = animationList->animation(i);
     1488        for (const auto& animation : *animationList) {
    14901489            auto childList = CSSValueList::createSpaceSeparated();
    14911490            for (auto longhand : shorthandForProperty(property))
    1492                 ComputedStyleExtractor::addValueForAnimationPropertyToList(childList.get(), longhand, &animation);
     1491                ComputedStyleExtractor::addValueForAnimationPropertyToList(childList.get(), longhand, animation.ptr());
    14931492            parentList->append(childList);
    14941493        }
Note: See TracChangeset for help on using the changeset viewer.