OLD | NEW |
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // FIXME: traceInCollection is also called from WeakProcessing to check
if the entry is dead. | 83 // FIXME: traceInCollection is also called from WeakProcessing to check
if the entry is dead. |
84 // Avoid calling trace in that case by only calling trace when cachedPro
perties is not yet marked. | 84 // Avoid calling trace in that case by only calling trace when cachedPro
perties is not yet marked. |
85 if (!Heap::isHeapObjectAlive(cachedProperties)) | 85 if (!Heap::isHeapObjectAlive(cachedProperties)) |
86 visitor->trace(cachedProperties); | 86 visitor->trace(cachedProperties); |
87 return false; | 87 return false; |
88 } | 88 } |
89 }; | 89 }; |
90 #endif | 90 #endif |
91 | 91 |
92 class MatchedPropertiesCache { | 92 class MatchedPropertiesCache { |
93 DISALLOW_ALLOCATION(); | 93 DISALLOW_NEW(); |
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 |
(...skipping 13 matching lines...) Expand all Loading... |
117 | 117 |
118 using Cache = HashMap<unsigned, OwnPtr<CachedMatchedProperties>>; | 118 using Cache = HashMap<unsigned, OwnPtr<CachedMatchedProperties>>; |
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 |
OLD | NEW |