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

Add referrerpolicy to list of relevant mutations #26450

Conversation

@PeterZhizhin
Copy link
Contributor

PeterZhizhin commented May 6, 2020

img.referrerPolicy change now mutates the image.
Not all referrerPolicy attribute changes result in an image update event.
Only valid changes are reflected.

All referrerpolicy tests inside relevant-mutations.html WPT test now pass.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #26388
  • These have tests:
./mach test-wpt tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html
@highfive
Copy link

highfive commented May 6, 2020

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon.

@highfive
Copy link

highfive commented May 6, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/webidls/HTMLImageElement.webidl, components/script/dom/htmlimageelement.rs
  • @KiChjang: components/script/dom/webidls/HTMLImageElement.webidl, components/script/dom/htmlimageelement.rs, components/net_traits/lib.rs
@jdm
Copy link
Member

jdm commented May 6, 2020

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented May 6, 2020

Trying commit c54647b with merge 2ecb409...

bors-servo added a commit that referenced this pull request May 6, 2020
…evant_mutations, r=<try>

Add referrerpolicy to list of relevant mutations

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

`img.referrerPolicy` change now mutates the image.
Not all `referrerPolicy` attribute changes result in an image update event.
Only valid changes are reflected.

All referrerpolicy tests inside `relevant-mutations.html` WPT test now pass.

---
<!-- 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 #26388

<!-- Either: -->
- [x] These have tests:
```
./mach test-wpt tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html
```
@bors-servo
Copy link
Contributor

bors-servo commented May 6, 2020

💔 Test failed - status-taskcluster

@PeterZhizhin
Copy link
Contributor Author

PeterZhizhin commented May 6, 2020

I don't fully understand the test results. There are some irrelevant tests (probably), I didn't change anything related to CSS, but some CSS tests are failing.

However, it appears that there are some relevant tests with unexpected results:

  ▶ Unexpected subtest result in /html/dom/idlharness.https.html?include=HTML.*:
  └ PASS [expected FAIL] HTMLImageElement interface: attribute referrerPolicy
  ▶ Unexpected subtest result in /html/dom/idlharness.https.html?include=HTML.*:
  └ PASS [expected FAIL] HTMLImageElement interface: document.createElement("img") must inherit property "referrerPolicy" with the proper type
  ▶ Unexpected subtest result in /html/dom/idlharness.https.html?include=HTML.*:
  └ PASS [expected FAIL] HTMLImageElement interface: new Image() must inherit property "referrerPolicy" with the proper type
  ▶ Unexpected subtest result in /custom-elements/reactions/HTMLImageElement.html:
  └ PASS [expected FAIL] referrerPolicy on HTMLImageElement must enqueue an attributeChanged reaction when adding a new attribute
  ▶ Unexpected subtest result in /custom-elements/reactions/HTMLImageElement.html:
  └ PASS [expected FAIL] referrerPolicy on HTMLImageElement must enqueue an attributeChanged reaction when replacing an existing attribute

Unfortunately, I cannot run this test locally. I tried running:

.\mach test-wpt .\tests\wpt\web-platform-tests\html\dom\idlharness.https.html

This is due to #26431 (it runs the test in headless mode).

I am not sure what to do next. Should I edit servo\tests\wpt\metadata\html\dom\idlharness.https.html.ini and remove the expected HTMLImageElement failures?

What about the other tests? Is this me or they are just flaky?

@jdm
Copy link
Member

jdm commented May 6, 2020

Oh, only the results in the public/filtered-wpt-errorsummary.log artifact matter; the others are filtered into public/intermittents.log because they are tests with known intermittent failures. And yes, removing those expected failures from the ini file is the correct choice here.

@highfive highfive removed the S-tests-failed label May 6, 2020
@jdm
Copy link
Member

jdm commented May 6, 2020

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented May 6, 2020

Trying commit fe0f013 with merge 2f80db3...

bors-servo added a commit that referenced this pull request May 6, 2020
…evant_mutations, r=<try>

Add referrerpolicy to list of relevant mutations

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

`img.referrerPolicy` change now mutates the image.
Not all `referrerPolicy` attribute changes result in an image update event.
Only valid changes are reflected.

All referrerpolicy tests inside `relevant-mutations.html` WPT test now pass.

---
<!-- 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 #26388

<!-- Either: -->
- [x] These have tests:
```
./mach test-wpt tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html
```
@bors-servo
Copy link
Contributor

bors-servo commented May 6, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented May 6, 2020

  ▶ Unexpected subtest result in /html/dom/idlharness.https.html?include=HTML.*:
  └ PASS [expected FAIL] HTMLImageElement interface: attribute referrerPolicy

One missing one.

@highfive highfive removed the S-tests-failed label May 6, 2020
@PeterZhizhin
Copy link
Contributor Author

PeterZhizhin commented May 6, 2020

  ▶ Unexpected subtest result in /html/dom/idlharness.https.html?include=HTML.*:
  └ PASS [expected FAIL] HTMLImageElement interface: attribute referrerPolicy

One missing one.

Sorry, added removed this expectation as well.

@PeterZhizhin
Copy link
Contributor Author

PeterZhizhin commented May 6, 2020

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented May 6, 2020

@PeterZhizhin: 🔑 Insufficient privileges: not in try users

2 similar comments
@bors-servo
Copy link
Contributor

bors-servo commented May 6, 2020

@PeterZhizhin: 🔑 Insufficient privileges: not in try users

@bors-servo
Copy link
Contributor

bors-servo commented May 6, 2020

@PeterZhizhin: 🔑 Insufficient privileges: not in try users

Copy link
Member

jdm left a comment

Looks good! Please squash your changes into a single commit, too.

components/script/dom/htmlimageelement.rs Outdated Show resolved Hide resolved
components/script/dom/htmlimageelement.rs Outdated Show resolved Hide resolved
components/script/dom/webidls/HTMLImageElement.webidl Outdated Show resolved Hide resolved
components/script/dom/htmlimageelement.rs Outdated Show resolved Hide resolved
@jdm jdm assigned jdm and unassigned Manishearth May 6, 2020
This fixes #26388. referrerPolicy is now calls onload for image
mutations. Not all referrerPolicy attribute changes result in an image
update event. Only valid changes are reflected.

Referrerpolicy tests now pass.
@PeterZhizhin PeterZhizhin force-pushed the PeterZhizhin:add_referrerpolicy_to_list_of_relevant_mutations branch from c7ee67a to f44c2c9 May 7, 2020
@PeterZhizhin
Copy link
Contributor Author

PeterZhizhin commented May 7, 2020

I've addressed all review comments. Also squashed all commits into one.

@PeterZhizhin PeterZhizhin requested a review from jdm May 7, 2020
@jdm
Copy link
Member

jdm commented May 7, 2020

@bors-servo r+
Thanks!

@bors-servo
Copy link
Contributor

bors-servo commented May 7, 2020

📌 Commit f44c2c9 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented May 7, 2020

Testing commit f44c2c9 with merge 6aec2c8...

@bors-servo
Copy link
Contributor

bors-servo commented May 7, 2020

☀️ Test successful - status-taskcluster
Approved by: jdm
Pushing 6aec2c8 to master...

@bors-servo bors-servo merged commit 6aec2c8 into servo:master May 7, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@PeterZhizhin PeterZhizhin deleted the PeterZhizhin:add_referrerpolicy_to_list_of_relevant_mutations branch May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.