mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Revert "Issue #756 - Remove Contextual Identity from DevTools"
This reverts commit 091435f2fd.
This commit is contained in:
parent
caab96c969
commit
393112bc29
6 changed files with 142 additions and 26 deletions
|
|
@ -451,10 +451,21 @@ var StyleSheetActor = protocol.ActorClassWithSpec(styleSheetSpec, {
|
|||
let options = {
|
||||
loadFromCache: true,
|
||||
policy: Ci.nsIContentPolicy.TYPE_INTERNAL_STYLESHEET,
|
||||
window: this.window,
|
||||
charset: this._getCSSCharset()
|
||||
};
|
||||
|
||||
// Bug 1282660 - We use the system principal to load the default internal
|
||||
// stylesheets instead of the content principal since such stylesheets
|
||||
// require system principal to load. At meanwhile, we strip the loadGroup
|
||||
// for preventing the assertion of the userContextId mismatching.
|
||||
// The default internal stylesheets load from the 'resource:' URL.
|
||||
// Bug 1287607, 1291321 - 'chrome' and 'file' protocols should also be handled in the
|
||||
// same way.
|
||||
if (!/^(chrome|file|resource):\/\//.test(this.href)) {
|
||||
options.window = this.window;
|
||||
options.principal = this.document.nodePrincipal;
|
||||
}
|
||||
|
||||
return fetch(this.href, options).then(({ content }) => {
|
||||
this.text = content;
|
||||
return content;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue