Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 #include "core/css/CSSInitialValue.h" | 37 #include "core/css/CSSInitialValue.h" |
| 38 #include "core/css/CSSPrimitiveValue.h" | 38 #include "core/css/CSSPrimitiveValue.h" |
| 39 #include "core/css/CSSUnsetValue.h" | 39 #include "core/css/CSSUnsetValue.h" |
| 40 #include "core/css/CSSValueList.h" | 40 #include "core/css/CSSValueList.h" |
| 41 #include "wtf/HashMap.h" | 41 #include "wtf/HashMap.h" |
| 42 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
| 43 #include "wtf/text/AtomicStringHash.h" | 43 #include "wtf/text/AtomicStringHash.h" |
| 44 | 44 |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 47 using ::blink::cssvalue::CSSColorValue; | |
|
dcheng
2017/04/05 02:31:34
It would be nicer not to have using declarations i
slangley
2017/04/05 04:40:18
done
| |
| 48 | |
| 47 class CORE_EXPORT CSSValuePool | 49 class CORE_EXPORT CSSValuePool |
| 48 : public GarbageCollectedFinalized<CSSValuePool> { | 50 : public GarbageCollectedFinalized<CSSValuePool> { |
| 49 WTF_MAKE_NONCOPYABLE(CSSValuePool); | 51 WTF_MAKE_NONCOPYABLE(CSSValuePool); |
| 50 | 52 |
| 51 public: | 53 public: |
| 52 // TODO(sashab): Make all the value pools store const CSSValues. | 54 // TODO(sashab): Make all the value pools store const CSSValues. |
| 53 static const int maximumCacheableIntegerValue = 255; | 55 static const int maximumCacheableIntegerValue = 255; |
| 54 using ColorValueCache = HeapHashMap<unsigned, Member<CSSColorValue>>; | 56 using ColorValueCache = HeapHashMap<unsigned, Member<CSSColorValue>>; |
| 55 static const unsigned maximumColorCacheSize = 512; | 57 static const unsigned maximumColorCacheSize = 512; |
| 56 using FontFaceValueCache = | 58 using FontFaceValueCache = |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 FontFamilyValueCache m_fontFamilyValueCache; | 146 FontFamilyValueCache m_fontFamilyValueCache; |
| 145 | 147 |
| 146 friend CORE_EXPORT CSSValuePool& cssValuePool(); | 148 friend CORE_EXPORT CSSValuePool& cssValuePool(); |
| 147 }; | 149 }; |
| 148 | 150 |
| 149 CORE_EXPORT CSSValuePool& cssValuePool(); | 151 CORE_EXPORT CSSValuePool& cssValuePool(); |
| 150 | 152 |
| 151 } // namespace blink | 153 } // namespace blink |
| 152 | 154 |
| 153 #endif | 155 #endif |
| OLD | NEW |