#include "third_party/blink/renderer/core/layout/hit_test_result.h"
#include "cc/base/region.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_utilities.h"
#include "third_party/blink/renderer/core/dom/flat_tree_traversal.h"
#include "third_party/blink/renderer/core/dom/pseudo_element.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/editing/position_with_affinity.h"
#include "third_party/blink/renderer/core/editing/text_affinity.h"
#include "third_party/blink/renderer/core/editing/visible_units.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/html/forms/html_input_element.h"
#include "third_party/blink/renderer/core/html/forms/html_text_area_element.h"
#include "third_party/blink/renderer/core/html/html_area_element.h"
#include "third_party/blink/renderer/core/html/html_embed_element.h"
#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/renderer/core/html/html_map_element.h"
#include "third_party/blink/renderer/core/html/html_object_element.h"
#include "third_party/blink/renderer/core/html/media/html_media_element.h"
#include "third_party/blink/renderer/core/html/media/media_source_handle.h"
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input_type_names.h"
#include "third_party/blink/renderer/core/layout/hit_test_location.h"
#include "third_party/blink/renderer/core/layout/layout_block.h"
#include "third_party/blink/renderer/core/layout/layout_embedded_content.h"
#include "third_party/blink/renderer/core/layout/layout_image.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_image.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.h"
#include "third_party/blink/renderer/core/scroll/scrollbar.h"
#include "third_party/blink/renderer/core/svg/svg_element.h"
#include "third_party/blink/renderer/platform/mediastream/media_stream_descriptor.h"
#include "ui/gfx/geometry/rect_conversions.h"
namespace blink {
FormControlType;
namespace {
bool HasImageSourceURL(const Node& node) { … }
}
HitTestResult::HitTestResult()
: … { … }
HitTestResult::HitTestResult(const HitTestRequest& other_request,
const HitTestLocation& location)
: … { … }
HitTestResult::HitTestResult(const HitTestResult& other)
: … { … }
HitTestResult::~HitTestResult() = default;
HitTestResult& HitTestResult::operator=(const HitTestResult& other) { … }
bool HitTestResult::EqualForCacheability(const HitTestResult& other) const { … }
void HitTestResult::CacheValues(const HitTestResult& other) { … }
void HitTestResult::PopulateFromCachedResult(const HitTestResult& other) { … }
void HitTestResult::Trace(Visitor* visitor) const { … }
void HitTestResult::SetNodeAndPosition(Node* node,
const PhysicalBoxFragment* box_fragment,
const PhysicalOffset& position) { … }
void HitTestResult::OverrideNodeAndPosition(Node* node,
PhysicalOffset position) { … }
PositionWithAffinity HitTestResult::GetPosition() const { … }
PositionWithAffinity HitTestResult::GetPositionForInnerNodeOrImageMapImage()
const { … }
void HitTestResult::SetToShadowHostIfInUAShadowRoot() { … }
CompositorElementId HitTestResult::GetScrollableContainer() const { … }
HTMLAreaElement* HitTestResult::ImageAreaForImage() const { … }
void HitTestResult::SetInnerNode(Node* n) { … }
void HitTestResult::SetURLElement(Element* n) { … }
void HitTestResult::SetScrollbar(Scrollbar* s) { … }
LocalFrame* HitTestResult::InnerNodeFrame() const { … }
bool HitTestResult::IsSelected(const HitTestLocation& location) const { … }
String HitTestResult::Title(TextDirection& dir) const { … }
const AtomicString& HitTestResult::AltDisplayString() const { … }
Image* HitTestResult::GetImage() const { … }
Image* HitTestResult::GetImage(const Node* node) { … }
gfx::Rect HitTestResult::ImageRect() const { … }
KURL HitTestResult::AbsoluteImageURL(const Node* node) { … }
KURL HitTestResult::AbsoluteImageURL() const { … }
KURL HitTestResult::AbsoluteMediaURL() const { … }
MediaStreamDescriptor* HitTestResult::GetMediaStreamDescriptor() const { … }
MediaSourceHandle* HitTestResult::GetMediaSourceHandle() const { … }
HTMLMediaElement* HitTestResult::MediaElement() const { … }
KURL HitTestResult::AbsoluteLinkURL() const { … }
bool HitTestResult::IsLiveLink() const { … }
bool HitTestResult::IsOverLink() const { … }
String HitTestResult::TextContent() const { … }
bool HitTestResult::IsContentEditable() const { … }
std::tuple<bool, ListBasedHitTestBehavior>
HitTestResult::AddNodeToListBasedTestResultInternal(
Node* node,
const HitTestLocation& location) { … }
ListBasedHitTestBehavior HitTestResult::AddNodeToListBasedTestResult(
Node* node,
const HitTestLocation& location,
const PhysicalRect& rect) { … }
ListBasedHitTestBehavior HitTestResult::AddNodeToListBasedTestResult(
Node* node,
const HitTestLocation& location,
const gfx::QuadF& quad) { … }
ListBasedHitTestBehavior HitTestResult::AddNodeToListBasedTestResult(
Node* node,
const HitTestLocation& location,
const cc::Region& region) { … }
void HitTestResult::Append(const HitTestResult& other) { … }
const HitTestResult::NodeSet& HitTestResult::ListBasedTestResult() const { … }
HitTestResult::NodeSet& HitTestResult::MutableListBasedTestResult() { … }
HitTestLocation HitTestResult::ResolveRectBasedTest(
Node* resolved_inner_node,
const PhysicalOffset& resolved_point_in_main_frame) { … }
Node* HitTestResult::InnerNodeOrImageMapImage() const { … }
}