Bug 1332353 - Make it clearer when a stylesheet is really owned by its mDocument

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 05:46:23 -04:00 committed by Roy Tam
commit 5d444ef68a
13 changed files with 83 additions and 38 deletions

View file

@ -2209,9 +2209,9 @@ Loader::LoadChildSheet(StyleSheet* aParentSheet,
nsCOMPtr<nsINode> owningNode;
// check for an owning document: if none, don't bother walking up the parent
// sheets
if (aParentSheet->GetOwningDocument()) {
// check for an associated document: if none, don't bother walking up the
// parent sheets
if (aParentSheet->GetAssociatedDocument()) {
StyleSheet* topSheet = aParentSheet;
while (StyleSheet* parent = topSheet->GetParentSheet()) {
topSheet = parent;