diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-21 11:11:05 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-21 13:03:33 +0100 |
commit | 0ba785894c80286c9d0374a585c2cb534b81bc55 (patch) | |
tree | 3e8bca04e2f65cb047e977a2c86148eb34c76c03 /Userland/Libraries/LibWeb/Painting/Paintable.cpp | |
parent | 8c88ee1165a538600c630f929b0b726d200c7dc7 (diff) | |
download | serenity-0ba785894c80286c9d0374a585c2cb534b81bc55.zip |
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. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/Paintable.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/Paintable.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/Paintable.cpp b/Userland/Libraries/LibWeb/Painting/Paintable.cpp index be4d3c64d8..be83683e74 100644 --- a/Userland/Libraries/LibWeb/Painting/Paintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/Paintable.cpp @@ -41,7 +41,7 @@ bool Paintable::handle_mousewheel(Badge<EventHandler>, Gfx::IntPoint const&, uns return false; } -HitTestResult Paintable::hit_test(Gfx::FloatPoint const&, HitTestType) const +Optional<HitTestResult> Paintable::hit_test(Gfx::FloatPoint const&, HitTestType) const { return {}; } |