| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 return nullptr; | 79 return nullptr; |
| 80 } | 80 } |
| 81 return cacheItem; | 81 return cacheItem; |
| 82 } | 82 } |
| 83 | 83 |
| 84 void MatchedPropertiesCache::add(const ComputedStyle& style, | 84 void MatchedPropertiesCache::add(const ComputedStyle& style, |
| 85 const ComputedStyle& parentStyle, | 85 const ComputedStyle& parentStyle, |
| 86 unsigned hash, | 86 unsigned hash, |
| 87 const MatchedPropertiesVector& properties) { | 87 const MatchedPropertiesVector& properties) { |
| 88 ASSERT(hash); | 88 ASSERT(hash); |
| 89 Cache::AddResult addResult = m_cache.add(hash, nullptr); | 89 Cache::AddResult addResult = m_cache.insert(hash, nullptr); |
| 90 if (addResult.isNewEntry) | 90 if (addResult.isNewEntry) |
| 91 addResult.storedValue->value = new CachedMatchedProperties; | 91 addResult.storedValue->value = new CachedMatchedProperties; |
| 92 | 92 |
| 93 CachedMatchedProperties* cacheItem = addResult.storedValue->value.get(); | 93 CachedMatchedProperties* cacheItem = addResult.storedValue->value.get(); |
| 94 if (!addResult.isNewEntry) | 94 if (!addResult.isNewEntry) |
| 95 cacheItem->clear(); | 95 cacheItem->clear(); |
| 96 | 96 |
| 97 cacheItem->set(style, parentStyle, properties); | 97 cacheItem->set(style, parentStyle, properties); |
| 98 } | 98 } |
| 99 | 99 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 if (style.hasVariableReferenceFromNonInheritedProperty()) | 137 if (style.hasVariableReferenceFromNonInheritedProperty()) |
| 138 return false; | 138 return false; |
| 139 return true; | 139 return true; |
| 140 } | 140 } |
| 141 | 141 |
| 142 DEFINE_TRACE(MatchedPropertiesCache) { | 142 DEFINE_TRACE(MatchedPropertiesCache) { |
| 143 visitor->trace(m_cache); | 143 visitor->trace(m_cache); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace blink | 146 } // namespace blink |
| OLD | NEW |