diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-18 20:40:12 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-19 14:45:59 +0100 |
commit | a97586c24a1c06f02f0cf667d367c3a97f45a7dd (patch) | |
tree | 96d924fb35aecc0b79e5663b7c7a672821fc6d20 /Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp | |
parent | bfe69e9d0d7898a81365b8e782e167c1ba23cbe4 (diff) | |
download | serenity-a97586c24a1c06f02f0cf667d367c3a97f45a7dd.zip |
LibWeb: Shrink DOM::EventTarget by 80 bytes
Do this by converting two Function members into virtual functions:
- legacy_pre_activation_behavior
- legacy_cancelled_activation_behavior
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp b/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp index 37e3c2d484..b037ac79d6 100644 --- a/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp +++ b/Userland/Libraries/LibWeb/DOM/EventDispatcher.cpp @@ -283,7 +283,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr< } } - if (activation_target && activation_target->legacy_pre_activation_behavior) + if (activation_target) activation_target->legacy_pre_activation_behavior(); for (ssize_t i = event->path().size() - 1; i >= 0; --i) { @@ -329,8 +329,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr< // NOTE: Since activation_target is set, it will have activation behavior. activation_target->activation_behavior(event); } else { - if (activation_target->legacy_cancelled_activation_behavior) - activation_target->legacy_cancelled_activation_behavior(); + activation_target->legacy_cancelled_activation_behavior(); } } |