#include "third_party/blink/renderer/core/paint/clip_path_clipper.h"
#include "third_party/blink/renderer/core/animation/element_animations.h"
#include "third_party/blink/renderer/core/css/clip_path_paint_image_generator.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_utilities.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/layout/inline/inline_cursor.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/layout/layout_inline.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_clipper.h"
#include "third_party/blink/renderer/core/layout/svg/svg_resources.h"
#include "third_party/blink/renderer/core/layout/svg/transformed_hit_test_location.h"
#include "third_party/blink/renderer/core/paint/paint_auto_dark_mode.h"
#include "third_party/blink/renderer/core/paint/paint_info.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/paint/rounded_border_geometry.h"
#include "third_party/blink/renderer/core/style/clip_path_operation.h"
#include "third_party/blink/renderer/core/style/computed_style_constants.h"
#include "third_party/blink/renderer/core/style/geometry_box_clip_path_operation.h"
#include "third_party/blink/renderer/core/style/reference_clip_path_operation.h"
#include "third_party/blink/renderer/core/style/shape_clip_path_operation.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context.h"
#include "third_party/blink/renderer/platform/graphics/image.h"
#include "third_party/blink/renderer/platform/graphics/paint/drawing_display_item.h"
#include "third_party/blink/renderer/platform/graphics/paint/drawing_recorder.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_controller.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
#include "third_party/blink/renderer/platform/graphics/paint/scoped_paint_chunk_properties.h"
#include "ui/gfx/geometry/rect_conversions.h"
namespace blink {
CompositedPaintStatus;
namespace {
SVGResourceClient* GetResourceClient(const LayoutObject& object) { … }
LayoutSVGResourceClipper* ResolveElementReference(
const LayoutObject& object,
const ReferenceClipPathOperation& reference_clip_path_operation) { … }
PhysicalRect BorderBoxRect(const LayoutBoxModelObject& object) { … }
PhysicalBoxStrut ReferenceBoxBorderBoxOutsets(
GeometryBox geometry_box,
const LayoutBoxModelObject& object) { … }
FloatRoundedRect RoundedReferenceBox(GeometryBox geometry_box,
const LayoutObject& object) { … }
bool UsesPaintOffset(const LayoutObject& clip_path_owner) { … }
bool UsesZoomedReferenceBox(const LayoutObject& clip_path_owner) { … }
CompositedPaintStatus CompositeClipPathStatus(Node* node) { … }
void SetCompositeClipPathStatus(Node* node, bool is_compositable) { … }
bool CanCompositeClipPathAnimation(const LayoutObject& layout_object) { … }
bool HasCompositeClipPathAnimation(const LayoutObject& layout_object) { … }
void PaintWorkletBasedClip(GraphicsContext& context,
const LayoutObject& clip_path_owner,
const gfx::RectF& reference_box,
const LayoutObject& reference_box_object) { … }
}
void ClipPathClipper::ResolveClipPathStatus(const LayoutObject& layout_object,
bool is_in_block_fragmentation) { … }
gfx::RectF ClipPathClipper::LocalReferenceBox(const LayoutObject& object) { … }
std::optional<gfx::RectF> ClipPathClipper::LocalClipPathBoundingBox(
const LayoutObject& object) { … }
static AffineTransform UserSpaceToClipPathTransform(
const LayoutSVGResourceClipper& clipper,
const gfx::RectF& reference_box,
const LayoutObject& reference_box_object) { … }
static Path GetPathWithObjectZoom(const ShapeClipPathOperation& shape,
const gfx::RectF& reference_box,
const LayoutObject& reference_box_object) { … }
bool ClipPathClipper::HitTest(const LayoutObject& object,
const HitTestLocation& location) { … }
bool ClipPathClipper::HitTest(const LayoutObject& clip_path_owner,
const gfx::RectF& reference_box,
const LayoutObject& reference_box_object,
const HitTestLocation& location) { … }
static AffineTransform MaskToContentTransform(
const LayoutSVGResourceClipper& resource_clipper,
const gfx::RectF& reference_box,
const LayoutObject& reference_box_object) { … }
static std::optional<Path> PathBasedClipInternal(
const LayoutObject& clip_path_owner,
const gfx::RectF& reference_box,
const LayoutObject& reference_box_object) { … }
void ClipPathClipper::PaintClipPathAsMaskImage(
GraphicsContext& context,
const LayoutObject& layout_object,
const DisplayItemClient& display_item_client) { … }
std::optional<Path> ClipPathClipper::PathBasedClip(
const LayoutObject& clip_path_owner) { … }
}