Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Issue 2883833002: net: Do not sniff XHTML content (Closed)

Created:
3 years, 7 months ago by tkent
Modified:
3 years, 7 months ago
Reviewers:
yosin_UTC9, mmenke
CC:
blink-reviews, blink-reviews-w3ctests_chromium.org, bnc+watch_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

net: Do not sniff XHTML content This CL removes XHTML content sniff for text/xml and application/xml. We altered the content-type to application/xhtml+xml if the root tag starts with the following: <html xmlns="http://www.w3.org/1999/xhtml" We stop it. This behavior has never been applied to <html xmlns='http://www.w3.org/1999/xhtml' or <html xmlns="http://www.w3.org/1999/xhtml" because this behavior was introduced to pass some layout tests. The behavior difference between application/xml and application/xhtml+xml is document.createElement(). This CL updates some tests. New behavior is interoperable with Edge, Firefox, and Safari. * LayoutTests changes ** external/wpt/dom/nodes/Document-createElement-namespace.html This CL fixes failing sub-tests. ** fast/dom/Document/xml-document-focus.xml Page rendering is changed because of document.createElement() in js-test.js. ** fast/dom/ping-attribute-no-crash.xml This assumes document.createElement() has XHTML behavior. This CL renames it to html/text_level_semantics/a-ping-no-crash.xhtml. ** http/tests/misc/createElementNamespace1.xml This CL fixes a failing sub-test about document.createElement(). BUG=231927, 702084 Review-Url: https://codereview.chromium.org/2883833002 Cr-Commit-Position: refs/heads/master@{#473805} Committed: https://chromium.googlesource.com/chromium/src/+/9cc9427a4b67b394747dde2f1b8279a0d3384892

Patch Set 1 : . #

Total comments: 1

Patch Set 2 : Remove XHTML content sniff entirely #

Total comments: 2

Patch Set 3 : Update tests #

Messages

Total messages: 41 (31 generated)
tkent
mmenke@, would you review this please? https://codereview.chromium.org/2883833002/diff/20001/net/base/mime_sniffer.cc File net/base/mime_sniffer.cc (right): https://codereview.chromium.org/2883833002/diff/20001/net/base/mime_sniffer.cc#newcode549 net/base/mime_sniffer.cc:549: MAGIC_STRING("application/xhtml+xml", I think ...
3 years, 7 months ago (2017-05-15 07:25:32 UTC) #14
tkent
Updated the patch to remove XHTML content sniff entirely.
3 years, 7 months ago (2017-05-16 01:04:27 UTC) #18
mmenke
On 2017/05/16 01:04:27, tkent wrote: > Updated the patch to remove XHTML content sniff entirely. ...
3 years, 7 months ago (2017-05-17 14:13:52 UTC) #21
mmenke
Sorry again for the delay - the renderer's handling of mime types is basically a ...
3 years, 7 months ago (2017-05-17 20:51:42 UTC) #22
tkent
Thank you for your review! https://codereview.chromium.org/2883833002/diff/40001/net/base/mime_sniffer_unittest.cc File net/base/mime_sniffer_unittest.cc (right): https://codereview.chromium.org/2883833002/diff/40001/net/base/mime_sniffer_unittest.cc#newcode360 net/base/mime_sniffer_unittest.cc:360: SniffMimeType("<foo><html xmlns=\"http://www.w3.org/1999/xhtml\">", On 2017/05/17 ...
3 years, 7 months ago (2017-05-19 00:55:42 UTC) #27
mmenke
net/ LGTM. You should have someone familiar with layout tests review those changes - I'm ...
3 years, 7 months ago (2017-05-22 15:40:34 UTC) #30
tkent
yosin@, would you check LayoutTests changes please? I'm confident that these changes are valid.
3 years, 7 months ago (2017-05-23 00:26:02 UTC) #32
yosin_UTC9
third_party/WebKit/LayoutTests/ lgtm
3 years, 7 months ago (2017-05-23 01:07:28 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2883833002/60001
3 years, 7 months ago (2017-05-23 01:08:31 UTC) #38
commit-bot: I haz the power
3 years, 7 months ago (2017-05-23 04:08:20 UTC) #41
Message was sent while issue was closed.
Committed patchset #3 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/9cc9427a4b67b394747dde2f1b82...

Powered by Google App Engine
This is Rietveld 408576698