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 "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>
42 class CSSStyleSelector;
44 class StyleFlexibleBoxData;
45 class StyleMarqueeData;
46 class StyleMultiColData;
47 class StyleReflection;
48 class StyleTransformData;
53 #if ENABLE(DASHBOARD_SUPPORT)
54 struct StyleDashboardRegion;
58 // StyleRareNonInheritedData::m_pageSize is meaningful only when
59 // StyleRareNonInheritedData::m_pageSizeType is PAGE_SIZE_RESOLVED.
61 PAGE_SIZE_AUTO, // size: auto
62 PAGE_SIZE_AUTO_LANDSCAPE, // size: landscape
63 PAGE_SIZE_AUTO_PORTRAIT, // size: portrait
64 PAGE_SIZE_RESOLVED // Size is fully resolved.
67 // This struct is for rarely used non-inherited CSS3, CSS2, and WebKit-specific properties.
68 // By grouping them together, we save space, and only allocate this object when someone
69 // actually uses one of these properties.
70 class StyleRareNonInheritedData : public RefCounted<StyleRareNonInheritedData> {
72 static PassRefPtr<StyleRareNonInheritedData> create() { return adoptRef(new StyleRareNonInheritedData); }
73 PassRefPtr<StyleRareNonInheritedData> copy() const { return adoptRef(new StyleRareNonInheritedData(*this)); }
74 ~StyleRareNonInheritedData();
76 bool operator==(const StyleRareNonInheritedData&) const;
77 bool operator!=(const StyleRareNonInheritedData& o) const { return !(*this == o); }
79 bool contentDataEquivalent(const StyleRareNonInheritedData& o) const;
80 bool shadowDataEquivalent(const StyleRareNonInheritedData& o) const;
81 bool reflectionDataEquivalent(const StyleRareNonInheritedData& o) const;
82 bool animationDataEquivalent(const StyleRareNonInheritedData&) const;
83 bool transitionDataEquivalent(const StyleRareNonInheritedData&) const;
85 LineClampValue lineClamp; // An Apple extension.
86 #if ENABLE(DASHBOARD_SUPPORT)
87 Vector<StyleDashboardRegion> m_dashboardRegions;
89 float opacity; // Whether or not we're transparent.
91 DataRef<StyleFlexibleBoxData> flexibleBox; // Flexible box properties
92 DataRef<StyleMarqueeData> marquee; // Marquee properties
93 DataRef<StyleMultiColData> m_multiCol; // CSS3 multicol properties
94 DataRef<StyleTransformData> m_transform; // Transform properties (rotate, scale, skew, etc.)
96 OwnPtr<ContentData> m_content;
97 OwnPtr<CounterDirectiveMap> m_counterDirectives;
99 unsigned userDrag : 2; // EUserDrag
100 bool textOverflow : 1; // Whether or not lines that spill out should be truncated with "..."
101 unsigned marginTopCollapse : 2; // EMarginCollapse
102 unsigned marginBottomCollapse : 2; // EMarginCollapse
103 unsigned matchNearestMailBlockquoteColor : 1; // EMatchNearestMailBlockquoteColor, FIXME: This property needs to be eliminated. It should never have been added.
104 unsigned m_appearance : 6; // EAppearance
105 unsigned m_borderFit : 1; // EBorderFit
107 short m_counterIncrement;
108 short m_counterReset;
110 #if USE(ACCELERATED_COMPOSITING)
111 bool m_runningAcceleratedAnimation : 1;
113 OwnPtr<ShadowData> m_boxShadow; // For box-shadow decorations.
115 RefPtr<StyleReflection> m_boxReflect;
117 OwnPtr<AnimationList> m_animations;
118 OwnPtr<AnimationList> m_transitions;
121 NinePieceImage m_maskBoxImage;
123 ETransformStyle3D m_transformStyle3D;
124 EBackfaceVisibility m_backfaceVisibility;
126 Length m_perspectiveOriginX;
127 Length m_perspectiveOriginY;
129 LengthSize m_pageSize;
130 PageSizeType m_pageSizeType;
133 StyleRareNonInheritedData();
134 StyleRareNonInheritedData(const StyleRareNonInheritedData&);
137 } // namespace WebCore
139 #endif // StyleRareNonInheritedData_h