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

indexed getter of form elements #11697

Merged
merged 1 commit into from Jun 15, 2016
Merged

indexed getter of form elements #11697

merged 1 commit into from Jun 15, 2016

Conversation

mrmiywj
Copy link
Contributor

@mrmiywj mrmiywj commented Jun 10, 2016


  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/htmlformelement.rs, components/script/dom/webidls/HTMLFormElement.webidl

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 10, 2016
@mrmiywj mrmiywj mentioned this pull request Jun 10, 2016
5 tasks
@jdm jdm assigned Ms2ger and unassigned mbrubeck Jun 10, 2016
@Ms2ger
Copy link
Contributor

Ms2ger commented Jun 10, 2016

You still need to fix the comments made on the previous PR.

@mrmiywj
Copy link
Contributor Author

mrmiywj commented Jun 10, 2016

@Ms2ger
Hmm, I think I've fixed the comments made on the previous PR.
This comment is not avoidable for now.

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)
Copy link
Contributor

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.

@highfive
Copy link

New code was committed to pull request.

@mrmiywj
Copy link
Contributor Author

mrmiywj commented Jun 10, 2016

Sorry for that I didn't notice that it was changed on my other PC. My bad.

@KiChjang
Copy link
Contributor

Isn't #11405 (the issue that this PR is trying to fix) supposed to be assigned to @catchmrbharath?

@mrmiywj
Copy link
Contributor Author

mrmiywj commented Jun 11, 2016

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.

@highfive
Copy link

New code was committed to pull request.

1 similar comment
@highfive
Copy link

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);
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@KiChjang KiChjang added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jun 13, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Jun 13, 2016
@highfive
Copy link

New code was committed to pull request.

@mrmiywj
Copy link
Contributor Author

mrmiywj commented Jun 13, 2016

@KiChjang Sorry for that I'm not familiar with FE programming.

@Ms2ger
Copy link
Contributor

Ms2ger commented Jun 13, 2016

I'm sorry to do this to you, but @KiChjang was wrong about the ? in the WebIDL file. In our implementation, it needs to be there.

@highfive
Copy link

New code was committed to pull request.

@mrmiywj
Copy link
Contributor Author

mrmiywj commented Jun 13, 2016

Yep, ? is not avoided here since the tests failed. Is there any resources about the webidls generator specification used here?

@jdm
Copy link
Member

jdm commented Jun 13, 2016

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.

@highfive
Copy link

New code was committed to pull request.

@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 14, 2016
@highfive
Copy link

  ▶ Unexpected subtest result in /old-tests/submission/Opera/script_scheduling/031.html:
  └ PASS [expected FAIL]  scheduler: focus and blur events

@jdm
Copy link
Member

jdm commented Jun 14, 2016

That test uses indexed getters on form elements, so that's a pleasant surprise :)

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jun 14, 2016
@highfive
Copy link

New code was committed to pull request.

@jdm jdm added S-needs-squash Some (or all) of the commits in the PR should be combined. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jun 15, 2016
@jdm
Copy link
Member

jdm commented Jun 15, 2016

Please squash the commits :)

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 15, 2016
@mrmiywj
Copy link
Contributor Author

mrmiywj commented Jun 15, 2016

Sorry, I forgot that;)

@KiChjang
Copy link
Contributor

@bors-servo r=Ms2ger

@bors-servo
Copy link
Contributor

📌 Commit 4bb8843 has been approved by Ms2ger

@bors-servo
Copy link
Contributor

⌛ Testing commit 4bb8843 with merge 2086d21...

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-squash Some (or all) of the commits in the PR should be combined. labels Jun 15, 2016
bors-servo pushed a commit that referenced this pull request Jun 15, 2016
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 -->
@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jun 15, 2016
@highfive
Copy link

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/transform-table-007.htm
  └   → /css-transforms-1_dev/html/transform-table-007.htm a5c014b20ef1363bea6f24eda28c7efb7c45698a
/css-transforms-1_dev/html/reference/transform-blank-ref.htm fa6407b1acbbfea27e27061e7d1bdeca98e4a728
Testing a5c014b20ef1363bea6f24eda28c7efb7c45698a == fa6407b1acbbfea27e27061e7d1bdeca98e4a728

@Ms2ger
Copy link
Contributor

Ms2ger commented Jun 15, 2016

@bors-servo retry #11574

@bors-servo
Copy link
Contributor

⚡ 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...

@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-tests-failed The changes caused existing tests to fail.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement HTMLFormElement Element getter
7 participants