diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:46:23 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:46:23 -0400 |
commit | 2e2190a5044943bde31679996afdc3558d22231b (patch) | |
tree | 898dd347d142825ae8b7db30b6172a2a1271a2b3 /layout/style/StyleRule.cpp | |
parent | ea3a2ce279f92457bfd6168f97b106be193ea740 (diff) | |
download | UXP-2e2190a5044943bde31679996afdc3558d22231b.tar UXP-2e2190a5044943bde31679996afdc3558d22231b.tar.gz UXP-2e2190a5044943bde31679996afdc3558d22231b.tar.lz UXP-2e2190a5044943bde31679996afdc3558d22231b.tar.xz UXP-2e2190a5044943bde31679996afdc3558d22231b.zip |
Bug 1332353 - Make it clearer when a stylesheet is really owned by its mDocument
Tag #1375
Diffstat (limited to 'layout/style/StyleRule.cpp')
-rw-r--r-- | layout/style/StyleRule.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp index 598cb7c74..622f498dd 100644 --- a/layout/style/StyleRule.cpp +++ b/layout/style/StyleRule.cpp @@ -1209,13 +1209,13 @@ DOMCSSDeclarationImpl::SetCSSDeclaration(DeclarationBlock* aDecl) NS_PRECONDITION(mRule, "can only be called when |GetCSSDeclaration| returned a declaration"); - nsCOMPtr<nsIDocument> owningDoc; + nsCOMPtr<nsIDocument> doc; RefPtr<CSSStyleSheet> sheet = mRule->GetStyleSheet(); if (sheet) { - owningDoc = sheet->GetOwningDocument(); + doc = sheet->GetAssociatedDocument(); } - mozAutoDocUpdate updateBatch(owningDoc, UPDATE_STYLE, true); + mozAutoDocUpdate updateBatch(doc, UPDATE_STYLE, true); mRule->SetDeclaration(aDecl->AsGecko()); @@ -1223,8 +1223,8 @@ DOMCSSDeclarationImpl::SetCSSDeclaration(DeclarationBlock* aDecl) sheet->DidDirty(); } - if (owningDoc) { - owningDoc->StyleRuleChanged(sheet, mRule); + if (doc) { + doc->StyleRuleChanged(sheet, mRule); } return NS_OK; } |