Skip to content

Implement iterable for headers - #12998

Merged
bors-servo merged 1 commit into
servo:masterfrom
jeenalee:iterable-headers
Aug 24, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
jeenalee:iterable-headers

Conversation

@jeenalee

@jeenalee jeenalee commented Aug 23, 2016 •

Copy link
Copy Markdown
Contributor

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 Implement the Headers API #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
Copy Markdown

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 highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 23, 2016
@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@jeenalee

Copy link
Copy Markdown
Contributor Author

r? @jdm

Comment thread components/script/dom/headers.rs Outdated

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

jdm commented Aug 24, 2016

Copy link
Copy Markdown
Member

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 jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. S-needs-rebase There are merge conflict errors. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 24, 2016
@jdm

jdm commented Aug 24, 2016 •

Copy link
Copy Markdown
Member

#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
Copy Markdown
Contributor Author

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 servo#12819. Expected wpt results are updated as well.
@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 Aug 24, 2016
@jeenalee

Copy link
Copy Markdown
Contributor Author

@jdm Rebased!

@jdm

jdm commented Aug 24, 2016

Copy link
Copy Markdown
Member

@bors-servo: r+
Nice work!

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit e3624ed has been approved by jdm

@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-rebase There are merge conflict errors. labels Aug 24, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit e3624ed with merge 5b46a59...

bors-servo pushed 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
Copy Markdown
Contributor

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

@bors-servo
bors-servo merged commit e3624ed into servo:master Aug 24, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 24, 2016
@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement the Headers API

5 participants