summaryrefslogtreecommitdiff
path: root/dom/base/nsTreeSanitizer.h
diff options
context:
space:
mode:
authorHenri Sivonen <hsivonen@hsivonen.fi>2020-11-19 19:06:03 +0000
committerMoonchild <moonchild@palemoon.org>2020-11-19 19:06:03 +0000
commit828efb443944e36ddcd12132bc1268b96072916b (patch)
tree55a78d83037156166aa07fe058b130e39c7bf512 /dom/base/nsTreeSanitizer.h
parent2497bf0499c85c560121d57c6ba5aaabf64cee8a (diff)
downloaduxp-828efb443944e36ddcd12132bc1268b96072916b.tar.gz
[dom] Remove attributes from descendants when setting sanitized style.
This avoids a number of problems with incomplete sanitation.
Diffstat (limited to 'dom/base/nsTreeSanitizer.h')
-rw-r--r--dom/base/nsTreeSanitizer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/dom/base/nsTreeSanitizer.h b/dom/base/nsTreeSanitizer.h
index b8700d775f..b4a333f619 100644
--- a/dom/base/nsTreeSanitizer.h
+++ b/dom/base/nsTreeSanitizer.h
@@ -184,6 +184,12 @@ class MOZ_STACK_CLASS nsTreeSanitizer {
void RemoveAllAttributes(nsIContent* aElement);
/**
+ * Removes all attributes from the descendants of an element but not from
+ * the element itself.
+ */
+ void RemoveAllAttributesFromDescendants(mozilla::dom::Element* aElement);
+
+ /**
* The whitelist of HTML elements.
*/
static nsTHashtable<nsISupportsHashKey>* sElementsHTML;