mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
ported from mozilla: Bug 1460920 - Part 1 - Speculative loading script should take referrerpolicy attribute in script element into account r=hsivonen (045f98957a)
This commit is contained in:
parent
ac5f375e8f
commit
281e3f4d1b
5 changed files with 67 additions and 29 deletions
|
|
@ -184,6 +184,8 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace,
|
|||
aAttributes->getValue(nsHtml5AttributeName::ATTR_CROSSORIGIN);
|
||||
nsHtml5String integrity =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_INTEGRITY);
|
||||
nsHtml5String referrerPolicy =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_REFERRERPOLICY);
|
||||
bool async =
|
||||
aAttributes->contains(nsHtml5AttributeName::ATTR_ASYNC);
|
||||
bool defer =
|
||||
|
|
@ -196,6 +198,7 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace,
|
|||
type,
|
||||
crossOrigin,
|
||||
integrity,
|
||||
referrerPolicy,
|
||||
mode == nsHtml5TreeBuilder::IN_HEAD,
|
||||
async,
|
||||
defer,
|
||||
|
|
@ -247,12 +250,15 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace,
|
|||
aAttributes->getValue(nsHtml5AttributeName::ATTR_CROSSORIGIN);
|
||||
nsHtml5String integrity =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_INTEGRITY);
|
||||
nsHtml5String referrerPolicy =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_REFERRERPOLICY);
|
||||
mSpeculativeLoadQueue.AppendElement()->InitScript(
|
||||
url,
|
||||
charset,
|
||||
type,
|
||||
crossOrigin,
|
||||
integrity,
|
||||
referrerPolicy,
|
||||
mode == nsHtml5TreeBuilder::IN_HEAD,
|
||||
false,
|
||||
false,
|
||||
|
|
@ -349,12 +355,15 @@ nsHtml5TreeBuilder::createElement(int32_t aNamespace,
|
|||
aAttributes->getValue(nsHtml5AttributeName::ATTR_CROSSORIGIN);
|
||||
nsHtml5String integrity =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_INTEGRITY);
|
||||
nsHtml5String referrerPolicy =
|
||||
aAttributes->getValue(nsHtml5AttributeName::ATTR_REFERRERPOLICY);
|
||||
mSpeculativeLoadQueue.AppendElement()->InitScript(
|
||||
url,
|
||||
nullptr,
|
||||
type,
|
||||
crossOrigin,
|
||||
integrity,
|
||||
referrerPolicy,
|
||||
mode == nsHtml5TreeBuilder::IN_HEAD,
|
||||
false /* async */,
|
||||
false /* defer */,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue