| Index: Source/core/css/resolver/MatchResult.cpp
|
| diff --git a/Source/core/css/resolver/MatchResult.cpp b/Source/core/css/resolver/MatchResult.cpp
|
| index f61efb393a1d710ac28c755c763487ea0c0105d7..7002031bf2aceae4a3d62c1d08bab3f19e398da5 100644
|
| --- a/Source/core/css/resolver/MatchResult.cpp
|
| +++ b/Source/core/css/resolver/MatchResult.cpp
|
| @@ -50,11 +50,26 @@ DEFINE_TRACE(MatchedProperties)
|
|
|
| void MatchResult::addMatchedProperties(const StylePropertySet* properties, unsigned linkMatchType, PropertyWhitelistType propertyWhitelistType)
|
| {
|
| - matchedProperties.grow(matchedProperties.size() + 1);
|
| - MatchedProperties& newProperties = matchedProperties.last();
|
| + m_matchedProperties.grow(m_matchedProperties.size() + 1);
|
| + MatchedProperties& newProperties = m_matchedProperties.last();
|
| newProperties.properties = const_cast<StylePropertySet*>(properties);
|
| newProperties.m_types.linkMatchType = linkMatchType;
|
| newProperties.m_types.whitelistType = propertyWhitelistType;
|
| }
|
|
|
| +void MatchResult::uaRulesFinished()
|
| +{
|
| + m_uaRangeEnd = m_matchedProperties.size();
|
| +}
|
| +
|
| +void MatchResult::authorScopeFinished()
|
| +{
|
| + // Don't add empty ranges.
|
| + if (m_authorRangeEnd.isEmpty() && m_uaRangeEnd == m_matchedProperties.size())
|
| + return;
|
| + if (!m_authorRangeEnd.isEmpty() && m_authorRangeEnd.last() == m_matchedProperties.size())
|
| + return;
|
| + m_authorRangeEnd.append(m_matchedProperties.size());
|
| +}
|
| +
|
| } // namespace blink
|
|
|