Skip to content

Track hash changes in session history - #21048

Merged
bors-servo merged 1 commit into
servo:masterfrom
cbrewster:hash_change_history
Jul 21, 2018
Merged

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

Conversation

@cbrewster

@cbrewster cbrewster commented Jun 13, 2018 •

Copy link
Copy Markdown
Contributor

Adds tracking of hash changes in the session history.


  • 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/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

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

Copy link
Copy Markdown
Contributor Author

r? @asajeffrey

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we fail this test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, Firefox passes both tests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bors-servo

Copy link
Copy Markdown
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jun 23, 2018
@paulrouget

Copy link
Copy Markdown
Contributor

Does this trigger the HistoryChanged embedder message?

@cbrewster

Copy link
Copy Markdown
Contributor Author

@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 hash_change_history branch from d0a7cc2 to b6b0f32 Compare June 27, 2018 21:05
@cbrewster cbrewster removed the S-needs-rebase There are merge conflict errors. label Jun 27, 2018
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

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

@bors-servo

Copy link
Copy Markdown
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jul 19, 2018
@asajeffrey

Copy link
Copy Markdown
Contributor

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

@cbrewster
cbrewster force-pushed the hash_change_history branch from b6b0f32 to 33f40a4 Compare July 20, 2018 18:59
@cbrewster

Copy link
Copy Markdown
Contributor Author

@bors-servo r=asajeffrey

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 33f40a4 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. S-needs-rebase There are merge conflict errors. labels Jul 20, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 33f40a4 with merge ce0014b...

bors-servo pushed 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
Copy Markdown
Contributor

💔 Test failed - linux-rel-css

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jul 20, 2018
@jdm

jdm commented Jul 20, 2018

Copy link
Copy Markdown
Member
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 hash_change_history branch from 33f40a4 to 39acdcd Compare July 20, 2018 19:41
@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jul 20, 2018
@jdm

jdm commented Jul 20, 2018

Copy link
Copy Markdown
Member
  ▶ 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 hash_change_history branch from 39acdcd to 61442cc Compare July 21, 2018 18:39
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jul 21, 2018
@cbrewster

Copy link
Copy Markdown
Contributor Author

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 61442cc has been approved by cbrewster

@highfive highfive assigned cbrewster and unassigned asajeffrey Jul 21, 2018
@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 Jul 21, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 61442cc with merge 91c8f26...

bors-servo pushed 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
Copy Markdown
Contributor Author

@bors-servo r=asajeffrey

@bors-servo

Copy link
Copy Markdown
Contributor

💡 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
Copy Markdown
Contributor

📌 Commit 61442cc has been approved by asajeffrey

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

Copy link
Copy Markdown
Contributor

⌛ Testing commit 61442cc with merge a97d8b9...

bors-servo pushed 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
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt3

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jul 21, 2018
@cbrewster

Copy link
Copy Markdown
Contributor Author

@bors-servo retry

  • websockets

@bors-servo

Copy link
Copy Markdown
Contributor

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, android-x86, 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 a97d8b9 to master...

@bors-servo
bors-servo merged commit 61442cc into servo:master Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-tests-failed The changes caused existing tests to fail.

Projects

None yet

8 participants