switch (aPropID) { case eCSSProperty_background: return ParseBackground(aErrorCode); case eCSSProperty_background_position: return ParseBackgroundPosition(aErrorCode); case eCSSProperty_border: return ParseBorderSide(aErrorCode, kBorderTopIDs, PR_TRUE); case eCSSProperty_border_color: return ParseBorderColor(aErrorCode); case eCSSProperty_border_spacing: return ParseBorderSpacing(aErrorCode); case eCSSProperty_border_style: return ParseBorderStyle(aErrorCode); case eCSSProperty_border_bottom: return ParseBorderSide(aErrorCode, kBorderBottomIDs, PR_FALSE); case eCSSProperty_border_left: return ParseBorderSide(aErrorCode, kBorderLeftIDs, PR_FALSE); case eCSSProperty_border_right: return ParseBorderSide(aErrorCode, kBorderRightIDs, PR_FALSE); case eCSSProperty_border_top: return ParseBorderSide(aErrorCode, kBorderTopIDs, PR_FALSE); case eCSSProperty_border_bottom_colors: return ParseBorderColors(aErrorCode, &mTempData.mMargin.mBorderColors.mBottom, aPropID); case eCSSProperty_border_left_colors: return ParseBorderColors(aErrorCode, &mTempData.mMargin.mBorderColors.mLeft, aPropID); case eCSSProperty_border_right_colors: return ParseBorderColors(aErrorCode, &mTempData.mMargin.mBorderColors.mRight, aPropID); case eCSSProperty_border_top_colors: return ParseBorderColors(aErrorCode, &mTempData.mMargin.mBorderColors.mTop, aPropID); case eCSSProperty_border_width: return ParseBorderWidth(aErrorCode); case eCSSProperty__moz_border_radius: return ParseBorderRadius(aErrorCode); #ifdef ENABLE_OUTLINE case eCSSProperty__moz_outline_radius: return ParseOutlineRadius(aErrorCode); #endif case eCSSProperty_clip: return ParseRect(mTempData.mDisplay.mClip, aErrorCode, eCSSProperty_clip); case eCSSProperty_content: return ParseContent(aErrorCode); case eCSSProperty__moz_counter_increment: return ParseCounterData(aErrorCode, &mTempData.mContent.mCounterIncrement, aPropID); case eCSSProperty__moz_counter_reset: return ParseCounterData(aErrorCode, &mTempData.mContent.mCounterReset, aPropID); case eCSSProperty_cue: return ParseCue(aErrorCode); case eCSSProperty_cursor: return ParseCursor(aErrorCode); case eCSSProperty_font: return ParseFont(aErrorCode); case eCSSProperty_image_region: return ParseRect(mTempData.mList.mImageRegion, aErrorCode, eCSSProperty_image_region); case eCSSProperty_list_style: return ParseListStyle(aErrorCode); case eCSSProperty_margin: return ParseMargin(aErrorCode); #ifdef ENABLE_OUTLINE case eCSSProperty__moz_outline: return ParseOutline(aErrorCode); #endif case eCSSProperty_padding: return ParsePadding(aErrorCode); case eCSSProperty_pause: return ParsePause(aErrorCode); case eCSSProperty_play_during: return ParsePlayDuring(aErrorCode); case eCSSProperty_quotes: return ParseQuotes(aErrorCode); case eCSSProperty_size: return ParseSize(aErrorCode); case eCSSProperty_text_shadow: return ParseTextShadow(aErrorCode);
NS_ASSERTION(nsnull != aBaseURL, "need base URL"); NS_ASSERTION(nsnull != aDeclaration, "Need declaration to parse into!"); *aChanged = PR_FALSE;
PRBool CSSParserImpl::ParseProperty(PRInt32& aErrorCode,                                    nsCSSProperty aPropID){  switch (aPropID) {  // handle shorthand or multiple properties  case eCSSProperty_background:    return ParseBackground(aErrorCode);  case eCSSProperty_background_position:    return ParseBackgroundPosition(aErrorCode);  case eCSSProperty_border:    return ParseBorderSide(aErrorCode, kBorderTopIDs, PR_TRUE);  case eCSSProperty_border_color:    return ParseBorderColor(aErrorCode);  case eCSSProperty_border_spacing:    return ParseBorderSpacing(aErrorCode);  case eCSSProperty_border_style:    return ParseBorderStyle(aErrorCode);  case eCSSProperty_border_bottom:    return ParseBorderSide(aErrorCode, kBorderBottomIDs, PR_FALSE);  case eCSSProperty_border_left:    return ParseBorderSide(aErrorCode, kBorderLeftIDs, PR_FALSE);  case eCSSProperty_border_right:    return ParseBorderSide(aErrorCode, kBorderRightIDs, PR_FALSE);  case eCSSProperty_border_top:    return ParseBorderSide(aErrorCode, kBorderTopIDs, PR_FALSE);  case eCSSProperty_border_bottom_colors:    return ParseBorderColors(aErrorCode,                             &mTempData.mMargin.mBorderColors.mBottom,                             aPropID);  case eCSSProperty_border_left_colors:    return ParseBorderColors(aErrorCode,                             &mTempData.mMargin.mBorderColors.mLeft,                             aPropID);  case eCSSProperty_border_right_colors:    return ParseBorderColors(aErrorCode,                             &mTempData.mMargin.mBorderColors.mRight,                             aPropID);  case eCSSProperty_border_top_colors:    return ParseBorderColors(aErrorCode,                             &mTempData.mMargin.mBorderColors.mTop,                             aPropID);  case eCSSProperty_border_width:    return ParseBorderWidth(aErrorCode);  case eCSSProperty__moz_border_radius:    return ParseBorderRadius(aErrorCode);#ifdef ENABLE_OUTLINE  case eCSSProperty__moz_outline_radius:    return ParseOutlineRadius(aErrorCode);#endif  case eCSSProperty_clip:    return ParseRect(mTempData.mDisplay.mClip, aErrorCode,                     eCSSProperty_clip);  case eCSSProperty_content:    return ParseContent(aErrorCode);  case eCSSProperty__moz_counter_increment:    return ParseCounterData(aErrorCode, &mTempData.mContent.mCounterIncrement,                            aPropID);  case eCSSProperty__moz_counter_reset:    return ParseCounterData(aErrorCode, &mTempData.mContent.mCounterReset,                            aPropID);  case eCSSProperty_cue:    return ParseCue(aErrorCode);  case eCSSProperty_cursor:    return ParseCursor(aErrorCode);  case eCSSProperty_font:    return ParseFont(aErrorCode);  case eCSSProperty_image_region:    return ParseRect(mTempData.mList.mImageRegion, aErrorCode,                     eCSSProperty_image_region);  case eCSSProperty_list_style:    return ParseListStyle(aErrorCode);  case eCSSProperty_margin:    return ParseMargin(aErrorCode);#ifdef ENABLE_OUTLINE  case eCSSProperty__moz_outline:    return ParseOutline(aErrorCode);#endif  case eCSSProperty_padding:    return ParsePadding(aErrorCode);  case eCSSProperty_pause:    return ParsePause(aErrorCode);  case eCSSProperty_play_during:    return ParsePlayDuring(aErrorCode);  case eCSSProperty_quotes:    return ParseQuotes(aErrorCode);  case eCSSProperty_size:    return ParseSize(aErrorCode);  case eCSSProperty_text_shadow:    return ParseTextShadow(aErrorCode);  // Strip out properties we use internally. These properties are used  // by compound property parsing routines (e.g. "background-position").  case eCSSProperty_background_x_position:  case eCSSProperty_background_y_position:  case eCSSProperty_border_x_spacing:  case eCSSProperty_border_y_spacing:  case eCSSProperty_play_during_flags:  case eCSSProperty_size_height:  case eCSSProperty_size_width:    // The user can't use these    REPORT_UNEXPECTED(NS_LITERAL_STRING("Attempt to use inaccessible property"));    return PR_FALSE;  default:  // must be single property    {      nsCSSValue value;      if (ParseSingleValueProperty(aErrorCode, value, aPropID)) {        if (ExpectEndProperty(aErrorCode, PR_TRUE)) {          AppendValue(aPropID, value);          aErrorCode = NS_OK;          return PR_TRUE;        }        // XXX Report errors?      }      // XXX Report errors?    }  }  return PR_FALSE;}