gecko-dev/dom/xml
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
..
crashtests Bug 1405878. Make sure to notify for our kids, if needed, before calling DoneAddingChildren in the XML content sink. r=hsivonen 2017-10-09 14:49:19 -04:00
resources Bug 863246 - Move resources that need to be exposed to web content to locations that are marked as contentaccessible r=billm 2017-06-08 17:52:46 +08:00
test Bug 1365506 - fix XHTML/XUL tests that use data: URI. r=smaug 2017-05-23 09:02:06 +08:00
CDATASection.cpp
CDATASection.h
ProcessingInstruction.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
ProcessingInstruction.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
XMLDocument.cpp Bug 1393806 part 3. Change dom::ReparentWrapper to take an ErrorResult. r=peterv 2017-09-13 13:34:55 -04:00
XMLDocument.h Bug 1387956 (part 1) - Change |nsWindowSizes*| arguments to |nsWindowSizes&|. r=mccr8. 2017-08-10 14:13:22 +10:00
XMLStylesheetProcessingInstruction.cpp Bug 1406278: Part 8b - Use subject principal as triggering principal in style <link> "href" attribute. r=bz 2017-10-05 19:40:48 -07:00
XMLStylesheetProcessingInstruction.h Bug 1406278: Part 8b - Use subject principal as triggering principal in style <link> "href" attribute. r=bz 2017-10-05 19:40:48 -07:00
htmlmathml-f.ent
moz.build Bug 1335099 - add BUG_COMPONENT to many dom/* subdir files. r=overholt 2017-02-06 09:45:55 -05:00
nsIXMLContentSink.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
nsXMLContentSink.cpp Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
nsXMLContentSink.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
nsXMLElement.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
nsXMLElement.h Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz 2017-04-20 12:57:48 -07:00
nsXMLFragmentContentSink.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
nsXMLPrettyPrinter.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
nsXMLPrettyPrinter.h