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 beginnings of the History API #11481
Conversation
highfive
commented
May 28, 2016
|
Heads up! This PR modifies the following files:
|
|
|
|
Reviewed 1 of 60 files at r1. Comments from Reviewable |
|
hmm so the |
highfive
commented
Jun 1, 2016
|
New code was committed to pull request. |
1 similar comment
highfive
commented
Jun 1, 2016
|
New code was committed to pull request. |
|
@asajeffrey alright this should actually be ready for review whenever you have some open time. I imagine this will probably need a bit of cleanup before actually merging, but it would be nice to have another pair of eyes run over this just to make sure I am not doing something stupidly. |
highfive
commented
Jun 2, 2016
|
New code was committed to pull request. |
|
|
|
|
window ref push state forward nav more history api work Added popstate event usage more stuff Added delta to NavigationDirection enum variants Added history length and full delta nav Added constellation - script communication for active history entry Quick fixes to finish of proof of concept Switched to use StructuredCloneData when possible Use Heap<JS> instead of MutHeapJSVal pushState and replaceState should be marked as Throw Added FrameEntry added interleaved session history Cleanup tidy fixes cleaned up clear forward browsing context session history updated test expectations enabled history interface tests Added popstate event handler fixed forward history not being cleared Fix conditions on when popstate should be fired push/replace state url handling remove changing of hash as it causes a page reload Updated test expectations Added active document check Don't check cross-origin if the Url is not changed Skip activating transitional entries with a larger delta Rebased Fix debug messages Address other comments Remove duplicate popstate event binding Added spec link for fully active Added support for mozbrowser/multiple tlbc rebase and fix bhtml nav issue Joint session history lazy iter rebased added TODO for fully active document fix tidy cleanup fixed test expectation
|
|
|
My sketch about how to implement the history iterator... First, we have forward and back iterators for a single frame, just from frame.prev.iter()
frame.next.iter()both of which implement Now, define something like: struct MergeIncreasingIterators<I>(Vec<I>);
impl<I> Iterator for MergeIncreasingIterators<I>
where I: PeekableIterator, I::Item: PartialOrd
{
type Item = I::Item;
fn next(&mut self) -> Option<I::Item> {
self.0.iter()
.filter_map(|iter| iter.peek().map(|item| (iter, item)))
.min_by_key(|(iter, item)| item)
.and_then(|(iter, item)| iter.next())
}and ditto Implement |
|
I think this PR would be a lot easier to read if it was split up into it's parts: implement deltas, implement state push, implement joint session histories, etc.
|
|
Got part way through reading the PR. There's a lot of stuff here! |
|
I would like to split this out into more PRs. I think it would be good for me to go back through all my changes bit by bit since this is so huge. I do like that idea for the iterator a lot, sadly I still don't think it will work due to my issue where the back iter needs to drop the first entry and push the
|
|
Closing as I will split this into multiple PRs |
cbrewster commentedMay 28, 2016
•
edited
New PR for #11220 since Reviewable was getting slow.
r? @asajeffrey
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is