mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Don't lose change events on MediaQueryList internal state change
MediaQueryList will now remember if a state change occurred when evaluating its match state. This memory can then be used by the document later on when it's updating all queries, to ensure that we don't forget to fire at least one change event. This also required plumbing the system visibility state to initial about:blank documents, since otherwise they would be stuck in "hidden" state indefinitely and never evaluate their media queries.
This commit is contained in:
parent
6fd24c2a68
commit
c9cd795257
Notes:
github-actions[bot]
2025-02-13 19:53:28 +00:00
Author: https://github.com/awesomekling
Commit: c9cd795257
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3558
Reviewed-by: https://github.com/AtkinsSJ ✅
7 changed files with 78 additions and 23 deletions
|
@ -109,6 +109,9 @@ WebIDL::ExceptionOr<void> NavigableContainer::create_new_child_navigable(GC::Ptr
|
|||
// 11. Let traversable be parentNavigable's traversable navigable.
|
||||
auto traversable = parent_navigable->traversable_navigable();
|
||||
|
||||
// AD-HOC: Let the initial about:blank document inherit the system visibility state from traversable.
|
||||
document->update_the_visibility_state(traversable->system_visibility_state());
|
||||
|
||||
// 12. Append the following session history traversal steps to traversable:
|
||||
traversable->append_session_history_traversal_steps(GC::create_function(heap(), [traversable, navigable, parent_navigable, history_entry, after_session_history_update] {
|
||||
// 1. Let parentDocState be parentNavigable's active session history entry's document state.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue