#include "third_party/blink/renderer/core/events/mouse_event.h"
#include "third_party/blink/public/common/input/web_pointer_properties.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_mouse_event_init.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/events/event_dispatcher.h"
#include "third_party/blink/renderer/core/dom/events/event_path.h"
#include "third_party/blink/renderer/core/event_interface_names.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/html/canvas/html_canvas_element.h"
#include "third_party/blink/renderer/core/html/html_frame_element_base.h"
#include "third_party/blink/renderer/core/html/media/html_media_element.h"
#include "third_party/blink/renderer/core/input/input_device_capabilities.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/page/pointer_lock_controller.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/svg/svg_element.h"
#include "third_party/blink/renderer/platform/bindings/dom_wrapper_world.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
namespace blink {
namespace {
float LayoutZoomFactor(const LocalDOMWindow* local_dom_window) { … }
const LayoutObject* FindTargetLayoutObject(Node*& target_node) { … }
unsigned ButtonsToWebInputEventModifiers(uint16_t buttons) { … }
}
MouseEvent* MouseEvent::Create(ScriptState* script_state,
const AtomicString& type,
const MouseEventInit* initializer) { … }
MouseEvent* MouseEvent::Create(const AtomicString& event_type,
const MouseEventInit* initializer,
base::TimeTicks platform_time_stamp,
SyntheticEventType synthetic_event_type,
WebMenuSourceType menu_source_type) { … }
MouseEvent::MouseEvent()
: … { … }
MouseEvent::MouseEvent(const AtomicString& event_type,
const MouseEventInit* initializer,
base::TimeTicks platform_time_stamp,
SyntheticEventType synthetic_event_type,
WebMenuSourceType menu_source_type,
LocalDOMWindow* fallback_dom_window)
: … { … }
void MouseEvent::InitCoordinates(const double client_x,
const double client_y,
const LocalDOMWindow* fallback_dom_window) { … }
void MouseEvent::SetCoordinatesFromWebPointerProperties(
const WebPointerProperties& web_pointer_properties,
const LocalDOMWindow* dom_window,
MouseEventInit* initializer) { … }
uint16_t MouseEvent::WebInputEventModifiersToButtons(unsigned modifiers) { … }
void MouseEvent::initMouseEvent(ScriptState* script_state,
const AtomicString& type,
bool bubbles,
bool cancelable,
AbstractView* view,
int detail,
int screen_x,
int screen_y,
int client_x,
int client_y,
bool ctrl_key,
bool alt_key,
bool shift_key,
bool meta_key,
int16_t button,
EventTarget* related_target,
uint16_t buttons) { … }
void MouseEvent::InitMouseEventInternal(
const AtomicString& type,
bool bubbles,
bool cancelable,
AbstractView* view,
int detail,
double screen_x,
double screen_y,
double client_x,
double client_y,
WebInputEvent::Modifiers modifiers,
int16_t button,
EventTarget* related_target,
InputDeviceCapabilities* source_capabilities,
uint16_t buttons) { … }
void MouseEvent::InitCoordinatesForTesting(double screen_x,
double screen_y,
double client_x,
double client_y) { … }
const AtomicString& MouseEvent::InterfaceName() const { … }
bool MouseEvent::IsMouseEvent() const { … }
int16_t MouseEvent::button() const { … }
bool MouseEvent::IsLeftButton() const { … }
unsigned MouseEvent::which() const { … }
Node* MouseEvent::toElement() const { … }
Node* MouseEvent::fromElement() const { … }
void MouseEvent::Trace(Visitor* visitor) const { … }
DispatchEventResult MouseEvent::DispatchEvent(EventDispatcher& dispatcher) { … }
void MouseEvent::ReceivedTarget() { … }
void MouseEvent::ComputeRelativePosition() { … }
void MouseEvent::RecordLayerXYMetrics() { … }
int MouseEvent::layerX() { … }
int MouseEvent::layerY() { … }
double MouseEvent::offsetX() const { … }
double MouseEvent::offsetY() const { … }
}