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 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_a11y_HTMLElementAccessibles_h__
7 #define mozilla_a11y_HTMLElementAccessibles_h__
9 #include "BaseAccessibles.h"
10 #include "nsAutoPtr.h"
12 namespace mozilla {
13 namespace a11y {
15 /**
16 * Used for HTML hr element.
17 */
18 class HTMLHRAccessible : public LeafAccessible
19 {
20 public:
22 HTMLHRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
23 LeafAccessible(aContent, aDoc) {}
25 // Accessible
26 virtual a11y::role NativeRole();
27 };
29 /**
30 * Used for HTML br element.
31 */
32 class HTMLBRAccessible : public LeafAccessible
33 {
34 public:
35 HTMLBRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
36 LeafAccessible(aContent, aDoc)
37 {
38 mType = eHTMLBRType;
39 }
41 // Accessible
42 virtual a11y::role NativeRole();
43 virtual uint64_t NativeState();
45 protected:
46 // Accessible
47 virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
48 };
50 /**
51 * Used for HTML label element.
52 */
53 class HTMLLabelAccessible : public HyperTextAccessibleWrap
54 {
55 public:
57 HTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc) :
58 HyperTextAccessibleWrap(aContent, aDoc) {}
60 NS_DECL_ISUPPORTS_INHERITED
62 // Accessible
63 virtual a11y::role NativeRole();
64 virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
66 protected:
67 virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
68 };
70 /**
71 * Used for HTML output element.
72 */
73 class HTMLOutputAccessible : public HyperTextAccessibleWrap
74 {
75 public:
77 HTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
78 HyperTextAccessibleWrap(aContent, aDoc) {}
80 NS_DECL_ISUPPORTS_INHERITED
82 // Accessible
83 virtual a11y::role NativeRole();
84 virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
85 virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
86 };
88 } // namespace a11y
89 } // namespace mozilla
91 #endif