Skip to content

Conversation

@estefysc
Copy link
Contributor

@estefysc estefysc commented Dec 5, 2025

Fixes WPT test: badging/non-fully-active.https.html

Fixes Document::is_fully_active() to check the has_been_destroyed flag. When a navigable is destroyed, the flag is set immediately but the navigable pointer is cleared later in a queued task (see NavigableContainer::destroy_the_child_navigable), causing is_fully_active() to incorrectly return true during this gap.

Implements navigator.setAppBadge() and navigator.clearAppBadge() methods per the specification. Permission handling, badge display logic, and task queuing are not yet implemented.

@ladybird-bot
Copy link
Collaborator

Hello!

One or more of the commit messages in this PR do not match the Ladybird code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why.
Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

@estefysc estefysc force-pushed the badging-api branch 3 times, most recently from badc08f to 0673156 Compare December 6, 2025 14:08
When a navigable is being destroyed (e.g., via iframe.remove()), the
has_been_destroyed flag is set immediately, but the navigable pointer
is not nulled until later in a queued task. This causes
is_fully_active() to incorrectly return true during the transitional
period.

Add a check for the has_been_destroyed flag to ensure the document is
correctly detected as no longer fully active when its navigable is
being destroyed.
Add support for the Badging API (https://w3c.github.io/badging/),
which allows web applications to set application badges.
This fixes the WPT test badging/non-fully-active.https.html.
@estefysc estefysc marked this pull request as draft December 8, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants