| Index: Source/core/css/RuleFeature.cpp
|
| diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp
|
| index 7c8f160ae43f4d7445289aeda1ee292c72301f55..f693b844c944a704df05b6252e5f4f6aa7efe941 100644
|
| --- a/Source/core/css/RuleFeature.cpp
|
| +++ b/Source/core/css/RuleFeature.cpp
|
| @@ -69,6 +69,9 @@ void RuleFeatureSet::collectFeaturesFromSelectorList(const CSSSelectorList* sele
|
|
|
| void RuleFeatureSet::add(const RuleFeatureSet& other)
|
| {
|
| + if (const RuleSetAnalyzer* otherAnalyzer = other.getRuleSetAnalyzer())
|
| + ensureRuleSetAnalyzer()->combine(*otherAnalyzer);
|
| +
|
| HashSet<AtomicString>::const_iterator end = other.idsInRules.end();
|
| for (HashSet<AtomicString>::const_iterator it = other.idsInRules.begin(); it != end; ++it)
|
| idsInRules.add(*it);
|
| @@ -95,4 +98,16 @@ void RuleFeatureSet::clear()
|
| m_maxDirectAdjacentSelectors = 0;
|
| }
|
|
|
| +const RuleSetAnalyzer* RuleFeatureSet::getRuleSetAnalyzer() const
|
| +{
|
| + return ruleSetAnalyzer.get();
|
| +}
|
| +
|
| +RuleSetAnalyzer* RuleFeatureSet::ensureRuleSetAnalyzer()
|
| +{
|
| + if (!ruleSetAnalyzer)
|
| + ruleSetAnalyzer = RuleSetAnalyzer::create();
|
| + return ruleSetAnalyzer.get();
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|