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

Track hash changes in session history #21048

Merged
merged 1 commit into from Jul 21, 2018

Conversation

@cbrewster
Copy link
Member

cbrewster commented Jun 13, 2018

Adds tracking of hash changes in the session history.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #14970 fix #13437 (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 Jun 13, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/history.rs, components/constellation/constellation.rs, components/script/dom/window.rs, components/constellation/session_history.rs
  • @paulrouget: components/constellation/constellation.rs, components/constellation/session_history.rs
  • @KiChjang: components/script/dom/history.rs, components/script_traits/script_msg.rs, components/script/dom/window.rs
@cbrewster
Copy link
Member Author

cbrewster commented Jun 13, 2018

@highfive highfive assigned asajeffrey and unassigned mbrubeck Jun 13, 2018
[Queue a task to fire hashchange event]
expected: TIMEOUT
expected: FAIL

This comment has been minimized.

Copy link
@jdm

jdm Jun 13, 2018

Member

Why do we fail this test?

This comment has been minimized.

Copy link
@cbrewster

cbrewster Jun 14, 2018

Author Member

This test expects bubbles for the hashchange event to be false, but /html/browsers/browsing-the-web/scroll-to-fragid/004.html expects bubbles to be true. I wasn't able to find where this is specified in the specification, but Firefox sets bubbles to be true, so I went with that. One of the tests will need to be fixed.

This comment has been minimized.

Copy link
@jdm

jdm Jun 14, 2018

Member

Interestingly, Firefox passes both tests.

This comment has been minimized.

Copy link
@jdm

jdm Jun 14, 2018

Member

Also it looks like bubbles should be false per the "Example" block at https://dom.spec.whatwg.org/#concept-event-fire.

This comment has been minimized.

Copy link
@jdm

jdm Jun 14, 2018

Member

Given web-platform-tests/wpt#11355 from 9 days ago, I think we should update 004.html to match.

This comment has been minimized.

Copy link
@cbrewster

cbrewster Jun 27, 2018

Author Member

Ahh that explains it! I'll update it to false

@bors-servo
Copy link
Contributor

bors-servo commented Jun 23, 2018

The latest upstream changes (presumably #21086) made this pull request unmergeable. Please resolve the merge conflicts.

@paulrouget
Copy link
Contributor

paulrouget commented Jun 25, 2018

Does this trigger the HistoryChanged embedder message?

@cbrewster
Copy link
Member Author

cbrewster commented Jun 27, 2018

@paulrouget looks like it doesn't. I don't think history.pushState does either, so I will need to fix both of those.

@cbrewster cbrewster force-pushed the cbrewster:hash_change_history branch from d0a7cc2 to b6b0f32 Jun 27, 2018
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Jun 27, 2018

Error syncing changes upstream. Logs saved in error-snapshot-1530134754172.

@bors-servo
Copy link
Contributor

bors-servo commented Jul 19, 2018

The latest upstream changes (presumably #21204) made this pull request unmergeable. Please resolve the merge conflicts.

@asajeffrey
Copy link
Member

asajeffrey commented Jul 20, 2018

OK, this looks really good! Squash, rebase and r=me.

@cbrewster cbrewster force-pushed the cbrewster:hash_change_history branch from b6b0f32 to 33f40a4 Jul 20, 2018
@cbrewster
Copy link
Member Author

cbrewster commented Jul 20, 2018

@bors-servo r=asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2018

📌 Commit 33f40a4 has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2018

Testing commit 33f40a4 with merge ce0014b...

bors-servo added a commit that referenced this pull request Jul 20, 2018
Track hash changes in session history

<!-- Please describe your changes on the following line: -->
Adds tracking of hash changes in 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 #14970 fix #13437 (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/21048)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2018

💔 Test failed - linux-rel-css

@jdm
Copy link
Member

jdm commented Jul 20, 2018

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
    --> components/script/dom/window.rs:1612:39
     |
1087 |     pub fn task_canceller(&self, name: TaskSourceName) -> TaskCanceller {
     |     ------------------------------------------------------------------- defined here
...
1612 |                         Box::new(self.task_canceller().wrap_task(task)),
     |                                       ^^^^^^^^^^^^^^ expected 1 parameter

error: aborting due to previous error
@cbrewster cbrewster force-pushed the cbrewster:hash_change_history branch from 33f40a4 to 39acdcd Jul 20, 2018
@jdm
Copy link
Member

jdm commented Jul 20, 2018

  ▶ Unexpected subtest result in /css/cssom-view/scroll-behavior-smooth.html:
  └ PASS [expected NOTRUN] Smooth scrolling while doing history navigation.

  ▶ Unexpected subtest result in /css/cssom-view/scroll-behavior-smooth.html:
  │ FAIL [expected TIMEOUT] Instant scrolling while doing history navigation.
  │   → assert_equals: Shouldn't be scrolled back to top yet. expected 0 but got 28739
  │ 
  │ instant/window.onhashchange/window.onhashchange/<@http://web-platform.test:8000/css/cssom-view/scroll-behavior-smooth.html:80:11
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1538:20
  └ instant/window.onhashchange/window.onhashchange@http://web-platform.test:8000/css/cssom-view/scroll-behavior-smooth.html:78:9
Notify history changed on pushState and scroll to frag
@cbrewster cbrewster force-pushed the cbrewster:hash_change_history branch from 39acdcd to 61442cc Jul 21, 2018
@cbrewster
Copy link
Member Author

cbrewster commented Jul 21, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

📌 Commit 61442cc has been approved by cbrewster

@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

Testing commit 61442cc with merge 91c8f26...

bors-servo added a commit that referenced this pull request Jul 21, 2018
Track hash changes in session history

<!-- Please describe your changes on the following line: -->
Adds tracking of hash changes in 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 #14970 fix #13437 (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/21048)
<!-- Reviewable:end -->
@cbrewster
Copy link
Member Author

cbrewster commented Jul 21, 2018

@bors-servo r=asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

💡 This pull request was already approved, no need to approve it again.

  • This pull request is currently being tested. If there's no response from the continuous integration service, you may use retry to trigger a build again.
@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

📌 Commit 61442cc has been approved by asajeffrey

@highfive highfive assigned asajeffrey and unassigned cbrewster Jul 21, 2018
@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

Testing commit 61442cc with merge a97d8b9...

bors-servo added a commit that referenced this pull request Jul 21, 2018
Track hash changes in session history

<!-- Please describe your changes on the following line: -->
Adds tracking of hash changes in 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 #14970 fix #13437 (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/21048)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

💔 Test failed - mac-rel-wpt3

@cbrewster
Copy link
Member Author

cbrewster commented Jul 21, 2018

@bors-servo retry

  • websockets
@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

@bors-servo bors-servo merged commit 61442cc into servo:master Jul 21, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.