servo/components/constellation
bors-servo 8b274f25d3 Auto merge of #14559 - asajeffrey:script-track-document-and-bc-discarding, r=cbrewster
Implement browsing context discarding

<!-- Please describe your changes on the following line: -->

Implement browsing context discarding (https://html.spec.whatwg.org/multipage/browsers.html#discard-a-document).

* When a pipeline is closed, inform the script thread whether the browsing context is to be discarded.
* In script threads, synchronously discard any similar-origin documents and browsing contexts.
* When a browsing context is discarded, it loses the reference to the active document, but the window keeps it, so we need to move the `Document` pointer from `BrowsingContext` to `Window`.
* Fix the webIDL for Window to make parent and top optional (the spec says they can return null when the browsing context is discarded).

---
<!-- 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 #14411
- [X] There are tests for these 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/14559)
<!-- Reviewable:end -->
2017-01-05 18:20:12 -08:00
..
Cargo.toml An in-memory RNG that shares its file descriptor. 2017-01-05 13:51:53 +00:00
constellation.rs Auto merge of #14559 - asajeffrey:script-track-document-and-bc-discarding, r=cbrewster 2017-01-05 18:20:12 -08:00
event_loop.rs Renamed ScriptChan in constellation to EventLoop. 2016-12-15 16:58:52 -06:00
frame.rs Pass test-tidy. 2017-01-04 15:23:37 +00:00
lib.rs An in-memory RNG that shares its file descriptor. 2017-01-05 13:51:53 +00:00
pipeline.rs Implement browsing context discarding. 2017-01-05 21:12:57 +00:00
sandboxing.rs Removed util. 2016-12-14 18:04:37 -06:00
timer_scheduler.rs Replace the one-thread-per-timeout model by a two-thread model of timeouts. 2016-05-20 13:59:12 -05:00