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 iterable for headers #12998

Merged
merged 1 commit into from Aug 24, 2016
Merged

Conversation

@jeenalee
Copy link
Contributor

jeenalee commented Aug 23, 2016

These patches make Headers iterable based on #12819.

The expected wpt results are updated as well.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #11897 (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because web platform tests for Headers already exist. Expected test results are updated with this PR.

This change is Reviewable

@highfive
Copy link

highfive commented Aug 23, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/webidls/IterableIterator.webidl, components/script/dom/mod.rs, components/script/dom/bindings/codegen/Configuration.py, components/script/dom/webidls/TestBindingIterable.webidl, components/script/dom/bindings/iterable.rs, components/script/dom/bindings/codegen/parser/callback-location.patch, components/script/dom/bindings/codegen/CodegenRust.py, components/script/dom/bindings/mod.rs, components/script/dom/bindings/codegen/parser/update.sh, components/script/dom/webidls/TestBindingPairIterable.webidl, components/script/dom/headers.rs, components/script/dom/webidls/Headers.webidl, components/script/dom/testbindingiterable.rs, components/script/dom/bindings/codegen/parser/WebIDL.py, components/script/dom/testbindingpairiterable.rs
@highfive
Copy link

highfive commented Aug 23, 2016

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@jeenalee
Copy link
Contributor Author

jeenalee commented Aug 23, 2016

r? @jdm

@highfive highfive assigned jdm and unassigned larsbergstrom Aug 23, 2016
@jeenalee jeenalee force-pushed the jeenalee:iterable-headers branch from 721646f to ced463f Aug 23, 2016

fn get_key_at_index(&self, n: u32) -> ByteString {
let sorted_header_vec = self.sort_header_list();
let key = sorted_header_vec[n as usize].1.clone();

This comment has been minimized.

@jdm

jdm Aug 24, 2016

Member

I suspect this should be .0 instead... do any test results change when that's corrected?

This comment has been minimized.

@jeenalee

jeenalee Aug 24, 2016

Author Contributor

Oh strange! Yes you are correct. I had it as 0, but I don't know what happened there... I'll fix that right now.

@jdm
Copy link
Member

jdm commented Aug 24, 2016

There are a bunch of unrelated changes in the commit that implements Iterable; it would be best to remove those (at least into separate commits that can be removed from this PR before merging).

@jdm
Copy link
Member

jdm commented Aug 24, 2016

#12819 should be merging within the next couple hours, so feel free to put this off until you can rebase your changes against master.

@jeenalee
Copy link
Contributor Author

jeenalee commented Aug 24, 2016

Ok. I must have made mistakes with git. It wasn't my intention to group all the changes in the headers with the iterable implementation commit. I'll wait until the #12819 is merged into master.

This commit implements iterable in DOM Headers based on iterable
implementation from #12819. Expected wpt results are updated as well.
@jeenalee jeenalee force-pushed the jeenalee:iterable-headers branch from ced463f to e3624ed Aug 24, 2016
@jeenalee
Copy link
Contributor Author

jeenalee commented Aug 24, 2016

@jdm Rebased!

@jdm
Copy link
Member

jdm commented Aug 24, 2016

@bors-servo: r+
Nice work!

@bors-servo
Copy link
Contributor

bors-servo commented Aug 24, 2016

📌 Commit e3624ed has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Aug 24, 2016

Testing commit e3624ed with merge 5b46a59...

bors-servo added a commit that referenced this pull request Aug 24, 2016
Implement iterable for headers

<!-- Please describe your changes on the following line: -->
These patches make Headers iterable based on #12819.

The expected wpt results are updated as well.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because web platform tests for Headers already exist. Expected test results are updated with this PR.

<!-- 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/12998)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Aug 24, 2016

@bors-servo bors-servo merged commit e3624ed into servo:master Aug 24, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@izgzhen izgzhen mentioned this pull request Aug 27, 2016
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.

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