Commit Graph

13 Commits

Author SHA1 Message Date
Aliaksandr Kalenik
2a69fd4c52 LibWeb: Replace spin_until in apply_the_history_step with state machine
Replace the blocking spin_processing_tasks_with_source_until calls
in apply_the_history_step_after_unload_check() with an event-driven
ApplyHistoryStepState GC cell that tracks 5 phases, following the
same pattern used by CheckUnloadingCanceledState.

Key changes:
- Introduce ApplyHistoryStepState with phases:
  WaitingForDocumentPopulation, ProcessingContinuations,
  WaitingForChangeJobCompletion, WaitingForNonChangingJobs and Completed
- Add on_complete callbacks to apply_the_push_or_replace_history_step,
  finalize_a_same_document_navigation,
  finalize_a_cross_document_navigation, and
  update_for_navigable_creation_or_destruction
- Remove spin_until from Document::open()
- Use null-document tasks for non-changing navigable updates and
  document unload/destroy to avoid stuck tasks when documents become
  non-fully-active
- Defer completely_finish_loading when document has no navigable yet,
  and re-trigger post-load steps in activate_history_entry for documents
  that completed loading before activation

Co-Authored-By: Shannon Booth <shannon@serenityos.org>
2026-03-31 09:47:59 +02:00
Luke Wilde
102c0232ac LibWeb: Add FACEs to disabled form control checks 2026-03-25 13:18:15 +00:00
Luke Wilde
ad653da637 LibWeb: Implement ElementInternals#validationMessage 2026-03-25 13:18:15 +00:00
Luke Wilde
dfb7e51218 LibWeb: Implement ElementInternals#setValidity 2026-03-25 13:18:15 +00:00
Luke Wilde
4daa2b33f1 LibWeb: Implement ElementInternals#labels 2026-03-25 13:18:15 +00:00
Luke Wilde
297110ffb1 LibWeb: Implement ElementInternals#form 2026-03-25 13:18:15 +00:00
Luke Wilde
05c7ba2282 LibWeb: Implement ElementInternals#willValidate 2026-03-25 13:18:15 +00:00
Luke Wilde
9af3e34875 LibWeb: Return FACEs from HTML{FieldSet,Form}Element#elements 2026-03-25 13:18:15 +00:00
Luke Wilde
80302feec7 LibWeb: Implement reset algorithm for FACEs 2026-03-25 13:18:15 +00:00
Luke Wilde
4cea5d43e6 LibWeb: Queue form{Associated,Disabled}Callback where appropriate 2026-03-25 13:18:15 +00:00
Luke Wilde
6a812cf919 Tests/LibWeb: Import form-associated custom elements WPT tests
These will be worked on in future commits.
2026-03-25 13:18:15 +00:00
Sam Atkins
4e854ca44a LibWeb/HTML: Provide a fallback for validation anchor
Corresponds to daa3016b40

Also import a related test.
2025-07-08 17:08:39 +01:00
Noah
85842c1739 LibWeb: Stub out several methods for ElementInternals
This begins implementation on form-associated custom elements.
This fixes a few WPT tests which I'm importing.

Co-authored-by: Sam Atkins <sam@ladybird.org>
2025-05-21 15:28:10 +01:00