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>*)
}
#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()))
return false;
......
......@@ -101,7 +101,7 @@ public:
void clear();
void clearViewportDependent();
static bool isCacheable(const Element*, const ComputedStyle&, const ComputedStyle& parentStyle);
static bool isCacheable(const ComputedStyle&, const ComputedStyle& parentStyle);
DECLARE_TRACE();
......
......@@ -1342,7 +1342,7 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
bool applyInheritedOnly = false;
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);
// 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
......@@ -1422,7 +1422,7 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
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);
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