OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv
ed. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 case CSSValueCurrentcolor: | 153 case CSSValueCurrentcolor: |
154 return true; | 154 return true; |
155 default: | 155 default: |
156 return false; | 156 return false; |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 using CSSTextCache = WillBePersistentHeapHashMap<RawPtrWillBeWeakMember<const CS
SPrimitiveValue>, String>; | 160 using CSSTextCache = WillBePersistentHeapHashMap<RawPtrWillBeWeakMember<const CS
SPrimitiveValue>, String>; |
161 static CSSTextCache& cssTextCache() | 161 static CSSTextCache& cssTextCache() |
162 { | 162 { |
| 163 // Experiment: verify that this cache is used from non-main threads. |
| 164 RELEASE_ASSERT(isMainThread()); |
163 AtomicallyInitializedStaticReference(ThreadSpecific<CSSTextCache>, cache, ne
w ThreadSpecific<CSSTextCache>()); | 165 AtomicallyInitializedStaticReference(ThreadSpecific<CSSTextCache>, cache, ne
w ThreadSpecific<CSSTextCache>()); |
164 return *cache; | 166 return *cache; |
165 } | 167 } |
166 | 168 |
167 CSSPrimitiveValue::UnitType CSSPrimitiveValue::typeWithCalcResolved() const | 169 CSSPrimitiveValue::UnitType CSSPrimitiveValue::typeWithCalcResolved() const |
168 { | 170 { |
169 if (type() != UnitType::Calc) | 171 if (type() != UnitType::Calc) |
170 return type(); | 172 return type(); |
171 | 173 |
172 switch (m_value.calc->category()) { | 174 switch (m_value.calc->category()) { |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 visitor->trace(m_value.calc); | 845 visitor->trace(m_value.calc); |
844 break; | 846 break; |
845 default: | 847 default: |
846 break; | 848 break; |
847 } | 849 } |
848 #endif | 850 #endif |
849 CSSValue::traceAfterDispatch(visitor); | 851 CSSValue::traceAfterDispatch(visitor); |
850 } | 852 } |
851 | 853 |
852 } // namespace blink | 854 } // namespace blink |
OLD | NEW |