Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector<StylePropertyShorthand> matchingShorthandsForLonghand(CSSPropertyID propertyID)
- {
- switch (propertyID) {
- case CSSPropertyWebkitAnimationDelay:
- case CSSPropertyWebkitAnimationDirection:
- case CSSPropertyWebkitAnimationDuration:
- case CSSPropertyWebkitAnimationFillMode:
- case CSSPropertyWebkitAnimationIterationCount:
- case CSSPropertyWebkitAnimationName:
- case CSSPropertyWebkitAnimationTimingFunction:
- return Vector<StylePropertyShorthand>{webkitAnimationShorthand()};
- case CSSPropertyWebkitBorderAfterColor:
- case CSSPropertyWebkitBorderAfterStyle:
- case CSSPropertyWebkitBorderAfterWidth:
- return Vector<StylePropertyShorthand>{webkitBorderAfterShorthand()};
- case CSSPropertyWebkitBorderBeforeColor:
- case CSSPropertyWebkitBorderBeforeStyle:
- case CSSPropertyWebkitBorderBeforeWidth:
- return Vector<StylePropertyShorthand>{webkitBorderBeforeShorthand()};
- case CSSPropertyWebkitBorderEndColor:
- case CSSPropertyWebkitBorderEndStyle:
- case CSSPropertyWebkitBorderEndWidth:
- return Vector<StylePropertyShorthand>{webkitBorderEndShorthand()};
- case CSSPropertyBorderBottomLeftRadius:
- case CSSPropertyBorderBottomRightRadius:
- case CSSPropertyBorderTopLeftRadius:
- case CSSPropertyBorderTopRightRadius:
- return Vector<StylePropertyShorthand>{webkitBorderRadiusShorthand(), borderRadiusShorthand()};
- case CSSPropertyWebkitBorderStartColor:
- case CSSPropertyWebkitBorderStartStyle:
- case CSSPropertyWebkitBorderStartWidth:
- return Vector<StylePropertyShorthand>{webkitBorderStartShorthand()};
- case CSSPropertyWebkitGridAutoColumns:
- case CSSPropertyWebkitGridAutoFlow:
- case CSSPropertyWebkitGridAutoRows:
- return Vector<StylePropertyShorthand>{webkitGridShorthand()};
- case CSSPropertyWebkitGridTemplateAreas:
- case CSSPropertyWebkitGridTemplateColumns:
- case CSSPropertyWebkitGridTemplateRows:
- return Vector<StylePropertyShorthand>{webkitGridShorthand(), webkitGridTemplateShorthand()};
- case CSSPropertyWebkitGridRowStart:
- return Vector<StylePropertyShorthand>{webkitGridAreaShorthand(), webkitGridAreaShorthand(), webkitGridRowShorthand()};
- case CSSPropertyWebkitGridColumnStart:
- return Vector<StylePropertyShorthand>{webkitGridAreaShorthand(), webkitGridColumnShorthand()};
- case CSSPropertyWebkitGridRowEnd:
- return Vector<StylePropertyShorthand>{webkitGridAreaShorthand(), webkitGridRowShorthand()};
- case CSSPropertyWebkitGridColumnEnd:
- return Vector<StylePropertyShorthand>{webkitGridColumnShorthand()};
- case CSSPropertyWebkitMarginAfterCollapse:
- case CSSPropertyWebkitMarginBeforeCollapse:
- return Vector<StylePropertyShorthand>{webkitMarginCollapseShorthand()};
- case CSSPropertyWebkitMarqueeDirection:
- case CSSPropertyWebkitMarqueeIncrement:
- case CSSPropertyWebkitMarqueeRepetition:
- case CSSPropertyWebkitMarqueeSpeed:
- case CSSPropertyWebkitMarqueeStyle:
- return Vector<StylePropertyShorthand>{webkitMarqueeShorthand()};
- case CSSPropertyWebkitMaskClip:
- case CSSPropertyWebkitMaskImage:
- case CSSPropertyWebkitMaskOrigin:
- case CSSPropertyWebkitMaskSize:
- case CSSPropertyWebkitMaskSourceType:
- return Vector<StylePropertyShorthand>{webkitMaskShorthand()};
- case CSSPropertyWebkitMaskPositionX:
- case CSSPropertyWebkitMaskPositionY:
- return Vector<StylePropertyShorthand>{webkitMaskShorthand(), webkitMaskPositionShorthand()};
- case CSSPropertyWebkitMaskRepeatX:
- case CSSPropertyWebkitMaskRepeatY:
- return Vector<StylePropertyShorthand>{webkitMaskShorthand(), webkitMaskRepeatShorthand()};
- case CSSPropertyWebkitPerspectiveOriginX:
- case CSSPropertyWebkitPerspectiveOriginY:
- return Vector<StylePropertyShorthand>{webkitPerspectiveOriginShorthand()};
- case CSSPropertyWebkitTextDecorationColor:
- case CSSPropertyWebkitTextDecorationLine:
- case CSSPropertyWebkitTextDecorationStyle:
- return Vector<StylePropertyShorthand>{webkitTextDecorationShorthand()};
- case CSSPropertyWebkitTextEmphasisColor:
- case CSSPropertyWebkitTextEmphasisStyle:
- return Vector<StylePropertyShorthand>{webkitTextEmphasisShorthand()};
- case CSSPropertyWebkitTextStrokeColor:
- case CSSPropertyWebkitTextStrokeWidth:
- return Vector<StylePropertyShorthand>{webkitTextStrokeShorthand()};
- case CSSPropertyWebkitTransformOriginX:
- case CSSPropertyWebkitTransformOriginY:
- case CSSPropertyWebkitTransformOriginZ:
- return Vector<StylePropertyShorthand>{webkitTransformOriginShorthand()};
- case CSSPropertyWebkitTransitionDelay:
- case CSSPropertyWebkitTransitionDuration:
- case CSSPropertyWebkitTransitionProperty:
- case CSSPropertyWebkitTransitionTimingFunction:
- return Vector<StylePropertyShorthand>{webkitTransitionShorthand()};
- case CSSPropertyAnimationDelay:
- case CSSPropertyAnimationDirection:
- case CSSPropertyAnimationDuration:
- case CSSPropertyAnimationFillMode:
- case CSSPropertyAnimationIterationCount:
- case CSSPropertyAnimationName:
- case CSSPropertyAnimationTimingFunction:
- return Vector<StylePropertyShorthand>{animationShorthand()};
- case CSSPropertyBackgroundAttachment:
- case CSSPropertyBackgroundClip:
- case CSSPropertyBackgroundColor:
- case CSSPropertyBackgroundImage:
- case CSSPropertyBackgroundOrigin:
- case CSSPropertyBackgroundSize:
- return Vector<StylePropertyShorthand>{backgroundShorthand()};
- case CSSPropertyBackgroundPositionX:
- case CSSPropertyBackgroundPositionY:
- return Vector<StylePropertyShorthand>{backgroundShorthand(), backgroundPositionShorthand()};
- case CSSPropertyBackgroundRepeatX:
- case CSSPropertyBackgroundRepeatY:
- return Vector<StylePropertyShorthand>{backgroundShorthand(), backgroundRepeatShorthand()};
- case CSSPropertyBorderBottomColor:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderBottomShorthand(), borderColorShorthand()};
- case CSSPropertyBorderBottomStyle:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderBottomShorthand(), borderStyleShorthand()};
- case CSSPropertyBorderBottomWidth:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderBottomShorthand(), borderWidthShorthand()};
- case CSSPropertyBorderLeftColor:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderColorShorthand(), borderLeftShorthand()};
- case CSSPropertyBorderRightColor:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderColorShorthand(), borderRightShorthand()};
- case CSSPropertyBorderTopColor:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderColorShorthand(), borderTopShorthand()};
- case CSSPropertyBorderLeftStyle:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderLeftShorthand(), borderStyleShorthand()};
- case CSSPropertyBorderLeftWidth:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderLeftShorthand(), borderWidthShorthand()};
- case CSSPropertyBorderRightStyle:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderRightShorthand(), borderStyleShorthand()};
- case CSSPropertyBorderRightWidth:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderRightShorthand(), borderWidthShorthand()};
- case CSSPropertyBorderTopStyle:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderStyleShorthand(), borderTopShorthand()};
- case CSSPropertyBorderTopWidth:
- return Vector<StylePropertyShorthand>{borderShorthand(), borderTopShorthand(), borderWidthShorthand()};
- case CSSPropertyBorderImageOutset:
- case CSSPropertyBorderImageRepeat:
- case CSSPropertyBorderImageSlice:
- case CSSPropertyBorderImageSource:
- case CSSPropertyBorderImageWidth:
- return Vector<StylePropertyShorthand>{borderImageShorthand()};
- case CSSPropertyWebkitBorderHorizontalSpacing:
- case CSSPropertyWebkitBorderVerticalSpacing:
- return Vector<StylePropertyShorthand>{borderSpacingShorthand()};
- case CSSPropertyColumnRuleColor:
- case CSSPropertyColumnRuleStyle:
- case CSSPropertyColumnRuleWidth:
- return Vector<StylePropertyShorthand>{columnRuleShorthand()};
- case CSSPropertyColumnCount:
- case CSSPropertyColumnWidth:
- return Vector<StylePropertyShorthand>{columnsShorthand()};
- case CSSPropertyFlexBasis:
- case CSSPropertyFlexGrow:
- case CSSPropertyFlexShrink:
- return Vector<StylePropertyShorthand>{flexShorthand()};
- case CSSPropertyFlexDirection:
- case CSSPropertyFlexWrap:
- return Vector<StylePropertyShorthand>{flexFlowShorthand()};
- case CSSPropertyListStyleImage:
- case CSSPropertyListStylePosition:
- case CSSPropertyListStyleType:
- return Vector<StylePropertyShorthand>{listStyleShorthand()};
- case CSSPropertyMarginBottom:
- case CSSPropertyMarginLeft:
- case CSSPropertyMarginRight:
- case CSSPropertyMarginTop:
- return Vector<StylePropertyShorthand>{marginShorthand()};
- case CSSPropertyMarkerEnd:
- case CSSPropertyMarkerMid:
- case CSSPropertyMarkerStart:
- return Vector<StylePropertyShorthand>{markerShorthand()};
- case CSSPropertyOutlineColor:
- case CSSPropertyOutlineStyle:
- case CSSPropertyOutlineWidth:
- return Vector<StylePropertyShorthand>{outlineShorthand()};
- case CSSPropertyOverflowX:
- case CSSPropertyOverflowY:
- return Vector<StylePropertyShorthand>{overflowShorthand()};
- case CSSPropertyPaddingBottom:
- case CSSPropertyPaddingLeft:
- case CSSPropertyPaddingRight:
- case CSSPropertyPaddingTop:
- return Vector<StylePropertyShorthand>{paddingShorthand()};
- case CSSPropertyTransitionDelay:
- case CSSPropertyTransitionDuration:
- case CSSPropertyTransitionProperty:
- case CSSPropertyTransitionTimingFunction:
- return Vector<StylePropertyShorthand>{transitionShorthand()};
- default:
- return matchingCustomShorthandsForLonghand(propertyID);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement