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
indexed getter of form elements #11697
Conversation
Heads up! This PR modifies the following files:
|
You still need to fix the comments made on the previous PR. |
@Ms2ger Other comments have been fixed. |
// https://html.spec.whatwg.org/multipage/#dom-form-item | ||
fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Root<Element>> { | ||
let elements = self.Elements(); | ||
(*elements).IndexedGetter(index, found) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be no need for the explicit dereference.
New code was committed to pull request. |
Sorry for that I didn't notice that it was changed on my other PC. My bad. |
Isn't #11405 (the issue that this PR is trying to fix) supposed to be assigned to @catchmrbharath? |
Sorry for that I did not notice that. This issue was on my ToDo list and still open, so I just tried to pick it up. |
New code was committed to pull request. |
1 similar comment
New code was committed to pull request. |
@@ -17,7 +17,7 @@ interface HTMLFormElement : HTMLElement { | |||
|
|||
[SameObject] readonly attribute HTMLFormControlsCollection elements; | |||
readonly attribute unsigned long length; | |||
//getter Element (unsigned long index); | |||
getter Element? (unsigned long index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't following the WebIDL definitions for HTMLFormElement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cannot be avoided for now.
New code was committed to pull request. |
@KiChjang Sorry for that I'm not familiar with FE programming. |
I'm sorry to do this to you, but @KiChjang was wrong about the |
New code was committed to pull request. |
Yep, |
https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings and http://doc.servo.org/script/dom/bindings/index.html might be what you're looking for, or else http://heycam.github.io/webidl/ is the actual specification for WebIDL files. |
New code was committed to pull request. |
💔 Test failed - mac-rel-wpt |
|
That test uses indexed getters on form elements, so that's a pleasant surprise :) |
New code was committed to pull request. |
Please squash the commits :) |
Sorry, I forgot that;) |
@bors-servo r=Ms2ger |
📌 Commit 4bb8843 has been approved by |
indexed getter of form elements <!-- Please describe your changes on the following line: --> --- <!-- 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 #11405 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11697) <!-- Reviewable:end -->
💔 Test failed - linux-rel |
|
@bors-servo retry #11574 |
⚡ Previous build results for android, arm32, arm64, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows are reusable. Rebuilding only linux-rel... |
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows |
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is