OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 : StyleColor(m_textStrokeColor); | 80 : StyleColor(m_textStrokeColor); |
81 } | 81 } |
82 StyleColor textFillColor() const { | 82 StyleColor textFillColor() const { |
83 return m_textFillColorIsCurrentColor ? StyleColor::currentColor() | 83 return m_textFillColorIsCurrentColor ? StyleColor::currentColor() |
84 : StyleColor(m_textFillColor); | 84 : StyleColor(m_textFillColor); |
85 } | 85 } |
86 StyleColor textEmphasisColor() const { | 86 StyleColor textEmphasisColor() const { |
87 return m_textEmphasisColorIsCurrentColor ? StyleColor::currentColor() | 87 return m_textEmphasisColorIsCurrentColor ? StyleColor::currentColor() |
88 : StyleColor(m_textEmphasisColor); | 88 : StyleColor(m_textEmphasisColor); |
89 } | 89 } |
| 90 StyleColor caretColor() const { |
| 91 if (m_caretColorIsCurrentColor) |
| 92 return StyleColor::currentColor(); |
| 93 if (m_caretColorIsAuto) |
| 94 return StyleColor::autoColor(); |
| 95 return StyleColor(m_caretColor); |
| 96 } |
90 StyleColor visitedLinkTextStrokeColor() const { | 97 StyleColor visitedLinkTextStrokeColor() const { |
91 return m_visitedLinkTextStrokeColorIsCurrentColor | 98 return m_visitedLinkTextStrokeColorIsCurrentColor |
92 ? StyleColor::currentColor() | 99 ? StyleColor::currentColor() |
93 : StyleColor(m_visitedLinkTextStrokeColor); | 100 : StyleColor(m_visitedLinkTextStrokeColor); |
94 } | 101 } |
95 StyleColor visitedLinkTextFillColor() const { | 102 StyleColor visitedLinkTextFillColor() const { |
96 return m_visitedLinkTextFillColorIsCurrentColor | 103 return m_visitedLinkTextFillColorIsCurrentColor |
97 ? StyleColor::currentColor() | 104 ? StyleColor::currentColor() |
98 : StyleColor(m_visitedLinkTextFillColor); | 105 : StyleColor(m_visitedLinkTextFillColor); |
99 } | 106 } |
100 StyleColor visitedLinkTextEmphasisColor() const { | 107 StyleColor visitedLinkTextEmphasisColor() const { |
101 return m_visitedLinkTextEmphasisColorIsCurrentColor | 108 return m_visitedLinkTextEmphasisColorIsCurrentColor |
102 ? StyleColor::currentColor() | 109 ? StyleColor::currentColor() |
103 : StyleColor(m_visitedLinkTextEmphasisColor); | 110 : StyleColor(m_visitedLinkTextEmphasisColor); |
104 } | 111 } |
| 112 StyleColor visitedLinkCaretColor() const { |
| 113 if (m_visitedLinkCaretColorIsCurrentColor) |
| 114 return StyleColor::currentColor(); |
| 115 if (m_visitedLinkCaretColorIsAuto) |
| 116 return StyleColor::autoColor(); |
| 117 return StyleColor(m_visitedLinkCaretColor); |
| 118 } |
105 | 119 |
106 void setTextStrokeColor(const StyleColor& color) { | 120 void setTextStrokeColor(const StyleColor& color) { |
107 m_textStrokeColor = color.resolve(Color()); | 121 m_textStrokeColor = color.resolve(Color()); |
108 m_textStrokeColorIsCurrentColor = color.isCurrentColor(); | 122 m_textStrokeColorIsCurrentColor = color.isCurrentColor(); |
109 } | 123 } |
110 void setTextFillColor(const StyleColor& color) { | 124 void setTextFillColor(const StyleColor& color) { |
111 m_textFillColor = color.resolve(Color()); | 125 m_textFillColor = color.resolve(Color()); |
112 m_textFillColorIsCurrentColor = color.isCurrentColor(); | 126 m_textFillColorIsCurrentColor = color.isCurrentColor(); |
113 } | 127 } |
114 void setTextEmphasisColor(const StyleColor& color) { | 128 void setTextEmphasisColor(const StyleColor& color) { |
115 m_textEmphasisColor = color.resolve(Color()); | 129 m_textEmphasisColor = color.resolve(Color()); |
116 m_textEmphasisColorIsCurrentColor = color.isCurrentColor(); | 130 m_textEmphasisColorIsCurrentColor = color.isCurrentColor(); |
117 } | 131 } |
| 132 void setCaretColor(const StyleColor& color) { |
| 133 m_caretColor = color.resolve(Color()); |
| 134 m_caretColorIsCurrentColor = color.isCurrentColor(); |
| 135 m_caretColorIsAuto = color.isAutoColor(); |
| 136 } |
118 void setVisitedLinkTextStrokeColor(const StyleColor& color) { | 137 void setVisitedLinkTextStrokeColor(const StyleColor& color) { |
119 m_visitedLinkTextStrokeColor = color.resolve(Color()); | 138 m_visitedLinkTextStrokeColor = color.resolve(Color()); |
120 m_visitedLinkTextStrokeColorIsCurrentColor = color.isCurrentColor(); | 139 m_visitedLinkTextStrokeColorIsCurrentColor = color.isCurrentColor(); |
121 } | 140 } |
122 void setVisitedLinkTextFillColor(const StyleColor& color) { | 141 void setVisitedLinkTextFillColor(const StyleColor& color) { |
123 m_visitedLinkTextFillColor = color.resolve(Color()); | 142 m_visitedLinkTextFillColor = color.resolve(Color()); |
124 m_visitedLinkTextFillColorIsCurrentColor = color.isCurrentColor(); | 143 m_visitedLinkTextFillColorIsCurrentColor = color.isCurrentColor(); |
125 } | 144 } |
126 void setVisitedLinkTextEmphasisColor(const StyleColor& color) { | 145 void setVisitedLinkTextEmphasisColor(const StyleColor& color) { |
127 m_visitedLinkTextEmphasisColor = color.resolve(Color()); | 146 m_visitedLinkTextEmphasisColor = color.resolve(Color()); |
128 m_visitedLinkTextEmphasisColorIsCurrentColor = color.isCurrentColor(); | 147 m_visitedLinkTextEmphasisColorIsCurrentColor = color.isCurrentColor(); |
129 } | 148 } |
| 149 void setVisitedLinkCaretColor(const StyleColor& color) { |
| 150 m_visitedLinkCaretColor = color.resolve(Color()); |
| 151 m_visitedLinkCaretColorIsCurrentColor = color.isCurrentColor(); |
| 152 m_visitedLinkCaretColorIsAuto = color.isAutoColor(); |
| 153 } |
130 | 154 |
131 Color m_textStrokeColor; | 155 Color m_textStrokeColor; |
132 float textStrokeWidth; | 156 float textStrokeWidth; |
133 Color m_textFillColor; | 157 Color m_textFillColor; |
134 Color m_textEmphasisColor; | 158 Color m_textEmphasisColor; |
| 159 Color m_caretColor; |
135 | 160 |
136 Color m_visitedLinkTextStrokeColor; | 161 Color m_visitedLinkTextStrokeColor; |
137 Color m_visitedLinkTextFillColor; | 162 Color m_visitedLinkTextFillColor; |
138 Color m_visitedLinkTextEmphasisColor; | 163 Color m_visitedLinkTextEmphasisColor; |
| 164 Color m_visitedLinkCaretColor; |
139 | 165 |
140 RefPtr<ShadowList> | 166 RefPtr<ShadowList> |
141 textShadow; // Our text shadow information for shadowed text drawing. | 167 textShadow; // Our text shadow information for shadowed text drawing. |
142 AtomicString | 168 AtomicString |
143 highlight; // Apple-specific extension for custom highlight rendering. | 169 highlight; // Apple-specific extension for custom highlight rendering. |
144 | 170 |
145 Persistent<CursorList> cursorData; | 171 Persistent<CursorList> cursorData; |
146 | 172 |
147 Length indent; | 173 Length indent; |
148 float m_effectiveZoom; | 174 float m_effectiveZoom; |
149 | 175 |
150 // Paged media properties. | 176 // Paged media properties. |
151 short widows; | 177 short widows; |
152 short orphans; | 178 short orphans; |
153 | 179 |
154 unsigned m_textStrokeColorIsCurrentColor : 1; | 180 unsigned m_textStrokeColorIsCurrentColor : 1; |
155 unsigned m_textFillColorIsCurrentColor : 1; | 181 unsigned m_textFillColorIsCurrentColor : 1; |
156 unsigned m_textEmphasisColorIsCurrentColor : 1; | 182 unsigned m_textEmphasisColorIsCurrentColor : 1; |
| 183 unsigned m_caretColorIsCurrentColor : 1; |
| 184 unsigned m_caretColorIsAuto : 1; |
157 unsigned m_visitedLinkTextStrokeColorIsCurrentColor : 1; | 185 unsigned m_visitedLinkTextStrokeColorIsCurrentColor : 1; |
158 unsigned m_visitedLinkTextFillColorIsCurrentColor : 1; | 186 unsigned m_visitedLinkTextFillColorIsCurrentColor : 1; |
159 unsigned m_visitedLinkTextEmphasisColorIsCurrentColor : 1; | 187 unsigned m_visitedLinkTextEmphasisColorIsCurrentColor : 1; |
| 188 unsigned m_visitedLinkCaretColorIsCurrentColor : 1; |
| 189 unsigned m_visitedLinkCaretColorIsAuto : 1; |
160 | 190 |
161 unsigned textSecurity : 2; // ETextSecurity | 191 unsigned textSecurity : 2; // ETextSecurity |
162 unsigned userModify : 2; // EUserModify (editing) | 192 unsigned userModify : 2; // EUserModify (editing) |
163 unsigned wordBreak : 2; // EWordBreak | 193 unsigned wordBreak : 2; // EWordBreak |
164 unsigned overflowWrap : 1; // EOverflowWrap | 194 unsigned overflowWrap : 1; // EOverflowWrap |
165 unsigned lineBreak : 3; // LineBreak | 195 unsigned lineBreak : 3; // LineBreak |
166 unsigned userSelect : 2; // EUserSelect | 196 unsigned userSelect : 2; // EUserSelect |
167 unsigned speak : 3; // ESpeak | 197 unsigned speak : 3; // ESpeak |
168 unsigned hyphens : 2; // Hyphens | 198 unsigned hyphens : 2; // Hyphens |
169 unsigned textEmphasisFill : 1; // TextEmphasisFill | 199 unsigned textEmphasisFill : 1; // TextEmphasisFill |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 TextSizeAdjust m_textSizeAdjust; | 240 TextSizeAdjust m_textSizeAdjust; |
211 | 241 |
212 private: | 242 private: |
213 StyleRareInheritedData(); | 243 StyleRareInheritedData(); |
214 StyleRareInheritedData(const StyleRareInheritedData&); | 244 StyleRareInheritedData(const StyleRareInheritedData&); |
215 }; | 245 }; |
216 | 246 |
217 } // namespace blink | 247 } // namespace blink |
218 | 248 |
219 #endif // StyleRareInheritedData_h | 249 #endif // StyleRareInheritedData_h |
OLD | NEW |