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, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. |
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. |
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 5 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 24 matching lines...) Expand all Loading... | |
35 | 35 |
36 #ifndef NDEBUG | 36 #ifndef NDEBUG |
37 #include "wtf/text/CString.h" | 37 #include "wtf/text/CString.h" |
38 #include <stdio.h> | 38 #include <stdio.h> |
39 #endif | 39 #endif |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 static size_t sizeForImmutableStylePropertySetWithPropertyCount(unsigned count) | 43 static size_t sizeForImmutableStylePropertySetWithPropertyCount(unsigned count) |
44 { | 44 { |
45 return sizeof(ImmutableStylePropertySet) - sizeof(void*) + sizeof(CSSValue*) * count + sizeof(StylePropertyMetadata) * count; | 45 return sizeof(ImmutableStylePropertySet) - sizeof(void*) + sizeof(RawPtrWill BeMember<CSSValue>) * count + sizeof(StylePropertyMetadata) * count; |
haraken
2015/11/10 16:37:05
Let's land this change separately.
peria
2015/11/11 02:46:34
Done.
https://codereview.chromium.org/1433843002/
| |
46 } | 46 } |
47 | 47 |
48 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::cre ate(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode) | 48 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::cre ate(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode) |
49 { | 49 { |
50 ASSERT(count <= MaxArraySize); | 50 ASSERT(count <= MaxArraySize); |
51 #if ENABLE(OILPAN) | 51 #if ENABLE(OILPAN) |
52 void* slot = Heap::allocate<StylePropertySet>(sizeForImmutableStylePropertyS etWithPropertyCount(count)); | 52 void* slot = Heap::allocate<StylePropertySet>(sizeForImmutableStylePropertyS etWithPropertyCount(count)); |
53 #else | 53 #else |
54 void* slot = WTF::Partitions::fastMalloc(sizeForImmutableStylePropertySetWit hPropertyCount(count)); | 54 void* slot = WTF::Partitions::fastMalloc(sizeForImmutableStylePropertySetWit hPropertyCount(count)); |
55 #endif // ENABLE(OILPAN) | 55 #endif // ENABLE(OILPAN) |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
512 { | 512 { |
513 return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode)); | 513 return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode)); |
514 } | 514 } |
515 | 515 |
516 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create( const CSSProperty* properties, unsigned count) | 516 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create( const CSSProperty* properties, unsigned count) |
517 { | 517 { |
518 return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count)); | 518 return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count)); |
519 } | 519 } |
520 | 520 |
521 } // namespace blink | 521 } // namespace blink |
OLD | NEW |