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

Make the parser decode input from document's encoding #22432

Merged
merged 4 commits into from Dec 12, 2018

Conversation

Projects
None yet
5 participants
@nox
Copy link
Member

nox commented Dec 12, 2018

This change is Reviewable

nox added some commits Dec 8, 2018

@highfive

This comment has been minimized.

Copy link

highfive commented Dec 12, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/document.rs, components/script/Cargo.toml, components/script/dom/servoparser/mod.rs, components/script/dom/bindings/trace.rs
  • @KiChjang: components/script/dom/document.rs, components/script/Cargo.toml, components/net_traits/lib.rs, components/script/dom/servoparser/mod.rs, components/script/dom/bindings/trace.rs
@nox

This comment has been minimized.

Copy link
Member

nox commented Dec 12, 2018

@bors-servo try=wpt

@highfive

This comment has been minimized.

Copy link

highfive commented Dec 12, 2018

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify script code, but no tests are modified. Please consider adding a test!
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

⌛️ Trying commit 39f92f7 with merge 7629cd3...

bors-servo added a commit that referenced this pull request Dec 12, 2018

Auto merge of #22432 - servo:encoding, r=<try>
Make the parser decode input from document's encoding
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

💔 Test failed - linux-rel-wpt

Make the parser decode input from document's encoding
The document's encoding is only computed from the Content-Type header for now,
with no sniffing at all.

@nox nox force-pushed the encoding branch from 39f92f7 to a2abfc6 Dec 12, 2018

let encoding = content_type
.get_param(mime::CHARSET)
.and_then(|charset| Encoding::for_label(charset.as_str().as_bytes()))
.unwrap_or(UTF_8);

This comment has been minimized.

@SimonSapin

SimonSapin Dec 12, 2018

Member

I think this fallback is incorrect per spec, but it’s likely better until we implement <meta charset> sniffing.

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Dec 12, 2018

Nice!

@bors-servo r+

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

📌 Commit a2abfc6 has been approved by SimonSapin

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

⌛️ Testing commit a2abfc6 with merge 36d55df...

bors-servo added a commit that referenced this pull request Dec 12, 2018

Auto merge of #22432 - servo:encoding, r=SimonSapin
Make the parser decode input from document's encoding

<!-- 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/22432)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

💔 Test failed - linux-rel-css

@nox

This comment has been minimized.

Copy link
Member

nox commented Dec 12, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

⌛️ Testing commit a2abfc6 with merge e399cd5...

bors-servo added a commit that referenced this pull request Dec 12, 2018

Auto merge of #22432 - servo:encoding, r=SimonSapin
Make the parser decode input from document's encoding

<!-- 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/22432)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

💔 Test failed - mac-rel-wpt2

@nox

This comment has been minimized.

Copy link
Member

nox commented Dec 12, 2018

@bors-servo

This comment has been minimized.

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

💔 Test failed - mac-rel-wpt2

@nox

This comment has been minimized.

Copy link
Member

nox commented Dec 12, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

⌛️ Testing commit a2abfc6 with merge 2e01a23...

bors-servo added a commit that referenced this pull request Dec 12, 2018

Auto merge of #22432 - servo:encoding, r=SimonSapin
Make the parser decode input from document's encoding

<!-- 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/22432)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Dec 12, 2018

@bors-servo bors-servo merged commit a2abfc6 into master Dec 12, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
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