diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-09-13 10:28:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 10:28:45 -0400 |
commit | 7b3feb7ffe176907233c85e0fc1c4300ee64ea8c (patch) | |
tree | b62142fe4156f51a4958c3daf3503bd338571044 /components/script/dom/bindings/codegen/parser | |
parent | efa2c7334eef4e2d4e905b5d187deb1fd54ae577 (diff) | |
parent | b051df76ef3f5d9764c37607105b8a31956aaec0 (diff) | |
download | servo-7b3feb7ffe176907233c85e0fc1c4300ee64ea8c.tar.gz servo-7b3feb7ffe176907233c85e0fc1c4300ee64ea8c.zip |
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: https://github.com/mandreyel/servo/commit/6fa2160bcc14db7ab020a65eba1473d7c36bc44d.
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 -->
Diffstat (limited to 'components/script/dom/bindings/codegen/parser')
0 files changed, 0 insertions, 0 deletions