servo/components
bors-servo 7b3feb7ffe
Auto merge of #21559 - mandreyel:pipeline-fields-to-browsingcontext, r=cbrewster
Frame should store some of the data that is currently in Pipeline #14692

<!-- Please describe your changes on the following line: -->
Apologies, meant to land it sooner but deadline at work got hectic.

So I moved the `Pipeline::{visible, is_private, parent_info}` fields (`size` was moved earlier) to `BrowsingContext`, and renamed them where appropriate (and did some minor refactoring on the side, hope that's alright).

This introduced some complications, because when a pipeline is spawned for a browsing context that does not yet exist, the browsing context won't be constructed until after pipeline has made its document active. Thus, values for the fields that used to be in `Pipeline` and are now in `BrowsingContext` could not be easily retrieved when constructing the `BrowsingContext` (since in most cases they were only available when spawning a pipeline).
For this reason, I've put these fields in `SessionHistoryChange` since one is always created and added to `Constellation::pending_changes` when a new pipeline is created, so it provides an easy way to forward the necessary values to new `BrowsingContext`s.

Though frankly I'm not sure I like expanding `SessionHistoryChange`'s purpose to serve as a crutch to construct browsing contexts, so a way to uncouple purposes would be to separately store the values for a to-be-created `BrowsingContext` in a collection of structs in `Constellation` and consume them when a new `BrowsingContext` is created. Here's a PoC: 6fa2160bcc.
I didn't include this by default because it introduces a little overhead. Perhaps `PendingBrowsingContextInfo` could be stored as an `Option<>` next to a `SessionHistoryChange` in `Constellation::pending_changes`? That'd uncouple the two structs but not incur any overhead.

I don't think it's finished, so I've marked some areas where I need input on small matters with `TODO(mandreyel)`, but the general idea is done. I'll be sure to squash commits when no further changes need be done!

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

<!-- Either: -->
- [x] These changes do not require tests because no new features or behaviour were introduced.

<!-- 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/21559)
<!-- Reviewable:end -->
2018-09-13 10:28:45 -04:00
..
allocator Format component allocator #21373 2018-08-16 15:44:54 +08:00
atoms Add rtl and ltr as static atoms. 2018-09-03 12:56:22 +02:00
bluetooth Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
bluetooth_traits Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
canvas Kill WebGLThreadObserver 2018-09-12 23:46:49 +02:00
canvas_traits Properly support PACK_ALIGNMENT in WebGL 1 2018-09-12 23:45:49 +02:00
channel add servo_channel crate 2018-09-12 11:25:45 +08:00
compositing Auto merge of #21688 - paulrouget:rm-clipboard, r=jdm 2018-09-13 03:08:53 -04:00
config Format components config #21373 2018-09-02 08:27:07 +08:00
constellation Auto merge of #21559 - mandreyel:pipeline-fields-to-browsingcontext, r=cbrewster 2018-09-13 10:28:45 -04:00
debugger Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
deny_public_fields Format components debugger and deny_public_fields #21373 2018-09-01 09:44:53 +08:00
devtools Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
devtools_traits Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
dom_struct Format components dom_struct, domobject_derive and embedder_traits #21373 2018-09-03 08:19:25 +08:00
domobject_derive Format components dom_struct, domobject_derive and embedder_traits #21373 2018-09-03 08:19:25 +08:00
embedder_traits Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
fallible Format components fallible and geometry #21373 2018-09-04 09:51:55 +08:00
geometry Move malloc_size_of_derive to proper position 2018-09-04 11:29:38 +08:00
gfx Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
gfx_traits Format gfx_traits #21373 2018-09-09 10:11:08 +08:00
hashglobe Format hashglobe #21373 2018-09-09 10:14:36 +08:00
jstraceable_derive Format jstraceable_derive #21373 2018-09-10 11:03:38 +08:00
layout Auto merge of #21628 - paavininanda:Current-pixel-density, r=jdm 2018-09-13 00:16:46 -04:00
layout_thread Auto merge of #21628 - paavininanda:Current-pixel-density, r=jdm 2018-09-13 00:16:46 -04:00
layout_traits Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
malloc_size_of Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
malloc_size_of_derive Rustfmt malloc_size_of & derive 2018-09-05 10:32:44 +02:00
metrics Auto merge of #21325 - gterzian:crossbeam_integration, r=SimonSapin,jdm 2018-09-12 13:33:45 -04:00
msg Format msg #21373 2018-09-11 15:04:55 +08:00
net Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
net_traits Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
profile Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
profile_traits Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
rand Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
range format components/range using rustfmt 2018-09-12 12:32:31 +05:30
remutex format components/remutex 2018-09-12 12:37:11 +05:30
script Auto merge of #21683 - servo:webgl, r=jdm 2018-09-13 01:47:52 -04:00
script_layout_interface Auto merge of #21687 - AnshulMalik:format-script_layout, r=jdm 2018-09-13 08:28:01 -04:00
script_plugins Format components/script_plugins 2018-09-13 01:01:35 +09:00
script_traits Auto merge of #21693 - chansuke:format_script_traits, r=jdm 2018-09-12 21:57:30 -04:00
selectors format components/selectors 2018-09-12 00:24:20 +05:30
servo Auto merge of #21688 - paulrouget:rm-clipboard, r=jdm 2018-09-13 03:08:53 -04:00
servo_arc style: Use an acquire load for is_unique in servo_arc. 2018-07-24 03:27:08 +02:00
size_of_test Format component size_of_test 2018-09-10 21:31:38 +09:00
style Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
style_derive Format component of style_derive 2018-09-07 22:18:51 +09:00
style_traits Format component of style_traits 2018-09-08 13:28:13 +09:00
url Format component of url 2018-09-05 22:53:03 +09:00
webdriver_server Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
webvr Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00
webvr_traits Replace mpsc with crossbeam/servo channel, update ipc-channel 2018-09-12 13:33:32 +08:00