Title: [291047] trunk/Source/WebCore
- Revision
- 291047
- Author
- [email protected]
- Date
- 2022-03-09 05:44:20 -0800 (Wed, 09 Mar 2022)
Log Message
[web-animations] increase the max number of animatable properties
https://bugs.webkit.org/show_bug.cgi?id=237651
Reviewed by Antti Koivisto.
We've run out of space in m_propertyToIdMap, the limit was 255.
* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (291046 => 291047)
--- trunk/Source/WebCore/ChangeLog 2022-03-09 13:34:33 UTC (rev 291046)
+++ trunk/Source/WebCore/ChangeLog 2022-03-09 13:44:20 UTC (rev 291047)
@@ -1,3 +1,15 @@
+2022-03-09 Antoine Quint <[email protected]>
+
+ [web-animations] increase the max number of animatable properties
+ https://bugs.webkit.org/show_bug.cgi?id=237651
+
+ Reviewed by Antti Koivisto.
+
+ We've run out of space in m_propertyToIdMap, the limit was 255.
+
+ * animation/CSSPropertyAnimation.cpp:
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+
2022-03-09 Antti Koivisto <[email protected]>
[CSS Container Queries] Remove size() function syntax
Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (291046 => 291047)
--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-03-09 13:34:33 UTC (rev 291046)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-03-09 13:44:20 UTC (rev 291047)
@@ -2550,15 +2550,15 @@
CSSPropertyAnimationWrapperMap();
~CSSPropertyAnimationWrapperMap() = delete;
- unsigned char& indexFromPropertyID(CSSPropertyID propertyID)
+ unsigned short& indexFromPropertyID(CSSPropertyID propertyID)
{
return m_propertyToIdMap[propertyID - firstCSSProperty];
}
Vector<std::unique_ptr<AnimationPropertyWrapperBase>> m_propertyWrappers;
- unsigned char m_propertyToIdMap[numCSSProperties];
+ unsigned short m_propertyToIdMap[numCSSProperties];
- static const unsigned char cInvalidPropertyWrapperIndex = UCHAR_MAX;
+ static const unsigned short cInvalidPropertyWrapperIndex = std::numeric_limits<unsigned short>::max();
friend class WTF::NeverDestroyed<CSSPropertyAnimationWrapperMap>;
};
@@ -2893,7 +2893,7 @@
for (int i = 0; i < numCSSProperties; ++i)
m_propertyToIdMap[i] = cInvalidPropertyWrapperIndex;
- COMPILE_ASSERT(animatableLonghandPropertiesCount + animatableShorthandPropertiesCount < UCHAR_MAX, numberOfAnimatablePropertiesMustBeLessThanUCharMax);
+ COMPILE_ASSERT(animatableLonghandPropertiesCount + animatableShorthandPropertiesCount < std::numeric_limits<unsigned short>::max(), numberOfAnimatablePropertiesMustBeLessThanUShrtMax);
m_propertyWrappers.reserveInitialCapacity(animatableLonghandPropertiesCount + animatableShorthandPropertiesCount);
// First we put the non-shorthand property wrappers into the map, so the shorthand-building
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes