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 StyleRareInheritedData_h
26 #define StyleRareInheritedData_h
28 #include "core/css/StyleColor.h"
29 #include "core/rendering/style/DataRef.h"
30 #include "core/rendering/style/StyleVariableData.h"
31 #include "platform/Length.h"
32 #include "platform/graphics/Color.h"
33 #include "wtf/PassRefPtr.h"
34 #include "wtf/RefCounted.h"
35 #include "wtf/text/AtomicString.h"
44 // This struct is for rarely used inherited CSS3, CSS2, and WebKit-specific properties.
45 // By grouping them together, we save space, and only allocate this object when someone
46 // actually uses one of these properties.
47 class StyleRareInheritedData : public RefCounted<StyleRareInheritedData> {
49 static PassRefPtr<StyleRareInheritedData> create() { return adoptRef(new StyleRareInheritedData); }
50 PassRefPtr<StyleRareInheritedData> copy() const { return adoptRef(new StyleRareInheritedData(*this)); }
51 ~StyleRareInheritedData();
53 bool operator==(const StyleRareInheritedData& o) const;
54 bool operator!=(const StyleRareInheritedData& o) const
58 bool shadowDataEquivalent(const StyleRareInheritedData&) const;
60 RefPtr<StyleImage> listStyleImage;
62 StyleColor textStrokeColor;
63 float textStrokeWidth;
64 StyleColor textFillColor;
65 StyleColor textEmphasisColor;
67 StyleColor visitedLinkTextStrokeColor;
68 StyleColor visitedLinkTextFillColor;
69 StyleColor visitedLinkTextEmphasisColor;
71 RefPtr<ShadowList> textShadow; // Our text shadow information for shadowed text drawing.
72 AtomicString highlight; // Apple-specific extension for custom highlight rendering.
74 RefPtr<CursorList> cursorData;
76 float m_effectiveZoom;
78 // Paged media properties.
81 unsigned m_hasAutoWidows : 1;
82 unsigned m_hasAutoOrphans : 1;
84 unsigned textSecurity : 2; // ETextSecurity
85 unsigned userModify : 2; // EUserModify (editing)
86 unsigned wordBreak : 2; // EWordBreak
87 unsigned overflowWrap : 1; // EOverflowWrap
88 unsigned lineBreak : 3; // LineBreak
89 unsigned resize : 2; // EResize
90 unsigned userSelect : 2; // EUserSelect
91 unsigned speak : 3; // ESpeak
92 unsigned hyphens : 2; // Hyphens
93 unsigned textEmphasisFill : 1; // TextEmphasisFill
94 unsigned textEmphasisMark : 3; // TextEmphasisMark
95 unsigned textEmphasisPosition : 1; // TextEmphasisPosition
96 unsigned m_textAlignLast : 3; // TextAlignLast
97 unsigned m_textJustify : 2; // TextJustify
98 unsigned m_textOrientation : 2; // TextOrientation
99 unsigned m_textIndentLine : 1; // TextIndentEachLine
100 unsigned m_lineBoxContain: 7; // LineBoxContain
101 // CSS Image Values Level 3
102 unsigned m_imageRendering : 2; // EImageRendering
103 unsigned m_lineSnap : 2; // LineSnap
104 unsigned m_lineAlign : 1; // LineAlign
105 unsigned m_textUnderlinePosition : 2; // TextUnderlinePosition
106 unsigned m_rubyPosition : 1; // RubyPosition
107 unsigned m_touchActionDelay : 1; // TouchActionDelay
109 AtomicString hyphenationString;
110 short hyphenationLimitBefore;
111 short hyphenationLimitAfter;
112 short hyphenationLimitLines;
116 AtomicString textEmphasisCustomMark;
117 RefPtr<QuotesData> quotes;
119 AtomicString m_lineGrid;
122 Color tapHighlightColor;
124 DataRef<StyleVariableData> m_variables;
127 StyleRareInheritedData();
128 StyleRareInheritedData(const StyleRareInheritedData&);
131 } // namespace WebCore
133 #endif // StyleRareInheritedData_h