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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 class CORE_EXPORT CSSValuePool | 47 class CORE_EXPORT CSSValuePool |
48 : public GarbageCollectedFinalized<CSSValuePool> { | 48 : public GarbageCollectedFinalized<CSSValuePool> { |
49 WTF_MAKE_NONCOPYABLE(CSSValuePool); | 49 WTF_MAKE_NONCOPYABLE(CSSValuePool); |
50 | 50 |
51 public: | 51 public: |
52 // TODO(sashab): Make all the value pools store const CSSValues. | 52 // TODO(sashab): Make all the value pools store const CSSValues. |
53 static const int maximumCacheableIntegerValue = 255; | 53 static const int maximumCacheableIntegerValue = 255; |
54 using CSSColorValue = ::blink::cssvalue::CSSColorValue; | |
dcheng
2017/04/05 06:21:26
Nit: I think ::blink:: can be omitted.
(We don't
slangley
2017/04/05 06:45:57
Done
| |
54 using ColorValueCache = HeapHashMap<unsigned, Member<CSSColorValue>>; | 55 using ColorValueCache = HeapHashMap<unsigned, Member<CSSColorValue>>; |
55 static const unsigned maximumColorCacheSize = 512; | 56 static const unsigned maximumColorCacheSize = 512; |
56 using FontFaceValueCache = | 57 using FontFaceValueCache = |
57 HeapHashMap<AtomicString, Member<const CSSValueList>>; | 58 HeapHashMap<AtomicString, Member<const CSSValueList>>; |
58 static const unsigned maximumFontFaceCacheSize = 128; | 59 static const unsigned maximumFontFaceCacheSize = 128; |
59 using FontFamilyValueCache = HeapHashMap<String, Member<CSSFontFamilyValue>>; | 60 using FontFamilyValueCache = HeapHashMap<String, Member<CSSFontFamilyValue>>; |
60 | 61 |
61 // Cached individual values. | 62 // Cached individual values. |
62 CSSColorValue* transparentColor() { return m_colorTransparent; } | 63 CSSColorValue* transparentColor() { return m_colorTransparent; } |
63 CSSColorValue* whiteColor() { return m_colorWhite; } | 64 CSSColorValue* whiteColor() { return m_colorWhite; } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 FontFamilyValueCache m_fontFamilyValueCache; | 145 FontFamilyValueCache m_fontFamilyValueCache; |
145 | 146 |
146 friend CORE_EXPORT CSSValuePool& cssValuePool(); | 147 friend CORE_EXPORT CSSValuePool& cssValuePool(); |
147 }; | 148 }; |
148 | 149 |
149 CORE_EXPORT CSSValuePool& cssValuePool(); | 150 CORE_EXPORT CSSValuePool& cssValuePool(); |
150 | 151 |
151 } // namespace blink | 152 } // namespace blink |
152 | 153 |
153 #endif | 154 #endif |
OLD | NEW |