#include "third_party/blink/renderer/core/paint/text_decoration_painter.h"
#include "third_party/blink/renderer/core/layout/inline/fragment_item.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_inline_text.h"
#include "third_party/blink/renderer/core/layout/text_decoration_offset.h"
#include "third_party/blink/renderer/core/paint/paint_info.h"
#include "third_party/blink/renderer/core/paint/text_painter.h"
#include "third_party/blink/renderer/core/paint/text_shadow_painter.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context_state_saver.h"
namespace blink {
namespace {
Color LineColorForPhase(TextDecorationInfo& decoration_info,
TextShadowPaintPhase phase) { … }
}
TextDecorationPainter::TextDecorationPainter(
TextPainter& text_painter,
const InlinePaintContext* inline_context,
const PaintInfo& paint_info,
const ComputedStyle& style,
const TextPaintStyle& text_style,
const LineRelativeRect& decoration_rect,
HighlightPainter::SelectionPaintState* selection)
: … { … }
TextDecorationPainter::~TextDecorationPainter() { … }
void TextDecorationPainter::UpdateDecorationInfo(
std::optional<TextDecorationInfo>& result,
const FragmentItem& text_item,
const ComputedStyle& style,
std::optional<LineRelativeRect> decoration_rect_override,
const AppliedTextDecoration* decoration_override) { … }
gfx::RectF TextDecorationPainter::ExpandRectForSVGDecorations(
const LineRelativeRect& rect) { … }
void TextDecorationPainter::Begin(const FragmentItem& text_item, Phase phase) { … }
void TextDecorationPainter::PaintUnderOrOverLineDecorations(
TextDecorationInfo& decoration_info,
const TextFragmentPaintInfo& fragment_paint_info,
const TextPaintStyle& text_style,
TextDecorationLine lines_to_paint) { … }
void TextDecorationPainter::PaintLineThroughDecorations(
TextDecorationInfo& decoration_info,
const TextPaintStyle& text_style) { … }
void TextDecorationPainter::PaintExceptLineThrough(
const TextFragmentPaintInfo& fragment_paint_info) { … }
void TextDecorationPainter::PaintOnlyLineThrough() { … }
void TextDecorationPainter::PaintExceptLineThrough(
TextDecorationInfo& decoration_info,
const TextPaintStyle& text_style,
const TextFragmentPaintInfo& fragment_paint_info,
TextDecorationLine lines_to_paint) { … }
void TextDecorationPainter::PaintOnlyLineThrough(
TextDecorationInfo& decoration_info,
const TextPaintStyle& text_style) { … }
void TextDecorationPainter::ClipIfNeeded(
GraphicsContextStateSaver& state_saver) { … }
}