WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
185550
Add referrerpolicy attribute support for <script> elements
https://bugs.webkit.org/show_bug.cgi?id=185550
Summary
Add referrerpolicy attribute support for <script> elements
Dominic Farolino
Reported
2018-05-11 10:10:07 PDT
The HTML Standard PR [1] is adding support for the referrerpolicy attribute on <script> elements. Check the PR for a link to the relevant WPTs (which atm, I have not yet started). [1]:
https://github.com/whatwg/html/pull/3678
Attachments
Patch
(11.58 KB, patch)
2019-05-28 01:15 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(21.70 KB, patch)
2019-05-28 09:22 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-highsierra
(3.31 MB, application/zip)
2019-05-28 10:24 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2
(2.79 MB, application/zip)
2019-05-28 10:34 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews115 for mac-highsierra
(1.54 MB, application/zip)
2019-05-28 10:46 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews215 for win-future
(13.48 MB, application/zip)
2019-05-28 11:13 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(2.95 MB, application/zip)
2019-05-28 12:08 PDT
,
EWS Watchlist
no flags
Details
Patch
(20.34 KB, patch)
2019-05-28 23:57 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(20.37 KB, patch)
2019-05-29 01:17 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(81.56 KB, patch)
2019-05-29 12:02 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(82.08 KB, patch)
2019-05-29 13:13 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-highsierra
(3.13 MB, application/zip)
2019-05-29 14:29 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews106 for mac-highsierra-wk2
(2.75 MB, application/zip)
2019-05-29 14:44 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews123 for ios-simulator-wk2
(2.57 MB, application/zip)
2019-05-29 15:19 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews214 for win-future
(13.85 MB, application/zip)
2019-05-29 15:49 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews116 for mac-highsierra
(2.92 MB, application/zip)
2019-05-29 21:11 PDT
,
EWS Watchlist
no flags
Details
Patch
(82.17 KB, patch)
2019-05-30 01:00 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-highsierra
(3.11 MB, application/zip)
2019-05-30 02:16 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews116 for mac-highsierra
(2.92 MB, application/zip)
2019-05-30 02:57 PDT
,
EWS Watchlist
no flags
Details
Patch
(78.90 KB, patch)
2019-05-30 03:25 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews214 for win-future
(13.53 MB, application/zip)
2019-05-30 05:31 PDT
,
EWS Watchlist
no flags
Details
Patch
(74.21 KB, patch)
2019-05-30 06:34 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(79.60 KB, patch)
2019-07-16 02:10 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Patch
(79.53 KB, patch)
2019-07-16 04:32 PDT
,
Rob Buis
no flags
Details
Formatted Diff
Diff
Show Obsolete
(11)
View All
Add attachment
proposed patch, testcase, etc.
Rob Buis
Comment 1
2019-05-28 01:15:18 PDT
Created
attachment 370716
[details]
Patch
Rob Buis
Comment 2
2019-05-28 09:22:19 PDT
Created
attachment 370751
[details]
Patch
EWS Watchlist
Comment 3
2019-05-28 10:24:32 PDT
Comment on
attachment 370751
[details]
Patch
Attachment 370751
[details]
did not pass mac-ews (mac): Output:
https://webkit-queues.webkit.org/results/12309031
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 4
2019-05-28 10:24:33 PDT
Created
attachment 370759
[details]
Archive of layout-test-results from ews101 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 5
2019-05-28 10:34:04 PDT
Comment on
attachment 370751
[details]
Patch
Attachment 370751
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
https://webkit-queues.webkit.org/results/12309057
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 6
2019-05-28 10:34:05 PDT
Created
attachment 370761
[details]
Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 7
2019-05-28 10:46:55 PDT
Comment on
attachment 370751
[details]
Patch
Attachment 370751
[details]
did not pass mac-debug-ews (mac): Output:
https://webkit-queues.webkit.org/results/12309032
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 8
2019-05-28 10:46:57 PDT
Created
attachment 370765
[details]
Archive of layout-test-results from ews115 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 9
2019-05-28 11:13:21 PDT
Comment on
attachment 370751
[details]
Patch
Attachment 370751
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/12309335
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 10
2019-05-28 11:13:29 PDT
Created
attachment 370768
[details]
Archive of layout-test-results from ews215 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews215 Port: win-future Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
EWS Watchlist
Comment 11
2019-05-28 12:08:48 PDT
Comment on
attachment 370751
[details]
Patch
Attachment 370751
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
https://webkit-queues.webkit.org/results/12309772
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 12
2019-05-28 12:08:49 PDT
Created
attachment 370772
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.14.5
Rob Buis
Comment 13
2019-05-28 23:57:22 PDT
Created
attachment 370833
[details]
Patch
Rob Buis
Comment 14
2019-05-29 01:17:50 PDT
Created
attachment 370835
[details]
Patch
Rob Buis
Comment 15
2019-05-29 12:02:52 PDT
Created
attachment 370870
[details]
Patch
Rob Buis
Comment 16
2019-05-29 13:13:37 PDT
Created
attachment 370878
[details]
Patch
EWS Watchlist
Comment 17
2019-05-29 14:29:14 PDT
Comment on
attachment 370878
[details]
Patch
Attachment 370878
[details]
did not pass mac-ews (mac): Output:
https://webkit-queues.webkit.org/results/12321257
New failing tests: http/tests/referrer-policy-script/origin/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin/cross-origin-http.https.html http/tests/referrer-policy-script/no-referrer-when-downgrade/cross-origin-http.https.html http/tests/referrer-policy-script/same-origin/cross-origin-http.https.html http/tests/referrer-policy-script/unsafe-url/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin-when-cross-origin/cross-origin-http.https.html
EWS Watchlist
Comment 18
2019-05-29 14:29:16 PDT
Created
attachment 370884
[details]
Archive of layout-test-results from ews101 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 19
2019-05-29 14:44:10 PDT
Comment on
attachment 370878
[details]
Patch
Attachment 370878
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
https://webkit-queues.webkit.org/results/12321279
New failing tests: http/tests/referrer-policy-script/same-origin/cross-origin-http.https.html http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http.https.html http/tests/referrer-policy-script/origin/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin/cross-origin-http.https.html
EWS Watchlist
Comment 20
2019-05-29 14:44:11 PDT
Created
attachment 370886
[details]
Archive of layout-test-results from ews106 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 21
2019-05-29 15:19:00 PDT
Comment on
attachment 370878
[details]
Patch
Attachment 370878
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
https://webkit-queues.webkit.org/results/12321345
New failing tests: http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http.https.html http/tests/referrer-policy-script/no-referrer-when-downgrade/cross-origin-http.https.html http/tests/referrer-policy-script/origin/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin/cross-origin-http.https.html
EWS Watchlist
Comment 22
2019-05-29 15:19:02 PDT
Created
attachment 370889
[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.14.5
EWS Watchlist
Comment 23
2019-05-29 15:49:27 PDT
Comment on
attachment 370878
[details]
Patch
Attachment 370878
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/12321635
New failing tests: http/tests/referrer-policy-script/origin/same-origin.html http/tests/referrer-policy-script/no-referrer/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin-when-cross-origin/cross-origin-http-http.html http/tests/referrer-policy-script/origin/cross-origin-http-http.html http/tests/referrer-policy-script/origin/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin/same-origin.html http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http-http.html http/tests/referrer-policy-script/no-referrer-when-downgrade/cross-origin-http.https.html http/tests/referrer-policy-script/same-origin/cross-origin-http.https.html http/tests/referrer-policy-script/no-referrer/cross-origin-http-http.html http/tests/referrer-policy-script/strict-origin/cross-origin-http-http.html http/tests/referrer-policy-script/unsafe-url/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin-when-cross-origin/cross-origin-http.https.html http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http.https.html
EWS Watchlist
Comment 24
2019-05-29 15:49:29 PDT
Created
attachment 370892
[details]
Archive of layout-test-results from ews214 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews214 Port: win-future Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
EWS Watchlist
Comment 25
2019-05-29 21:11:16 PDT
Comment on
attachment 370878
[details]
Patch
Attachment 370878
[details]
did not pass mac-debug-ews (mac): Output:
https://webkit-queues.webkit.org/results/12324173
New failing tests: http/tests/referrer-policy-script/origin/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin/cross-origin-http.https.html http/tests/referrer-policy-script/same-origin/cross-origin-http.https.html http/tests/referrer-policy-script/unsafe-url/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin-when-cross-origin/cross-origin-http.https.html http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http.https.html
EWS Watchlist
Comment 26
2019-05-29 21:11:18 PDT
Created
attachment 370918
[details]
Archive of layout-test-results from ews116 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-highsierra Platform: Mac OS X 10.13.6
Rob Buis
Comment 27
2019-05-30 01:00:16 PDT
Created
attachment 370926
[details]
Patch
EWS Watchlist
Comment 28
2019-05-30 02:16:08 PDT
Comment on
attachment 370926
[details]
Patch
Attachment 370926
[details]
did not pass mac-ews (mac): Output:
https://webkit-queues.webkit.org/results/12326139
New failing tests: http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http.https.html http/tests/referrer-policy-script/origin/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin/cross-origin-http.https.html
EWS Watchlist
Comment 29
2019-05-30 02:16:10 PDT
Created
attachment 370928
[details]
Archive of layout-test-results from ews100 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 30
2019-05-30 02:57:28 PDT
Comment on
attachment 370926
[details]
Patch
Attachment 370926
[details]
did not pass mac-debug-ews (mac): Output:
https://webkit-queues.webkit.org/results/12326214
New failing tests: http/tests/referrer-policy-script/same-origin/cross-origin-http.https.html http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http.https.html http/tests/referrer-policy-script/origin/cross-origin-http.https.html http/tests/referrer-policy-script/strict-origin/cross-origin-http.https.html
EWS Watchlist
Comment 31
2019-05-30 02:57:30 PDT
Created
attachment 370931
[details]
Archive of layout-test-results from ews116 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-highsierra Platform: Mac OS X 10.13.6
Rob Buis
Comment 32
2019-05-30 03:25:53 PDT
Created
attachment 370933
[details]
Patch
EWS Watchlist
Comment 33
2019-05-30 05:31:35 PDT
Comment on
attachment 370933
[details]
Patch
Attachment 370933
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/12327053
New failing tests: http/tests/referrer-policy-script/origin/same-origin.html http/tests/referrer-policy-script/strict-origin-when-cross-origin/cross-origin-http-http.html http/tests/referrer-policy-script/origin/cross-origin-http-http.html http/tests/referrer-policy-script/strict-origin/same-origin.html http/tests/referrer-policy-script/same-origin/cross-origin-http-http.html http/tests/referrer-policy-script/no-referrer/cross-origin-http-http.html http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http-http.html http/tests/referrer-policy-script/origin-when-cross-origin/cross-origin-http.https.html
EWS Watchlist
Comment 34
2019-05-30 05:31:37 PDT
Created
attachment 370936
[details]
Archive of layout-test-results from ews214 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews214 Port: win-future Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Rob Buis
Comment 35
2019-05-30 06:34:51 PDT
Created
attachment 370939
[details]
Patch
youenn fablet
Comment 36
2019-07-15 08:57:55 PDT
Comment on
attachment 370939
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=370939&action=review
> Source/WebCore/ChangeLog:36 > + http/tests/referrer-policy-script/unsafe-url/same-origin.html
Nice to have all these tests. I guess I should finish the reimport of WPT referrer policy tests. I wonder whether some of these might be redundant though or would be worth exporting to WPT.
> Source/WebCore/bindings/js/CachedScriptFetcher.h:45 > + CachedScriptFetcher(const String& nonce, const ReferrerPolicy& referrerPolicy, const String& charset, const AtomicString& initiatorName, bool isInUserAgentShadowTree)
s/const ReferrerPolicy& policy/ReferrerPolicy
> Source/WebCore/dom/LoadableClassicScript.cpp:38 > +Ref<LoadableClassicScript> LoadableClassicScript::create(const String& nonce, const String& integrityMetadata, const ReferrerPolicy& policy, const String& crossOriginMode, const String& charset, const AtomicString& initiatorName, bool isInUserAgentShadowTree)
Ditto, below as well
> LayoutTests/platform/win/TestExpectations:4299 > +
webkit.org/b/195461
http/tests/referrer-policy-script [ Skip ]
Do we know why they are failing here? I would have thought they would be similar to Mac-wk1.
Rob Buis
Comment 37
2019-07-16 02:10:57 PDT
Created
attachment 374201
[details]
Patch
Rob Buis
Comment 38
2019-07-16 04:32:58 PDT
Created
attachment 374204
[details]
Patch
Rob Buis
Comment 39
2019-07-16 11:46:37 PDT
Comment on
attachment 370939
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=370939&action=review
>> Source/WebCore/ChangeLog:36 >> + http/tests/referrer-policy-script/unsafe-url/same-origin.html > > Nice to have all these tests. I guess I should finish the reimport of WPT referrer policy tests. > I wonder whether some of these might be redundant though or would be worth exporting to WPT.
It would be great to have the WPT referrer policy tests imported and working. I think the http/tests/referrer-policy-script tests can be removed once that is done, since the WPT tests are even more in depth (same/cross origin, redirects etc.)
>> Source/WebCore/bindings/js/CachedScriptFetcher.h:45 >> + CachedScriptFetcher(const String& nonce, const ReferrerPolicy& referrerPolicy, const String& charset, const AtomicString& initiatorName, bool isInUserAgentShadowTree) > > s/const ReferrerPolicy& policy/ReferrerPolicy
I did this substitution everywhere in the patch.
>> Source/WebCore/dom/LoadableClassicScript.cpp:38 >> +Ref<LoadableClassicScript> LoadableClassicScript::create(const String& nonce, const String& integrityMetadata, const ReferrerPolicy& policy, const String& crossOriginMode, const String& charset, const AtomicString& initiatorName, bool isInUserAgentShadowTree) > > Ditto, below as well
I did this substitution everywhere in the patch.
>> LayoutTests/platform/win/TestExpectations:4299 >> +
webkit.org/b/195461
http/tests/referrer-policy-script [ Skip ] > > Do we know why they are failing here? > I would have thought they would be similar to Mac-wk1.
I think I read some bug report stating a lot of loading test started failing on win after some "framework" was removed or updated, but I can't find that bug.
WebKit Commit Bot
Comment 40
2019-07-17 02:03:43 PDT
Comment on
attachment 374204
[details]
Patch Clearing flags on attachment: 374204 Committed
r247509
: <
https://trac.webkit.org/changeset/247509
>
WebKit Commit Bot
Comment 41
2019-07-17 02:03:46 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 42
2019-07-17 02:04:35 PDT
<
rdar://problem/53193901
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug