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

Issue 1501393003: Deprecate fetching stylesheets with unsupported type (Closed)

Created:
5 years ago by suzyh_UTC10 (ex-contributor)
Modified:
4 years, 11 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, gavinp+prerender_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Deprecate fetching stylesheets with unsupported type The spec http://www.w3.org/TR/html5/document-metadata.html#the-link-element specifies that "If the UA does not support the given MIME type for the given link relationship, then the UA should not obtain the resource". The linked bug contains a testcase that illustrates that Blink is not currently doing this, and is obtaining the resource even if the link type is e.g. "application/javascript". This patch translates the testcase from the linked bug into Blink layout tests and implements a deprecation warning ahead of implementing the suggested fix. For more background and discussion, see https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/nH1O6WszMgo/discussion BUG=286682 Committed: https://crrev.com/db6584f5ba2d6cda49fa42775903399cd4d427d6 Cr-Commit-Position: refs/heads/master@{#370531}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Updated tests, converted from fix to deprecation warning #

Total comments: 2

Patch Set 3 : Fix MIME type comparison, update deprecation message #

Patch Set 4 : Make deprecation warning dependent on isStyleSheet check #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -0 lines) Patch
A third_party/WebKit/LayoutTests/loader/link-load-only-supported-stylesheet-types.html View 1 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/loader/link-load-only-supported-stylesheet-types-datauri.html View 1 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/loader/link-load-only-supported-stylesheet-types-datauri-expected.txt View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/loader/link-load-only-supported-stylesheet-types-expected.txt View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/loader/resources/blue.css View 1 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/loader/resources/red.css View 1 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/loader/resources/yellow.css View 1 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.cpp View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLLinkElement.cpp View 1 2 3 4 3 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/MIMETypeRegistry.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/MIMETypeRegistry.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (19 generated)
suzyh_UTC10 (ex-contributor)
Hi, I was unsure who would be a good person to review this patch. If ...
5 years ago (2015-12-08 23:24:27 UTC) #2
Yoav Weiss
On 2015/12/08 23:24:27, suzyh wrote: > Hi, > > I was unsure who would be ...
5 years ago (2015-12-09 07:13:12 UTC) #3
Yoav Weiss
On 2015/12/09 07:13:12, Yoav Weiss wrote: > On 2015/12/08 23:24:27, suzyh wrote: > > Hi, ...
5 years ago (2015-12-09 07:49:54 UTC) #4
Rick Byers
On 2015/12/09 07:13:12, Yoav Weiss wrote: > On 2015/12/08 23:24:27, suzyh wrote: > > Hi, ...
5 years ago (2015-12-09 21:26:11 UTC) #5
Yoav Weiss
On 2015/12/09 21:26:11, Rick Byers wrote: > On 2015/12/09 07:13:12, Yoav Weiss wrote: > > ...
5 years ago (2015-12-10 11:59:52 UTC) #6
suzyh_UTC10 (ex-contributor)
Thank you both for the input, and apologies for the delay in responding. > > ...
5 years ago (2015-12-17 03:48:10 UTC) #7
esprehn
https://codereview.chromium.org/1501393003/diff/1/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp File third_party/WebKit/Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/1501393003/diff/1/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp#newcode594 third_party/WebKit/Source/core/html/HTMLLinkElement.cpp:594: bool LinkStyle::styleSheetTypeIsSupported(const String& type) const This is static it ...
5 years ago (2015-12-17 07:07:07 UTC) #9
Yoav Weiss
On 2015/12/17 03:48:10, suzyh wrote: > Thank you both for the input, and apologies for ...
5 years ago (2015-12-17 07:59:57 UTC) #11
Yoav Weiss
On 2015/12/17 03:48:10, suzyh wrote: > Thank you both for the input, and apologies for ...
5 years ago (2015-12-17 08:55:49 UTC) #12
igrigorik
On 2015/12/17 07:59:57, Yoav Weiss wrote: > On 2015/12/17 03:48:10, suzyh wrote: > > Thank ...
5 years ago (2015-12-17 16:30:08 UTC) #13
suzyh_UTC10 (ex-contributor)
> > Since it seems that Blink/WebKit are the odd ones out for this behaviour, ...
5 years ago (2015-12-18 02:30:35 UTC) #14
Rick Byers
On 2015/12/18 02:30:35, suzyh wrote: > > > Since it seems that Blink/WebKit are the ...
5 years ago (2015-12-21 19:55:45 UTC) #15
Rick Byers
https://codereview.chromium.org/1501393003/diff/1/third_party/WebKit/LayoutTests/loader/link-load-only-supported-stylesheet-types.html File third_party/WebKit/LayoutTests/loader/link-load-only-supported-stylesheet-types.html (right): https://codereview.chromium.org/1501393003/diff/1/third_party/WebKit/LayoutTests/loader/link-load-only-supported-stylesheet-types.html#newcode4 third_party/WebKit/LayoutTests/loader/link-load-only-supported-stylesheet-types.html:4: <link rel="stylesheet" type="application/javascript" href="data:text/css,body { color: red !important; }"> ...
5 years ago (2015-12-21 19:58:41 UTC) #17
suzyh_UTC10 (ex-contributor)
Following from the discussion on the associated PSA thread, I've converted this patch from a ...
4 years, 11 months ago (2016-01-18 07:28:27 UTC) #19
Yoav Weiss
The tests look fine for a deprecation warning. Once we'd actually remove support, we'd need ...
4 years, 11 months ago (2016-01-18 08:21:18 UTC) #20
Rick Byers
LGTM (modulo Yoav's nit)
4 years, 11 months ago (2016-01-18 18:53:56 UTC) #21
Rick Byers
On 2016/01/18 18:53:56, Rick Byers wrote: > LGTM (modulo Yoav's nit) Oh please also add ...
4 years, 11 months ago (2016-01-18 18:54:17 UTC) #22
suzyh_UTC10 (ex-contributor)
Thanks! PTAL at the MIME type comparison. Shane advised me that I don't need to ...
4 years, 11 months ago (2016-01-19 01:58:13 UTC) #25
Yoav Weiss
On 2016/01/19 01:58:13, suzyh wrote: > Thanks! PTAL at the MIME type comparison. > > ...
4 years, 11 months ago (2016-01-19 05:57:36 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1501393003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1501393003/40001
4 years, 11 months ago (2016-01-19 22:16:44 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/167091)
4 years, 11 months ago (2016-01-20 00:07:11 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1501393003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1501393003/60001
4 years, 11 months ago (2016-01-20 05:24:06 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/10774)
4 years, 11 months ago (2016-01-20 05:56:05 UTC) #35
suzyh_UTC10 (ex-contributor)
Attempting to commit the patch uncovered a bug: my code displayed a deprecation warning for ...
4 years, 11 months ago (2016-01-20 08:27:04 UTC) #36
esprehn
lgtm
4 years, 11 months ago (2016-01-20 08:51:26 UTC) #37
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1501393003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1501393003/60001
4 years, 11 months ago (2016-01-20 21:33:18 UTC) #39
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/137361) linux_chromium_rel_ng on ...
4 years, 11 months ago (2016-01-20 21:41:57 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1501393003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1501393003/80001
4 years, 11 months ago (2016-01-20 22:03:13 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-20 23:30:33 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1501393003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1501393003/80001
4 years, 11 months ago (2016-01-20 23:34:10 UTC) #48
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 11 months ago (2016-01-20 23:42:22 UTC) #49
commit-bot: I haz the power
4 years, 11 months ago (2016-01-20 23:43:13 UTC) #51
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/db6584f5ba2d6cda49fa42775903399cd4d427d6
Cr-Commit-Position: refs/heads/master@{#370531}

Powered by Google App Engine
This is Rietveld 408576698