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