- cssPropertyMap.set(alignment_baselineAttr, AnimatedString);
- cssPropertyMap.set(baseline_shiftAttr, AnimatedString);
- cssPropertyMap.set(buffered_renderingAttr, AnimatedString);
- cssPropertyMap.set(clipAttr, AnimatedRect);
- cssPropertyMap.set(clip_pathAttr, AnimatedString);
- cssPropertyMap.set(clip_ruleAttr, AnimatedString);
- cssPropertyMap.set(SVGNames::colorAttr, AnimatedColor);
- cssPropertyMap.set(color_interpolationAttr, AnimatedString);
- cssPropertyMap.set(color_interpolation_filtersAttr, AnimatedString);
- cssPropertyMap.set(color_renderingAttr, AnimatedString);
- cssPropertyMap.set(cursorAttr, AnimatedString);
- cssPropertyMap.set(displayAttr, AnimatedString);
- cssPropertyMap.set(dominant_baselineAttr, AnimatedString);
- cssPropertyMap.set(fillAttr, AnimatedColor);
- cssPropertyMap.set(fill_opacityAttr, AnimatedNumber);
- cssPropertyMap.set(fill_ruleAttr, AnimatedString);
- cssPropertyMap.set(filterAttr, AnimatedString);
- cssPropertyMap.set(flood_colorAttr, AnimatedColor);
- cssPropertyMap.set(flood_opacityAttr, AnimatedNumber);
- cssPropertyMap.set(font_familyAttr, AnimatedString);
- cssPropertyMap.set(font_sizeAttr, AnimatedLength);
- cssPropertyMap.set(font_stretchAttr, AnimatedString);
- cssPropertyMap.set(font_styleAttr, AnimatedString);
- cssPropertyMap.set(font_variantAttr, AnimatedString);
- cssPropertyMap.set(font_weightAttr, AnimatedString);
- cssPropertyMap.set(image_renderingAttr, AnimatedString);
- cssPropertyMap.set(letter_spacingAttr, AnimatedLength);
- cssPropertyMap.set(lighting_colorAttr, AnimatedColor);
- cssPropertyMap.set(marker_endAttr, AnimatedString);
- cssPropertyMap.set(marker_midAttr, AnimatedString);
- cssPropertyMap.set(marker_startAttr, AnimatedString);
- cssPropertyMap.set(maskAttr, AnimatedString);
- cssPropertyMap.set(mask_typeAttr, AnimatedString);
- cssPropertyMap.set(opacityAttr, AnimatedNumber);
- cssPropertyMap.set(overflowAttr, AnimatedString);
- cssPropertyMap.set(paint_orderAttr, AnimatedString);
- cssPropertyMap.set(pointer_eventsAttr, AnimatedString);
- cssPropertyMap.set(shape_renderingAttr, AnimatedString);
- cssPropertyMap.set(stop_colorAttr, AnimatedColor);
- cssPropertyMap.set(stop_opacityAttr, AnimatedNumber);
- cssPropertyMap.set(strokeAttr, AnimatedColor);
- cssPropertyMap.set(stroke_dasharrayAttr, AnimatedLengthList);
- cssPropertyMap.set(stroke_dashoffsetAttr, AnimatedLength);
- cssPropertyMap.set(stroke_linecapAttr, AnimatedString);
- cssPropertyMap.set(stroke_linejoinAttr, AnimatedString);
- cssPropertyMap.set(stroke_miterlimitAttr, AnimatedNumber);
- cssPropertyMap.set(stroke_opacityAttr, AnimatedNumber);
- cssPropertyMap.set(stroke_widthAttr, AnimatedLength);
- cssPropertyMap.set(text_anchorAttr, AnimatedString);
- cssPropertyMap.set(text_decorationAttr, AnimatedString);
- cssPropertyMap.set(text_renderingAttr, AnimatedString);
- cssPropertyMap.set(vector_effectAttr, AnimatedString);
- cssPropertyMap.set(visibilityAttr, AnimatedString);
- cssPropertyMap.set(word_spacingAttr, AnimatedLength);
+ struct AttrToTypeEntry {
+ const QualifiedName& attr;
+ const AnimatedPropertyType propType;
+ };
+ const AttrToTypeEntry attrToTypes[] = {
+ { alignment_baselineAttr, AnimatedString },
+ { baseline_shiftAttr, AnimatedString },
+ { buffered_renderingAttr, AnimatedString },
+ { clip_pathAttr, AnimatedString },
+ { clip_ruleAttr, AnimatedString },
+ { SVGNames::colorAttr, AnimatedColor },
+ { color_interpolationAttr, AnimatedString },
+ { color_interpolation_filtersAttr, AnimatedString },
+ { color_renderingAttr, AnimatedString },
+ { cursorAttr, AnimatedString },
+ { displayAttr, AnimatedString },
+ { dominant_baselineAttr, AnimatedString },
+ { fillAttr, AnimatedColor },
+ { fill_opacityAttr, AnimatedNumber },
+ { fill_ruleAttr, AnimatedString },
+ { filterAttr, AnimatedString },
+ { flood_colorAttr, AnimatedColor },
+ { flood_opacityAttr, AnimatedNumber },
+ { font_familyAttr, AnimatedString },
+ { font_sizeAttr, AnimatedLength },
+ { font_stretchAttr, AnimatedString },
+ { font_styleAttr, AnimatedString },
+ { font_variantAttr, AnimatedString },
+ { font_weightAttr, AnimatedString },
+ { image_renderingAttr, AnimatedString },
+ { letter_spacingAttr, AnimatedLength },
+ { lighting_colorAttr, AnimatedColor },
+ { marker_endAttr, AnimatedString },
+ { marker_midAttr, AnimatedString },
+ { marker_startAttr, AnimatedString },
+ { maskAttr, AnimatedString },
+ { mask_typeAttr, AnimatedString },
+ { opacityAttr, AnimatedNumber },
+ { overflowAttr, AnimatedString },
+ { paint_orderAttr, AnimatedString },
+ { pointer_eventsAttr, AnimatedString },
+ { shape_renderingAttr, AnimatedString },
+ { stop_colorAttr, AnimatedColor },
+ { stop_opacityAttr, AnimatedNumber },
+ { strokeAttr, AnimatedColor },
+ { stroke_dasharrayAttr, AnimatedLengthList },
+ { stroke_dashoffsetAttr, AnimatedLength },
+ { stroke_linecapAttr, AnimatedString },
+ { stroke_linejoinAttr, AnimatedString },
+ { stroke_miterlimitAttr, AnimatedNumber },
+ { stroke_opacityAttr, AnimatedNumber },
+ { stroke_widthAttr, AnimatedLength },
+ { text_anchorAttr, AnimatedString },
+ { text_decorationAttr, AnimatedString },
+ { text_renderingAttr, AnimatedString },
+ { vector_effectAttr, AnimatedString },
+ { visibilityAttr, AnimatedString },
+ { word_spacingAttr, AnimatedLength },
+ };
+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(attrToTypes); i++)
+ cssPropertyMap.set(attrToTypes[i].attr, attrToTypes[i].propType);