Skip to content
  • alexis.menard@openbossa.org's avatar
    Increase code sharing between CSSParser and CSSPropertyLonghand. · 7f095be7
    alexis.menard@openbossa.org authored
    https://bugs.webkit.org/show_bug.cgi?id=81587
    
    Reviewed by Antti Koivisto.
    
    Expose the longhands declaration for a given shorthand in CSSPropertyLonghand and
    make CSSParser use them. It will make the declaration of longhands in one place only.
    Remove the map of CSSPropertyLonghand and replace it by a regular switch/case.
    The map doesn't bring much here and it's cleaner and faster to use the switch.
    It also shows a little performance improvement in CSS/CSSPropertySetterGetter.html.
    
    No new tests : no behavior change.
    
    * css/CSSParser.cpp:
    (WebCore::CSSParser::parseValue):
    (WebCore::CSSParser::parseAnimationShorthand):
    (WebCore::CSSParser::parseTransitionShorthand):
    (WebCore::CSSParser::parseShorthand):
    Modify the prototype of this function to directly use the CSSPropertyLonghand.
    * css/CSSParser.h:
    (WebCore):
    (CSSParser):
    * css/CSSPropertyLonghand.cpp:
    (WebCore):
    (WebCore::backgroundLonghand):
    (WebCore::backgroundPositionLonghand):
    (WebCore::backgroundRepeatLonghand):
    (WebCore::borderLonghand):
    (WebCore::borderBottomLonghand):
    (WebCore::borderColorLonghand):
    (WebCore::borderImageLonghand):
    (WebCore::borderLeftLonghand):
    (WebCore::borderRadiusLonghand):
    (WebCore::borderRightLonghand):
    (WebCore::borderSpacingLonghand):
    (WebCore::borderStyleLonghand):
    (WebCore::borderTopLonghand):
    (WebCore::borderWidthLonghand):
    (WebCore::listStyleLonghand):
    (WebCore::fontLonghand):
    (WebCore::marginLonghand):
    (WebCore::outlineLonghand):
    (WebCore::overflowLonghand):
    (WebCore::paddingLonghand):
    (WebCore::webkitAnimationLonghand):
    (WebCore::webkitBorderAfterLonghand):
    (WebCore::webkitBorderBeforeLonghand):
    (WebCore::webkitBorderEndLonghand):
    (WebCore::webkitBorderStartLonghand):
    (WebCore::webkitColumnsLonghand):
    (WebCore::webkitColumnRuleLonghand):
    (WebCore::webkitFlexFlowLonghand):
    (WebCore::webkitMarginCollapseLonghand):
    (WebCore::webkitMarqueeLonghand):
    (WebCore::webkitMaskLonghand):
    (WebCore::webkitMaskPositionLonghand):
    (WebCore::webkitMaskRepeatLonghand):
    (WebCore::webkitTextEmphasisLonghand):
    (WebCore::webkitTextStrokeLonghand):
    (WebCore::webkitTransitionLonghand):
    (WebCore::webkitTransformOriginLonghand):
    (WebCore::webkitWrapLonghand):
    (WebCore::longhandForProperty):
    * css/CSSPropertyLonghand.h:
    (WebCore):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7f095be7