]> git.saurik.com Git - iphone-api.git/blob - WebCore/StyleRareNonInheritedData.h
Add support for new WinterBoard Settings features.
[iphone-api.git] / WebCore / StyleRareNonInheritedData.h
1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22 *
23 */
24
25 #ifndef StyleRareNonInheritedData_h
26 #define StyleRareNonInheritedData_h
27
28 #include "CounterDirectives.h"
29 #include "CursorData.h"
30 #include "DataRef.h"
31 #include "FillLayer.h"
32 #include "NinePieceImage.h"
33 #include "StyleTransformData.h"
34 #include <wtf/OwnPtr.h>
35 #include <wtf/PassRefPtr.h>
36 #include <wtf/Vector.h>
37
38 namespace WebCore {
39
40 class AnimationList;
41 class CSSStyleSelector;
42 class StyleFlexibleBoxData;
43 class StyleMarqueeData;
44 class StyleMultiColData;
45 class StyleReflection;
46 class StyleTransformData;
47 struct ContentData;
48 struct ShadowData;
49
50 #if ENABLE(DASHBOARD_SUPPORT)
51 class StyleDashboardRegion;
52 #endif
53
54 #if ENABLE(XBL)
55 class BindingURI;
56 #endif
57
58 // This struct is for rarely used non-inherited CSS3, CSS2, and WebKit-specific properties.
59 // By grouping them together, we save space, and only allocate this object when someone
60 // actually uses one of these properties.
61 class StyleRareNonInheritedData : public RefCounted<StyleRareNonInheritedData> {
62 public:
63 static PassRefPtr<StyleRareNonInheritedData> create() { return adoptRef(new StyleRareNonInheritedData); }
64 PassRefPtr<StyleRareNonInheritedData> copy() const { return adoptRef(new StyleRareNonInheritedData(*this)); }
65 ~StyleRareNonInheritedData();
66
67 #if ENABLE(XBL)
68 bool bindingsEquivalent(const StyleRareNonInheritedData&) const;
69 #endif
70
71 bool operator==(const StyleRareNonInheritedData&) const;
72 bool operator!=(const StyleRareNonInheritedData& o) const { return !(*this == o); }
73
74 bool shadowDataEquivalent(const StyleRareNonInheritedData& o) const;
75 bool reflectionDataEquivalent(const StyleRareNonInheritedData& o) const;
76 bool animationDataEquivalent(const StyleRareNonInheritedData&) const;
77 bool transitionDataEquivalent(const StyleRareNonInheritedData&) const;
78
79 int lineClamp; // An Apple extension.
80 #if ENABLE(DASHBOARD_SUPPORT)
81 Vector<StyleDashboardRegion> m_dashboardRegions;
82 #endif
83 float opacity; // Whether or not we're transparent.
84
85 DataRef<StyleFlexibleBoxData> flexibleBox; // Flexible box properties
86 DataRef<StyleMarqueeData> marquee; // Marquee properties
87 DataRef<StyleMultiColData> m_multiCol; // CSS3 multicol properties
88 DataRef<StyleTransformData> m_transform; // Transform properties (rotate, scale, skew, etc.)
89
90 OwnPtr<ContentData> m_content;
91 OwnPtr<CounterDirectiveMap> m_counterDirectives;
92
93 unsigned userDrag : 2; // EUserDrag
94 bool textOverflow : 1; // Whether or not lines that spill out should be truncated with "..."
95 unsigned marginTopCollapse : 2; // EMarginCollapse
96 unsigned marginBottomCollapse : 2; // EMarginCollapse
97 unsigned matchNearestMailBlockquoteColor : 1; // EMatchNearestMailBlockquoteColor, FIXME: This property needs to be eliminated. It should never have been added.
98 unsigned m_appearance : 6; // EAppearance
99 unsigned m_borderFit : 1; // EBorderFit
100 #if USE(ACCELERATED_COMPOSITING)
101 bool m_runningAcceleratedAnimation : 1;
102 #endif
103 unsigned m_imageLoadingBorder : 1;
104 OwnPtr<ShadowData> m_boxShadow; // For box-shadow decorations.
105
106 RefPtr<StyleReflection> m_boxReflect;
107
108 OwnPtr<AnimationList> m_animations;
109 OwnPtr<AnimationList> m_transitions;
110
111 FillLayer m_mask;
112 NinePieceImage m_maskBoxImage;
113
114 ETransformStyle3D m_transformStyle3D;
115 EBackfaceVisibility m_backfaceVisibility;
116 float m_perspective;
117 Length m_perspectiveOriginX;
118 Length m_perspectiveOriginY;
119
120 #if ENABLE(XBL)
121 OwnPtr<BindingURI> bindingURI; // The XBL binding URI list.
122 #endif
123
124 private:
125 StyleRareNonInheritedData();
126 StyleRareNonInheritedData(const StyleRareNonInheritedData&);
127 };
128
129 } // namespace WebCore
130
131 #endif // StyleRareNonInheritedData_h