Set platform pointer events as primary mouse pointer events. This lets pages recognize real mouse input from pointermove before they install mouse tracking behavior. Also thread platform mouse coordinates through hover target changes. This makes mouseover, mouseout, mouseenter, mouseleave, and matching pointer boundary events trusted and gives them the coordinate data from the originating platform mouse event. Cover both paths with UIEvents text tests.
26 lines
490 B
C++
26 lines
490 B
C++
/*
|
|
* Copyright (c) 2026-present, the Ladybird developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Optional.h>
|
|
#include <AK/Types.h>
|
|
#include <LibWeb/PixelUnits.h>
|
|
|
|
namespace Web::DOM {
|
|
|
|
struct HoverEventData {
|
|
CSSPixelPoint screen_position;
|
|
CSSPixelPoint page_offset;
|
|
CSSPixelPoint viewport_position;
|
|
CSSPixelPoint offset;
|
|
Optional<CSSPixelPoint> movement;
|
|
u32 button { 0 };
|
|
u32 buttons { 0 };
|
|
u32 modifiers { 0 };
|
|
};
|
|
|
|
}
|