Files
servo/components/script/dom
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
..
2016-10-11 19:44:32 +02:00
2016-12-12 10:47:54 -10:00
2016-12-08 08:50:35 -10:00
2016-12-14 18:04:37 -06:00
2016-12-12 10:47:54 -10:00
2016-11-03 16:23:05 +01:00
2016-12-12 10:47:54 -10:00
2016-12-22 16:06:22 +01:00
2016-12-12 10:47:54 -10:00
2016-12-12 10:47:54 -10:00
2016-12-08 08:50:35 -10:00
2016-10-11 19:44:32 +02:00
2016-11-03 16:23:05 +01:00
2016-12-14 18:04:37 -06:00
2016-12-12 10:47:54 -10:00
2016-12-08 08:50:35 -10:00
2016-11-03 16:23:05 +01:00
2016-10-06 20:59:13 +02:00
2016-12-14 18:04:37 -06:00
2016-12-12 10:47:54 -10:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-12-12 10:47:54 -10:00
2016-12-12 10:47:54 -10:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-12-17 23:03:40 -08:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-12-14 18:04:37 -06:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-12-12 10:47:54 -10:00
2016-12-12 10:47:54 -10:00
2016-12-12 10:47:54 -10:00
2016-12-19 09:04:13 -07:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-03 16:23:05 +01:00
2016-11-18 12:38:12 +08:00
2016-12-02 23:46:40 +03:00
2016-12-20 22:13:01 +01:00
2016-12-14 18:04:37 -06:00
2016-11-03 16:23:05 +01:00
2016-12-12 10:47:54 -10:00
2016-12-14 18:04:37 -06:00
2016-12-12 10:47:54 -10:00
2016-08-30 19:07:19 +02:00
2016-11-03 16:23:05 +01:00
2016-12-08 08:50:35 -10:00
2016-12-12 10:47:54 -10:00
2016-12-19 19:43:26 +01:00
2016-12-12 10:47:54 -10:00
2016-12-08 08:50:35 -10:00
2016-12-12 10:47:54 -10:00
2016-11-25 11:27:51 +08:00
2016-12-22 16:06:22 +01:00
2016-11-03 16:23:05 +01:00
2016-12-14 18:04:37 -06:00
2016-12-08 08:50:35 -10:00
2016-12-12 10:47:54 -10:00
2016-12-12 10:47:54 -10:00
2016-12-12 10:47:54 -10:00
2016-12-12 10:47:54 -10:00
2016-12-14 18:04:37 -06:00
2016-11-03 16:23:05 +01:00
2016-12-12 10:47:54 -10:00
2016-12-12 10:47:54 -10:00
2016-12-06 13:15:18 -10:00
2016-12-08 08:50:35 -10:00
2016-12-12 10:47:54 -10:00