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 HTMLSelectElement.add() and indexed setter #25449

Merged
merged 1 commit into from Jan 8, 2020

Conversation

@pshaughn
Copy link
Member

pshaughn commented Jan 7, 2020

HTMLSelectElement.add and its indexed setter just needed to forward to matching methods in HTMLOptionsCollection, which they now do. It was also necessary to change codegen slightly; it had accidentally assumed that if an indexed setter existed, a named getter or setter also would.

I expect this and #25446 will combine to pass more tests than either alone does.


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

highfive commented Jan 7, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/bindings/codegen/CodegenRust.py, components/script/dom/htmlselectelement.rs, components/script/dom/webidls/HTMLSelectElement.webidl
  • @KiChjang: components/script/dom/bindings/codegen/CodegenRust.py, components/script/dom/htmlselectelement.rs, components/script/dom/webidls/HTMLSelectElement.webidl
@Manishearth
Copy link
Member

Manishearth commented Jan 7, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Jan 7, 2020

📌 Commit f3394dc has been approved by Manishearth

@highfive highfive assigned Manishearth and unassigned nox Jan 7, 2020
@bors-servo
Copy link
Contributor

bors-servo commented Jan 7, 2020

Testing commit f3394dc with merge a2f6238...

bors-servo added a commit that referenced this pull request Jan 7, 2020
Implement HTMLSelectElement.add() and indexed setter

HTMLSelectElement.add and its indexed setter just needed to forward to matching methods in HTMLOptionsCollection, which they now do. It was also necessary to change codegen slightly; it had accidentally assumed that if an indexed setter existed, a named getter or setter also would.

I expect this and #25446 will combine to pass more tests than either alone does.

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

<!-- 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 Jan 7, 2020

💔 Test failed - status-taskcluster

@Manishearth
Copy link
Member

Manishearth commented Jan 7, 2020

1 unexpected results that are NOT known-intermittents:
  ▶ Unexpected subtest result in /_mozilla/mozilla/union.html:
  │ FAIL [expected PASS] union
  └   → The object can not be found here.

feel free to tweak that test (or remove it) if it's wrong

@pshaughn
Copy link
Member Author

pshaughn commented Jan 7, 2020

That test is both right and interesting. It's making sure that, if script calls a method that takes a union type using an argument that's incorrect for that union, codegen code throws a TypeError at the script. This was working when the method didn't have the [Throws] extended attribute, and now it isn't working.

@pshaughn
Copy link
Member Author

pshaughn commented Jan 7, 2020

I stand corrected; the TypeError is still getting thrown, and some other line is throwing a NotFoundError for reasons as yet unclear.

…as relying on add to be a stub
@pshaughn pshaughn force-pushed the pshaughn:select-adding branch from f3394dc to c1b71fc Jan 7, 2020
@pshaughn
Copy link
Member Author

pshaughn commented Jan 7, 2020

The test only worked because add() wasn't actually doing anything; I wasn't sure which of two behaviors was the one really being tested for so now it tries for both.

@@ -14053,7 +14051,7 @@
],
"css/border_black_groove.html": [
"49e1647a6f71e320770225ad537b4fd4020bd700",
"reftest_node"

This comment has been minimized.

Copy link
@pshaughn

pshaughn Jan 7, 2020

Author Member

I don't know what this means; I just ran update-manifest as usual and it changed this!

This comment has been minimized.

Copy link
@Manishearth

Manishearth Jan 7, 2020

Member

probably something changed in the runner 🤷‍♂️

@Manishearth
Copy link
Member

Manishearth commented Jan 7, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Jan 7, 2020

📌 Commit c1b71fc has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Jan 8, 2020

Testing commit c1b71fc with merge 1e7c206...

bors-servo added a commit that referenced this pull request Jan 8, 2020
Implement HTMLSelectElement.add() and indexed setter

HTMLSelectElement.add and its indexed setter just needed to forward to matching methods in HTMLOptionsCollection, which they now do. It was also necessary to change codegen slightly; it had accidentally assumed that if an indexed setter existed, a named getter or setter also would.

I expect this and #25446 will combine to pass more tests than either alone does.

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

<!-- 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 Jan 8, 2020

☀️ Test successful - status-taskcluster
Approved by: Manishearth
Pushing 1e7c206 to master...

@bors-servo bors-servo merged commit c1b71fc into servo:master Jan 8, 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.

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