| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 case CSSValueWebkitText: | 147 case CSSValueWebkitText: |
| 148 case CSSValueWebkitLink: | 148 case CSSValueWebkitLink: |
| 149 case CSSValueWebkitActivelink: | 149 case CSSValueWebkitActivelink: |
| 150 case CSSValueCurrentcolor: | 150 case CSSValueCurrentcolor: |
| 151 return true; | 151 return true; |
| 152 default: | 152 default: |
| 153 return false; | 153 return false; |
| 154 } | 154 } |
| 155 } | 155 } |
| 156 | 156 |
| 157 using CSSTextCache = WillBePersistentHeapHashMap<RawPtrWillBeWeakMember<const CS
SPrimitiveValue>, String>; | 157 using CSSTextCache = PersistentHeapHashMap<WeakMember<const CSSPrimitiveValue>,
String>; |
| 158 | 158 |
| 159 static CSSTextCache& cssTextCache() | 159 static CSSTextCache& cssTextCache() |
| 160 { | 160 { |
| 161 RELEASE_ASSERT(isMainThread()); | 161 RELEASE_ASSERT(isMainThread()); |
| 162 DEFINE_STATIC_LOCAL(CSSTextCache, cache, ()); | 162 DEFINE_STATIC_LOCAL(CSSTextCache, cache, ()); |
| 163 return cache; | 163 return cache; |
| 164 } | 164 } |
| 165 | 165 |
| 166 CSSPrimitiveValue::UnitType CSSPrimitiveValue::typeWithCalcResolved() const | 166 CSSPrimitiveValue::UnitType CSSPrimitiveValue::typeWithCalcResolved() const |
| 167 { | 167 { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 ASSERT_NOT_REACHED(); | 283 ASSERT_NOT_REACHED(); |
| 284 break; | 284 break; |
| 285 } | 285 } |
| 286 } | 286 } |
| 287 | 287 |
| 288 void CSSPrimitiveValue::init(UnitType type) | 288 void CSSPrimitiveValue::init(UnitType type) |
| 289 { | 289 { |
| 290 m_primitiveUnitType = static_cast<unsigned>(type); | 290 m_primitiveUnitType = static_cast<unsigned>(type); |
| 291 } | 291 } |
| 292 | 292 |
| 293 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<CSSCalcValue> c) | 293 void CSSPrimitiveValue::init(RawPtr<CSSCalcValue> c) |
| 294 { | 294 { |
| 295 init(UnitType::Calc); | 295 init(UnitType::Calc); |
| 296 m_hasCachedCSSText = false; | 296 m_hasCachedCSSText = false; |
| 297 m_value.calc = c.leakRef(); | 297 m_value.calc = c.leakRef(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 CSSPrimitiveValue::~CSSPrimitiveValue() | 300 CSSPrimitiveValue::~CSSPrimitiveValue() |
| 301 { | 301 { |
| 302 #if !ENABLE(OILPAN) | 302 #if !ENABLE(OILPAN) |
| 303 switch (type()) { | 303 switch (type()) { |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 visitor->trace(m_value.calc); | 837 visitor->trace(m_value.calc); |
| 838 break; | 838 break; |
| 839 default: | 839 default: |
| 840 break; | 840 break; |
| 841 } | 841 } |
| 842 #endif | 842 #endif |
| 843 CSSValue::traceAfterDispatch(visitor); | 843 CSSValue::traceAfterDispatch(visitor); |
| 844 } | 844 } |
| 845 | 845 |
| 846 } // namespace blink | 846 } // namespace blink |
| OLD | NEW |