gecko-dev/dom
Kris Maglione 5fdcb5a5d2 Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a loading
principal currently retrieve it from the context node. Since no current
callers require the principal to be the loading principal, and some already
expect it to be the triggering principal (which there's currently no other way
to retrieve), I chose to pass the triggering principal whenever possible, but
use the loading principal to determine the origin URL.

As a follow-up, I'd like to change the nsIContentPolicy interface to
explicitly receive loading and triggering principals, or possibly just
LoadInfo instances, rather than poorly-defined request
origin/principal/context args. But since that may cause trouble for
comm-central, I'd rather not do it as part of this bug.

MozReview-Commit-ID: LqD9GxdzMte

--HG--
extra : rebase_source : 41ce439912ae7b895e0a3b0e660fa6ba571eb50f
2017-10-12 15:43:55 -07:00
..
abort Bug 1402317 - Remove dom.abortController.enabled and dom.abortController.fetch.enabled prefs, r=qdot 2017-09-27 03:50:46 +02:00
animation Bug 1407463 - Drop unused pseudo atom argument from GetBaseContextForElement. r=heycam 2017-10-11 10:00:37 +09:00
asmjscache Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
audiochannel
base Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
battery
bindings Bug 1406820 part 2. Fix some missing member initialization in dom/bindings code. r=qdot 2017-10-11 00:46:18 +01:00
broadcastchannel Bug 1359017 - onmessageerror for BroadcastChannel in case StructuredClone algorithm fails when deserializing, r=masayuki, r=smaug 2017-09-13 05:59:06 +02:00
browser-element Bug 1406278: Part 4 - Use subject principal as triggering principal in <iframe>/<frame> "src" attribute r=bz 2017-10-04 22:59:44 -07:00
cache Bug 1398167 - Remove the temporary fix for not upgrading shema version from 25 to 26. r=bkelly 2017-10-09 11:36:14 +08:00
canvas Bug 989628 - Add crashtest. r=me 2017-10-11 11:52:40 -04:00
commandhandler
console Bug 1403866 - No AutoSafeJSContext in Console.cpp, r=bz 2017-09-29 09:20:58 +02:00
credentialmanagement Bug 1402156 - Cancel any pending requests when u2f.{register,sign} is called r=jcj 2017-10-06 14:45:27 +02:00
crypto Bug 1401803 - WebAuthn types need to return ArrayBuffers r=keeler 2017-09-20 07:32:07 -07:00
encoding Bug 1406819 - Remove various bits of dead code from dom/. r=baku 2017-10-11 10:09:13 +01:00
events Backed out changeset 759a43ebc6bf (bug 1405541) for asserting in devtools/client/performance/test/browser_perf-console-record-03.js on Windows 7. r=backout 2017-10-11 13:15:26 +02:00
fetch Bug 1406820 part 1. Initialize InternalRequest::mBodyLength in the fetch code. r=qdot 2017-10-11 00:46:17 +01:00
file Backed out changeset c68498143c13 (bug 1403771) for bustage at dom/file/StreamBlobImpl.cpp:108: 'GetInternalStream' was not declared in this scope. r=backout on a CLOSED TREE 2017-10-04 19:11:13 +02:00
filehandle Bug 1404845 - Renaming BlobImpl::GetInternalStream to BlobImpl::CreateInputStream, r=smaug 2017-10-02 13:53:12 +02:00
filesystem
flyweb Bug 870698 - Part 10: Replace Append(NS_LITERAL_STRING("")) with AppendLiteral(u""). r=erahm 2017-09-07 18:32:54 -07:00
gamepad Bug 1404147 Fixed Unsigned/Signed comparison in WindowsGamepad.cpp r=qdot 2017-09-28 17:00:05 -05:00
geolocation
grid
html Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
imptests
indexedDB Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
interfaces Bug 1403077 - add two test-only helper functions to access the stylo blocklist. r=heycam 2017-10-09 12:07:04 +08:00
ipc Backed out changeset 759a43ebc6bf (bug 1405541) for asserting in devtools/client/performance/test/browser_perf-console-record-03.js on Windows 7. r=backout 2017-10-11 13:15:26 +02:00
json
jsurl
locales Bug 1406493 - Remove the rest of the attribute deprecation warnings; r=baku f=annevk 2017-10-09 18:26:11 -04:00
manifest Bug 1368024 - Fall back to 'name' when 'short_name' is missing. r=daleharvey 2017-10-05 15:20:04 +08:00
mathml Bug 1406278: Part 1 - Pass subject principal to SetAttribute and friends. r=bz 2017-10-09 14:33:38 -07:00
media Bug 1407917 - Simplify DDLogger string-logging functions - r=jwwang 2017-10-12 17:51:41 +11:00
messagechannel Backed out changeset a8d6f6fd7bda (bug 1359017) for failing wpt's /html/dom/reflection-forms.html. r=backout 2017-09-13 08:56:53 +02:00
network Bug 1404845 - Renaming BlobImpl::GetInternalStream to BlobImpl::CreateInputStream, r=smaug 2017-10-02 13:53:12 +02:00
notification Bug 870698 - Part 4: Replace Equals("") with EqualsLiteral(""). r=erahm 2017-09-06 01:13:45 -07:00
offline Bug 1401848. Remove NS_IMPL_EVENT_HANDLER and its consumers. r=smaug 2017-09-22 18:07:05 -04:00
payments Bug 1403080 - Return null DOMString while PaymentOptions.requestShipping is false. r=baku 2017-09-28 15:20:19 +08:00
performance Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
permission
plugins Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
power
presentation Bug 1402888 - Remove nsIInputStreamPump::Init() offset and limit params, r=smaug 2017-09-26 07:21:44 +02:00
promise Bug 1347644 - Baldr: implement ConsumeStreamCallback in browser (r=bkelly) 2017-10-10 14:41:24 -05:00
push Bug 1407838 - Remove the remains of NS_Alloc/NS_Realloc/NS_Free. r=njn 2017-10-12 11:08:44 +09:00
quota Backed out changeset 20571bff3967 (bug 1389561). r=backout a=backout 2017-10-12 15:10:16 +02:00
res
script Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
secureelement
security Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
smil Bug 1406441 - provide nsSMILCompositor with a move constructor, rather than a copy constructor; r=dholbert 2017-10-09 10:39:38 -04:00
storage Bug 1406819 - Remove various bits of dead code from dom/. r=baku 2017-10-11 10:09:13 +01:00
svg Bug 1398806 - GetCtx and GetNearestViewport should return the nearest svg or symbol element which is now an SVGViewportElement rather than only returning the nearest svg element because a symbol establishes a viewport too. r=dholbert 2017-10-10 07:58:34 +01:00
system Backed out changeset d9bc6c96c492 (bug 1399877) for build bustage a=backout 2017-09-15 14:53:20 -07:00
tests Bug 1347644 - Baldr: implement ConsumeStreamCallback in browser (r=bkelly) 2017-10-10 14:41:24 -05:00
time
u2f Bug 1402156 - Cancel any pending requests when u2f.{register,sign} is called r=jcj 2017-10-06 14:45:27 +02:00
url Bug 870698 - Part 8: Replace Equals(NS_LITERAL_CSTRING("")) with EqualsLiteral(""). r=erahm 2017-09-06 15:00:31 -07:00
vr Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
webauthn Bug 1407565 - Add NS_IsMainThread() assertions to WebAuthnManager r=jcj 2017-10-12 13:16:29 +02:00
webbrowserpersist Backed out changeset f99c758cd03e (bug 1406525) for Windows build bustage 2017-10-06 22:40:54 -07:00
webidl Merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-12 12:03:15 +02:00
workers Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
worklet
xbl Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
xhr Bug 1405571 - Only do a final flush on the XHR text decoder once; r=hsivonen 2017-10-04 15:05:28 -04:00
xml Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
xslt Bug 1406819 - Remove various bits of dead code from dom/. r=baku 2017-10-11 10:09:13 +01:00
xul Bug 1406829 (part 3) - Use [ptr] native for nsAtom pointers in .idl files. r=froydnj. 2017-10-11 08:34:38 +11:00
jar.mn
moz.build