mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
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
This commit is contained in:
parent
bfe69e9d0d
commit
a97586c24a
2 changed files with 4 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue