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 upHistory State API #15261
History State API #15261
Conversation
highfive
commented
Jan 27, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jan 27, 2017
|
r? @asajeffrey |
|
@bors-servo try |
History State API <!-- Please describe your changes on the following line: --> This PR implements the state-related portions of the History API. We need to think out how exactly to handle the history state in the case of 1. Reloads and 2. Pruning/Reloading Distant History. --- <!-- 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 - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/15261) <!-- Reviewable:end -->
| [Manual scroll restoration should take precedent over scrolling to fragment in cross doc navigation] | ||
| expected: FAIL | ||
| expected: TIMEOUT |
This comment has been minimized.
This comment has been minimized.
cbrewster
Jan 27, 2017
Author
Member
This new TIMEOUT is due to hashchange events not being implemented yet.
| [history.{push,replace}State retain scroll restoration mode and navigation in the same document respects it] | ||
| expected: FAIL | ||
| expected: TIMEOUT |
This comment has been minimized.
This comment has been minimized.
|
|
|
bb10d3d
to
979e719
|
@bors-servo try |
History State API <!-- Please describe your changes on the following line: --> This PR implements the state-related portions of the History API. We need to think out how exactly to handle the history state in the case of 1. Reloads and 2. Pruning/Reloading Distant History. --- <!-- 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 - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/15261) <!-- Reviewable:end -->
|
|
|
|
|
@jdm I have been looking at how to handle the |
|
@bors-servo try |
History State API <!-- Please describe your changes on the following line: --> This PR implements the state-related portions of the History API. We need to think out how exactly to handle the history state in the case of 1. Reloads and 2. Pruning/Reloading Distant History. --- <!-- 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 - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/15261) <!-- Reviewable:end -->
|
|
|
Reusing the same pipeline id does cause some other unintended issues as After thinking about it, I wonder if we could something along these lines:
|
|
Blocked on #15566 |
|
Sounds like recycling pipeline IDs is having unexpected consequences. |
|
|
Various frame-related cleanup
This change implements handling history state entries and hash change history entries. The constellation is in charge of managing session history and traversals. The History object is in charge of updating all state on the script/dom side of things. The resource thread stores the serialized history state data. This data must be stored outside the script thread as the script thread may be shut down if its document is purged during history pruning. Storing the state data allows for retrieval of the state data at a later time even if the document had to be recreated. Each state is tracked using a state ID which is a UUID. Traversal tasks are now queued on the history traversal task source. The runnable waits synchronously on the constellation to finish handling the traversal. This allows for tests to use setTimeout to wait for a traversal to be handled before the callback has a chance of being called.
update test expectations
|
|
|
IRC conversation about session histories with multiple instances of the same pipeline id: http://logs.glob.uno/?c=mozilla%23servo&s=24+Feb+2017&e=24+Feb+2017#c619161 TL;DR: If you have document A which pushStates to B then again to C, then their shared Document is discarded, then the history is traversed to B, what happens? Our read of the spec is that A, B and C should all be reloaded to the same fresh document. This means that any session history entries with the same pipeline id must be contiguous. (Duplicating #10992 (comment) just to make sure I don't forget.) |
|
What is the status on this? If this is stalled, could we close the PR and file an issue referencing it? |
|
@nox right now we need to find a better way of handling distant history pipeline discard that allows the history to contain multiple entries with the same pipeline id. I'm finishing up school at the moment so I don't have time right now, but I plan on finishing this up here in a couple weeks. I'll close for now until I have time to resume work. |
cbrewster commentedJan 27, 2017
•
edited by larsbergstrom
This PR implements the state-related portions of the History API. We need to think out how exactly to handle the history state in the case of 1. Reloads and 2. Pruning/Reloading Distant History.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is