mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Issue #2402 - CSP Violation events should have the correct sample for inline contexts. https://bugzilla.mozilla.org/show_bug.cgi?id=1473587 Add preference to increase max length of CSP report source sample. https://bugzilla.mozilla.org/show_bug.cgi?id=1415352 Return valid columnNumber value in CSP violation events. https://bugzilla.mozilla.org/show_bug.cgi?id=1418246
This commit is contained in:
parent
e74612e23e
commit
5b068f3726
38 changed files with 277 additions and 106 deletions
|
|
@ -446,7 +446,8 @@ nsXMLContentSink::SetParser(nsParserBase* aParser)
|
|||
|
||||
nsresult
|
||||
nsXMLContentSink::CreateElement(const char16_t** aAtts, uint32_t aAttsCount,
|
||||
mozilla::dom::NodeInfo* aNodeInfo, uint32_t aLineNumber,
|
||||
mozilla::dom::NodeInfo* aNodeInfo,
|
||||
uint32_t aLineNumber, uint32_t aColumnNumber,
|
||||
nsIContent** aResult, bool* aAppendContent,
|
||||
FromParser aFromParser)
|
||||
{
|
||||
|
|
@ -466,6 +467,7 @@ nsXMLContentSink::CreateElement(const char16_t** aAtts, uint32_t aAttsCount,
|
|||
) {
|
||||
nsCOMPtr<nsIScriptElement> sele = do_QueryInterface(content);
|
||||
sele->SetScriptLineNumber(aLineNumber);
|
||||
sele->SetScriptColumnNumber(aColumnNumber);
|
||||
sele->SetCreatorParser(GetParser());
|
||||
}
|
||||
|
||||
|
|
@ -500,6 +502,7 @@ nsXMLContentSink::CreateElement(const char16_t** aAtts, uint32_t aAttsCount,
|
|||
}
|
||||
if (!aNodeInfo->Equals(nsGkAtoms::link, kNameSpaceID_XHTML)) {
|
||||
ssle->SetLineNumber(aFromParser ? aLineNumber : 0);
|
||||
ssle->SetColumnNumber(aFromParser ? aColumnNumber : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -918,10 +921,11 @@ NS_IMETHODIMP
|
|||
nsXMLContentSink::HandleStartElement(const char16_t *aName,
|
||||
const char16_t **aAtts,
|
||||
uint32_t aAttsCount,
|
||||
uint32_t aLineNumber)
|
||||
uint32_t aLineNumber,
|
||||
uint32_t aColumnNumber)
|
||||
{
|
||||
return HandleStartElement(aName, aAtts, aAttsCount, aLineNumber,
|
||||
true);
|
||||
aColumnNumber, true);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
@ -929,6 +933,7 @@ nsXMLContentSink::HandleStartElement(const char16_t *aName,
|
|||
const char16_t **aAtts,
|
||||
uint32_t aAttsCount,
|
||||
uint32_t aLineNumber,
|
||||
uint32_t aColumnNumber,
|
||||
bool aInterruptable)
|
||||
{
|
||||
NS_PRECONDITION(aAttsCount % 2 == 0, "incorrect aAttsCount");
|
||||
|
|
@ -963,7 +968,7 @@ nsXMLContentSink::HandleStartElement(const char16_t *aName,
|
|||
nsIDOMNode::ELEMENT_NODE);
|
||||
|
||||
result = CreateElement(aAtts, aAttsCount, nodeInfo, aLineNumber,
|
||||
getter_AddRefs(content), &appendContent,
|
||||
aColumnNumber, getter_AddRefs(content), &appendContent,
|
||||
FROM_PARSER_NETWORK);
|
||||
NS_ENSURE_SUCCESS(result, result);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue