Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Encapsulate globals in CSSPropertyAnimation.cpp
https://bugs.webkit.org/show_bug.cgi?id=121205 Reviewed by Antti Koivisto. Encapsulated the globals inside a newly added CSSPropertyAnimationWrapperMap. Also removed the circular dependency from ShorthandPropertyWrapper's constructor to CSSPropertyAnimationWrapperMap::instance(). The circular dependency still exists in ensurePropertyMap but I'm going to remove it in the bug 121199. * page/animation/CSSPropertyAnimation.cpp: (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Takes a Vector of longhand wrappers instead of calling wrapperForProperty in the middle of constructing the very table. This circular dependency is now encapsulated in CSSPropertyAnimationWrapperMap::ensurePropertyMap. (WebCore::CSSPropertyAnimationWrapperMap::instance): Added. (WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty): Renamed from WebCore::wrapperForProperty. (WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex): Added. (WebCore::CSSPropertyAnimationWrapperMap::size): Added. (WebCore::CSSPropertyAnimationWrapperMap::addPropertyWrapper): Renamed from WebCore::addPropertyWrapper. Also cleaned up boolean logics to use early exits instead of nested ifs. (WebCore::CSSPropertyAnimationWrapperMap::addShorthandProperties): Renamed from WebCore::addShorthandProperties. (WebCore::CSSPropertyAnimationWrapperMap::ensurePropertyMap): Renamed from WebCore::ensurePropertyMap. Added an alias gPropertyWrappers for m_propertyWrappers; this aliasing will be removed in the bug 121199. (WebCore::CSSPropertyAnimation::blendProperties): (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated): (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty): (WebCore::CSSPropertyAnimation::propertiesEqual): (WebCore::CSSPropertyAnimation::getPropertyAtIndex): (WebCore::CSSPropertyAnimation::getNumProperties): * page/animation/CSSPropertyAnimation.h: * rendering/style/RenderStyle.h: Canonical link: https://commits.webkit.org/139204@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
4 changed files
with
123 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters