New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace current session entry when reloading #13167
Conversation
Heads up! This PR modifies the following files:
|
r? @asajeffrey |
let entry = self.frames.get_mut(&frame_id).map(|frame| { | ||
frame.replace_current(frame_change.new_pipeline_id) | ||
}); | ||
if let Some(entry) = entry { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, but is entry ever supposed to be none? unwrap
or warn
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should probably warn, the None
case will only happen if the frame lookup fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
This looks good to me, and pass my local tests. |
89767c1
to
abeff2c
Compare
☔ The latest upstream changes (presumably #13211) made this pull request unmergeable. Please resolve the merge conflicts. |
abeff2c
to
2f7b72e
Compare
☔ The latest upstream changes (presumably #11698) made this pull request unmergeable. Please resolve the merge conflicts. |
2f7b72e
to
4bfff66
Compare
☔ The latest upstream changes (presumably #13227) made this pull request unmergeable. Please resolve the merge conflicts. |
4bfff66
to
0520ee4
Compare
Nitpicking about adding some comments, apart from that lgtm! You don't have to add the comments, but I think they would help. You can r=me. Reviewed 2 of 10 files at r1, 8 of 8 files at r2. components/constellation/constellation.rs, line 1389 at r2 (raw file):
A comment somewhere in this file about what components/script/script_thread.rs, line 232 at r2 (raw file):
A comment saying what the components/script_traits/lib.rs, line 462 at r2 (raw file):
A comment about components/script_traits/script_msg.rs, line 86 at r2 (raw file):
A comment about Comments from Reviewable |
0520ee4
to
e9b2f1b
Compare
@bors-servo r=asajeffrey |
📌 Commit e9b2f1b has been approved by |
…effrey Replace current session entry when reloading <!-- Please describe your changes on the following line: --> This PR adds a replacement option when navigating. It replaces the current session history entry after a new page has been loaded. This will prevent reloading from adding a new entry to the session 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 - [X] These changes fix #13123 (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/13167) <!-- Reviewable:end -->
☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
This PR adds a replacement option when navigating. It replaces the current session history entry after a new page has been loaded. This will prevent reloading from adding a new entry to the session history.
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is