Skip to content

Conversation

@cdumez
Copy link
Contributor

@cdumez cdumez commented Jul 22, 2022

c74e2dd

xhr/json.any.html WPT test is failing in WebKit
https://bugs.webkit.org/show_bug.cgi?id=243109

Reviewed by Darin Adler.

Force UTF-8 decoding for XHR response when responseType is json.
This aligns our behavior with Blink and Gecko.

* LayoutTests/imported/w3c/web-platform-tests/xhr/json.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/xhr/json.any.worker-expected.txt:
* Source/WebCore/loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::setEncoding):
(WebCore::TextResourceDecoder::checkForBOM):
* Source/WebCore/loader/TextResourceDecoder.h:
(WebCore::TextResourceDecoder::setAlwaysUseUTF8):
* Source/WebCore/xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createDecoder const):

Canonical link: https://commits.webkit.org/252838@main

@cdumez cdumez self-assigned this Jul 22, 2022
@cdumez cdumez added WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit). WebKit Nightly Build labels Jul 22, 2022
@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label Jul 22, 2022
@cdumez cdumez removed the merging-blocked Applied to prevent a change from being merged label Jul 22, 2022
@cdumez cdumez force-pushed the 243109_xhr_json_utf8 branch from cf011f7 to 6bea177 Compare July 22, 2022 22:06
Copy link
Member

Choose a reason for hiding this comment

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

I think we should remove the argument here. Only use this when it’s true.

@cdumez cdumez force-pushed the 243109_xhr_json_utf8 branch from 6bea177 to 8080601 Compare July 26, 2022 16:30
@cdumez cdumez added the merge-queue Applied to send a pull request to merge-queue label Jul 26, 2022
https://bugs.webkit.org/show_bug.cgi?id=243109

Reviewed by Darin Adler.

Force UTF-8 decoding for XHR response when responseType is json.
This aligns our behavior with Blink and Gecko.

* LayoutTests/imported/w3c/web-platform-tests/xhr/json.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/xhr/json.any.worker-expected.txt:
* Source/WebCore/loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::setEncoding):
(WebCore::TextResourceDecoder::checkForBOM):
* Source/WebCore/loader/TextResourceDecoder.h:
(WebCore::TextResourceDecoder::setAlwaysUseUTF8):
* Source/WebCore/xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createDecoder const):

Canonical link: https://commits.webkit.org/252838@main
@webkit-commit-queue
Copy link
Collaborator

Committed 252838@main (c74e2dd): https://commits.webkit.org/252838@main

Reviewed commits have been landed. Closing PR #2667 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit c74e2dd into WebKit:main Jul 26, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants