Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSValuePool.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 25 matching lines...) Expand all
36 #include "core/css/CSSInitialValue.h" 36 #include "core/css/CSSInitialValue.h"
37 #include "core/css/CSSPrimitiveValue.h" 37 #include "core/css/CSSPrimitiveValue.h"
38 #include "core/css/CSSUnsetValue.h" 38 #include "core/css/CSSUnsetValue.h"
39 #include "core/css/CSSValueList.h" 39 #include "core/css/CSSValueList.h"
40 #include "wtf/HashMap.h" 40 #include "wtf/HashMap.h"
41 #include "wtf/RefPtr.h" 41 #include "wtf/RefPtr.h"
42 #include "wtf/text/AtomicStringHash.h" 42 #include "wtf/text/AtomicStringHash.h"
43 43
44 namespace blink { 44 namespace blink {
45 45
46 class CORE_EXPORT CSSValuePool : public NoBaseWillBeGarbageCollectedFinalized<C SSValuePool> { 46 class CORE_EXPORT CSSValuePool : public GarbageCollectedFinalized<CSSValuePool> {
47 USING_FAST_MALLOC_WILL_BE_REMOVED(CSSValuePool);
48 public: 47 public:
49 PassRefPtrWillBeRawPtr<CSSValueList> createFontFaceValue(const AtomicString& ); 48 RawPtr<CSSValueList> createFontFaceValue(const AtomicString&);
50 PassRefPtrWillBeRawPtr<CSSFontFamilyValue> createFontFamilyValue(const Strin g&); 49 RawPtr<CSSFontFamilyValue> createFontFamilyValue(const String&);
51 PassRefPtrWillBeRawPtr<CSSInheritedValue> createInheritedValue() { return m_ inheritedValue; } 50 RawPtr<CSSInheritedValue> createInheritedValue() { return m_inheritedValue; }
52 PassRefPtrWillBeRawPtr<CSSInitialValue> createImplicitInitialValue() { retur n m_implicitInitialValue; } 51 RawPtr<CSSInitialValue> createImplicitInitialValue() { return m_implicitInit ialValue; }
53 PassRefPtrWillBeRawPtr<CSSInitialValue> createExplicitInitialValue() { retur n m_explicitInitialValue; } 52 RawPtr<CSSInitialValue> createExplicitInitialValue() { return m_explicitInit ialValue; }
54 PassRefPtrWillBeRawPtr<CSSUnsetValue> createUnsetValue() { return m_unsetVal ue; } 53 RawPtr<CSSUnsetValue> createUnsetValue() { return m_unsetValue; }
55 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createIdentifierValue(CSSValueID i dentifier); 54 RawPtr<CSSPrimitiveValue> createIdentifierValue(CSSValueID identifier);
56 PassRefPtrWillBeRawPtr<CSSCustomIdentValue> createIdentifierValue(CSSPropert yID identifier); 55 RawPtr<CSSCustomIdentValue> createIdentifierValue(CSSPropertyID identifier);
57 PassRefPtrWillBeRawPtr<CSSColorValue> createColorValue(RGBA32 rgbValue); 56 RawPtr<CSSColorValue> createColorValue(RGBA32 rgbValue);
58 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createValue(double value, CSSPrimi tiveValue::UnitType); 57 RawPtr<CSSPrimitiveValue> createValue(double value, CSSPrimitiveValue::UnitT ype);
59 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createValue(const Length& value, c onst ComputedStyle&); 58 RawPtr<CSSPrimitiveValue> createValue(const Length& value, const ComputedSty le&);
60 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createValue(const Length& value, f loat zoom) { return CSSPrimitiveValue::create(value, zoom); } 59 RawPtr<CSSPrimitiveValue> createValue(const Length& value, float zoom) { ret urn CSSPrimitiveValue::create(value, zoom); }
61 template<typename T> static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create Value(T value) { return CSSPrimitiveValue::create(value); } 60 template<typename T> static RawPtr<CSSPrimitiveValue> createValue(T value) { return CSSPrimitiveValue::create(value); }
62 61
63 DECLARE_TRACE(); 62 DECLARE_TRACE();
64 63
65 private: 64 private:
66 CSSValuePool(); 65 CSSValuePool();
67 66
68 RefPtrWillBeMember<CSSInheritedValue> m_inheritedValue; 67 Member<CSSInheritedValue> m_inheritedValue;
69 RefPtrWillBeMember<CSSInitialValue> m_implicitInitialValue; 68 Member<CSSInitialValue> m_implicitInitialValue;
70 RefPtrWillBeMember<CSSInitialValue> m_explicitInitialValue; 69 Member<CSSInitialValue> m_explicitInitialValue;
71 RefPtrWillBeMember<CSSUnsetValue> m_unsetValue; 70 Member<CSSUnsetValue> m_unsetValue;
72 71
73 WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>, numCSSValueKeywords> m_identifierValueCache; 72 HeapVector<Member<CSSPrimitiveValue>, numCSSValueKeywords> m_identifierValue Cache;
74 73
75 using ColorValueCache = WillBeHeapHashMap<unsigned, RefPtrWillBeMember<CSSCo lorValue>>; 74 using ColorValueCache = HeapHashMap<unsigned, Member<CSSColorValue>>;
76 ColorValueCache m_colorValueCache; 75 ColorValueCache m_colorValueCache;
77 RefPtrWillBeMember<CSSColorValue> m_colorTransparent; 76 Member<CSSColorValue> m_colorTransparent;
78 RefPtrWillBeMember<CSSColorValue> m_colorWhite; 77 Member<CSSColorValue> m_colorWhite;
79 RefPtrWillBeMember<CSSColorValue> m_colorBlack; 78 Member<CSSColorValue> m_colorBlack;
80 79
81 static const int maximumCacheableIntegerValue = 255; 80 static const int maximumCacheableIntegerValue = 255;
82 81
83 WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>, maximumCacheableInte gerValue + 1> m_pixelValueCache; 82 HeapVector<Member<CSSPrimitiveValue>, maximumCacheableIntegerValue + 1> m_pi xelValueCache;
84 WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>, maximumCacheableInte gerValue + 1> m_percentValueCache; 83 HeapVector<Member<CSSPrimitiveValue>, maximumCacheableIntegerValue + 1> m_pe rcentValueCache;
85 WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>, maximumCacheableInte gerValue + 1> m_numberValueCache; 84 HeapVector<Member<CSSPrimitiveValue>, maximumCacheableIntegerValue + 1> m_nu mberValueCache;
86 85
87 using FontFaceValueCache = WillBeHeapHashMap<AtomicString, RefPtrWillBeMembe r<CSSValueList>>; 86 using FontFaceValueCache = HeapHashMap<AtomicString, Member<CSSValueList>>;
88 FontFaceValueCache m_fontFaceValueCache; 87 FontFaceValueCache m_fontFaceValueCache;
89 88
90 using FontFamilyValueCache = WillBeHeapHashMap<String, RefPtrWillBeMember<CS SFontFamilyValue>>; 89 using FontFamilyValueCache = HeapHashMap<String, Member<CSSFontFamilyValue>> ;
91 FontFamilyValueCache m_fontFamilyValueCache; 90 FontFamilyValueCache m_fontFamilyValueCache;
92 91
93 friend CORE_EXPORT CSSValuePool& cssValuePool(); 92 friend CORE_EXPORT CSSValuePool& cssValuePool();
94 }; 93 };
95 94
96 CORE_EXPORT CSSValuePool& cssValuePool(); 95 CORE_EXPORT CSSValuePool& cssValuePool();
97 96
98 } // namespace blink 97 } // namespace blink
99 98
100 #endif 99 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValuePair.h ('k') | third_party/WebKit/Source/core/css/CSSValuePool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698