Skip to content
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

Merged
merged 1 commit into from Apr 12, 2018
Merged

Session history fixup #20629

merged 1 commit into from Apr 12, 2018

Conversation

@cbrewster
Copy link
Member

cbrewster commented Apr 12, 2018

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 errors
  • These changes fix #__ (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

@highfive
Copy link

highfive commented Apr 12, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/constellation/constellation.rs, components/constellation/session_history.rs
  • @paulrouget: components/constellation/constellation.rs, components/constellation/session_history.rs
@cbrewster
Copy link
Member Author

cbrewster commented Apr 12, 2018

@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Apr 12, 2018

Opened new PR for upstreamable changes.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50.

@cbrewster cbrewster force-pushed the cbrewster:session_history_fixup branch from 3c0f253 to 9dd91bb Apr 12, 2018
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Apr 12, 2018

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50.

@cbrewster cbrewster force-pushed the cbrewster:session_history_fixup branch from 9dd91bb to 1b1b772 Apr 12, 2018
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Apr 12, 2018

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50.

@cbrewster cbrewster force-pushed the cbrewster:session_history_fixup branch from 1b1b772 to 84fc67a Apr 12, 2018
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Apr 12, 2018

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50.

Copy link
Member

asajeffrey left a comment

LGTM!

{
let session_history = self.get_joint_session_history(browsing_context.top_level_id);
session_history.remove_entries_for_browsing_context(browsing_context_id);
}

This comment has been minimized.

Copy link
@asajeffrey

asajeffrey Apr 12, 2018

Member

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?

This comment has been minimized.

Copy link
@cbrewster

cbrewster Apr 12, 2018

Author Member

Yes

assert_equals(old_history_len + 1, history.length);
document.body.removeChild(document.getElementById("frame"));
assert_equals(old_history_len, history.length);
t.done();

This comment has been minimized.

Copy link
@asajeffrey

asajeffrey Apr 12, 2018

Member

Good test! Have you tried on other browsers?

This comment has been minimized.

Copy link
@cbrewster

cbrewster Apr 12, 2018

Author Member

Works in Firefox; fails in Chrome and Safari.

This comment has been minimized.

Copy link
@asajeffrey

asajeffrey Apr 12, 2018

Member

Oh that's interesting. I'm pretty sure this is a spec-compliant test.

@asajeffrey
Copy link
Member

asajeffrey commented Apr 12, 2018

Squash and r=me.

Notify history changed after a navigation

Add history drop test
@cbrewster cbrewster force-pushed the cbrewster:session_history_fixup branch from 84fc67a to 787ec4b Apr 12, 2018
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Apr 12, 2018

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#50.

@cbrewster
Copy link
Member Author

cbrewster commented Apr 12, 2018

@bors-servo r=asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Apr 12, 2018

📌 Commit 787ec4b has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Apr 12, 2018

Testing commit 787ec4b with merge e4472f7...

bors-servo added a commit that referenced this pull request Apr 12, 2018
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 -->
@bors-servo
Copy link
Contributor

bors-servo commented Apr 12, 2018

💔 Test failed - linux-rel-css

@cbrewster
Copy link
Member Author

cbrewster commented Apr 12, 2018

@bors-servo retry
I think this is intermittent, it passes locally.

@bors-servo
Copy link
Contributor

bors-servo commented Apr 12, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Apr 12, 2018

@bors-servo bors-servo merged commit 787ec4b into servo:master Apr 12, 2018
3 of 4 checks passed
3 of 4 checks passed
Taskcluster (pull_request) TaskGroup: failure
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@cbrewster cbrewster deleted the cbrewster:session_history_fixup branch Apr 13, 2018
nox added a commit to web-platform-tests/wpt that referenced this pull request Apr 19, 2018
Notify history changed after a navigation

Add history drop test

Upstreamed from servo/servo#20629 [ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.