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

Implement "translate" attribute #25629

Merged
merged 1 commit into from Feb 13, 2020
Merged

Conversation

@pshaughn
Copy link
Member

pshaughn commented Jan 28, 2020

This attribute is almost a straightforward enumerated one, but the getter value inherits from parents when the content attribute is absent, even when the parents are non-HTML elements. This initial commit is using LocalName::from on a static string; once html5ever has a release with "translate" in the built-in local name list, a small change will be needed.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #25628
  • There are tests for these changes OR
  • These changes do not require tests because ___
@highfive
Copy link

highfive commented Jan 28, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/webidls/HTMLElement.webidl, components/script/dom/element.rs, components/script/dom/htmlelement.rs
  • @KiChjang: components/script/dom/webidls/HTMLElement.webidl, components/script/dom/element.rs, components/script/dom/htmlelement.rs
@pshaughn pshaughn force-pushed the pshaughn:reflect_translate branch from a9c981e to bcc2608 Jan 28, 2020
@pshaughn pshaughn marked this pull request as ready for review Jan 28, 2020
components/script/dom/element.rs Outdated Show resolved Hide resolved
@jdm jdm assigned jdm and unassigned nox Jan 28, 2020
@jdm
Copy link
Member

jdm commented Feb 12, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 12, 2020

📌 Commit bcc2608 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Feb 12, 2020

Testing commit bcc2608 with merge 78b7ecf...

bors-servo added a commit that referenced this pull request Feb 12, 2020
Implement "translate" attribute

This attribute is almost a straightforward enumerated one, but the getter value inherits from parents when the content attribute is absent, even when the parents are non-HTML elements. This initial commit is using LocalName::from on a static string; once html5ever has a release with "translate" in the built-in local name list, a small change will be needed.

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

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

bors-servo commented Feb 12, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Feb 12, 2020

  ▶ Unexpected subtest result in /custom-elements/reactions/HTMLElement.html:
  └ PASS [expected FAIL] translate on HTMLElement must enqueue an attributeChanged reaction when adding translate content attribute
  ▶ Unexpected subtest result in /custom-elements/reactions/HTMLElement.html:
  └ PASS [expected FAIL] translate on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute
  ▶ Unexpected subtest result in /html/dom/idlharness.https.html?include=HTML.*:
  └ PASS [expected FAIL] HTMLElement interface: attribute translate
  ▶ Unexpected subtest result in /html/dom/idlharness.https.html?include=HTML.*:
  └ PASS [expected FAIL] HTMLElement interface: document.createElement("noscript") must inherit property "translate" with the proper type
@pshaughn pshaughn force-pushed the pshaughn:reflect_translate branch from bcc2608 to 3f8a9f6 Feb 13, 2020
@jdm
Copy link
Member

jdm commented Feb 13, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2020

📌 Commit 3f8a9f6 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2020

Testing commit 3f8a9f6 with merge e3a2301...

bors-servo added a commit that referenced this pull request Feb 13, 2020
Implement "translate" attribute

This attribute is almost a straightforward enumerated one, but the getter value inherits from parents when the content attribute is absent, even when the parents are non-HTML elements. This initial commit is using LocalName::from on a static string; once html5ever has a release with "translate" in the built-in local name list, a small change will be needed.

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

<!-- 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. -->
@jdm
Copy link
Member

jdm commented Feb 13, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2020

💡 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 Feb 13, 2020

📌 Commit 3f8a9f6 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2020

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

@bors-servo bors-servo merged commit 3f8a9f6 into servo:master Feb 13, 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
Linked issues

Successfully merging this pull request may close these issues.

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