-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Session history fixup #20629
Session history fixup #20629
Conversation
Heads up! This PR modifies the following files:
|
r? @asajeffrey |
Opened new PR for upstreamable changes. Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50. |
3c0f253
to
9dd91bb
Compare
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50. |
9dd91bb
to
1b1b772
Compare
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50. |
1b1b772
to
84fc67a
Compare
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50. |
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.
LGTM!
{ | ||
let session_history = self.get_joint_session_history(browsing_context.top_level_id); | ||
session_history.remove_entries_for_browsing_context(browsing_context_id); | ||
} |
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.
Ah, this is interesting. Does this mean we're now eagerly removing entries from the session history, so the changes to history.length
will be immediately visible?
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.
Yes
assert_equals(old_history_len + 1, history.length); | ||
document.body.removeChild(document.getElementById("frame")); | ||
assert_equals(old_history_len, history.length); | ||
t.done(); |
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.
Good test! Have you tried on other browsers?
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.
Works in Firefox; fails in Chrome and Safari.
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.
Oh that's interesting. I'm pretty sure this is a spec-compliant test.
Squash and r=me. |
Notify history changed after a navigation Add history drop test
84fc67a
to
787ec4b
Compare
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50. |
@bors-servo r=asajeffrey |
📌 Commit 787ec4b has been approved by |
Session history fixup <!-- Please describe your changes on the following line: --> When a browsing context was removed, its entries were not removed from the joint session history. The embedder should be notified that the history changed after a navigation matures. --- <!-- 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 build-geckolib` 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 _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/20629) <!-- Reviewable:end -->
💔 Test failed - linux-rel-css |
@bors-servo retry |
⚡ Previous build results for android, arm32, arm64, linux-dev, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev are reusable. Rebuilding only linux-rel-css... |
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
Notify history changed after a navigation Add history drop test Upstreamed from servo/servo#20629 [ci skip]
When a browsing context was removed, its entries were not removed from the joint session history.
The embedder should be notified that the history changed after a navigation matures.
./mach build -d
does not report any errors./mach build-geckolib
does not report any errors./mach test-tidy
does not report any errorsThis change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)