Repository navigation
History State API - #15261
History State API#15261cbrewster wants to merge 7 commits into
Conversation
|
Heads up! This PR modifies the following files:
|
|
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 -->
| expected: TIMEOUT | ||
| [Manual scroll restoration should take precedent over scrolling to fragment in cross doc navigation] | ||
| expected: FAIL | ||
| expected: TIMEOUT |
There was a problem hiding this comment.
This new TIMEOUT is due to hashchange events not being implemented yet.
| expected: TIMEOUT | ||
| [history.{push,replace}State retain scroll restoration mode and navigation in the same document respects it] | ||
| expected: FAIL | ||
| expected: TIMEOUT |
|
💔 Test failed - linux-rel-wpt |
|
c9582e7 to
ff16b67
Compare
bb10d3d to
979e719
Compare
|
@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 -->
|
💔 Test failed - linux-rel-wpt |
|
☔ The latest upstream changes (presumably #14971) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@jdm I have been looking at how to handle the |
979e719 to
30a1d59
Compare
|
@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 -->
|
💔 Test failed - linux-rel-wpt |
677f30c to
4e2f6af
Compare
|
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. |
|
☔ The latest upstream changes (presumably #15537) made this pull request unmergeable. Please resolve the merge conflicts. |
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
4e2f6af to
13a9509
Compare
|
☔ The latest upstream changes (presumably #15588) made this pull request unmergeable. Please resolve the merge conflicts. |
|
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. |
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