| 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.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 return cacheItem; | 82 return cacheItem; |
| 83 } | 83 } |
| 84 | 84 |
| 85 void MatchedPropertiesCache::add(const ComputedStyle& style, const ComputedStyle
& parentStyle, unsigned hash, const MatchedPropertiesVector& properties) | 85 void MatchedPropertiesCache::add(const ComputedStyle& style, const ComputedStyle
& parentStyle, unsigned hash, const MatchedPropertiesVector& properties) |
| 86 { | 86 { |
| 87 #if !ENABLE(OILPAN) | 87 #if !ENABLE(OILPAN) |
| 88 static const unsigned maxAdditionsBetweenSweeps = 100; | 88 static const unsigned maxAdditionsBetweenSweeps = 100; |
| 89 if (++m_additionsSinceLastSweep >= maxAdditionsBetweenSweeps | 89 if (++m_additionsSinceLastSweep >= maxAdditionsBetweenSweeps |
| 90 && !m_sweepTimer.isActive()) { | 90 && !m_sweepTimer.isActive()) { |
| 91 static const unsigned sweepTimeInSeconds = 60; | 91 static const unsigned sweepTimeInSeconds = 60; |
| 92 m_sweepTimer.startOneShot(sweepTimeInSeconds, FROM_HERE); | 92 m_sweepTimer.startOneShot(sweepTimeInSeconds, BLINK_FROM_HERE); |
| 93 } | 93 } |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 ASSERT(hash); | 96 ASSERT(hash); |
| 97 Cache::AddResult addResult = m_cache.add(hash, nullptr); | 97 Cache::AddResult addResult = m_cache.add(hash, nullptr); |
| 98 if (addResult.isNewEntry) | 98 if (addResult.isNewEntry) |
| 99 addResult.storedValue->value = adoptPtrWillBeNoop(new CachedMatchedPrope
rties); | 99 addResult.storedValue->value = adoptPtrWillBeNoop(new CachedMatchedPrope
rties); |
| 100 | 100 |
| 101 CachedMatchedProperties* cacheItem = addResult.storedValue->value.get(); | 101 CachedMatchedProperties* cacheItem = addResult.storedValue->value.get(); |
| 102 if (!addResult.isNewEntry) | 102 if (!addResult.isNewEntry) |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 | 159 |
| 160 DEFINE_TRACE(MatchedPropertiesCache) | 160 DEFINE_TRACE(MatchedPropertiesCache) |
| 161 { | 161 { |
| 162 #if ENABLE(OILPAN) | 162 #if ENABLE(OILPAN) |
| 163 visitor->trace(m_cache); | 163 visitor->trace(m_cache); |
| 164 #endif | 164 #endif |
| 165 } | 165 } |
| 166 | 166 |
| 167 } | 167 } |
| OLD | NEW |