blob: fd28ff33042b2cd5f2d6c51a6bb7cf1f987ac39b [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_TEXT_DECORATION_OFFSET_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_TEXT_DECORATION_OFFSET_H_
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/layout/api/line_layout_item.h"
#include "third_party/blink/renderer/core/layout/text_decoration_offset_base.h"
namespace blink {
class ComputedStyle;
class InlineTextBox;
class CORE_EXPORT TextDecorationOffset : public TextDecorationOffsetBase {
STACK_ALLOCATED();
public:
TextDecorationOffset(const ComputedStyle& style,
const InlineTextBox* inline_text_box,
LineLayoutItem decorating_box)
: TextDecorationOffsetBase(style),
inline_text_box_(inline_text_box),
decorating_box_(decorating_box) {}
~TextDecorationOffset() = default;
int ComputeUnderlineOffsetForUnder(float text_decoration_thickness,
FontVerticalPositionType) const override;
private:
const InlineTextBox* inline_text_box_;
LineLayoutItem decorating_box_;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_TEXT_DECORATION_OFFSET_H_