chromium/third_party/blink/renderer/core/layout/hit_test_location.cc

/*
 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved.
 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
*/

#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 =;

// The Path::Intersects(const gfx::QuadF&, ...) functions have O(N^2) behavior,
// so to avoid performance issues we only call these functions for "shorter"
// Paths and fallback to using the single-point (approximately the centroid of
// the quad/rect) code-path - this matches behavior prior to
// crrev.com/c/5307520. See crbug.com/337338049 and crbug.com/341136034.
bool CanUseRectHitTestForPath(const Path& path) {}

}  // namespace

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 {}

}  // namespace blink