Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTextDecoder: streaming decode, ignoreBOM #20431
Conversation
highfive
commented
Mar 26, 2018
|
Heads up! This PR modifies the following files:
|
highfive
commented
Mar 26, 2018
|
This PR also fixes the tests |
|
This looks really great! Thanks for working on this! |
| #[ignore_malloc_size_of = "defined in encoding_rs"] | ||
| decoder_: RefCell<Decoder>, | ||
| in_stream_: RefCell<Vec<u8>>, | ||
| do_not_flush_: Cell<bool>, |
This comment has been minimized.
This comment has been minimized.
| s | ||
| }; | ||
| Ok(USVString(s.into_owned())) | ||
| if !self.do_not_flush_.get() { |
This comment has been minimized.
This comment has been minimized.
jdm
Mar 26, 2018
Member
Let's add a // Step 1 comment here (and similar for the rest of this method).
ded3ffa
to
3990946
|
@bors-servo r+ |
|
|
TextDecoder: streaming decode, ignoreBOM <!-- Please describe your changes on the following line: --> Implement streaming decode and ignoreBOM flag for TextDecoder. https://encoding.spec.whatwg.org/#dom-textdecoder-decode https://encoding.spec.whatwg.org/#dom-textdecoder-ignorebom --- <!-- 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 #13234 (github issue number if applicable). - [x] These changes fix #5600 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the wpt tests are used for testing: * /encoding/textdecoder-fatal-streaming.html * /encoding/textdecoder-streaming.html * /encoding/textdecoder-ignorebom.html <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/20431) <!-- Reviewable:end -->
|
|
|
Hooray, lots of other passing tests! |
|
To be clear - you will need to follow these steps and include the changes in this commit. |
|
@bors-servo r+ |
|
|
TextDecoder: streaming decode, ignoreBOM <!-- Please describe your changes on the following line: --> Implement streaming decode and ignoreBOM flag for TextDecoder. https://encoding.spec.whatwg.org/#dom-textdecoder-decode https://encoding.spec.whatwg.org/#dom-textdecoder-ignorebom --- <!-- 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 #13234 (github issue number if applicable). - [x] These changes fix #5600 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the wpt tests are used for testing: * /encoding/textdecoder-fatal-streaming.html * /encoding/textdecoder-streaming.html * /encoding/textdecoder-ignorebom.html <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/20431) <!-- Reviewable:end -->
|
|
talklittle commentedMar 26, 2018
•
edited by SimonSapin
Implement streaming decode and ignoreBOM flag for TextDecoder.
https://encoding.spec.whatwg.org/#dom-textdecoder-decode
https://encoding.spec.whatwg.org/#dom-textdecoder-ignorebom
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is