Remove unused Element param from MatchedPropertiesCache::isCacheable

Review URL: https://codereview.chromium.org/1315303010

git-svn-id: svn://svn.chromium.org/blink/trunk@201775 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent d65cb45a
...@@ -143,7 +143,7 @@ void MatchedPropertiesCache::sweep(Timer<MatchedPropertiesCache>*) ...@@ -143,7 +143,7 @@ void MatchedPropertiesCache::sweep(Timer<MatchedPropertiesCache>*)
} }
#endif #endif
bool MatchedPropertiesCache::isCacheable(const Element* element, const ComputedStyle& style, const ComputedStyle& parentStyle) bool MatchedPropertiesCache::isCacheable(const ComputedStyle& style, const ComputedStyle& parentStyle)
{ {
if (style.unique() || (style.styleType() != NOPSEUDO && parentStyle.unique())) if (style.unique() || (style.styleType() != NOPSEUDO && parentStyle.unique()))
return false; return false;
......
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
void clear(); void clear();
void clearViewportDependent(); void clearViewportDependent();
static bool isCacheable(const Element*, const ComputedStyle&, const ComputedStyle& parentStyle); static bool isCacheable(const ComputedStyle&, const ComputedStyle& parentStyle);
DECLARE_TRACE(); DECLARE_TRACE();
......
...@@ -1342,7 +1342,7 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc ...@@ -1342,7 +1342,7 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
bool applyInheritedOnly = false; bool applyInheritedOnly = false;
const CachedMatchedProperties* cachedMatchedProperties = cacheHash ? m_matchedPropertiesCache.find(cacheHash, state, matchResult.matchedProperties()) : 0; const CachedMatchedProperties* cachedMatchedProperties = cacheHash ? m_matchedPropertiesCache.find(cacheHash, state, matchResult.matchedProperties()) : 0;
if (cachedMatchedProperties && MatchedPropertiesCache::isCacheable(element, *state.style(), *state.parentStyle())) { if (cachedMatchedProperties && MatchedPropertiesCache::isCacheable(*state.style(), *state.parentStyle())) {
INCREMENT_STYLE_STATS_COUNTER(*this, matchedPropertyCacheHit, 1); INCREMENT_STYLE_STATS_COUNTER(*this, matchedPropertyCacheHit, 1);
// We can build up the style by copying non-inherited properties from an earlier style object built using the same exact // We can build up the style by copying non-inherited properties from an earlier style object built using the same exact
// style declarations. We then only need to apply the inherited properties, if any, as their values can depend on the // style declarations. We then only need to apply the inherited properties, if any, as their values can depend on the
...@@ -1422,7 +1422,7 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc ...@@ -1422,7 +1422,7 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
loadPendingResources(state); loadPendingResources(state);
if (!cachedMatchedProperties && cacheHash && MatchedPropertiesCache::isCacheable(element, *state.style(), *state.parentStyle())) { if (!cachedMatchedProperties && cacheHash && MatchedPropertiesCache::isCacheable(*state.style(), *state.parentStyle())) {
INCREMENT_STYLE_STATS_COUNTER(*this, matchedPropertyCacheAdded, 1); INCREMENT_STYLE_STATS_COUNTER(*this, matchedPropertyCacheAdded, 1);
m_matchedPropertiesCache.add(*state.style(), *state.parentStyle(), cacheHash, matchResult.matchedProperties()); m_matchedPropertiesCache.add(*state.style(), *state.parentStyle(), cacheHash, matchResult.matchedProperties());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment