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