summaryrefslogtreecommitdiffstats
path: root/layout/style/ServoStyleSheet.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 05:46:23 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 05:46:23 -0400
commit2e2190a5044943bde31679996afdc3558d22231b (patch)
tree898dd347d142825ae8b7db30b6172a2a1271a2b3 /layout/style/ServoStyleSheet.cpp
parentea3a2ce279f92457bfd6168f97b106be193ea740 (diff)
downloadUXP-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/ServoStyleSheet.cpp')
-rw-r--r--layout/style/ServoStyleSheet.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/layout/style/ServoStyleSheet.cpp b/layout/style/ServoStyleSheet.cpp
index cfeae20d2..5f2a925b5 100644
--- a/layout/style/ServoStyleSheet.cpp
+++ b/layout/style/ServoStyleSheet.cpp
@@ -30,19 +30,23 @@ ServoStyleSheet::HasRules() const
}
void
-ServoStyleSheet::SetOwningDocument(nsIDocument* aDocument)
+ServoStyleSheet::SetAssociatedDocument(nsIDocument* aDocument,
+ DocumentAssociationMode aAssociationMode)
{
+ MOZ_ASSERT_IF(!aDocument, aAssociationMode == NotOwnedByDocument);
+
// XXXheycam: Traverse to child ServoStyleSheets to set this, like
- // CSSStyleSheet::SetOwningDocument does.
+ // CSSStyleSheet::SetAssociatedDocument does.
mDocument = aDocument;
+ mDocumentAssociationMode = aAssociationMode;
}
ServoStyleSheet*
ServoStyleSheet::GetParentSheet() const
{
// XXXheycam: When we implement support for child sheets, we'll have
- // to fix SetOwningDocument to propagate the owning document down
+ // to fix SetAssociatedDocument to propagate the associated document down
// to the children.
MOZ_CRASH("stylo: not implemented");
}