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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSValue.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 * (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 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
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 13 matching lines...) Expand all
24 #include "core/CoreExport.h" 24 #include "core/CoreExport.h"
25 #include "platform/heap/Handle.h" 25 #include "platform/heap/Handle.h"
26 #include "platform/weborigin/KURL.h" 26 #include "platform/weborigin/KURL.h"
27 #include "wtf/HashMap.h" 27 #include "wtf/HashMap.h"
28 #include "wtf/ListHashSet.h" 28 #include "wtf/ListHashSet.h"
29 #include "wtf/RefCounted.h" 29 #include "wtf/RefCounted.h"
30 #include "wtf/RefPtr.h" 30 #include "wtf/RefPtr.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class CORE_EXPORT CSSValue : public RefCountedWillBeGarbageCollectedFinalized<CS SValue> { 34 class CORE_EXPORT CSSValue : public GarbageCollectedFinalized<CSSValue> {
35 #if ENABLE(OILPAN) 35 #if ENABLE(OILPAN)
36 public: 36 public:
37 // Override operator new to allocate CSSValue subtype objects onto 37 // Override operator new to allocate CSSValue subtype objects onto
38 // a dedicated heap. 38 // a dedicated heap.
39 GC_PLUGIN_IGNORE("crbug.com/443854") 39 GC_PLUGIN_IGNORE("crbug.com/443854")
40 void* operator new(size_t size) 40 void* operator new(size_t size)
41 { 41 {
42 return allocateObject(size, false); 42 return allocateObject(size, false);
43 } 43 }
44 static void* allocateObject(size_t size, bool isEager) 44 static void* allocateObject(size_t size, bool isEager)
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 unsigned m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitType 222 unsigned m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitType
223 mutable unsigned m_hasCachedCSSText : 1; 223 mutable unsigned m_hasCachedCSSText : 1;
224 224
225 unsigned m_valueListSeparator : ValueListSeparatorBits; 225 unsigned m_valueListSeparator : ValueListSeparatorBits;
226 226
227 private: 227 private:
228 unsigned m_classType : ClassTypeBits; // ClassType 228 unsigned m_classType : ClassTypeBits; // ClassType
229 }; 229 };
230 230
231 template<typename CSSValueType, size_t inlineCapacity> 231 template<typename CSSValueType, size_t inlineCapacity>
232 inline bool compareCSSValueVector(const WillBeHeapVector<RefPtrWillBeMember<CSSV alueType>, inlineCapacity>& firstVector, const WillBeHeapVector<RefPtrWillBeMemb er<CSSValueType>, inlineCapacity>& secondVector) 232 inline bool compareCSSValueVector(const HeapVector<Member<CSSValueType>, inlineC apacity>& firstVector, const HeapVector<Member<CSSValueType>, inlineCapacity>& s econdVector)
233 { 233 {
234 size_t size = firstVector.size(); 234 size_t size = firstVector.size();
235 if (size != secondVector.size()) 235 if (size != secondVector.size())
236 return false; 236 return false;
237 237
238 for (size_t i = 0; i < size; i++) { 238 for (size_t i = 0; i < size; i++) {
239 const RefPtrWillBeMember<CSSValueType>& firstPtr = firstVector[i]; 239 const Member<CSSValueType>& firstPtr = firstVector[i];
240 const RefPtrWillBeMember<CSSValueType>& secondPtr = secondVector[i]; 240 const Member<CSSValueType>& secondPtr = secondVector[i];
241 if (firstPtr == secondPtr || (firstPtr && secondPtr && firstPtr->equals( *secondPtr))) 241 if (firstPtr == secondPtr || (firstPtr && secondPtr && firstPtr->equals( *secondPtr)))
242 continue; 242 continue;
243 return false; 243 return false;
244 } 244 }
245 return true; 245 return true;
246 } 246 }
247 247
248 template<typename CSSValueType> 248 template<typename CSSValueType>
249 inline bool compareCSSValuePtr(const RefPtr<CSSValueType>& first, const RefPtr<C SSValueType>& second) 249 inline bool compareCSSValuePtr(const RefPtr<CSSValueType>& first, const RefPtr<C SSValueType>& second)
250 { 250 {
(...skipping 23 matching lines...) Expand all
274 return false; 274 return false;
275 return first->equals(*second); 275 return first->equals(*second);
276 } 276 }
277 277
278 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ 278 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \
279 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica te) 279 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica te)
280 280
281 } // namespace blink 281 } // namespace blink
282 282
283 #endif // CSSValue_h 283 #endif // CSSValue_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSUnsetValue.h ('k') | third_party/WebKit/Source/core/css/CSSValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698