summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/contentextensions
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/contentextensions')
-rw-r--r--Source/WebCore/contentextensions/ContentExtensionStyleSheet.cpp7
-rw-r--r--Source/WebCore/contentextensions/ContentExtensionStyleSheet.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/Source/WebCore/contentextensions/ContentExtensionStyleSheet.cpp b/Source/WebCore/contentextensions/ContentExtensionStyleSheet.cpp
index d3126773f..44d7c5738 100644
--- a/Source/WebCore/contentextensions/ContentExtensionStyleSheet.cpp
+++ b/Source/WebCore/contentextensions/ContentExtensionStyleSheet.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -43,6 +43,11 @@ ContentExtensionStyleSheet::ContentExtensionStyleSheet(Document& document)
m_styleSheet->contents().setIsUserStyleSheet(true);
}
+ContentExtensionStyleSheet::~ContentExtensionStyleSheet()
+{
+ m_styleSheet->clearOwnerNode();
+}
+
bool ContentExtensionStyleSheet::addDisplayNoneSelector(const String& selector, uint32_t selectorID)
{
ASSERT(selectorID != std::numeric_limits<uint32_t>::max());
diff --git a/Source/WebCore/contentextensions/ContentExtensionStyleSheet.h b/Source/WebCore/contentextensions/ContentExtensionStyleSheet.h
index a503b586a..514407676 100644
--- a/Source/WebCore/contentextensions/ContentExtensionStyleSheet.h
+++ b/Source/WebCore/contentextensions/ContentExtensionStyleSheet.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -45,6 +45,7 @@ public:
{
return adoptRef(*new ContentExtensionStyleSheet(document));
}
+ virtual ~ContentExtensionStyleSheet();
bool addDisplayNoneSelector(const String& selector, uint32_t selectorID);