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, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 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 14 matching lines...) Expand all Loading... | |
25 | 25 |
26 namespace WebCore { | 26 namespace WebCore { |
27 | 27 |
28 class StylePropertyShorthand { | 28 class StylePropertyShorthand { |
29 WTF_MAKE_FAST_ALLOCATED; | 29 WTF_MAKE_FAST_ALLOCATED; |
30 public: | 30 public: |
31 StylePropertyShorthand() | 31 StylePropertyShorthand() |
32 : m_properties(0) | 32 : m_properties(0) |
33 , m_propertiesForInitialization(0) | 33 , m_propertiesForInitialization(0) |
34 , m_length(0) | 34 , m_length(0) |
35 , m_allAcceptAuto(false) | |
35 { | 36 { |
36 } | 37 } |
37 | 38 |
38 StylePropertyShorthand(const CSSPropertyID* properties, unsigned numProperti es) | 39 StylePropertyShorthand(const CSSPropertyID* properties, unsigned numProperti es, bool allAcceptAuto = false) |
Julien - ping for review
2013/07/23 00:56:29
NO!
This class represents a generic shorthand, no
mstensho (USE GERRIT)
2013/07/23 14:19:07
Done.
Also, my patch doesn't even apply anymore,
| |
39 : m_properties(properties) | 40 : m_properties(properties) |
40 , m_propertiesForInitialization(0) | 41 , m_propertiesForInitialization(0) |
41 , m_length(numProperties) | 42 , m_length(numProperties) |
43 , m_allAcceptAuto(allAcceptAuto) | |
42 { | 44 { |
43 } | 45 } |
44 | 46 |
45 StylePropertyShorthand(const CSSPropertyID* properties, const StylePropertyS horthand** propertiesForInitialization, unsigned numProperties) | 47 StylePropertyShorthand(const CSSPropertyID* properties, const StylePropertyS horthand** propertiesForInitialization, unsigned numProperties, bool allAcceptAu to = false) |
46 : m_properties(properties) | 48 : m_properties(properties) |
47 , m_propertiesForInitialization(propertiesForInitialization) | 49 , m_propertiesForInitialization(propertiesForInitialization) |
48 , m_length(numProperties) | 50 , m_length(numProperties) |
51 , m_allAcceptAuto(allAcceptAuto) | |
49 { | 52 { |
50 } | 53 } |
51 | 54 |
52 const CSSPropertyID* properties() const { return m_properties; } | 55 const CSSPropertyID* properties() const { return m_properties; } |
53 const StylePropertyShorthand** propertiesForInitialization() const { return m_propertiesForInitialization; } | 56 const StylePropertyShorthand** propertiesForInitialization() const { return m_propertiesForInitialization; } |
54 unsigned length() const { return m_length; } | 57 unsigned length() const { return m_length; } |
58 bool allAcceptAuto() const { return m_allAcceptAuto; } | |
55 | 59 |
56 private: | 60 private: |
57 const CSSPropertyID* m_properties; | 61 const CSSPropertyID* m_properties; |
58 const StylePropertyShorthand** m_propertiesForInitialization; | 62 const StylePropertyShorthand** m_propertiesForInitialization; |
59 unsigned m_length; | 63 unsigned m_length; |
64 bool m_allAcceptAuto; | |
60 }; | 65 }; |
61 | 66 |
62 const StylePropertyShorthand& backgroundShorthand(); | 67 const StylePropertyShorthand& backgroundShorthand(); |
63 const StylePropertyShorthand& backgroundPositionShorthand(); | 68 const StylePropertyShorthand& backgroundPositionShorthand(); |
64 const StylePropertyShorthand& backgroundRepeatShorthand(); | 69 const StylePropertyShorthand& backgroundRepeatShorthand(); |
65 const StylePropertyShorthand& borderShorthand(); | 70 const StylePropertyShorthand& borderShorthand(); |
66 const StylePropertyShorthand& borderAbridgedShorthand(); | 71 const StylePropertyShorthand& borderAbridgedShorthand(); |
67 const StylePropertyShorthand& borderBottomShorthand(); | 72 const StylePropertyShorthand& borderBottomShorthand(); |
68 const StylePropertyShorthand& borderColorShorthand(); | 73 const StylePropertyShorthand& borderColorShorthand(); |
69 const StylePropertyShorthand& borderImageShorthand(); | 74 const StylePropertyShorthand& borderImageShorthand(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 #endif | 112 #endif |
108 | 113 |
109 // Returns an empty list if the property is not a shorthand | 114 // Returns an empty list if the property is not a shorthand |
110 const StylePropertyShorthand& shorthandForProperty(CSSPropertyID); | 115 const StylePropertyShorthand& shorthandForProperty(CSSPropertyID); |
111 | 116 |
112 bool isExpandedShorthand(CSSPropertyID); | 117 bool isExpandedShorthand(CSSPropertyID); |
113 | 118 |
114 } // namespace WebCore | 119 } // namespace WebCore |
115 | 120 |
116 #endif // StylePropertyShorthand_h | 121 #endif // StylePropertyShorthand_h |
OLD | NEW |