mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Issue #2736 - Part 12: Re-work style <link> href attribute.
Use subject principal as triggering principal in style <link> "href" attribute.
This commit is contained in:
parent
dde21838de
commit
60ad5b2ffd
14 changed files with 51 additions and 29 deletions
|
|
@ -2015,6 +2015,7 @@ Loader::LoadInlineStyle(nsIContent* aElement,
|
|||
nsresult
|
||||
Loader::LoadStyleLink(nsIContent* aElement,
|
||||
nsIURI* aURL,
|
||||
nsIPrincipal* aTriggeringPrincipal,
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aMedia,
|
||||
bool aHasAlternateRel,
|
||||
|
|
@ -2044,11 +2045,9 @@ Loader::LoadStyleLink(nsIContent* aElement,
|
|||
nsIPrincipal* loadingPrincipal = aElement ? aElement->NodePrincipal()
|
||||
: mDocument->NodePrincipal();
|
||||
|
||||
//SHOULD BE:
|
||||
//nsIPrincipal* principal = aTriggeringPrincipal ? aTriggeringPrincipal
|
||||
// : loadingPrincipal;
|
||||
nsIPrincipal* principal = loadingPrincipal;
|
||||
|
||||
nsIPrincipal* principal = aTriggeringPrincipal ? aTriggeringPrincipal
|
||||
: loadingPrincipal;
|
||||
|
||||
nsISupports* context = aElement;
|
||||
if (!context) {
|
||||
context = mDocument;
|
||||
|
|
|
|||
|
|
@ -254,6 +254,9 @@ public:
|
|||
*
|
||||
* @param aElement the element linking to the the stylesheet. May be null.
|
||||
* @param aURL the URL of the sheet.
|
||||
* @param aTriggeringPrincipal the triggering principal for the load. May be
|
||||
* null, in which case the NodePrincipal() of the element (or
|
||||
* document if aElement is null) should be used.
|
||||
* @param aTitle the title of the sheet.
|
||||
* @param aMedia the media string for the sheet.
|
||||
* @param aHasAlternateRel whether the rel for this link included
|
||||
|
|
@ -269,6 +272,7 @@ public:
|
|||
*/
|
||||
nsresult LoadStyleLink(nsIContent* aElement,
|
||||
nsIURI* aURL,
|
||||
nsIPrincipal* aTriggeringPrincipal,
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aMedia,
|
||||
bool aHasAlternateRel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue