Chromium Code Reviews| Index: Source/core/css/parser/BisonCSSParser-in.cpp |
| diff --git a/Source/core/css/parser/BisonCSSParser-in.cpp b/Source/core/css/parser/BisonCSSParser-in.cpp |
| index 42ce90b38bf7e7a4bab186ee5134abb72fc1bb1c..55a8d8a18fafec20c9f3816644e89d1d6d5b85a2 100644 |
| --- a/Source/core/css/parser/BisonCSSParser-in.cpp |
| +++ b/Source/core/css/parser/BisonCSSParser-in.cpp |
| @@ -107,25 +107,37 @@ static const unsigned INVALID_NUM_PARSED_PROPERTIES = UINT_MAX; |
| BisonCSSParser::BisonCSSParser(const CSSParserContext& context) |
| : m_context(context) |
| - , m_important(false) |
| - , m_id(CSSPropertyInvalid) |
| - , m_styleSheet(0) |
| - , m_supportsCondition(false) |
| - , m_selectorListForParseSelector(0) |
| - , m_numParsedPropertiesBeforeMarginBox(INVALID_NUM_PARSED_PROPERTIES) |
| - , m_hasFontFaceOnlyValues(false) |
| - , m_hadSyntacticallyValidCSSRule(false) |
| - , m_logErrors(false) |
| - , m_ignoreErrors(false) |
| - , m_defaultNamespace(starAtom) |
| - , m_observer(0) |
| - , m_source(0) |
| - , m_ruleHeaderType(CSSRuleSourceData::UNKNOWN_RULE) |
| - , m_allowImportRules(true) |
| - , m_allowNamespaceDeclarations(true) |
| - , m_inViewport(false) |
| , m_tokenizer(*this) |
| { |
| + init(); |
| +} |
| + |
| +BisonCSSParser::BisonCSSParser(Document* document) |
|
eseidel
2014/03/28 22:09:24
Why is this needed? We could also add a parserCon
wibling-chromium
2014/03/31 08:06:36
Sure, I will do that instead of the constructor.
|
| + : m_context(document ? CSSParserContext(*document, 0) : strictCSSParserContext()) |
| + , m_tokenizer(*this) |
| +{ |
| + init(); |
| +} |
| + |
| +void BisonCSSParser::init() |
| +{ |
| + m_important = false; |
| + m_id = CSSPropertyInvalid; |
| + m_styleSheet = 0; |
| + m_supportsCondition = false; |
| + m_selectorListForParseSelector = 0; |
| + m_numParsedPropertiesBeforeMarginBox =INVALID_NUM_PARSED_PROPERTIES; |
| + m_hasFontFaceOnlyValues = false; |
| + m_hadSyntacticallyValidCSSRule = false; |
| + m_logErrors = false; |
| + m_ignoreErrors = false; |
| + m_defaultNamespace = starAtom; |
| + m_observer = 0; |
| + m_source = 0; |
| + m_ruleHeaderType = CSSRuleSourceData::UNKNOWN_RULE; |
| + m_allowImportRules = true; |
| + m_allowNamespaceDeclarations = true; |
| + m_inViewport = false; |
| #if YYDEBUG > 0 |
| cssyydebug = 1; |
| #endif |