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 commented Jun 10, 2016


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #11405 (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

@highfive
Copy link

highfive commented Jun 10, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/htmlformelement.rs, components/script/dom/webidls/HTMLFormElement.webidl
@mrmiywj mrmiywj mentioned this pull request Jun 10, 2016
4 of 5 tasks complete
@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)

This comment has been minimized.

@Ms2ger

Ms2ger Jun 10, 2016

Contributor

Should be no need for the explicit dereference.

<form id=form>
<table>
<tr>
<td><input type="radio" name="radio1" id="r1" value=1></td>

This comment has been minimized.

@Ms2ger

Ms2ger Jun 10, 2016

Contributor

Why the table?

@highfive
Copy link

highfive commented Jun 10, 2016

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
Member

KiChjang commented Jun 11, 2016

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

highfive commented Jun 12, 2016

New code was committed to pull request.

1 similar comment
@highfive
Copy link

highfive commented Jun 12, 2016

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);

This comment has been minimized.

This comment has been minimized.

@mrmiywj

mrmiywj Jun 13, 2016

Author Contributor

This cannot be avoided for now.

<tr>
<td><input type="radio" name="radio1" id="r1" value=1></td>
<td><input type="radio" name="radio2" id="r2" value=2></td>
</tr>

This comment has been minimized.

@KiChjang

KiChjang Jun 13, 2016

Member

Following on to @Ms2ger's comment, why is this still under a <tr> and <td> tag?

@highfive
Copy link

highfive commented Jun 13, 2016

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

highfive commented Jun 13, 2016

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

@highfive
Copy link

highfive commented Jun 13, 2016

New code was committed to pull request.

@bors-servo
Copy link
Contributor

bors-servo commented Jun 14, 2016

💔 Test failed - mac-rel-wpt

@highfive
Copy link

highfive commented Jun 14, 2016

  ▶ 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
Copy link

highfive commented Jun 14, 2016

New code was committed to pull request.

@jdm
Copy link
Member

jdm commented Jun 15, 2016

Please squash the commits :)

@mrmiywj
Copy link
Contributor Author

mrmiywj commented Jun 15, 2016

Sorry, I forgot that;)

@KiChjang
Copy link
Member

KiChjang commented Jun 15, 2016

@bors-servo r=Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Jun 15, 2016

📌 Commit 4bb8843 has been approved by Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Jun 15, 2016

Testing commit 4bb8843 with merge 2086d21...

bors-servo added 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

bors-servo commented Jun 15, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented Jun 15, 2016

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

bors-servo commented Jun 15, 2016

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

bors-servo commented Jun 15, 2016

@bors-servo bors-servo merged commit 4bb8843 into servo:master Jun 15, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
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.

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