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

Side by Side Diff: Source/core/css/resolver/MatchedPropertiesCache.h

Issue 1315303010: Remove unused Element param from MatchedPropertiesCache::isCacheable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/css/resolver/MatchedPropertiesCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 WTF_MAKE_NONCOPYABLE(MatchedPropertiesCache); 94 WTF_MAKE_NONCOPYABLE(MatchedPropertiesCache);
95 public: 95 public:
96 MatchedPropertiesCache(); 96 MatchedPropertiesCache();
97 97
98 const CachedMatchedProperties* find(unsigned hash, const StyleResolverState& , const MatchedPropertiesVector&); 98 const CachedMatchedProperties* find(unsigned hash, const StyleResolverState& , const MatchedPropertiesVector&);
99 void add(const ComputedStyle&, const ComputedStyle& parentStyle, unsigned ha sh, const MatchedPropertiesVector&); 99 void add(const ComputedStyle&, const ComputedStyle& parentStyle, unsigned ha sh, const MatchedPropertiesVector&);
100 100
101 void clear(); 101 void clear();
102 void clearViewportDependent(); 102 void clearViewportDependent();
103 103
104 static bool isCacheable(const Element*, const ComputedStyle&, const Computed Style& parentStyle); 104 static bool isCacheable(const ComputedStyle&, const ComputedStyle& parentSty le);
105 105
106 DECLARE_TRACE(); 106 DECLARE_TRACE();
107 107
108 private: 108 private:
109 #if ENABLE(OILPAN) 109 #if ENABLE(OILPAN)
110 typedef HeapHashMap<unsigned, Member<CachedMatchedProperties>, DefaultHash<u nsigned>::Hash, HashTraits<unsigned>, CachedMatchedPropertiesHashTraits > Cache; 110 typedef HeapHashMap<unsigned, Member<CachedMatchedProperties>, DefaultHash<u nsigned>::Hash, HashTraits<unsigned>, CachedMatchedPropertiesHashTraits > Cache;
111 #else 111 #else
112 // Every N additions to the matched declaration cache trigger a sweep where entries holding 112 // Every N additions to the matched declaration cache trigger a sweep where entries holding
113 // the last reference to a style declaration are garbage collected. 113 // the last reference to a style declaration are garbage collected.
114 void sweep(Timer<MatchedPropertiesCache>*); 114 void sweep(Timer<MatchedPropertiesCache>*);
115 115
116 unsigned m_additionsSinceLastSweep; 116 unsigned m_additionsSinceLastSweep;
117 117
118 typedef HashMap<unsigned, OwnPtr<CachedMatchedProperties>> Cache; 118 typedef HashMap<unsigned, OwnPtr<CachedMatchedProperties>> Cache;
119 Timer<MatchedPropertiesCache> m_sweepTimer; 119 Timer<MatchedPropertiesCache> m_sweepTimer;
120 #endif 120 #endif
121 Cache m_cache; 121 Cache m_cache;
122 }; 122 };
123 123
124 } 124 }
125 125
126 #endif 126 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/resolver/MatchedPropertiesCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698