Add comment explaining the difference between CSS_PROPERTY_PARSE_FUNCTION and CSS_PROPERTY_VALUE_PARSER_FUNCTION (prompted by question from jdaggett). No bug.

This commit is contained in:
L. David Baron 2012-03-29 10:16:21 -07:00
Родитель 932d6ffba3
Коммит 5b33d81ff3
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -97,13 +97,22 @@
// Define what mechanism the CSS parser uses for parsing the property. // Define what mechanism the CSS parser uses for parsing the property.
// See CSSParserImpl::ParseProperty(nsCSSProperty). Don't use 0 so that // See CSSParserImpl::ParseProperty(nsCSSProperty). Don't use 0 so that
// we can verify that every property sets one of the values. // we can verify that every property sets one of the values.
//
// CSS_PROPERTY_PARSE_FUNCTION must be used for shorthand properties,
// since it's the only mechanism that allows appending values for
// separate properties. Longhand properties that require custom parsing
// functions should prefer using CSS_PROPERTY_PARSE_VALUE (or
// CSS_PROPERTY_PARSE_VALUE_LIST) and
// CSS_PROPERTY_VALUE_PARSER_FUNCTION, though a number of existing
// longhand properties use CSS_PROPERTY_PARSE_FUNCTION instead.
#define CSS_PROPERTY_PARSE_PROPERTY_MASK (7<<9) #define CSS_PROPERTY_PARSE_PROPERTY_MASK (7<<9)
#define CSS_PROPERTY_PARSE_INACCESSIBLE (1<<9) #define CSS_PROPERTY_PARSE_INACCESSIBLE (1<<9)
#define CSS_PROPERTY_PARSE_FUNCTION (2<<9) #define CSS_PROPERTY_PARSE_FUNCTION (2<<9)
#define CSS_PROPERTY_PARSE_VALUE (3<<9) #define CSS_PROPERTY_PARSE_VALUE (3<<9)
#define CSS_PROPERTY_PARSE_VALUE_LIST (4<<9) #define CSS_PROPERTY_PARSE_VALUE_LIST (4<<9)
// See CSSParserImpl::ParseSingleValueProperty // See CSSParserImpl::ParseSingleValueProperty and comment above
// CSS_PROPERTY_PARSE_FUNCTION (which is different).
#define CSS_PROPERTY_VALUE_PARSER_FUNCTION (1<<12) #define CSS_PROPERTY_VALUE_PARSER_FUNCTION (1<<12)
MOZ_STATIC_ASSERT((CSS_PROPERTY_PARSE_PROPERTY_MASK & MOZ_STATIC_ASSERT((CSS_PROPERTY_PARSE_PROPERTY_MASK &
CSS_PROPERTY_VALUE_PARSER_FUNCTION) == 0, CSS_PROPERTY_VALUE_PARSER_FUNCTION) == 0,