OSDN Git Service

Merge WebKit at r59636: Initial merge by git
[android-x86/external-webkit.git] / WebCore / rendering / style / 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 "LineClampValue.h"
33 #include "NinePieceImage.h"
34 #include "StyleTransformData.h"
35 #include <wtf/OwnPtr.h>
36 #include <wtf/PassRefPtr.h>
37 #include <wtf/Vector.h>
38
39 namespace WebCore {
40
41 class AnimationList;
42 class CSSStyleSelector;
43 class ShadowData;
44 class StyleFlexibleBoxData;
45 class StyleMarqueeData;
46 class StyleMultiColData;
47 class StyleReflection;
48 class StyleTransformData;
49
50 struct ContentData;
51
52 #if ENABLE(DASHBOARD_SUPPORT)
53 class StyleDashboardRegion;
54 #endif
55
56 #if ENABLE(XBL)
57 class BindingURI;
58 #endif
59
60 // This struct is for rarely used non-inherited CSS3, CSS2, and WebKit-specific properties.
61 // By grouping them together, we save space, and only allocate this object when someone
62 // actually uses one of these properties.
63 class StyleRareNonInheritedData : public RefCounted<StyleRareNonInheritedData> {
64 public:
65     static PassRefPtr<StyleRareNonInheritedData> create() { return adoptRef(new StyleRareNonInheritedData); }
66     PassRefPtr<StyleRareNonInheritedData> copy() const { return adoptRef(new StyleRareNonInheritedData(*this)); }
67     ~StyleRareNonInheritedData();
68     
69 #if ENABLE(XBL)
70     bool bindingsEquivalent(const StyleRareNonInheritedData&) const;
71 #endif
72
73     bool operator==(const StyleRareNonInheritedData&) const;
74     bool operator!=(const StyleRareNonInheritedData& o) const { return !(*this == o); }
75
76     bool contentDataEquivalent(const StyleRareNonInheritedData& o) const;
77     bool shadowDataEquivalent(const StyleRareNonInheritedData& o) const;
78     bool reflectionDataEquivalent(const StyleRareNonInheritedData& o) const;
79     bool animationDataEquivalent(const StyleRareNonInheritedData&) const;
80     bool transitionDataEquivalent(const StyleRareNonInheritedData&) const;
81
82     LineClampValue lineClamp; // An Apple extension.
83 #if ENABLE(DASHBOARD_SUPPORT)
84     Vector<StyleDashboardRegion> m_dashboardRegions;
85 #endif
86     float opacity; // Whether or not we're transparent.
87
88     DataRef<StyleFlexibleBoxData> flexibleBox; // Flexible box properties 
89     DataRef<StyleMarqueeData> marquee; // Marquee properties
90     DataRef<StyleMultiColData> m_multiCol; //  CSS3 multicol properties
91     DataRef<StyleTransformData> m_transform; // Transform properties (rotate, scale, skew, etc.)
92
93     OwnPtr<ContentData> m_content;
94     OwnPtr<CounterDirectiveMap> m_counterDirectives;
95
96     unsigned userDrag : 2; // EUserDrag
97     bool textOverflow : 1; // Whether or not lines that spill out should be truncated with "..."
98     unsigned marginTopCollapse : 2; // EMarginCollapse
99     unsigned marginBottomCollapse : 2; // EMarginCollapse
100     unsigned matchNearestMailBlockquoteColor : 1; // EMatchNearestMailBlockquoteColor, FIXME: This property needs to be eliminated. It should never have been added.
101     unsigned m_appearance : 6; // EAppearance
102     unsigned m_borderFit : 1; // EBorderFit
103     
104     short m_counterIncrement;
105     short m_counterReset;
106     
107 #if USE(ACCELERATED_COMPOSITING)
108     bool m_runningAcceleratedAnimation : 1;
109 #endif
110     OwnPtr<ShadowData> m_boxShadow;  // For box-shadow decorations.
111     
112     RefPtr<StyleReflection> m_boxReflect;
113
114     OwnPtr<AnimationList> m_animations;
115     OwnPtr<AnimationList> m_transitions;
116
117     FillLayer m_mask;
118     NinePieceImage m_maskBoxImage;
119
120     ETransformStyle3D m_transformStyle3D;
121     EBackfaceVisibility m_backfaceVisibility;
122     float m_perspective;
123     Length m_perspectiveOriginX;
124     Length m_perspectiveOriginY;
125
126 #if ENABLE(XBL)
127     OwnPtr<BindingURI> bindingURI; // The XBL binding URI list.
128 #endif
129     
130 private:
131     StyleRareNonInheritedData();
132     StyleRareNonInheritedData(const StyleRareNonInheritedData&);
133 };
134
135 } // namespace WebCore
136
137 #endif // StyleRareNonInheritedData_h