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
Constellation informs script about documents becoming inactive, active or fully active. #14971
Constellation informs script about documents becoming inactive, active or fully active. #14971
Conversation
Heads up! This PR modifies the following files:
|
cc @jdm @cbrewster |
Hmm, there are wpt failures for this, I've still not quite got timers sorted out. I'll let you know once I've got something that passes wpt locally. |
5852156
to
3e9bda1
Compare
I rewrote this PR to explicitly initialize the document activity, which means we can go back to timers initially running. This fixes the wpt failures locally. This PR is now ready for review. |
Oh good, an intermittent:
|
That intermittent is reproducable on master: #14985. |
☔ The latest upstream changes (presumably #14990) made this pull request unmergeable. Please resolve the merge conflicts. |
3e9bda1
to
ee2bf98
Compare
Rebased. |
☔ The latest upstream changes (presumably #15016) made this pull request unmergeable. Please resolve the merge conflicts. |
@Ms2ger Review ping. |
ee2bf98
to
6fc5b69
Compare
Can we add a test for the r? @cbrewster |
@asajeffrey I have no idea what you mean by "fully implemented". Why would iframe content documents be different than any other document? As long is it's same origin I don't see what's not implemented. |
6fc5b69
to
90fb8e3
Compare
3a8fc25
to
3816799
Compare
Rebased. |
d7210ea
to
631fefb
Compare
@bors-servo r=cbrewster |
📌 Commit 631fefb has been approved by |
…rewster Constellation informs script about documents becoming inactive, active or fully active. <!-- Please describe your changes on the following line: --> This PR replaces the current freeze/thaw mechanism by messages from the constellation to script informing it about when documents become inactive, active or fully active. This means we can now implement |Document::is_active()| which is used in |document.write|. This PR also changes how timers work: previously they were initialized running, and were then frozen/thawed. This means there was a transitory period when timers were running even though the document was not fully active. With this PR, timers are initially suspended, and are only resumed when the document is made fully active. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14876 - [X] These changes do not require tests because it's an interal refactoring. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14971) <!-- Reviewable:end -->
💔 Test failed - linux-rel-wpt |
|
Oops, forgot to check in the |
631fefb
to
ca9cee0
Compare
@bors-servo r=cbrewster |
📌 Commit ca9cee0 has been approved by |
…rewster Constellation informs script about documents becoming inactive, active or fully active. <!-- Please describe your changes on the following line: --> This PR replaces the current freeze/thaw mechanism by messages from the constellation to script informing it about when documents become inactive, active or fully active. This means we can now implement |Document::is_active()| which is used in |document.write|. This PR also changes how timers work: previously they were initialized running, and were then frozen/thawed. This means there was a transitory period when timers were running even though the document was not fully active. With this PR, timers are initially suspended, and are only resumed when the document is made fully active. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14876 - [X] These changes do not require tests because it's an interal refactoring. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14971) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev |
This PR replaces the current freeze/thaw mechanism by messages from the constellation to script informing it about when documents become inactive, active or fully active.
This means we can now implement |Document::is_active()| which is used in |document.write|.
This PR also changes how timers work: previously they were initialized running, and were then frozen/thawed. This means there was a transitory period when timers were running even though the document was not fully active. With this PR, timers are initially suspended, and are only resumed when the document is made fully active.
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is