Skip to content

Expose DOMHighResTimeStamps at lower res#25659

Merged
bors-servo merged 1 commit intoservo:masterfrom
pshaughn:timingresolution
Feb 10, 2020
Merged

Expose DOMHighResTimeStamps at lower res#25659
bors-servo merged 1 commit intoservo:masterfrom
pshaughn:timingresolution

Conversation

@pshaughn
Copy link
Copy Markdown
Contributor

@pshaughn 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).


  • There are tests for these changes

@highfive
Copy link
Copy Markdown

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

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 31, 2020
@nox
Copy link
Copy Markdown
Contributor

nox commented Feb 3, 2020

@bors-servo r+

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 7c9abb4 has been approved by nox

@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 Feb 3, 2020
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 7c9abb4 with merge 3081c83...

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

💔 Test failed - status-taskcluster

@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 Feb 3, 2020
@pshaughn
Copy link
Copy Markdown
Contributor 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.

@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 Feb 3, 2020
@pshaughn
Copy link
Copy Markdown
Contributor 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
Copy Markdown
Contributor

⌛ Trying commit 8e65782 with merge af4283e...

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

💔 Test failed - status-taskcluster

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Feb 3, 2020
@pshaughn
Copy link
Copy Markdown
Contributor Author

pshaughn commented Feb 3, 2020

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

@nox
Copy link
Copy Markdown
Contributor

nox commented Feb 10, 2020

@bors-servo retry #24726

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit 8e65782 with merge 54a6062...

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

💔 Test failed - status-taskcluster

@jdm
Copy link
Copy Markdown
Member

jdm commented Feb 10, 2020

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Trying commit 8e65782 with merge 7ef79b6...

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

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

@jdm
Copy link
Copy Markdown
Member

jdm commented Feb 10, 2020

@bors-servo r=jdm,nox

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 8e65782 has been approved by jdm,nox

@highfive highfive assigned jdm and unassigned nox Feb 10, 2020
@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-tests-failed The changes caused existing tests to fail. labels Feb 10, 2020
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 8e65782 with merge c0ee759...

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

☀️ 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
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants