mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb/DOM: Set the pseudo_element on created Animation/TransitionEvents
Also import a couple of WPT tests that now pass.
This commit is contained in:
parent
d717dd64b3
commit
ed7a86b8cc
Notes:
github-actions[bot]
2025-12-03 12:31:02 +00:00
Author: https://github.com/AtkinsSJ
Commit: ed7a86b8cc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6998
5 changed files with 84 additions and 2 deletions
|
|
@ -2696,10 +2696,12 @@ void Document::dispatch_events_for_transition(GC::Ref<CSS::CSSTransition> transi
|
|||
type,
|
||||
CSS::TransitionEventInit {
|
||||
{ .bubbles = true },
|
||||
// FIXME: Correctly set pseudo_element
|
||||
MUST(String::from_utf8(transition->transition_property())),
|
||||
elapsed_time,
|
||||
String {},
|
||||
transition->owning_element()->pseudo_element().map([](auto it) {
|
||||
return MUST(String::formatted("::{}", CSS::pseudo_element_name(it)));
|
||||
})
|
||||
.value_or({}),
|
||||
}),
|
||||
.animation = transition,
|
||||
.target = transition->owning_element()->element(),
|
||||
|
|
@ -2791,6 +2793,10 @@ void Document::dispatch_events_for_animation_if_necessary(GC::Ref<Animations::An
|
|||
{ .bubbles = true },
|
||||
css_animation.animation_name(),
|
||||
elapsed_time_seconds,
|
||||
owning_element->pseudo_element().map([](auto it) {
|
||||
return MUST(String::formatted("::{}", CSS::pseudo_element_name(it)));
|
||||
})
|
||||
.value_or({}),
|
||||
}),
|
||||
.animation = css_animation,
|
||||
.target = *target,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue