#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/layout/ink_overflow.h"
#include "build/chromeos_buildflags.h"
#include "third_party/blink/renderer/core/editing/markers/custom_highlight_marker.h"
#include "third_party/blink/renderer/core/editing/markers/document_marker.h"
#include "third_party/blink/renderer/core/editing/markers/document_marker_controller.h"
#include "third_party/blink/renderer/core/highlight/highlight_style_utils.h"
#include "third_party/blink/renderer/core/layout/geometry/logical_rect.h"
#include "third_party/blink/renderer/core/layout/geometry/writing_mode_converter.h"
#include "third_party/blink/renderer/core/layout/inline/fragment_item.h"
#include "third_party/blink/renderer/core/layout/text_decoration_offset.h"
#include "third_party/blink/renderer/core/paint/highlight_painter.h"
#include "third_party/blink/renderer/core/paint/inline_paint_context.h"
#include "third_party/blink/renderer/core/paint/marker_range_mapping_context.h"
#include "third_party/blink/renderer/core/paint/text_decoration_info.h"
#include "third_party/blink/renderer/core/style/applied_text_decoration.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/platform/transforms/affine_transform.h"
#include "third_party/blink/renderer/platform/wtf/size_assertions.h"
namespace blink {
namespace …
#if DCHECK_IS_ON()
unsigned InkOverflow::read_unset_as_none_ = …;
InkOverflow::~InkOverflow() { … }
#endif
InkOverflow::InkOverflow(Type source_type, const InkOverflow& source) { … }
InkOverflow::InkOverflow(Type source_type, InkOverflow&& source) { … }
InkOverflow::Type InkOverflow::Reset(Type type, Type new_type) { … }
PhysicalRect InkOverflow::FromOutsets(const PhysicalSize& size) const { … }
PhysicalRect InkOverflow::Self(Type type, const PhysicalSize& size) const { … }
PhysicalRect InkOverflow::Contents(Type type, const PhysicalSize& size) const { … }
PhysicalRect InkOverflow::SelfAndContents(Type type,
const PhysicalSize& size) const { … }
bool InkOverflow::TrySetOutsets(Type type,
LayoutUnit left_outset,
LayoutUnit top_outset,
LayoutUnit right_outset,
LayoutUnit bottom_outset) { … }
InkOverflow::Type InkOverflow::SetSingle(Type type,
const PhysicalRect& ink_overflow,
const PhysicalSize& size,
Type new_type,
Type new_small_type) { … }
InkOverflow::Type InkOverflow::SetSelf(Type type,
const PhysicalRect& ink_overflow,
const PhysicalSize& size) { … }
InkOverflow::Type InkOverflow::SetContents(Type type,
const PhysicalRect& ink_overflow,
const PhysicalSize& size) { … }
InkOverflow::Type InkOverflow::Set(Type type,
const PhysicalRect& self,
const PhysicalRect& contents,
const PhysicalSize& size) { … }
InkOverflow::Type InkOverflow::SetTextInkOverflow(
Type type,
const InlineCursor& cursor,
const TextFragmentPaintInfo& text_info,
const ComputedStyle& style,
const PhysicalRect& rect_in_container,
const InlinePaintContext* inline_context,
PhysicalRect* ink_overflow_out) { … }
InkOverflow::Type InkOverflow::SetSvgTextInkOverflow(
Type type,
const InlineCursor& cursor,
const TextFragmentPaintInfo& text_info,
const ComputedStyle& style,
const Font& scaled_font,
const gfx::RectF& rect,
float scaling_factor,
float length_adjust_scale,
const AffineTransform& transform,
PhysicalRect* ink_overflow_out) { … }
std::optional<PhysicalRect> InkOverflow::ComputeTextInkOverflow(
const InlineCursor& cursor,
const TextFragmentPaintInfo& text_info,
const ComputedStyle& style,
const Font& scaled_font,
const PhysicalRect& rect_in_container,
const InlinePaintContext* inline_context) { … }
LogicalRect InkOverflow::ComputeEmphasisMarkOverflow(
const ComputedStyle& style,
const PhysicalSize& size,
const LogicalRect& ink_overflow_in) { … }
void InkOverflow::ExpandForShadowOverflow(LogicalRect& ink_overflow,
const ShadowList& text_shadow,
const WritingMode writing_mode) { … }
LogicalRect InkOverflow::ComputeDecorationOverflow(
const InlineCursor& cursor,
const ComputedStyle& style,
const Font& scaled_font,
const PhysicalOffset& container_offset,
const LogicalRect& ink_overflow,
const InlinePaintContext* inline_context,
const WritingMode writing_mode) { … }
LogicalRect InkOverflow::ComputeAppliedDecorationOverflow(
const ComputedStyle& style,
const Font& scaled_font,
const PhysicalOffset& offset_in_container,
const LogicalRect& ink_overflow,
const InlinePaintContext* inline_context,
const AppliedTextDecoration* decoration_override) { … }
LogicalRect InkOverflow::ComputeMarkerOverflow(
const DocumentMarkerVector& markers,
const DocumentMarker::MarkerType type,
const FragmentItem* fragment_item,
const TextOffsetRange& fragment_dom_offsets,
Text* text_node,
const ComputedStyle& style,
const Font& scaled_font,
const PhysicalOffset& offset_in_container,
const LogicalRect& ink_overflow,
const InlinePaintContext* inline_context,
const WritingMode writing_mode) { … }
LogicalRect InkOverflow::ComputeCustomHighlightOverflow(
const DocumentMarkerVector& markers,
const FragmentItem* fragment_item,
const TextOffsetRange& fragment_dom_offsets,
Text* text_node,
const ComputedStyle& style,
const Font& scaled_font,
const PhysicalOffset& offset_in_container,
const LogicalRect& ink_overflow,
const InlinePaintContext* inline_context) { … }
}