servo/components/layout
bors-servo c48ef50b72 Auto merge of #18514 - asajeffrey:layout-dont-panic-if-no-iframe-bc, r=emilio
Remove sources of panic when laying out an iframe without a nested browsing context

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

At the moment, layout panics if it discovers an iframe without a nested browsing context. Under normal circumstances, this is reasonable, but it requires very tight synchronization between script, layout, the constellation and the compositor. In particular, if a layout is in progress when an iframe's browsing context is discarded, this can trigger panic.

This PR fixes this in two ways:

1. Making the pipeline and browsing context ids optional in layout's representation of an iframe.
2. Shutting down layout before discarding a browsing context, rather than after.

This is belt and braces.

---
<!-- 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 #17482 and #18477
- [X] These changes do not require tests because the PR is fixing a panic caused by a race condition

<!-- 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. -->

<!-- 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/18514)
<!-- Reviewable:end -->
2017-09-22 09:34:12 -05:00
..
animation.rs stylo: Remove a lot of the restyle damage related complexity. 2017-08-20 13:59:46 +02:00
block.rs Fix panic when tables having position:sticky 2017-09-15 15:55:56 +02:00
Cargo.toml Updated h5e and x5e 2017-08-18 19:51:17 +05:30
construct.rs style: Kill -servo-under-display-none. 2017-09-17 04:31:15 +02:00
context.rs Speculatively evaluate paint functions during style. 2017-07-31 13:02:28 -05:00
data.rs layout: Stop doing unsafe transmutes between refcell references. 2017-05-25 10:31:40 +02:00
display_list_builder.rs Remove sources of panic when laying out an iframe without a nested browsing context. 2017-09-22 09:04:18 -05:00
flex.rs Auto merge of #18462 - mrobinson:cleanup-building-state, r=emilio 2017-09-15 05:30:47 -05:00
floats.rs order derivable traits lists 2017-08-23 21:38:44 +02:00
flow.rs Auto merge of #18462 - mrobinson:cleanup-building-state, r=emilio 2017-09-15 05:30:47 -05:00
flow_list.rs Untry 2017-06-18 13:21:51 +02:00
flow_ref.rs order derivable traits lists 2017-08-23 21:38:44 +02:00
fragment.rs Remove sources of panic when laying out an iframe without a nested browsing context. 2017-09-22 09:04:18 -05:00
generated_content.rs Make tidy aware of Rust multiline strings 2017-09-21 17:17:47 -04:00
incremental.rs Force reflow in the sequential fallback of block format context 2017-04-23 08:32:25 +08:00
inline.rs Auto merge of #18462 - mrobinson:cleanup-building-state, r=emilio 2017-09-15 05:30:47 -05:00
layout_debug.rs Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
lib.rs Replace all uses of the style::stylearc alias with servo_arc. 2017-07-19 09:29:05 +02:00
linked_list.rs Move util::linked_list to layout 2016-06-29 17:23:04 +02:00
list_item.rs Separate stacking context collection and display list building state 2017-09-12 17:15:06 +02:00
model.rs style: Make border-spacing serialization consistent, and move it to precomputed_type. 2017-09-17 21:33:17 +02:00
multicol.rs Auto merge of #18462 - mrobinson:cleanup-building-state, r=emilio 2017-09-15 05:30:47 -05:00
opaque_node.rs Introduce LayoutJS<Node>::opaque() to replace OpaqueNodeMethods::from_jsmanaged(). 2016-06-20 19:08:02 +02:00
parallel.rs Eliminate the sequential/traversal parallel distinction in favor of a unified adaptive driver. 2017-08-25 10:00:27 -07:00
persistent_list.rs Make tidy aware of Rust multiline strings 2017-09-21 17:17:47 -04:00
query.rs Introduce CSSPixelLength and update NonNegativeLength. 2017-09-13 18:05:14 +08:00
sequential.rs Separate stacking context collection and display list building state 2017-09-12 17:15:06 +02:00
table.rs Auto merge of #18506 - mrobinson:position-sticky-table, r=emilio 2017-09-18 04:18:17 -05:00
table_caption.rs Fix panic when tables having position:sticky 2017-09-15 15:55:56 +02:00
table_cell.rs Fix panic when tables having position:sticky 2017-09-15 15:55:56 +02:00
table_colgroup.rs Separate stacking context collection and display list building state 2017-09-12 17:15:06 +02:00
table_row.rs Auto merge of #18506 - mrobinson:position-sticky-table, r=emilio 2017-09-18 04:18:17 -05:00
table_rowgroup.rs Auto merge of #18506 - mrobinson:position-sticky-table, r=emilio 2017-09-18 04:18:17 -05:00
table_wrapper.rs Fix panic when tables having position:sticky 2017-09-15 15:55:56 +02:00
text.rs Introduce CSSPixelLength and update NonNegativeLength. 2017-09-13 18:05:14 +08:00
traversal.rs Eliminate RestyleData entirely. 2017-09-12 10:33:51 -07:00
webrender_helpers.rs Update WR (implement blur filter, text-shadow blend fixes, frame output fix). 2017-09-19 11:56:03 +10:00
wrapper.rs Eliminate RestyleData entirely. 2017-09-12 10:33:51 -07:00