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 #include "core/paint/TextPainter.h" | 5 #include "core/paint/TextPainter.h" |
6 | 6 |
7 #include "core/CSSPropertyNames.h" | 7 #include "core/CSSPropertyNames.h" |
8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
9 #include "core/layout/LayoutObject.h" | 9 #include "core/layout/LayoutObject.h" |
10 #include "core/layout/LayoutTextCombine.h" | 10 #include "core/layout/LayoutTextCombine.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 167 } |
168 | 168 |
169 void TextPainter::PaintDecorationUnderOrOverLine( | 169 void TextPainter::PaintDecorationUnderOrOverLine( |
170 GraphicsContext& context, | 170 GraphicsContext& context, |
171 const DecorationInfo& decoration_info, | 171 const DecorationInfo& decoration_info, |
172 const AppliedTextDecoration& decoration, | 172 const AppliedTextDecoration& decoration, |
173 int line_offset, | 173 int line_offset, |
174 float decoration_offset) { | 174 float decoration_offset) { |
175 AppliedDecorationPainter decoration_painter( | 175 AppliedDecorationPainter decoration_painter( |
176 context, decoration_info, line_offset, decoration, decoration_offset, 1); | 176 context, decoration_info, line_offset, decoration, decoration_offset, 1); |
177 if (decoration_info.style->GetTextDecorationSkip() & kTextDecorationSkipInk) { | 177 if (EnumHasFlags(decoration_info.style->GetTextDecorationSkip(), |
| 178 TextDecorationSkip::kInk)) { |
178 FloatRect decoration_bounds = decoration_painter.Bounds(); | 179 FloatRect decoration_bounds = decoration_painter.Bounds(); |
179 ClipDecorationsStripe(-decoration_info.baseline + decoration_bounds.Y() - | 180 ClipDecorationsStripe(-decoration_info.baseline + decoration_bounds.Y() - |
180 decoration_info.local_origin.Y(), | 181 decoration_info.local_origin.Y(), |
181 decoration_bounds.Height(), | 182 decoration_bounds.Height(), |
182 decoration_info.thickness); | 183 decoration_info.thickness); |
183 } | 184 } |
184 decoration_painter.Paint(); | 185 decoration_painter.Paint(); |
185 } | 186 } |
186 | 187 |
187 } // namespace blink | 188 } // namespace blink |
OLD | NEW |