Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: Source/core/css/resolver/MatchResult.cpp

Issue 1134173002: Get rid of TreeBoundaryCrossingRules. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missing important UA rules. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/MatchResult.h ('k') | Source/core/css/resolver/MatchedPropertiesCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..320dfc35c30a6e870d2bd6be4a478e710bf520d6 100644
--- a/Source/core/css/resolver/MatchResult.cpp
+++ b/Source/core/css/resolver/MatchResult.cpp
@@ -50,11 +50,22 @@ 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::closeOriginOrScope(bool isUAOrigin)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(m_rangeEnd.size());
+ if (UNLIKELY(m_rangeEnd.last() == m_matchedProperties.size()))
+ return;
+ if (isUAOrigin)
+ m_rangeEnd[0] = m_matchedProperties.size();
+ else
+ m_rangeEnd.append(m_matchedProperties.size());
+}
+
} // namespace blink
« no previous file with comments | « Source/core/css/resolver/MatchResult.h ('k') | Source/core/css/resolver/MatchedPropertiesCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698