mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 19:00:59 +00:00
LibWeb: Implement CSS transitions support for pseudo elements
We already had all necessary things for pseudo elements support in place except ability to save transition properties in Animatable. This commit adds the missing part.
This commit is contained in:
parent
9d0c307341
commit
3178679f0b
Notes:
github-actions[bot]
2025-05-30 13:49:19 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 3178679f0b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4905
5 changed files with 136 additions and 93 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <LibWeb/CSS/CSSStyleValue.h>
|
||||
#include <LibWeb/CSS/Interpolation.h>
|
||||
#include <LibWeb/CSS/PropertyID.h>
|
||||
#include <LibWeb/CSS/PseudoElement.h>
|
||||
#include <LibWeb/CSS/StyleValues/EasingStyleValue.h>
|
||||
#include <LibWeb/CSS/Time.h>
|
||||
|
||||
|
@ -21,9 +22,9 @@ class CSSTransition : public Animations::Animation {
|
|||
GC_DECLARE_ALLOCATOR(CSSTransition);
|
||||
|
||||
public:
|
||||
static GC::Ref<CSSTransition> start_a_transition(DOM::Element&, PropertyID, size_t transition_generation,
|
||||
double start_time, double end_time, NonnullRefPtr<CSSStyleValue const> start_value, NonnullRefPtr<CSSStyleValue const> end_value,
|
||||
NonnullRefPtr<CSSStyleValue const> reversing_adjusted_start_value, double reversing_shortening_factor);
|
||||
static GC::Ref<CSSTransition> start_a_transition(DOM::Element&, Optional<PseudoElement>, PropertyID,
|
||||
size_t transition_generation, double start_time, double end_time, NonnullRefPtr<CSSStyleValue const> start_value,
|
||||
NonnullRefPtr<CSSStyleValue const> end_value, NonnullRefPtr<CSSStyleValue const> reversing_adjusted_start_value, double reversing_shortening_factor);
|
||||
|
||||
StringView transition_property() const { return string_from_property_id(m_transition_property); }
|
||||
|
||||
|
@ -51,7 +52,7 @@ public:
|
|||
void set_previous_phase(Phase phase) { m_previous_phase = phase; }
|
||||
|
||||
private:
|
||||
CSSTransition(JS::Realm&, DOM::Element&, PropertyID, size_t transition_generation,
|
||||
CSSTransition(JS::Realm&, DOM::Element&, Optional<PseudoElement>, PropertyID, size_t transition_generation,
|
||||
double start_time, double end_time, NonnullRefPtr<CSSStyleValue const> start_value, NonnullRefPtr<CSSStyleValue const> end_value,
|
||||
NonnullRefPtr<CSSStyleValue const> reversing_adjusted_start_value, double reversing_shortening_factor);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue