mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +00:00
LibWeb: Make hit testing functions return Optional<HitTestResult>
Using "HitTestResult with null paintable" as a way to signal misses was unnecessarily confusing. Let's use Optional instead. :^)
This commit is contained in:
parent
8c88ee1165
commit
0ba785894c
7 changed files with 50 additions and 44 deletions
|
@ -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::FloatPoint const&, HitTestType) const override;
|
||||
virtual Optional<HitTestResult> hit_test(Gfx::FloatPoint const&, HitTestType) const override;
|
||||
|
||||
void invalidate_stacking_context();
|
||||
|
||||
|
@ -166,7 +166,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::FloatPoint const&, HitTestType) const override;
|
||||
virtual Optional<HitTestResult> hit_test(Gfx::FloatPoint const&, HitTestType) const override;
|
||||
|
||||
protected:
|
||||
PaintableWithLines(Layout::BlockContainer const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue