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)
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.
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.
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.
25 #ifndef StyleRareNonInheritedData_h
26 #define StyleRareNonInheritedData_h
28 #include "CounterDirectives.h"
29 #include "CursorData.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>
41 class CSSStyleSelector;
42 class StyleFlexibleBoxData;
43 class StyleMarqueeData;
44 class StyleMultiColData;
45 class StyleReflection;
46 class StyleTransformData;
50 #if ENABLE(DASHBOARD_SUPPORT)
51 class StyleDashboardRegion;
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> {
63 static PassRefPtr<StyleRareNonInheritedData> create() { return adoptRef(new StyleRareNonInheritedData); }
64 PassRefPtr<StyleRareNonInheritedData> copy() const { return adoptRef(new StyleRareNonInheritedData(*this)); }
65 ~StyleRareNonInheritedData();
68 bool bindingsEquivalent(const StyleRareNonInheritedData&) const;
71 bool operator==(const StyleRareNonInheritedData&) const;
72 bool operator!=(const StyleRareNonInheritedData& o) const { return !(*this == o); }
74 bool contentDataEquivalent(const StyleRareNonInheritedData& o) const;
75 bool shadowDataEquivalent(const StyleRareNonInheritedData& o) const;
76 bool reflectionDataEquivalent(const StyleRareNonInheritedData& o) const;
77 bool animationDataEquivalent(const StyleRareNonInheritedData&) const;
78 bool transitionDataEquivalent(const StyleRareNonInheritedData&) const;
80 int lineClamp; // An Apple extension.
81 #if ENABLE(DASHBOARD_SUPPORT)
82 Vector<StyleDashboardRegion> m_dashboardRegions;
84 float opacity; // Whether or not we're transparent.
86 DataRef<StyleFlexibleBoxData> flexibleBox; // Flexible box properties
87 DataRef<StyleMarqueeData> marquee; // Marquee properties
88 DataRef<StyleMultiColData> m_multiCol; // CSS3 multicol properties
89 DataRef<StyleTransformData> m_transform; // Transform properties (rotate, scale, skew, etc.)
91 OwnPtr<ContentData> m_content;
92 OwnPtr<CounterDirectiveMap> m_counterDirectives;
94 unsigned userDrag : 2; // EUserDrag
95 bool textOverflow : 1; // Whether or not lines that spill out should be truncated with "..."
96 unsigned marginTopCollapse : 2; // EMarginCollapse
97 unsigned marginBottomCollapse : 2; // EMarginCollapse
98 unsigned matchNearestMailBlockquoteColor : 1; // EMatchNearestMailBlockquoteColor, FIXME: This property needs to be eliminated. It should never have been added.
99 unsigned m_appearance : 6; // EAppearance
100 unsigned m_borderFit : 1; // EBorderFit
101 #if USE(ACCELERATED_COMPOSITING)
102 bool m_runningAcceleratedAnimation : 1;
104 OwnPtr<ShadowData> m_boxShadow; // For box-shadow decorations.
106 RefPtr<StyleReflection> m_boxReflect;
108 OwnPtr<AnimationList> m_animations;
109 OwnPtr<AnimationList> m_transitions;
112 NinePieceImage m_maskBoxImage;
114 ETransformStyle3D m_transformStyle3D;
115 EBackfaceVisibility m_backfaceVisibility;
117 Length m_perspectiveOriginX;
118 Length m_perspectiveOriginY;
121 OwnPtr<BindingURI> bindingURI; // The XBL binding URI list.
125 StyleRareNonInheritedData();
126 StyleRareNonInheritedData(const StyleRareNonInheritedData&);
129 } // namespace WebCore
131 #endif // StyleRareNonInheritedData_h