Skip to content

Make session history aware of URLs - #20671

Merged
bors-servo merged 1 commit into
servo:masterfrom
cbrewster:history_url
Apr 30, 2018
Merged

bors-servo merged 1 commit into
servo:masterfrom
cbrewster:history_url

Conversation

@cbrewster

@cbrewster cbrewster commented Apr 21, 2018 •

Copy link
Copy Markdown
Contributor

  • ./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
Copy Markdown

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/history.rs, components/constellation/constellation.rs, components/script/script_thread.rs, components/constellation/session_history.rs
  • @paulrouget: components/constellation/constellation.rs, components/constellation/session_history.rs
  • @fitzgen: components/script/dom/history.rs, components/script_traits/script_msg.rs, components/script/script_thread.rs, components/script_traits/lib.rs
  • @KiChjang: components/script/dom/history.rs, components/script_traits/script_msg.rs, components/script/script_thread.rs, components/script_traits/lib.rs

@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify script code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 21, 2018
@cbrewster

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit a247ff7 with merge be7bafb...

bors-servo pushed a commit that referenced this pull request Apr 21, 2018
Make session history aware of URLs

<!-- Please describe your changes on the following line: -->

---
<!-- 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: -->
- [ ] 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/20671)
<!-- Reviewable:end -->
@cbrewster cbrewster changed the title Make session history aware of URLs [WIP] Make session history aware of URLs Apr 21, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-css

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Apr 21, 2018
@asajeffrey

Copy link
Copy Markdown
Contributor

Looking good so far. Let me know when you'd like a review!

@cbrewster

Copy link
Copy Markdown
Contributor Author

@asajeffrey will do!
I need to write couple test cases that this PR fixes and verify that this is actually working. Testing this is pretty tricky.

@cbrewster

cbrewster commented Apr 21, 2018 •

Copy link
Copy Markdown
Contributor Author

@asajeffrey hmm I have hit a snag... Consider my example in http://servo-experiments.surge.sh/bfcache.html

After these changes, Servo should match the behavior of other browsers (history.go(-1) will result in the url having ?a=1).

Unfortunately, this is not what happens. Once the browser is navigated to servo.org, the session history looks something like

[
    PipelineDiff { reloader: NeedsToReload::Yes((0,1)), new_url: "...html?a=1", old_url: "...html", .. },
    BrowsingContextDiff { old_reloader: NeedsToReload::Yes((0,1)), ... },
]

history.go(-1) will only apply the BrowsingContextDiff which will cause "...html" to be loaded instead of loading "...html/?a=1".

Edit: I think the correct solution here is to update the LoadData to have the current url of the pipeline when it is discarded.

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Apr 22, 2018
@cbrewster

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit de5ebb8 with merge 6ed4d51...

bors-servo pushed a commit that referenced this pull request Apr 22, 2018
[WIP] Make session history aware of URLs

<!-- Please describe your changes on the following line: -->

---
<!-- 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: -->
- [ ] 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/20671)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-css

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Apr 22, 2018
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Apr 22, 2018
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Opened new PR for upstreamable changes.

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

@cbrewster cbrewster changed the title [WIP] Make session history aware of URLs Make session history aware of URLs Apr 24, 2018
@cbrewster

Copy link
Copy Markdown
Contributor Author

r? @asajeffrey

@highfive highfive assigned asajeffrey and unassigned pcwalton Apr 24, 2018
@asajeffrey

Copy link
Copy Markdown
Contributor

OK, finally dug myself out from under SM... This all looks good! I'm a bit surprised there aren't any new passing tests, do you have a feeling for why? Apart from that, yay, you can r=me.

@cbrewster

Copy link
Copy Markdown
Contributor Author

I believe most tests are relying on other things to be implemented, like adding history entries when location.hash is set. Once that is implemented, there should be some more passing tests.

@bors-servo r=asajeffrey

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit e7ef9cf has been approved by asajeffrey

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 30, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit e7ef9cf with merge 847115b...

bors-servo pushed a commit that referenced this pull request Apr 30, 2018
Make session history aware of URLs

<!-- Please describe your changes on the following line: -->

---
<!-- 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/20671)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ 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
Approved by: asajeffrey
Pushing 847115b to master...

@bors-servo
bors-servo merged commit e7ef9cf into servo:master Apr 30, 2018
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 30, 2018
jdm pushed a commit to web-platform-tests/wpt that referenced this pull request May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants