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

Unified Diff: sky/engine/core/css/resolver/MatchedPropertiesCache.cpp

Issue 863883002: Eliminate RuleRange. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: sky/engine/core/css/resolver/MatchedPropertiesCache.cpp
diff --git a/sky/engine/core/css/resolver/MatchedPropertiesCache.cpp b/sky/engine/core/css/resolver/MatchedPropertiesCache.cpp
index 4f68638b22e7104e9abdf65acb12e18cc8789b0e..edcf16f7c9c5f33bee93e5960863ec5fb668706d 100644
--- a/sky/engine/core/css/resolver/MatchedPropertiesCache.cpp
+++ b/sky/engine/core/css/resolver/MatchedPropertiesCache.cpp
@@ -38,7 +38,6 @@ namespace blink {
void CachedMatchedProperties::set(const RenderStyle* style, const RenderStyle* parentStyle, const MatchResult& matchResult)
{
matchedProperties.appendVector(matchResult.matchedProperties);
- ranges = matchResult.ranges;
// Note that we don't cache the original RenderStyle instance. It may be further modified.
// The RenderStyle in the cache is really just a holder for the substructures and never used as-is.
@@ -76,8 +75,6 @@ const CachedMatchedProperties* MatchedPropertiesCache::find(unsigned hash, const
if (matchResult.matchedProperties[i] != cacheItem->matchedProperties[i])
return 0;
}
- if (cacheItem->ranges != matchResult.ranges)
- return 0;
return cacheItem;
}
@@ -126,9 +123,9 @@ void MatchedPropertiesCache::sweep(Timer<MatchedPropertiesCache>*)
Cache::iterator end = m_cache.end();
for (; it != end; ++it) {
CachedMatchedProperties* cacheItem = it->value.get();
- Vector<MatchedProperties>& matchedProperties = cacheItem->matchedProperties;
+ Vector<RefPtr<StylePropertySet>>& matchedProperties = cacheItem->matchedProperties;
for (size_t i = 0; i < matchedProperties.size(); ++i) {
- if (matchedProperties[i].properties->hasOneRef()) {
+ if (matchedProperties[i]->hasOneRef()) {
toRemove.append(it->key);
break;
}
« no previous file with comments | « sky/engine/core/css/resolver/MatchedPropertiesCache.h ('k') | sky/engine/core/css/resolver/ScopedStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698