LibCore: Remove EventReceiver's event filter
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This went unused.
This commit is contained in:
Jelle Raaijmakers 2025-07-14 10:54:03 +02:00 committed by Sam Atkins
commit 4c88c7445c
Notes: github-actions[bot] 2025-07-14 10:56:19 +00:00
2 changed files with 0 additions and 13 deletions

View file

@ -11,7 +11,6 @@
#include <LibCore/Event.h>
#include <LibCore/EventLoop.h>
#include <LibCore/EventReceiver.h>
#include <stdio.h>
namespace Core {
@ -156,9 +155,6 @@ void EventReceiver::dispatch_event(Core::Event& e, EventReceiver* stay_within)
VERIFY(!stay_within || stay_within == this || stay_within->is_ancestor_of(*this));
auto* target = this;
do {
// If there's an event filter on this target, ask if it wants to swallow this event.
if (target->m_event_filter && !target->m_event_filter(e))
return;
target->event(e);
target = target->parent();
if (target == stay_within) {
@ -175,9 +171,4 @@ bool EventReceiver::is_visible_for_timer_purposes() const
return true;
}
void EventReceiver::set_event_filter(Function<bool(Core::Event&)> filter)
{
m_event_filter = move(filter);
}
}

View file

@ -10,7 +10,6 @@
#include <AK/AtomicRefCounted.h>
#include <AK/ByteString.h>
#include <AK/Forward.h>
#include <AK/Function.h>
#include <AK/Noncopyable.h>
#include <AK/OwnPtr.h>
#include <AK/StringView.h>
@ -125,8 +124,6 @@ public:
void remove_child(EventReceiver&);
void remove_all_children();
void set_event_filter(Function<bool(Core::Event&)>);
void deferred_invoke(Function<void()>);
void dispatch_event(Core::Event&, EventReceiver* stay_within = nullptr);
@ -174,7 +171,6 @@ private:
ByteString m_name;
intptr_t m_timer_id { 0 };
Vector<NonnullRefPtr<EventReceiver>> m_children;
Function<bool(Core::Event&)> m_event_filter;
};
}