mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #15016 - prampey:doc-deactivate, r=cbrewster
Documents now fully deactivate when a freeze message is sent <!-- Please describe your changes on the following line: --> Documents now fully deactivate when a freeze message is sent --- <!-- 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 #14906 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because minimal changes. <!-- 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/15016) <!-- Reviewable:end -->
This commit is contained in:
commit
2fb9a345d6
1 changed files with 4 additions and 3 deletions
|
@ -1354,9 +1354,10 @@ impl ScriptThread {
|
|||
|
||||
/// Handles freeze message
|
||||
fn handle_freeze_msg(&self, id: PipelineId) {
|
||||
let window = self.documents.borrow().find_window(id);
|
||||
if let Some(window) = window {
|
||||
window.freeze();
|
||||
let document = self.documents.borrow().find_document(id);
|
||||
if let Some(document) = document {
|
||||
document.window().freeze();
|
||||
document.fully_deactivate();
|
||||
return;
|
||||
}
|
||||
let mut loads = self.incomplete_loads.borrow_mut();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue