Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set tw=80 expandtab softtabstop=2 ts=2 sw=2: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /**
8 * nsMappedAttributeElement is the base for elements supporting style mapped
9 * attributes via nsMappedAttributes (HTML and MathML).
10 */
12 #ifndef NS_MAPPEDATTRIBUTEELEMENT_H_
13 #define NS_MAPPEDATTRIBUTEELEMENT_H_
15 #include "mozilla/Attributes.h"
16 #include "nsStyledElement.h"
18 class nsMappedAttributes;
19 struct nsRuleData;
21 typedef void (*nsMapRuleToAttributesFunc)(const nsMappedAttributes* aAttributes,
22 nsRuleData* aData);
24 typedef nsStyledElement nsMappedAttributeElementBase;
26 class nsMappedAttributeElement : public nsMappedAttributeElementBase
27 {
29 protected:
31 nsMappedAttributeElement(already_AddRefed<nsINodeInfo>& aNodeInfo)
32 : nsMappedAttributeElementBase(aNodeInfo)
33 {}
35 public:
36 virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
38 static void MapNoAttributesInto(const nsMappedAttributes* aAttributes,
39 nsRuleData* aRuleData);
41 NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) MOZ_OVERRIDE;
42 virtual bool SetMappedAttribute(nsIDocument* aDocument,
43 nsIAtom* aName,
44 nsAttrValue& aValue,
45 nsresult* aRetval) MOZ_OVERRIDE;
46 };
48 #endif // NS_MAPPEDATTRIBUTEELEMENT_H_