Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement joint session history #11866
Conversation
highfive
commented
Jun 25, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jun 25, 2016
4991c6c
to
414fe1e
|
|
414fe1e
to
2be8b13
|
Rebased. |
2be8b13
to
e5343c0
|
Does this try to implement the spec model? Based on input from Gecko and Blink engineers, it seems that extant implementations are different from the spec in ways that are likely to be difficult to reconcile without changing the spec model to match implementations. In particular the existing implementations store a representation of the frame tree for each position in history, and then diff that tree during navigations to work out which frame to navigate. IMO we should implement that model and change the spec to match. |
|
@jgraham it's based off of https://github.com/ConnorGBrewster/ServoNavigation/blob/master/notes/notes.pdf. It tries to stay as close to the current spec as possible. That proposes some changes to the spec to match up with what other browsers do/making traversal homomorphic. |
|
@jgraham we tried to make the minimum changes to the spec but be a) as close as possible to existing implementations, and b) vaguely sensible :) We are expecting that spec changes will be a result of this work. |
|
OK, but "as few changes from the spec as possible" should not be a goal. From what I've heard so far it sounds like there is common agreement on how this stuff is implemented, and the spec should reflect that agreement (in this area particularly because other implementations are highly unlikely to change their code to reflect a different model in the spec). From Servo's point of view this doesn't seem like an area where being gratuitously different can buy much in terms of the higher level goals around quality and performance. |
|
Agreed, the goals are (a) and (b) and if we can get something that meets this with as little disruption, so much the better. |
|
This implementation is based on timestamps and lazily computing the joint session history. I think with the revised spec, we should be able to use an in-memory representation of the jsh, and not have to keep track of timestamps. Not sure which is better. Reviewed 6 of 7 files at r7, 1 of 1 files at r8. components/constellation/constellation.rs, line 220 [r8] (raw file):
Rather than keeping two iterators, wouldn't it be easier to have separate components/constellation/constellation.rs, line 232 [r8] (raw file):
I think this is doing by hand what components/constellation/constellation.rs, line 266 [r8] (raw file):
I think this would be simpler with two different iterators, since they're different logic. components/constellation/constellation.rs, line 364 [r8] (raw file):
Yay combinators! Comments from Reviewable |
|
IRC chat: http://logs.glob.uno/?c=mozilla%23servo&s=27+Jun+2016&e=27+Jun+2016#c463962 TL;DR in-memory vs lazy computation of joint session history? |
e5343c0
to
781265b
|
Cleaned up a bit, still a few things I would like to get cleaner, like reducing the number of Review status: 0 of 7 files reviewed at latest revision, 4 unresolved discussions. components/constellation/constellation.rs, line 220 [r8] (raw file):
|
|
I just cleaned up the |
|
components/constellation/constellation.rs, line 232 [r8] (raw file):
|
fea85f6
to
751b04a
|
I did as much as I could think of to reduce the amount of vec allocations, now there are only 2 vec allocations for This is ready for another review pass. |
|
OK, I'll have a look tomorrow.
|
|
Reviewed everything apart from the constellation, i.e. all the easy bits! I'm trying to work out how we can simplify the constellation code. Reviewed 6 of 7 files at r11. components/msg/constellation_msg.rs, line 246 [r17] (raw file):
Yay for spec-compliant naming! components/script_traits/lib.rs, line 551 [r17] (raw file):
Don't need parentheses around components/script_traits/script_msg.rs, line 77 [r17] (raw file):
Don't need parentheses around Comments from Reviewable |
2eed173
to
1abdf6e
|
Finally got back around to this one. I would like to simplify the extra constellation code aswell, it seems like the constellation could grow a lot after this, old pipeline purging, and History API state stuff if we aren't careful. Review status: 0 of 7 files reviewed at latest revision, 3 unresolved discussions. components/msg/constellation_msg.rs, line 246 [r17] (raw file):
|
1abdf6e
to
98fb96b
|
|
|
Reviewed 3 of 7 files at r56, 2 of 2 files at r62, 2 of 2 files at r63. components/constellation/constellation.rs, line 1572 [r53] (raw file):
|
|
Review status: 6 of 7 files reviewed at latest revision, 6 unresolved discussions. components/constellation/constellation.rs, line 1572 [r53] (raw file):
|
|
Yay, nearly there, just one more nit. Reviewed 1 of 1 files at r65. components/constellation/constellation.rs, line 592 [r65] (raw file):
Can just make this a Vec rather than a &mut Vec? Comments from Reviewable |
82baa7c
to
e72d1a5
|
My goodness that was a bit epic! @bors-servo r+ |
|
|
…ffrey Implement joint session history <!-- Please describe your changes on the following line: --> This is cleaned up and should align with the patches on https://github.com/ConnorGBrewster/ServoNavigation/blob/master/notes/notes.pdf r? @asajeffrey --- <!-- 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 #11669 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because this is not testable until the History API is added. <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11866) <!-- Reviewable:end -->
|
|
|
Fix backward navigation make use of history iterator Add frame iterator add different back logic cleanup navigation_info Add extra explanation for iter logic Remove forward history on full frame tree Rename navigation to traversal where appropriate check full tree for can go back/forward simplify frame iter logic remove FrameIterator cleanup history iter reduce amount of vec allocations removed extra parenthesis Remove history iterator cleanup after rebasing avoid recursive vec allocation remove full_frame_tree remove_forward_history_in_frame_tree -> clear_joint_session_future
e72d1a5
to
f131818
|
@bors-servo r=asajeffrey |
|
|
…ffrey Implement joint session history <!-- Please describe your changes on the following line: --> This is cleaned up and should align with the patches on https://github.com/ConnorGBrewster/ServoNavigation/blob/master/notes/notes.pdf r? @asajeffrey --- <!-- 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 #11669 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because this is not testable until the History API is added. <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11866) <!-- Reviewable:end -->
|
|
cbrewster commentedJun 25, 2016
•
edited by larsbergstrom
This is cleaned up and should align with the patches on https://github.com/ConnorGBrewster/ServoNavigation/blob/master/notes/notes.pdf
r? @asajeffrey
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is