OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef AppliedTextDecoration_h | 5 #ifndef AppliedTextDecoration_h |
6 #define AppliedTextDecoration_h | 6 #define AppliedTextDecoration_h |
7 | 7 |
8 #include "core/css/StyleColor.h" | |
8 #include "core/rendering/style/RenderStyleConstants.h" | 9 #include "core/rendering/style/RenderStyleConstants.h" |
9 | 10 |
10 namespace WebCore { | 11 namespace WebCore { |
11 | 12 |
12 class AppliedTextDecoration { | 13 class AppliedTextDecoration { |
13 public: | 14 public: |
15 AppliedTextDecoration(TextDecoration, TextDecorationStyle, StyleColor); | |
14 explicit AppliedTextDecoration(TextDecoration); | 16 explicit AppliedTextDecoration(TextDecoration); |
15 AppliedTextDecoration(); | 17 AppliedTextDecoration(); |
16 | 18 |
17 TextDecoration line() const { return static_cast<TextDecoration>(m_line); } | 19 TextDecoration line() const { return static_cast<TextDecoration>(m_line); } |
20 TextDecorationStyle style() const { return static_cast<TextDecorationStyle>( m_style); } | |
18 | 21 |
22 bool isSimple() const { return m_style == TextDecorationStyleSolid && m_colo r.isCurrentColor(); } | |
Julien - ping for review
2014/05/19 10:30:18
We should disambiguate this function: it only make
andersr
2014/05/19 12:54:02
Done.
| |
19 bool operator==(const AppliedTextDecoration&) const; | 23 bool operator==(const AppliedTextDecoration&) const; |
20 bool operator!=(const AppliedTextDecoration& o) const { return !(*this == o) ; } | 24 bool operator!=(const AppliedTextDecoration& o) const { return !(*this == o) ; } |
21 | 25 |
22 private: | 26 private: |
23 unsigned m_line : TextDecorationBits; | 27 unsigned m_line : TextDecorationBits; |
28 unsigned m_style : 3; // TextDecorationStyle | |
29 StyleColor m_color; | |
24 }; | 30 }; |
25 | 31 |
26 } // namespace WebCore | 32 } // namespace WebCore |
27 | 33 |
28 #endif // AppliedTextDecoration_h | 34 #endif // AppliedTextDecoration_h |
OLD | NEW |