Guest User

Untitled

a guest
Jan 18th, 2015
199
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Vector<StylePropertyShorthand> matchingShorthandsForLonghand(CSSPropertyID propertyID)
  2. {
  3.     switch (propertyID) {
  4.     case CSSPropertyWebkitAnimationDelay:
  5.     case CSSPropertyWebkitAnimationDirection:
  6.     case CSSPropertyWebkitAnimationDuration:
  7.     case CSSPropertyWebkitAnimationFillMode:
  8.     case CSSPropertyWebkitAnimationIterationCount:
  9.     case CSSPropertyWebkitAnimationName:
  10.     case CSSPropertyWebkitAnimationTimingFunction:
  11.         return Vector<StylePropertyShorthand>{webkitAnimationShorthand()};
  12.     case CSSPropertyWebkitBorderAfterColor:
  13.     case CSSPropertyWebkitBorderAfterStyle:
  14.     case CSSPropertyWebkitBorderAfterWidth:
  15.         return Vector<StylePropertyShorthand>{webkitBorderAfterShorthand()};
  16.     case CSSPropertyWebkitBorderBeforeColor:
  17.     case CSSPropertyWebkitBorderBeforeStyle:
  18.     case CSSPropertyWebkitBorderBeforeWidth:
  19.         return Vector<StylePropertyShorthand>{webkitBorderBeforeShorthand()};
  20.     case CSSPropertyWebkitBorderEndColor:
  21.     case CSSPropertyWebkitBorderEndStyle:
  22.     case CSSPropertyWebkitBorderEndWidth:
  23.         return Vector<StylePropertyShorthand>{webkitBorderEndShorthand()};
  24.     case CSSPropertyBorderBottomLeftRadius:
  25.     case CSSPropertyBorderBottomRightRadius:
  26.     case CSSPropertyBorderTopLeftRadius:
  27.     case CSSPropertyBorderTopRightRadius:
  28.         return Vector<StylePropertyShorthand>{webkitBorderRadiusShorthand(), borderRadiusShorthand()};
  29.     case CSSPropertyWebkitBorderStartColor:
  30.     case CSSPropertyWebkitBorderStartStyle:
  31.     case CSSPropertyWebkitBorderStartWidth:
  32.         return Vector<StylePropertyShorthand>{webkitBorderStartShorthand()};
  33.     case CSSPropertyWebkitGridAutoColumns:
  34.     case CSSPropertyWebkitGridAutoFlow:
  35.     case CSSPropertyWebkitGridAutoRows:
  36.         return Vector<StylePropertyShorthand>{webkitGridShorthand()};
  37.     case CSSPropertyWebkitGridTemplateAreas:
  38.     case CSSPropertyWebkitGridTemplateColumns:
  39.     case CSSPropertyWebkitGridTemplateRows:
  40.         return Vector<StylePropertyShorthand>{webkitGridShorthand(), webkitGridTemplateShorthand()};
  41.     case CSSPropertyWebkitGridRowStart:
  42.         return Vector<StylePropertyShorthand>{webkitGridAreaShorthand(), webkitGridAreaShorthand(), webkitGridRowShorthand()};
  43.     case CSSPropertyWebkitGridColumnStart:
  44.         return Vector<StylePropertyShorthand>{webkitGridAreaShorthand(), webkitGridColumnShorthand()};
  45.     case CSSPropertyWebkitGridRowEnd:
  46.         return Vector<StylePropertyShorthand>{webkitGridAreaShorthand(), webkitGridRowShorthand()};
  47.     case CSSPropertyWebkitGridColumnEnd:
  48.         return Vector<StylePropertyShorthand>{webkitGridColumnShorthand()};
  49.     case CSSPropertyWebkitMarginAfterCollapse:
  50.     case CSSPropertyWebkitMarginBeforeCollapse:
  51.         return Vector<StylePropertyShorthand>{webkitMarginCollapseShorthand()};
  52.     case CSSPropertyWebkitMarqueeDirection:
  53.     case CSSPropertyWebkitMarqueeIncrement:
  54.     case CSSPropertyWebkitMarqueeRepetition:
  55.     case CSSPropertyWebkitMarqueeSpeed:
  56.     case CSSPropertyWebkitMarqueeStyle:
  57.         return Vector<StylePropertyShorthand>{webkitMarqueeShorthand()};
  58.     case CSSPropertyWebkitMaskClip:
  59.     case CSSPropertyWebkitMaskImage:
  60.     case CSSPropertyWebkitMaskOrigin:
  61.     case CSSPropertyWebkitMaskSize:
  62.     case CSSPropertyWebkitMaskSourceType:
  63.         return Vector<StylePropertyShorthand>{webkitMaskShorthand()};
  64.     case CSSPropertyWebkitMaskPositionX:
  65.     case CSSPropertyWebkitMaskPositionY:
  66.         return Vector<StylePropertyShorthand>{webkitMaskShorthand(), webkitMaskPositionShorthand()};
  67.     case CSSPropertyWebkitMaskRepeatX:
  68.     case CSSPropertyWebkitMaskRepeatY:
  69.         return Vector<StylePropertyShorthand>{webkitMaskShorthand(), webkitMaskRepeatShorthand()};
  70.     case CSSPropertyWebkitPerspectiveOriginX:
  71.     case CSSPropertyWebkitPerspectiveOriginY:
  72.         return Vector<StylePropertyShorthand>{webkitPerspectiveOriginShorthand()};
  73.     case CSSPropertyWebkitTextDecorationColor:
  74.     case CSSPropertyWebkitTextDecorationLine:
  75.     case CSSPropertyWebkitTextDecorationStyle:
  76.         return Vector<StylePropertyShorthand>{webkitTextDecorationShorthand()};
  77.     case CSSPropertyWebkitTextEmphasisColor:
  78.     case CSSPropertyWebkitTextEmphasisStyle:
  79.         return Vector<StylePropertyShorthand>{webkitTextEmphasisShorthand()};
  80.     case CSSPropertyWebkitTextStrokeColor:
  81.     case CSSPropertyWebkitTextStrokeWidth:
  82.         return Vector<StylePropertyShorthand>{webkitTextStrokeShorthand()};
  83.     case CSSPropertyWebkitTransformOriginX:
  84.     case CSSPropertyWebkitTransformOriginY:
  85.     case CSSPropertyWebkitTransformOriginZ:
  86.         return Vector<StylePropertyShorthand>{webkitTransformOriginShorthand()};
  87.     case CSSPropertyWebkitTransitionDelay:
  88.     case CSSPropertyWebkitTransitionDuration:
  89.     case CSSPropertyWebkitTransitionProperty:
  90.     case CSSPropertyWebkitTransitionTimingFunction:
  91.         return Vector<StylePropertyShorthand>{webkitTransitionShorthand()};
  92.     case CSSPropertyAnimationDelay:
  93.     case CSSPropertyAnimationDirection:
  94.     case CSSPropertyAnimationDuration:
  95.     case CSSPropertyAnimationFillMode:
  96.     case CSSPropertyAnimationIterationCount:
  97.     case CSSPropertyAnimationName:
  98.     case CSSPropertyAnimationTimingFunction:
  99.         return Vector<StylePropertyShorthand>{animationShorthand()};
  100.     case CSSPropertyBackgroundAttachment:
  101.     case CSSPropertyBackgroundClip:
  102.     case CSSPropertyBackgroundColor:
  103.     case CSSPropertyBackgroundImage:
  104.     case CSSPropertyBackgroundOrigin:
  105.     case CSSPropertyBackgroundSize:
  106.         return Vector<StylePropertyShorthand>{backgroundShorthand()};
  107.     case CSSPropertyBackgroundPositionX:
  108.     case CSSPropertyBackgroundPositionY:
  109.         return Vector<StylePropertyShorthand>{backgroundShorthand(), backgroundPositionShorthand()};
  110.     case CSSPropertyBackgroundRepeatX:
  111.     case CSSPropertyBackgroundRepeatY:
  112.         return Vector<StylePropertyShorthand>{backgroundShorthand(), backgroundRepeatShorthand()};
  113.     case CSSPropertyBorderBottomColor:
  114.         return Vector<StylePropertyShorthand>{borderShorthand(), borderBottomShorthand(), borderColorShorthand()};
  115.     case CSSPropertyBorderBottomStyle:
  116.         return Vector<StylePropertyShorthand>{borderShorthand(), borderBottomShorthand(), borderStyleShorthand()};
  117.     case CSSPropertyBorderBottomWidth:
  118.         return Vector<StylePropertyShorthand>{borderShorthand(), borderBottomShorthand(), borderWidthShorthand()};
  119.     case CSSPropertyBorderLeftColor:
  120.         return Vector<StylePropertyShorthand>{borderShorthand(), borderColorShorthand(), borderLeftShorthand()};
  121.     case CSSPropertyBorderRightColor:
  122.         return Vector<StylePropertyShorthand>{borderShorthand(), borderColorShorthand(), borderRightShorthand()};
  123.     case CSSPropertyBorderTopColor:
  124.         return Vector<StylePropertyShorthand>{borderShorthand(), borderColorShorthand(), borderTopShorthand()};
  125.     case CSSPropertyBorderLeftStyle:
  126.         return Vector<StylePropertyShorthand>{borderShorthand(), borderLeftShorthand(), borderStyleShorthand()};
  127.     case CSSPropertyBorderLeftWidth:
  128.         return Vector<StylePropertyShorthand>{borderShorthand(), borderLeftShorthand(), borderWidthShorthand()};
  129.     case CSSPropertyBorderRightStyle:
  130.         return Vector<StylePropertyShorthand>{borderShorthand(), borderRightShorthand(), borderStyleShorthand()};
  131.     case CSSPropertyBorderRightWidth:
  132.         return Vector<StylePropertyShorthand>{borderShorthand(), borderRightShorthand(), borderWidthShorthand()};
  133.     case CSSPropertyBorderTopStyle:
  134.         return Vector<StylePropertyShorthand>{borderShorthand(), borderStyleShorthand(), borderTopShorthand()};
  135.     case CSSPropertyBorderTopWidth:
  136.         return Vector<StylePropertyShorthand>{borderShorthand(), borderTopShorthand(), borderWidthShorthand()};
  137.     case CSSPropertyBorderImageOutset:
  138.     case CSSPropertyBorderImageRepeat:
  139.     case CSSPropertyBorderImageSlice:
  140.     case CSSPropertyBorderImageSource:
  141.     case CSSPropertyBorderImageWidth:
  142.         return Vector<StylePropertyShorthand>{borderImageShorthand()};
  143.     case CSSPropertyWebkitBorderHorizontalSpacing:
  144.     case CSSPropertyWebkitBorderVerticalSpacing:
  145.         return Vector<StylePropertyShorthand>{borderSpacingShorthand()};
  146.     case CSSPropertyColumnRuleColor:
  147.     case CSSPropertyColumnRuleStyle:
  148.     case CSSPropertyColumnRuleWidth:
  149.         return Vector<StylePropertyShorthand>{columnRuleShorthand()};
  150.     case CSSPropertyColumnCount:
  151.     case CSSPropertyColumnWidth:
  152.         return Vector<StylePropertyShorthand>{columnsShorthand()};
  153.     case CSSPropertyFlexBasis:
  154.     case CSSPropertyFlexGrow:
  155.     case CSSPropertyFlexShrink:
  156.         return Vector<StylePropertyShorthand>{flexShorthand()};
  157.     case CSSPropertyFlexDirection:
  158.     case CSSPropertyFlexWrap:
  159.         return Vector<StylePropertyShorthand>{flexFlowShorthand()};
  160.     case CSSPropertyListStyleImage:
  161.     case CSSPropertyListStylePosition:
  162.     case CSSPropertyListStyleType:
  163.         return Vector<StylePropertyShorthand>{listStyleShorthand()};
  164.     case CSSPropertyMarginBottom:
  165.     case CSSPropertyMarginLeft:
  166.     case CSSPropertyMarginRight:
  167.     case CSSPropertyMarginTop:
  168.         return Vector<StylePropertyShorthand>{marginShorthand()};
  169.     case CSSPropertyMarkerEnd:
  170.     case CSSPropertyMarkerMid:
  171.     case CSSPropertyMarkerStart:
  172.         return Vector<StylePropertyShorthand>{markerShorthand()};
  173.     case CSSPropertyOutlineColor:
  174.     case CSSPropertyOutlineStyle:
  175.     case CSSPropertyOutlineWidth:
  176.         return Vector<StylePropertyShorthand>{outlineShorthand()};
  177.     case CSSPropertyOverflowX:
  178.     case CSSPropertyOverflowY:
  179.         return Vector<StylePropertyShorthand>{overflowShorthand()};
  180.     case CSSPropertyPaddingBottom:
  181.     case CSSPropertyPaddingLeft:
  182.     case CSSPropertyPaddingRight:
  183.     case CSSPropertyPaddingTop:
  184.         return Vector<StylePropertyShorthand>{paddingShorthand()};
  185.     case CSSPropertyTransitionDelay:
  186.     case CSSPropertyTransitionDuration:
  187.     case CSSPropertyTransitionProperty:
  188.     case CSSPropertyTransitionTimingFunction:
  189.         return Vector<StylePropertyShorthand>{transitionShorthand()};
  190.     default:
  191.         return matchingCustomShorthandsForLonghand(propertyID);
  192.     }
  193. }
RAW Paste Data