Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 23 matching lines...) Expand all Loading... | |
| 34 // Override operator new to allocate CSSValue subtype objects onto | 34 // Override operator new to allocate CSSValue subtype objects onto |
| 35 // a dedicated heap. | 35 // a dedicated heap. |
| 36 GC_PLUGIN_IGNORE("crbug.com/443854") | 36 GC_PLUGIN_IGNORE("crbug.com/443854") |
| 37 void* operator new(size_t size) { return allocateObject(size, false); } | 37 void* operator new(size_t size) { return allocateObject(size, false); } |
| 38 static void* allocateObject(size_t size, bool isEager) { | 38 static void* allocateObject(size_t size, bool isEager) { |
| 39 ThreadState* state = | 39 ThreadState* state = |
| 40 ThreadStateFor<ThreadingTrait<CSSValue>::Affinity>::state(); | 40 ThreadStateFor<ThreadingTrait<CSSValue>::Affinity>::state(); |
| 41 const char typeName[] = "blink::CSSValue"; | 41 const char typeName[] = "blink::CSSValue"; |
| 42 return ThreadHeap::allocateOnArenaIndex( | 42 return ThreadHeap::allocateOnArenaIndex( |
| 43 state, size, | 43 state, size, |
| 44 isEager ? BlinkGC::EagerSweepArenaIndex : BlinkGC::CSSValueArenaIndex, | 44 is_eager ? BlinkGC::kEagerSweepArenaIndex : BlinkGC::kCSSValueArenaIndex , |
| 45 GCInfoTrait<CSSValue>::index(), typeName); | 45 GCInfoTrait<CSSValue>::index(), kTypeName); |
|
Łukasz Anforowicz
2017/01/04 22:11:24
CSSValueArenaIndex wasn't rewritten because this i
| |
| 46 } | 46 } |
| 47 | 47 |
| 48 // TODO(sashab): Remove this method and move logic to the caller. | 48 // TODO(sashab): Remove this method and move logic to the caller. |
| 49 static CSSValue* create(const Length& value, float zoom); | 49 static CSSValue* create(const Length& value, float zoom); |
| 50 | 50 |
| 51 String cssText() const; | 51 String cssText() const; |
| 52 | 52 |
| 53 bool isPrimitiveValue() const { return m_classType == PrimitiveClass; } | 53 bool isPrimitiveValue() const { return m_classType == PrimitiveClass; } |
| 54 bool isIdentifierValue() const { return m_classType == IdentifierClass; } | 54 bool isIdentifierValue() const { return m_classType == IdentifierClass; } |
| 55 bool isValuePair() const { return m_classType == ValuePairClass; } | 55 bool isValuePair() const { return m_classType == ValuePairClass; } |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 return first->equals(*second); | 303 return first->equals(*second); |
| 304 } | 304 } |
| 305 | 305 |
| 306 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ | 306 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ |
| 307 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, \ | 307 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, \ |
| 308 value.predicate) | 308 value.predicate) |
| 309 | 309 |
| 310 } // namespace blink | 310 } // namespace blink |
| 311 | 311 |
| 312 #endif // CSSValue_h | 312 #endif // CSSValue_h |
| OLD | NEW |