mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Bug 1332353 - Make it clearer when a stylesheet is really owned by its mDocument
Tag #1375
This commit is contained in:
parent
db34da8e01
commit
5d444ef68a
13 changed files with 83 additions and 38 deletions
|
|
@ -3473,7 +3473,7 @@ nsDOMWindowUtils::AddSheet(nsIDOMStyleSheet *aSheet, uint32_t aSheetType)
|
|||
nsIDocument::additionalSheetType type = convertSheetType(aSheetType);
|
||||
RefPtr<CSSStyleSheet> sheet = do_QueryObject(aSheet);
|
||||
NS_ENSURE_TRUE(sheet, NS_ERROR_FAILURE);
|
||||
if (sheet->GetOwningDocument()) {
|
||||
if (sheet->GetAssociatedDocument()) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
return doc->AddAdditionalStyleSheet(type, sheet);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue