Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc is fully active check #367

Merged
merged 3 commits into from
May 27, 2024
Merged

Add doc is fully active check #367

merged 3 commits into from
May 27, 2024

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Dec 18, 2023

Closes - no issue filed...

The following tasks have been completed:

Implementation commitment:

  • Chromium - already implemented
  • Gecko - already implemented
  • WebKit - already implemented

Preview | Diff

@marcoscaceres marcoscaceres mentioned this pull request Dec 18, 2023
4 tasks
index.html Outdated Show resolved Hide resolved
@EdgarChen
Copy link

I wonder if the fully active should be checked again in the task queued in step 7.3. of https://www.w3.org/TR/screen-wake-lock/#the-request-method, as the active state might change, similar to visibility.

@marcoscaceres
Copy link
Member Author

Yeah, good point.

@marcoscaceres
Copy link
Member Author

Integrated @EdgarChen's feedback... now also check if fully active at the turn of the event loop.

@marcoscaceres
Copy link
Member Author

marcoscaceres commented Apr 8, 2024

Added an additional test for the update web-platform-tests/wpt#45599

@marcoscaceres
Copy link
Member Author

marcoscaceres commented Apr 8, 2024

@EdgarChen, does Gecko already implement the fully active checks or do you want me to file bugs for those?

Never mind... found the answer.

@marcoscaceres
Copy link
Member Author

marcoscaceres commented Apr 8, 2024

@reillyeon, this should be good to go, I think.

@rakuco, are you still editing this spec? Should I be pinging you for review? (didn't get any response from previous pings, so was unsure)

Copy link
Member

@rakuco rakuco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in one of the inline comments, this check was already present in the spec, so I think the PR should be contain more information and indicate that this is moving the existing check and also checking if the document's fully active in the parallel steps.

Speaking of moving the existing check, you mentioned earlier that "the fully active check should be done first". Could you elaborate a bit? I remember asking ages ago if there was a recommended order for the permissions policy + permissions API checks in general, but thought it didn't matter if the fully active ones came before or after those.

index.html Show resolved Hide resolved
@rakuco
Copy link
Member

rakuco commented Apr 8, 2024

@rakuco, are you still editing this spec? Should I be pinging you for review? (didn't get any response from previous pings, so was unsure)

Sorry for the silence, it wasn't intentional! I haven't had much time to work on this spec lately; now that the DAS/WebApps situation seems to have progressed I think I can finally become just an interested contributor :-)

index.html Show resolved Hide resolved
@marcoscaceres
Copy link
Member Author

Speaking of moving the existing check, #367 (comment) that "the fully active check should be done first". Could you elaborate a bit? I remember asking ages ago if there was a recommended order for the permissions policy + permissions API checks in general, but thought it didn't matter if the fully active ones came before or after those.

Sure. Without a document (or the document being null or an iframe being detached) the permission check doesn't make sense - so, basically the fully active check just confirms the document is something in the web page and not just a dangling reference that didn't get garbage collected or accidentally stored in a variable.

Copy link
Member

@rakuco rakuco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, and thanks for the clarification!

@rakuco
Copy link
Member

rakuco commented Apr 9, 2024

As discussed in one of the inline comments, this check was already present in the spec, so I think the PR should be contain more information and indicate that this is moving the existing check and also checking if the document's fully active in the parallel steps.

It'd be good to still do this though -- the title does not fully cover what the change is doing.

@marcoscaceres marcoscaceres merged commit 377e5a3 into gh-pages May 27, 2024
2 checks passed
@marcoscaceres marcoscaceres deleted the fully_active branch May 27, 2024 06:56
@marcoscaceres
Copy link
Member Author

Made sure the commit message better reflects the change.

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.

5 participants