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

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

Merged
merged 4 commits into from Dec 12, 2018
Merged

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

merged 4 commits into from Dec 12, 2018

Conversation

@nox
Copy link
Member

nox commented Dec 12, 2018

This change is Reviewable

@highfive
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
Copy link
Member Author

nox commented Dec 12, 2018

@bors-servo try=wpt

@highfive
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
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
Make the parser decode input from document's encoding
@bors-servo
Copy link
Contributor

bors-servo commented Dec 12, 2018

💔 Test failed - linux-rel-wpt

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.

Copy link
@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
Copy link
Member

SimonSapin commented Dec 12, 2018

Nice!

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Dec 12, 2018

📌 Commit a2abfc6 has been approved by SimonSapin

@bors-servo
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
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
Copy link
Contributor

bors-servo commented Dec 12, 2018

💔 Test failed - linux-rel-css

@nox
Copy link
Member Author

nox commented Dec 12, 2018

@bors-servo
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
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
Copy link
Contributor

bors-servo commented Dec 12, 2018

💔 Test failed - mac-rel-wpt2

@nox
Copy link
Member Author

nox commented Dec 12, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Dec 12, 2018

💔 Test failed - mac-rel-wpt2

@nox
Copy link
Member Author

nox commented Dec 12, 2018

@bors-servo
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
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
Copy link
Contributor

bors-servo commented Dec 12, 2018

@bors-servo bors-servo merged commit a2abfc6 into master Dec 12, 2018
3 checks passed
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
@SimonSapin SimonSapin deleted the encoding branch Jan 28, 2019
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.

None yet

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