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 minlength attribute for text inputs #13313

Closed
jdm opened this issue Sep 19, 2016 · 3 comments
Closed

Implement minlength attribute for text inputs #13313

jdm opened this issue Sep 19, 2016 · 3 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Sep 19, 2016

Spec: https://html.spec.whatwg.org/multipage/forms.html#attr-fe-minlength

This applies to both HTMLInputElement and HTMLTextAreaElement.

Code: components/script/dom/htmltextareaelement.rs, components/script/dom/htmlinputelement.rs, components/script/dom/webidls/HTMLTextAreaElement.webidl, components/script/dom/webidls/HTMLInputElement.webidl
Tests: we'll need to write a new one in tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/ (use maxlength.html as an example). Also, unit tests in tests/unit/script/textinput.rs would be valuable (./mach test-unit -p script).

See #7323 for the PR that implemented maxlength.

@jdm jdm added the A-content/dom label Sep 19, 2016
@Phrohdoh
Copy link
Contributor

@Phrohdoh Phrohdoh commented Sep 19, 2016

I'm going to give this a shot!

@KiChjang KiChjang added the C-assigned label Sep 19, 2016
@KiChjang
Copy link
Member

@KiChjang KiChjang commented Sep 19, 2016

Great!

bors-servo added a commit to servo/string-cache that referenced this issue Sep 19, 2016
Add minlength to static_atom_list

For servo/servo#13313

@KiChjang

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/string-cache/172)
<!-- Reviewable:end -->
bors-servo added a commit to servo/string-cache that referenced this issue Sep 19, 2016
Add minlength to static_atom_list

For servo/servo#13313

@KiChjang

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/string-cache/172)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Sep 19, 2016
…jang

Update string_cache to 0.2.29

<!-- Please describe your changes on the following line: -->
Update string-cache from 0.2.28 to 0.2.29 which includes `minlength` for #13313.

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

<!-- Either: -->
- [X] These changes do not require tests because this is only adding a single string to string-cache (ref servo/string-cache#172)

<!-- 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/13314)
<!-- Reviewable:end -->
@jdm
Copy link
Member Author

@jdm jdm commented Sep 19, 2016

Related: whatwg/html#1796

bors-servo added a commit that referenced this issue Sep 20, 2016
…rewster

Implement minlength attribute for text inputs

<!-- Please describe your changes on the following line: -->
**This is not ready to be merged:
I need help writing tests as I am not familiar with the methods used in the `maxlength` tests (introduced in  tests/unit/script/textinput.rs).**

I also need to write the `minlength-manual` test.

Closes #13313
This depends on #13314 (and includes the commit from it so will need to be rebased once that patch lands).

I am just looking for a quick review to make sure I am on the right path.

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

<!-- Either: -->
- [X] There ~~are~~ *will be* tests for these changes

<!-- 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/13315)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Sep 21, 2016
…rewster

Implement minlength attribute for text inputs

<!-- Please describe your changes on the following line: -->
**This is not ready to be merged:
I need help writing tests as I am not familiar with the methods used in the `maxlength` tests (introduced in  tests/unit/script/textinput.rs).**

I also need to write the `minlength-manual` test.

Closes #13313
This depends on #13314 (and includes the commit from it so will need to be rebased once that patch lands).

I am just looking for a quick review to make sure I am on the right path.

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

<!-- Either: -->
- [X] There ~~are~~ *will be* tests for these changes

<!-- 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/13315)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Sep 21, 2016
…rewster

Implement minlength attribute for text inputs

<!-- Please describe your changes on the following line: -->
**This is not ready to be merged:
I need help writing tests as I am not familiar with the methods used in the `maxlength` tests (introduced in  tests/unit/script/textinput.rs).**

I also need to write the `minlength-manual` test.

Closes #13313
This depends on #13314 (and includes the commit from it so will need to be rebased once that patch lands).

I am just looking for a quick review to make sure I am on the right path.

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

<!-- Either: -->
- [X] There ~~are~~ *will be* tests for these changes

<!-- 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/13315)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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