mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-19 07:49:05 +00:00
LibWeb: Track the transition generation
This is used for transition's class-specific composite ordering
This commit is contained in:
parent
22fdcfbc50
commit
e4f1cb6f8c
Notes:
sideshowbarker
2024-07-18 04:46:35 +09:00
Author: https://github.com/mattco98
Commit: e4f1cb6f8c
Pull-request: https://github.com/SerenityOS/serenity/pull/23762
2 changed files with 9 additions and 0 deletions
|
@ -1166,6 +1166,10 @@ void Document::update_style()
|
|||
|
||||
update_animated_style_if_needed();
|
||||
|
||||
// Associated with each top-level browsing context is a current transition generation that is incremented on each
|
||||
// style change event. [CSS-Transitions-2]
|
||||
m_transition_generation++;
|
||||
|
||||
if (!needs_full_style_update() && !needs_style_update() && !child_needs_style_update())
|
||||
return;
|
||||
|
||||
|
|
|
@ -622,6 +622,8 @@ public:
|
|||
|
||||
OrderedHashTable<JS::NonnullGCPtr<Element>> const& top_layer_elements() const { return m_top_layer_elements; }
|
||||
|
||||
size_t transition_generation() const { return m_transition_generation; }
|
||||
|
||||
protected:
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
@ -843,6 +845,9 @@ private:
|
|||
Vector<PendingAnimationEvent> m_pending_animation_event_queue;
|
||||
RefPtr<Core::Timer> m_animation_driver_timer;
|
||||
|
||||
// https://drafts.csswg.org/css-transitions-2/#current-transition-generation
|
||||
size_t m_transition_generation { 0 };
|
||||
|
||||
bool m_needs_to_call_page_did_load { false };
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#scripts-may-run-for-the-newly-created-document
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue