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

Expose DOMHighResTimeStamps at lower res #25659

Merged
merged 1 commit into from Feb 10, 2020
Merged

Conversation

@pshaughn
Copy link
Member

pshaughn commented Jan 31, 2020

As explained in https://www.w3.org/TR/hr-time-2/#clock-resolution and tested in a few WPT tests, we're not supposed to show Javascript the full resolution of OS timestamps. This fixes that on all the DOMHighResTimeStamp interfaces that weren't already limiting themselves to integer milliseconds.

The specific choice of how to coarsen the resolution is extremely bikesheddable; I commented the reasoning for my arbitrary choice but I admit it's arbitrary.

A couple tests of timing resolution still fail, but because they're seeing undefined and NaN values due to unimplemented attributes (#25658).


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #25656 fix #25296 fix #21276
  • There are tests for these changes
@highfive
Copy link

highfive commented Jan 31, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/performance.rs, components/script/dom/vrframedata.rs, components/script/dom/performanceentry.rs, components/script/dom/event.rs, components/script/dom/performanceresourcetiming.rs and 1 more
  • @KiChjang: components/script/dom/performance.rs, components/script/dom/vrframedata.rs, components/script/dom/performanceentry.rs, components/script/dom/event.rs, components/script/dom/performanceresourcetiming.rs and 1 more
@nox
Copy link
Member

nox commented Feb 3, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 3, 2020

📌 Commit 7c9abb4 has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Feb 3, 2020

Testing commit 7c9abb4 with merge 3081c83...

bors-servo added a commit that referenced this pull request Feb 3, 2020
Expose DOMHighResTimeStamps at lower res

As explained in https://www.w3.org/TR/hr-time-2/#clock-resolution and tested in a few WPT tests, we're not supposed to show Javascript the full resolution of OS timestamps. This fixes that on all the DOMHighResTimeStamp interfaces that weren't already limiting themselves to integer milliseconds.

The specific choice of how to coarsen the resolution is extremely bikesheddable; I commented the reasoning for my arbitrary choice but I admit it's arbitrary.

A couple tests of timing resolution still fail, but because they're seeing undefined and NaN values due to unimplemented attributes (#25658).

---
<!-- 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 #25656 fix #25296 fix #21276

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 3, 2020

💔 Test failed - status-taskcluster

@pshaughn
Copy link
Member Author

pshaughn commented Feb 3, 2020

  ▶ Unexpected subtest result in /_mozilla/mozilla/window_performance.html:
  │ FAIL [expected PASS] window_performance
  │   → assert_greater_than: expected a number greater than 298.19 but got 298.19
  │ 
  │ @http://web-platform.test:8000/_mozilla/mozilla/window_performance.html:33:5
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2024:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  └ @http://web-platform.test:8000/_mozilla/mozilla/window_performance.html:9:1

I'll look into what this test is asking; my guess is that it's a bad test that expects behavior the HR-Time spec is specifically telling us not to have.

@pshaughn pshaughn force-pushed the pshaughn:timingresolution branch from 7c9abb4 to 8e65782 Feb 3, 2020
@pshaughn
Copy link
Member Author

pshaughn commented Feb 3, 2020

I think I understand what that test wanted to do, and with this change it should be able to keep doing it.
@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Feb 3, 2020

Trying commit 8e65782 with merge af4283e...

bors-servo added a commit that referenced this pull request Feb 3, 2020
Expose DOMHighResTimeStamps at lower res

As explained in https://www.w3.org/TR/hr-time-2/#clock-resolution and tested in a few WPT tests, we're not supposed to show Javascript the full resolution of OS timestamps. This fixes that on all the DOMHighResTimeStamp interfaces that weren't already limiting themselves to integer milliseconds.

The specific choice of how to coarsen the resolution is extremely bikesheddable; I commented the reasoning for my arbitrary choice but I admit it's arbitrary.

A couple tests of timing resolution still fail, but because they're seeing undefined and NaN values due to unimplemented attributes (#25658).

---
<!-- 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 #25656 fix #25296 fix #21276

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 3, 2020

💔 Test failed - status-taskcluster

@pshaughn
Copy link
Member Author

pshaughn commented Feb 3, 2020

There we go, down to the CSS reftest roulette now.

@nox
Copy link
Member

nox commented Feb 10, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

Trying commit 8e65782 with merge 54a6062...

bors-servo added a commit that referenced this pull request Feb 10, 2020
Expose DOMHighResTimeStamps at lower res

As explained in https://www.w3.org/TR/hr-time-2/#clock-resolution and tested in a few WPT tests, we're not supposed to show Javascript the full resolution of OS timestamps. This fixes that on all the DOMHighResTimeStamp interfaces that weren't already limiting themselves to integer milliseconds.

The specific choice of how to coarsen the resolution is extremely bikesheddable; I commented the reasoning for my arbitrary choice but I admit it's arbitrary.

A couple tests of timing resolution still fail, but because they're seeing undefined and NaN values due to unimplemented attributes (#25658).

---
<!-- 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 #25656 fix #25296 fix #21276

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Feb 10, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

Trying commit 8e65782 with merge 7ef79b6...

bors-servo added a commit that referenced this pull request Feb 10, 2020
Expose DOMHighResTimeStamps at lower res

As explained in https://www.w3.org/TR/hr-time-2/#clock-resolution and tested in a few WPT tests, we're not supposed to show Javascript the full resolution of OS timestamps. This fixes that on all the DOMHighResTimeStamp interfaces that weren't already limiting themselves to integer milliseconds.

The specific choice of how to coarsen the resolution is extremely bikesheddable; I commented the reasoning for my arbitrary choice but I admit it's arbitrary.

A couple tests of timing resolution still fail, but because they're seeing undefined and NaN values due to unimplemented attributes (#25658).

---
<!-- 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 #25656 fix #25296 fix #21276

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

☀️ Test successful - status-taskcluster
State: approved= try=True

@jdm
Copy link
Member

jdm commented Feb 10, 2020

@bors-servo r=jdm,nox

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

📌 Commit 8e65782 has been approved by jdm,nox

@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

Testing commit 8e65782 with merge c0ee759...

bors-servo added a commit that referenced this pull request Feb 10, 2020
Expose DOMHighResTimeStamps at lower res

As explained in https://www.w3.org/TR/hr-time-2/#clock-resolution and tested in a few WPT tests, we're not supposed to show Javascript the full resolution of OS timestamps. This fixes that on all the DOMHighResTimeStamp interfaces that weren't already limiting themselves to integer milliseconds.

The specific choice of how to coarsen the resolution is extremely bikesheddable; I commented the reasoning for my arbitrary choice but I admit it's arbitrary.

A couple tests of timing resolution still fail, but because they're seeing undefined and NaN values due to unimplemented attributes (#25658).

---
<!-- 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 #25656 fix #25296 fix #21276

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 10, 2020

☀️ Test successful - status-taskcluster
Approved by: jdm,nox
Pushing c0ee759 to master...

@bors-servo bors-servo merged commit 8e65782 into servo:master Feb 10, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
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
5 participants
You can’t perform that action at this time.