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