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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 PassRefPtr<CSSPrimitiveValue> createFontFamilyValue(const String&); | 45 PassRefPtr<CSSPrimitiveValue> createFontFamilyValue(const String&); |
46 PassRefPtr<CSSInheritedValue> createInheritedValue() { return m_inheritedVal
ue; } | 46 PassRefPtr<CSSInheritedValue> createInheritedValue() { return m_inheritedVal
ue; } |
47 PassRefPtr<CSSInitialValue> createImplicitInitialValue() { return m_implicit
InitialValue; } | 47 PassRefPtr<CSSInitialValue> createImplicitInitialValue() { return m_implicit
InitialValue; } |
48 PassRefPtr<CSSInitialValue> createExplicitInitialValue() { return m_explicit
InitialValue; } | 48 PassRefPtr<CSSInitialValue> createExplicitInitialValue() { return m_explicit
InitialValue; } |
49 PassRefPtr<CSSPrimitiveValue> createIdentifierValue(int identifier); | 49 PassRefPtr<CSSPrimitiveValue> createIdentifierValue(int identifier); |
50 PassRefPtr<CSSPrimitiveValue> createColorValue(unsigned rgbValue); | 50 PassRefPtr<CSSPrimitiveValue> createColorValue(unsigned rgbValue); |
51 PassRefPtr<CSSPrimitiveValue> createValue(double value, CSSPrimitiveValue::U
nitTypes); | 51 PassRefPtr<CSSPrimitiveValue> createValue(double value, CSSPrimitiveValue::U
nitTypes); |
52 PassRefPtr<CSSPrimitiveValue> createValue(const String& value, CSSPrimitiveV
alue::UnitTypes type) { return CSSPrimitiveValue::create(value, type); } | 52 PassRefPtr<CSSPrimitiveValue> createValue(const String& value, CSSPrimitiveV
alue::UnitTypes type) { return CSSPrimitiveValue::create(value, type); } |
53 template<typename T> static PassRefPtr<CSSPrimitiveValue> createValue(T valu
e) { return CSSPrimitiveValue::create(value); } | 53 template<typename T> static PassRefPtr<CSSPrimitiveValue> createValue(T valu
e) { return CSSPrimitiveValue::create(value); } |
54 | 54 |
55 void drain(); | |
56 | |
57 private: | 55 private: |
58 CSSValuePool(); | 56 CSSValuePool(); |
59 | 57 |
60 RefPtr<CSSInheritedValue> m_inheritedValue; | 58 RefPtr<CSSInheritedValue> m_inheritedValue; |
61 RefPtr<CSSInitialValue> m_implicitInitialValue; | 59 RefPtr<CSSInitialValue> m_implicitInitialValue; |
62 RefPtr<CSSInitialValue> m_explicitInitialValue; | 60 RefPtr<CSSInitialValue> m_explicitInitialValue; |
63 | 61 |
64 RefPtr<CSSPrimitiveValue> m_identifierValueCache[numCSSValueKeywords]; | 62 RefPtr<CSSPrimitiveValue> m_identifierValueCache[numCSSValueKeywords]; |
65 | 63 |
66 typedef HashMap<unsigned, RefPtr<CSSPrimitiveValue> > ColorValueCache; | 64 typedef HashMap<unsigned, RefPtr<CSSPrimitiveValue> > ColorValueCache; |
(...skipping 15 matching lines...) Expand all Loading... |
82 FontFamilyValueCache m_fontFamilyValueCache; | 80 FontFamilyValueCache m_fontFamilyValueCache; |
83 | 81 |
84 friend CSSValuePool& cssValuePool(); | 82 friend CSSValuePool& cssValuePool(); |
85 }; | 83 }; |
86 | 84 |
87 CSSValuePool& cssValuePool(); | 85 CSSValuePool& cssValuePool(); |
88 | 86 |
89 } | 87 } |
90 | 88 |
91 #endif | 89 #endif |
OLD | NEW |