#include "third_party/blink/renderer/core/layout/hit_test_location.h"
#include <cmath>
#include "third_party/blink/renderer/platform/geometry/float_rounded_rect.h"
#include "third_party/blink/renderer/platform/graphics/path.h"
namespace blink {
namespace {
bool PointInRectangleStroke(const gfx::PointF& point,
const gfx::RectF& rect,
float stroke_width) { … }
bool QuadIntersectsRectangleStroke(const gfx::QuadF& quad,
const gfx::RectF& rect,
float stroke_width) { … }
bool PointInEllipse(const gfx::PointF& point,
const gfx::PointF& center,
const gfx::SizeF& radii) { … }
float DistanceBetween(const gfx::PointF& from, const gfx::PointF& to) { … }
bool PointInCircleStroke(const gfx::PointF& point,
const gfx::PointF& center,
float radius,
float stroke_width) { … }
bool QuadIntersectsCircleStroke(const gfx::QuadF& quad,
const gfx::PointF& center,
float radius,
float stroke_width) { … }
constexpr int kMaxRectHitTestVerbs = …;
bool CanUseRectHitTestForPath(const Path& path) { … }
}
HitTestLocation::HitTestLocation()
: … { … }
HitTestLocation::HitTestLocation(const gfx::Point& point)
: … { … }
HitTestLocation::HitTestLocation(const PhysicalOffset& point)
: … { … }
HitTestLocation::HitTestLocation(const gfx::PointF& point)
: … { … }
HitTestLocation::HitTestLocation(const gfx::PointF& point,
const PhysicalRect& bounding_box)
: … { … }
HitTestLocation::HitTestLocation(const gfx::PointF& point,
const gfx::QuadF& quad)
: … { … }
HitTestLocation::HitTestLocation(const PhysicalRect& rect)
: … { … }
HitTestLocation::HitTestLocation(const HitTestLocation& other,
const PhysicalOffset& offset)
: … { … }
HitTestLocation::HitTestLocation(const HitTestLocation& other,
wtf_size_t fragment_index)
: … { … }
HitTestLocation::HitTestLocation(const HitTestLocation& other) = default;
HitTestLocation& HitTestLocation::operator=(const HitTestLocation& other) =
default;
void HitTestLocation::Move(const PhysicalOffset& offset) { … }
bool HitTestLocation::Intersects(const PhysicalRect& rect) const { … }
bool HitTestLocation::Intersects(const gfx::RectF& rect) const { … }
bool HitTestLocation::Intersects(const FloatRoundedRect& rect) const { … }
bool HitTestLocation::Intersects(const gfx::QuadF& quad) const { … }
bool HitTestLocation::ContainsPoint(const gfx::PointF& point) const { … }
bool HitTestLocation::Intersects(const Path& path) const { … }
bool HitTestLocation::Intersects(const Path& path,
WindRule winding_rule) const { … }
bool HitTestLocation::IntersectsStroke(const gfx::RectF& rect,
float stroke_width) const { … }
bool HitTestLocation::IntersectsEllipse(const gfx::PointF& center,
const gfx::SizeF& radii) const { … }
bool HitTestLocation::IntersectsCircleStroke(const gfx::PointF& center,
float radius,
float stroke_width) const { … }
}