Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: third_party/WebKit/Source/core/paint/TextPainter.cpp

Issue 2910513003: Make TextDecorationSkip an enum class. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698