CSSPropertyAnimation::ensurePropertyMap() is large
https://bugs.webkit.org/show_bug.cgi?id=121199
Reviewed by Darin Adler.
The bug was caused by repeated calls to Vector::append. Avoid it by storing pointers in a local array
and then adding them as we traverse them through to fill m_propertyToIdMap. Also reserve the full
initial capacity at once to avoid repeated calls to FastMalloc and FastFree.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::instance):
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty):
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex):
(WebCore::CSSPropertyAnimationWrapperMap::indexFromPropertyID):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Renamed from ensurePropertyMap.
Also merged addShorthandProperties into it since they have to access local variables of the other.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155743
268f45cc-cd09-0410-ab3c-
d52691b4dbfc