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

Stop embedder calls and fake rAF when window not visible #25914

Merged
merged 1 commit into from Mar 9, 2020

Conversation

@paulrouget
Copy link
Contributor

paulrouget commented Mar 6, 2020

This addresses 2 issues:

  • a rAF loop might still be ongoing when the window is invisible if script decided that the rAF were going too fast (spurious rAF)
  • a hidden window does not run the rAF loop, but the embedder would still be in animating mode

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #___ (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because ___
@highfive
Copy link

highfive commented Mar 6, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/document.rs, components/script/dom/window.rs
  • @KiChjang: components/script/dom/document.rs, components/script/dom/window.rs
@highfive
Copy link

highfive commented Mar 6, 2020

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@paulrouget
Copy link
Contributor Author

paulrouget commented Mar 9, 2020

Even though this is not fixing #25897 this is still an improvement.

@jdm
Copy link
Member

jdm commented Mar 9, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2020

📌 Commit 21c408e has been approved by jdm

@highfive highfive assigned jdm and unassigned SimonSapin Mar 9, 2020
@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2020

Testing commit 21c408e with merge d72a1ce...

bors-servo added a commit that referenced this pull request Mar 9, 2020
Stop embedder calls and fake rAF when window not visible

This addresses 2 issues:

- a rAF loop might still be ongoing when the window is invisible if script decided that the rAF were going too fast (spurious rAF)
- a hidden window does not run the rAF loop, but the embedder would still be in animating mode

---
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Mar 9, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2020

Testing commit 21c408e with merge ad1a4ad...

@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2020

☀️ Test successful - status-taskcluster
Approved by: jdm
Pushing ad1a4ad to master...

@bors-servo bors-servo merged commit ad1a4ad into servo:master Mar 9, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.