1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:57:35 +00:00

LibWeb+WebContent+headless-browser: Use CSSPixels for PageClient events

...and also for hit testing, which is involved in most of them.

Much of this is temporary conversions and other awkwardness, which
should resolve itself as the rest of LibWeb is converted to these new
types. Hopefully. :thousandyakstare:
This commit is contained in:
Sam Atkins 2022-11-02 17:35:53 +00:00 committed by Linus Groh
parent 045aa8530c
commit 3c7bd5a317
27 changed files with 169 additions and 159 deletions

View file

@ -18,15 +18,15 @@ public:
Label(DOM::Document&, HTML::HTMLLabelElement*, NonnullRefPtr<CSS::StyleProperties>);
virtual ~Label() override;
static bool is_inside_associated_label(LabelableNode const&, Gfx::IntPoint);
static bool is_inside_associated_label(LabelableNode const&, CSSPixelPoint);
static bool is_associated_label_hovered(LabelableNode const&);
const HTML::HTMLLabelElement& dom_node() const { return static_cast<const HTML::HTMLLabelElement&>(*BlockContainer::dom_node()); }
HTML::HTMLLabelElement& dom_node() { return static_cast<HTML::HTMLLabelElement&>(*BlockContainer::dom_node()); }
void handle_mousedown_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint, unsigned button);
void handle_mouseup_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint, unsigned button);
void handle_mousemove_on_label(Badge<Painting::TextPaintable>, Gfx::IntPoint, unsigned button);
void handle_mousedown_on_label(Badge<Painting::TextPaintable>, CSSPixelPoint, unsigned button);
void handle_mouseup_on_label(Badge<Painting::TextPaintable>, CSSPixelPoint, unsigned button);
void handle_mousemove_on_label(Badge<Painting::TextPaintable>, CSSPixelPoint, unsigned button);
LabelableNode* labeled_control();