summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Painting/Paintable.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-21 11:11:05 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-21 13:03:33 +0100
commit0ba785894c80286c9d0374a585c2cb534b81bc55 (patch)
tree3e8bca04e2f65cb047e977a2c86148eb34c76c03 /Userland/Libraries/LibWeb/Painting/Paintable.cpp
parent8c88ee1165a538600c630f929b0b726d200c7dc7 (diff)
downloadserenity-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.cpp2
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 {};
}