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 Apple Computer, Inc. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
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 16 matching lines...) Expand all Loading... |
27 #include "platform/RuntimeEnabledFeatures.h" | 27 #include "platform/RuntimeEnabledFeatures.h" |
28 #include "platform/text/TextDirection.h" | 28 #include "platform/text/TextDirection.h" |
29 #include "platform/text/WritingMode.h" | 29 #include "platform/text/WritingMode.h" |
30 #include "wtf/Allocator.h" | 30 #include "wtf/Allocator.h" |
31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
32 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 struct StylePropertyMetadata { | 36 struct StylePropertyMetadata { |
37 DISALLOW_ALLOCATION(); | 37 DISALLOW_NEW(); |
38 StylePropertyMetadata(CSSPropertyID propertyID, bool isSetFromShorthand, int
indexInShorthandsVector, bool important, bool implicit, bool inherited) | 38 StylePropertyMetadata(CSSPropertyID propertyID, bool isSetFromShorthand, int
indexInShorthandsVector, bool important, bool implicit, bool inherited) |
39 : m_propertyID(propertyID) | 39 : m_propertyID(propertyID) |
40 , m_isSetFromShorthand(isSetFromShorthand) | 40 , m_isSetFromShorthand(isSetFromShorthand) |
41 , m_indexInShorthandsVector(indexInShorthandsVector) | 41 , m_indexInShorthandsVector(indexInShorthandsVector) |
42 , m_important(important) | 42 , m_important(important) |
43 , m_implicit(implicit) | 43 , m_implicit(implicit) |
44 , m_inherited(inherited) | 44 , m_inherited(inherited) |
45 { | 45 { |
46 } | 46 } |
47 | 47 |
48 CSSPropertyID shorthandID() const; | 48 CSSPropertyID shorthandID() const; |
49 | 49 |
50 uint16_t m_propertyID : 10; | 50 uint16_t m_propertyID : 10; |
51 uint16_t m_isSetFromShorthand : 1; | 51 uint16_t m_isSetFromShorthand : 1; |
52 uint16_t m_indexInShorthandsVector : 2; // If this property was set as part
of an ambiguous shorthand, gives the index in the shorthands vector. | 52 uint16_t m_indexInShorthandsVector : 2; // If this property was set as part
of an ambiguous shorthand, gives the index in the shorthands vector. |
53 uint16_t m_important : 1; | 53 uint16_t m_important : 1; |
54 uint16_t m_implicit : 1; // Whether or not the property was set implicitly a
s the result of a shorthand. | 54 uint16_t m_implicit : 1; // Whether or not the property was set implicitly a
s the result of a shorthand. |
55 uint16_t m_inherited : 1; | 55 uint16_t m_inherited : 1; |
56 }; | 56 }; |
57 | 57 |
58 class CSSProperty { | 58 class CSSProperty { |
59 ALLOW_ONLY_INLINE_ALLOCATION(); | 59 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
60 public: | 60 public: |
61 CSSProperty(CSSPropertyID propertyID, PassRefPtrWillBeRawPtr<CSSValue> value
, bool important = false, bool isSetFromShorthand = false, int indexInShorthands
Vector = 0, bool implicit = false) | 61 CSSProperty(CSSPropertyID propertyID, PassRefPtrWillBeRawPtr<CSSValue> value
, bool important = false, bool isSetFromShorthand = false, int indexInShorthands
Vector = 0, bool implicit = false) |
62 : m_metadata(propertyID, isSetFromShorthand, indexInShorthandsVector, im
portant, implicit, CSSPropertyMetadata::isInheritedProperty(propertyID)) | 62 : m_metadata(propertyID, isSetFromShorthand, indexInShorthandsVector, im
portant, implicit, CSSPropertyMetadata::isInheritedProperty(propertyID)) |
63 , m_value(value) | 63 , m_value(value) |
64 { | 64 { |
65 } | 65 } |
66 | 66 |
67 // FIXME: Remove this. | 67 // FIXME: Remove this. |
68 CSSProperty(StylePropertyMetadata metadata, CSSValue* value) | 68 CSSProperty(StylePropertyMetadata metadata, CSSValue* value) |
69 : m_metadata(metadata) | 69 : m_metadata(metadata) |
(...skipping 20 matching lines...) Expand all Loading... |
90 private: | 90 private: |
91 StylePropertyMetadata m_metadata; | 91 StylePropertyMetadata m_metadata; |
92 RefPtrWillBeMember<CSSValue> m_value; | 92 RefPtrWillBeMember<CSSValue> m_value; |
93 }; | 93 }; |
94 | 94 |
95 } // namespace blink | 95 } // namespace blink |
96 | 96 |
97 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSProperty); | 97 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSProperty); |
98 | 98 |
99 #endif // CSSProperty_h | 99 #endif // CSSProperty_h |
OLD | NEW |