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

LibWeb: Update hit_test for CSS Transforms

This now also takes a FloatPoint instead of an IntPoint to avoid
excessive rounding when multiple transforms apply on top of each other.
This commit is contained in:
Simon Wanner 2022-03-18 01:32:50 +01:00 committed by Andreas Kling
parent a2331e8dd3
commit 48efdaa8c4
7 changed files with 28 additions and 23 deletions

View file

@ -115,7 +115,7 @@ public:
virtual void before_children_paint(PaintContext&, PaintPhase) const override;
virtual void after_children_paint(PaintContext&, PaintPhase) const override;
virtual HitTestResult hit_test(Gfx::IntPoint const&, HitTestType) const override;
virtual HitTestResult hit_test(Gfx::FloatPoint const&, HitTestType) const override;
protected:
explicit PaintableBox(Layout::Box const&);
@ -164,7 +164,7 @@ public:
virtual bool wants_mouse_events() const override { return false; }
virtual bool handle_mousewheel(Badge<EventHandler>, const Gfx::IntPoint&, unsigned buttons, unsigned modifiers, int wheel_delta_x, int wheel_delta_y) override;
virtual HitTestResult hit_test(Gfx::IntPoint const&, HitTestType) const override;
virtual HitTestResult hit_test(Gfx::FloatPoint const&, HitTestType) const override;
protected:
PaintableWithLines(Layout::BlockContainer const&);