#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_gradient.h"
#include <memory>
#include "third_party/blink/renderer/core/svg/gradient_attributes.h"
#include "third_party/blink/renderer/core/svg/svg_length.h"
#include "third_party/blink/renderer/core/svg/svg_length_context.h"
#include "third_party/blink/renderer/core/svg/svg_length_functions.h"
#include "third_party/blink/renderer/platform/graphics/gradient.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context.h"
#include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/transforms/affine_transform.h"
namespace blink {
namespace {
gfx::SizeF MakeViewport(const SVGViewportResolver& viewport_resolver,
const LengthPoint& point,
SVGUnitTypes::SVGUnitType type) { … }
float MakeViewportDimension(const SVGViewportResolver& viewport_resolver,
const Length& radius,
SVGUnitTypes::SVGUnitType type) { … }
}
struct GradientData { … };
LayoutSVGResourceGradient::LayoutSVGResourceGradient(SVGGradientElement* node)
: … { … }
void LayoutSVGResourceGradient::Trace(Visitor* visitor) const { … }
void LayoutSVGResourceGradient::RemoveAllClientsFromCache() { … }
bool LayoutSVGResourceGradient::RemoveClientFromCache(
SVGResourceClient& client) { … }
std::unique_ptr<GradientData> LayoutSVGResourceGradient::BuildGradientData(
const gfx::RectF& object_bounding_box) const { … }
bool LayoutSVGResourceGradient::ApplyShader(
const SVGResourceClient& client,
const gfx::RectF& reference_box,
const AffineTransform* additional_transform,
const AutoDarkMode& auto_dark_mode,
cc::PaintFlags& flags) { … }
bool LayoutSVGResourceGradient::IsChildAllowed(LayoutObject* child,
const ComputedStyle&) const { … }
gfx::PointF LayoutSVGResourceGradient::ResolvePoint(
SVGUnitTypes::SVGUnitType type,
const SVGLength& x,
const SVGLength& y) const { … }
float LayoutSVGResourceGradient::ResolveRadius(SVGUnitTypes::SVGUnitType type,
const SVGLength& r) const { … }
GradientSpreadMethod LayoutSVGResourceGradient::PlatformSpreadMethodFromSVGType(
SVGSpreadMethodType method) { … }
}