| Index: Source/core/css/parser/CSSPropertyParser.h
|
| diff --git a/Source/core/css/parser/CSSPropertyParser.h b/Source/core/css/parser/CSSPropertyParser.h
|
| index f7c9962acd2b28c5d6dd68800653f723eb9cde8d..f693a0cd4c4015d027bc6542da537f20bbe30897 100644
|
| --- a/Source/core/css/parser/CSSPropertyParser.h
|
| +++ b/Source/core/css/parser/CSSPropertyParser.h
|
| @@ -26,8 +26,10 @@
|
| #include "core/css/CSSGradientValue.h"
|
| #include "core/css/CSSGridTemplateAreasValue.h"
|
| #include "core/css/CSSPropertySourceData.h"
|
| +#include "core/css/CSSValuePool.h"
|
| #include "core/css/parser/CSSParserTokenRange.h"
|
| #include "platform/Length.h"
|
| +#include "wtf/text/StringBuilder.h"
|
|
|
| namespace blink {
|
|
|
| @@ -187,6 +189,7 @@ private:
|
| bool parseFont(bool important);
|
| bool parseSystemFont(bool important);
|
| PassRefPtrWillBeRawPtr<CSSValueList> parseFontFamily();
|
| + PassRefPtrWillBeRawPtr<CSSValueList> consumeFontFamily();
|
|
|
| PassRefPtrWillBeRawPtr<CSSValue> parseCounter(int defaultValue);
|
| PassRefPtrWillBeRawPtr<CSSValue> parseCounterContent(CSSParserValueList* args, bool counters);
|
| @@ -200,10 +203,9 @@ private:
|
|
|
| PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseLineHeight();
|
| bool parseFontSize(bool important);
|
| - bool parseFontVariant(bool important);
|
| + PassRefPtrWillBeRawPtr<CSSValue> consumeFontVariant();
|
| bool parseFontWeight(bool important);
|
| - PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceSrc();
|
| - PassRefPtrWillBeRawPtr<CSSValueList> parseFontFaceUnicodeRange();
|
| + PassRefPtrWillBeRawPtr<CSSValueList> consumeFontFaceSrc();
|
|
|
| bool parseSVGValue(CSSPropertyID propId, bool important);
|
| PassRefPtrWillBeRawPtr<CSSValue> parseSVGStrokeDasharray();
|
| @@ -262,11 +264,6 @@ private:
|
|
|
| bool parseCalculation(CSSParserValue*, ValueRange);
|
|
|
| - bool parseFontFeatureTag(CSSValueList*);
|
| - PassRefPtrWillBeRawPtr<CSSValue> parseFontFeatureSettings();
|
| -
|
| - bool parseFontVariantLigatures(bool important);
|
| -
|
| bool parseGeneratedImage(CSSParserValueList*, RefPtrWillBeRawPtr<CSSValue>&);
|
|
|
| PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveNumericValue(CSSParserValue*);
|
| @@ -288,8 +285,8 @@ private:
|
| PassRefPtrWillBeRawPtr<CSSValueList> parseSize();
|
| SizeParameterType parseSizeParameter(CSSValueList* parsedValues, CSSParserValue*, SizeParameterType prevParamType);
|
|
|
| - bool parseFontFaceSrcURI(CSSValueList*);
|
| - bool parseFontFaceSrcLocal(CSSValueList*);
|
| + bool consumeFontFaceSrcURI(CSSValueList*);
|
| + bool consumeFontFaceSrcLocal(CSSValueList*);
|
|
|
| class ImplicitScope {
|
| STACK_ALLOCATED();
|
| @@ -379,6 +376,42 @@ private:
|
| RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation;
|
| };
|
|
|
| +// FIXME(rwlbuis): move to CSSPropertyParser.cpp once
|
| +// all font properties are converted.
|
| +class FontFamilyValueBuilder {
|
| + STACK_ALLOCATED();
|
| +public:
|
| + FontFamilyValueBuilder(CSSValueList* list)
|
| + : m_list(list)
|
| + {
|
| + }
|
| +
|
| + void add(const CSSParserString& string)
|
| + {
|
| + if (!m_builder.isEmpty())
|
| + m_builder.append(' ');
|
| +
|
| + if (string.is8Bit()) {
|
| + m_builder.append(string.characters8(), string.length());
|
| + return;
|
| + }
|
| +
|
| + m_builder.append(string.characters16(), string.length());
|
| + }
|
| +
|
| + void commit()
|
| + {
|
| + if (m_builder.isEmpty())
|
| + return;
|
| + m_list->append(cssValuePool().createFontFamilyValue(m_builder.toString()));
|
| + m_builder.clear();
|
| + }
|
| +
|
| +private:
|
| + StringBuilder m_builder;
|
| + RawPtrWillBeMember<CSSValueList> m_list;
|
| +};
|
| +
|
| CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&);
|
| CSSValueID cssValueKeywordID(const CSSParserString&);
|
|
|
|
|