1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

LibWeb: Align session history step application code with latest spec

Replaces direct "apply the history step" calls with new functions from
the spec:
- "update for navigable creation/destruction"
- "apply the push/replace history step"
- "apply the reload history step"
This commit is contained in:
Aliaksandr Kalenik 2023-09-03 22:20:32 +02:00 committed by Andreas Kling
parent d3d2e56a68
commit 2445205e9d
4 changed files with 39 additions and 15 deletions

View file

@ -37,8 +37,9 @@ public:
};
HistoryObjectLengthAndIndex get_the_history_object_length_and_index(int) const;
void apply_the_history_step(int step, Optional<SourceSnapshotParams> = {});
void apply_pending_history_changes();
void apply_the_reload_history_step();
void apply_the_push_or_replace_history_step(int step);
void update_for_navigable_creation_or_destruction();
int get_the_used_step(int step) const;
Vector<JS::Handle<Navigable>> get_all_navigables_whose_current_session_history_entry_will_change_or_reload(int) const;
@ -62,6 +63,8 @@ private:
virtual void visit_edges(Cell::Visitor&) override;
void apply_the_history_step(int step, Optional<SourceSnapshotParams> = {});
// https://html.spec.whatwg.org/multipage/document-sequences.html#tn-current-session-history-step
int m_current_session_history_step { 0 };