#include "third_party/blink/renderer/core/layout/svg/layout_svg_shape.h"
#include "third_party/blink/renderer/core/layout/hit_test_location.h"
#include "third_party/blink/renderer/core/layout/hit_test_result.h"
#include "third_party/blink/renderer/core/layout/pointer_events_hit_rules.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_root.h"
#include "third_party/blink/renderer/core/layout/svg/svg_layout_info.h"
#include "third_party/blink/renderer/core/layout/svg/svg_layout_support.h"
#include "third_party/blink/renderer/core/layout/svg/svg_resources.h"
#include "third_party/blink/renderer/core/layout/svg/transform_helper.h"
#include "third_party/blink/renderer/core/layout/svg/transformed_hit_test_location.h"
#include "third_party/blink/renderer/core/paint/clip_path_clipper.h"
#include "third_party/blink/renderer/core/paint/svg_shape_painter.h"
#include "third_party/blink/renderer/core/svg/svg_geometry_element.h"
#include "third_party/blink/renderer/core/svg/svg_length_functions.h"
#include "third_party/blink/renderer/platform/graphics/stroke_data.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "ui/gfx/geometry/point_f.h"
namespace blink {
namespace {
void ClampBoundsToFinite(gfx::RectF& bounds) { … }
}
LayoutSVGShape::LayoutSVGShape(SVGGeometryElement* node)
: … { … }
LayoutSVGShape::~LayoutSVGShape() = default;
void LayoutSVGShape::StyleDidChange(StyleDifference diff,
const ComputedStyle* old_style) { … }
void LayoutSVGShape::WillBeDestroyed() { … }
void LayoutSVGShape::ClearPath() { … }
void LayoutSVGShape::CreatePath() { … }
float LayoutSVGShape::DashScaleFactor() const { … }
namespace {
bool HasMiterJoinStyle(const ComputedStyle& style) { … }
bool HasSquareCapStyle(const ComputedStyle& style) { … }
bool CanUseSimpleStrokeApproximation(
LayoutSVGShape::GeometryType geometry_type) { … }
bool CanHaveMiters(LayoutSVGShape::GeometryType geometry_type) { … }
bool CanHaveMitersOrCaps(LayoutSVGShape::GeometryType geometry_type) { … }
}
gfx::RectF LayoutSVGShape::ApproximateStrokeBoundingBox(
const gfx::RectF& shape_bounds) const { … }
gfx::RectF LayoutSVGShape::HitTestStrokeBoundingBox() const { … }
gfx::RectF LayoutSVGShape::StrokeBoundingBox() const { … }
bool LayoutSVGShape::ShapeDependentStrokeContains(
const HitTestLocation& location) { … }
bool LayoutSVGShape::ShapeDependentFillContains(
const HitTestLocation& location,
const WindRule fill_rule) const { … }
static bool HasPaintServer(const LayoutObject& object, const SVGPaint& paint) { … }
bool LayoutSVGShape::FillContains(const HitTestLocation& location,
bool requires_fill,
const WindRule fill_rule) { … }
bool LayoutSVGShape::StrokeContains(const HitTestLocation& location,
bool requires_stroke) { … }
SVGLayoutResult LayoutSVGShape::UpdateSVGLayout(
const SVGLayoutInfo& layout_info) { … }
bool LayoutSVGShape::UpdateAfterSVGLayout(const SVGLayoutInfo& layout_info,
bool bbox_changed) { … }
AffineTransform LayoutSVGShape::ComputeRootTransform() const { … }
AffineTransform LayoutSVGShape::ComputeNonScalingStrokeTransform() const { … }
void LayoutSVGShape::UpdateNonScalingStrokeData() { … }
void LayoutSVGShape::Paint(const PaintInfo& paint_info) const { … }
bool LayoutSVGShape::NodeAtPoint(HitTestResult& result,
const HitTestLocation& hit_test_location,
const PhysicalOffset& accumulated_offset,
HitTestPhase phase) { … }
bool LayoutSVGShape::HitTestShape(const HitTestRequest& request,
const HitTestLocation& local_location,
PointerEventsHitRules hit_rules) { … }
gfx::RectF LayoutSVGShape::CalculateStrokeBoundingBox() const { … }
gfx::RectF LayoutSVGShape::CalculateNonScalingStrokeBoundingBox() const { … }
float LayoutSVGShape::StrokeWidth() const { … }
float LayoutSVGShape::StrokeWidthForMarkerUnits() const { … }
LayoutSVGShapeRareData& LayoutSVGShape::EnsureRareData() const { … }
RasterEffectOutset LayoutSVGShape::VisualRectOutsetForRasterEffects() const { … }
}