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

Make HTMLOptionsCollection constructor accept a HTMLSelectElement argument. Fixes #15521 #15527

Merged
merged 1 commit into from Feb 13, 2017

Conversation

@simon-whitehead
Copy link
Contributor

simon-whitehead commented Feb 13, 2017

Moves the HTMLSelectElement.upcast() call into the HTMLOptionsCollection constructors, replacing their signatures with &HTMLSelectElement references. This limits the surface area for misuse by only allowing HTMLSelectElement instances to be passed in rather than Node instances.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #15521.
  • There are tests for these changes OR
  • These changes do not require tests because: the linked issue explicitly says building without errors is good enough.

This change is Reviewable

@highfive
Copy link

highfive commented Feb 13, 2017

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

@highfive
Copy link

highfive commented Feb 13, 2017

Heads up! This PR modifies the following files:

  • @fitzgen: components/script/dom/htmloptionscollection.rs, components/script/dom/htmlselectelement.rs
  • @KiChjang: components/script/dom/htmloptionscollection.rs, components/script/dom/htmlselectelement.rs
@highfive
Copy link

highfive commented Feb 13, 2017

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@cbrewster
Copy link
Member

cbrewster commented Feb 13, 2017

Thank you!
@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2017

📌 Commit 7409031 has been approved by cbrewster

@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2017

Testing commit 7409031 with merge f23d20f...

bors-servo added a commit that referenced this pull request Feb 13, 2017
Make HTMLOptionsCollection constructor accept a HTMLSelectElement argument. Fixes #15521

<!-- Please describe your changes on the following line: -->
Moves the `HTMLSelectElement.upcast()` call into the `HTMLOptionsCollection` constructors, replacing their signatures with `&HTMLSelectElement` references. This limits the surface area for misuse by only allowing `HTMLSelectElement` instances to be passed in rather than `Node` instances.

---
<!-- 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 #15521.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because: the linked issue explicitly says building without errors is good enough.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15527)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2017

💔 Test failed - linux-rel-wpt

@simon-whitehead
Copy link
Contributor Author

simon-whitehead commented Feb 13, 2017

The failure doesn't seem to be caused by my commit @cbrewster ?

@cbrewster
Copy link
Member

cbrewster commented Feb 13, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2017

Testing commit 7409031 with merge da8d154...

bors-servo added a commit that referenced this pull request Feb 13, 2017
Make HTMLOptionsCollection constructor accept a HTMLSelectElement argument. Fixes #15521

<!-- Please describe your changes on the following line: -->
Moves the `HTMLSelectElement.upcast()` call into the `HTMLOptionsCollection` constructors, replacing their signatures with `&HTMLSelectElement` references. This limits the surface area for misuse by only allowing `HTMLSelectElement` instances to be passed in rather than `Node` instances.

---
<!-- 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 #15521.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because: the linked issue explicitly says building without errors is good enough.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15527)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 13, 2017

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev
Approved by: cbrewster
Pushing da8d154 to master...

@bors-servo bors-servo merged commit 7409031 into servo:master Feb 13, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@simon-whitehead simon-whitehead deleted the simon-whitehead:fix-15521 branch Feb 16, 2017
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.

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