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

Issue 135723008: Add CORS support for <link> elements. (Closed)

Created:
6 years, 11 months ago by sof
Modified:
6 years, 10 months ago
CC:
blink-reviews, arv+blink, gavinp+loader_chromium.org, dglazkov+blink, adamk+blink_chromium.org, gavinp+prerender_chromium.org, Nate Chapin, watchdog-blink-watchlist_google.com, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Add CORS support for <link> elements. The HTMLLinkElement object supports CORS-enabled fetches, http://www.whatwg.org/specs/web-apps/current-work/#htmllinkelement by using the 'crossorigin' attribute. Extend HTMLLinkElement loading to support this over its link types, in particular / of note, "stylesheet" and "subresource" / "prefetch". R=abarth@chromium.org BUG=178787 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165923

Patch Set 1 #

Total comments: 5

Patch Set 2 : Add setCrossOriginAccessControl() helper to avoid repetition matching CORS attribute value #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -22 lines) Patch
A LayoutTests/fast/dom/HTMLLinkElement/link-crossOrigin.html View 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLLinkElement/link-crossOrigin-expected.txt View 1 chunk +21 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-stylesheet-anonymous.html View 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-stylesheet-anonymous-expected.txt View 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-stylesheet-no-cors.html View 1 chunk +31 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-stylesheet-no-cors-expected.txt View 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-stylesheet-use-credentials.html View 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-stylesheet-use-credentials-expected.txt View 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-subresource-anonymous.html View 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-subresource-anonymous-expected.txt View 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-subresource-no-cors.html View 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-subresource-no-cors-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-subresource-use-credentials.html View 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/security/link-crossorigin-subresource-use-credentials-expected.txt View 1 chunk +9 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/security/resources/green-background.css View 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/http/tests/security/resources/green-background-allow-credentials.php View 1 chunk +2 lines, -2 lines 0 comments Download
A + LayoutTests/http/tests/security/resources/green-background-allow-star.php View 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/http/tests/security/resources/link-crossorigin-common.js View 1 chunk +26 lines, -0 lines 0 comments Download
M Source/core/dom/ScriptLoader.cpp View 1 1 chunk +3 lines, -5 lines 0 comments Download
M Source/core/fetch/FetchRequest.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/FetchRequest.cpp View 1 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/html/HTMLLinkElement.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLLinkElement.cpp View 2 chunks +10 lines, -0 lines 0 comments Download
M Source/core/html/HTMLLinkElement.idl View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/parser/HTMLPreloadScanner.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/loader/ImageLoader.cpp View 1 1 chunk +2 lines, -4 lines 0 comments Download
M Source/core/loader/LinkLoader.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/LinkLoader.cpp View 1 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/loader/TextTrackLoader.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/TextTrackLoader.cpp View 1 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
sof
If you have the time at some point, please take a look. Building on the ...
6 years, 11 months ago (2014-01-27 22:48:21 UTC) #1
abarth-chromium
lgtm https://codereview.chromium.org/135723008/diff/1/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/135723008/diff/1/Source/core/html/HTMLLinkElement.cpp#newcode600 Source/core/html/HTMLLinkElement.cpp:600: StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMode, "use-credentials") ? AllowStoredCredentials : ...
6 years, 11 months ago (2014-01-28 06:38:45 UTC) #2
sof
https://codereview.chromium.org/135723008/diff/1/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/135723008/diff/1/Source/core/html/HTMLLinkElement.cpp#newcode600 Source/core/html/HTMLLinkElement.cpp:600: StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMode, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; ...
6 years, 11 months ago (2014-01-28 07:23:00 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/135723008/20001
6 years, 10 months ago (2014-01-28 08:36:24 UTC) #4
commit-bot: I haz the power
6 years, 10 months ago (2014-01-28 09:49:32 UTC) #5
Message was sent while issue was closed.
Change committed as 165923

Powered by Google App Engine
This is Rietveld 408576698