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 nsITextControlFrame_h___
7 #define nsITextControlFrame_h___
9 #include "nsIFormControlFrame.h"
11 class nsIEditor;
12 class nsISelectionController;
13 class nsFrameSelection;
15 class nsITextControlFrame : public nsIFormControlFrame
16 {
17 public:
18 NS_DECL_QUERYFRAME_TARGET(nsITextControlFrame)
20 enum SelectionDirection {
21 eNone,
22 eForward,
23 eBackward
24 };
26 NS_IMETHOD GetEditor(nsIEditor **aEditor) = 0;
28 NS_IMETHOD SetSelectionStart(int32_t aSelectionStart) = 0;
29 NS_IMETHOD SetSelectionEnd(int32_t aSelectionEnd) = 0;
31 NS_IMETHOD SetSelectionRange(int32_t aSelectionStart,
32 int32_t aSelectionEnd,
33 SelectionDirection aDirection = eNone) = 0;
34 NS_IMETHOD GetSelectionRange(int32_t* aSelectionStart,
35 int32_t* aSelectionEnd,
36 SelectionDirection* aDirection = nullptr) = 0;
38 NS_IMETHOD GetOwnedSelectionController(nsISelectionController** aSelCon) = 0;
39 virtual nsFrameSelection* GetOwnedFrameSelection() = 0;
41 virtual nsresult GetPhonetic(nsAString& aPhonetic) = 0;
43 /**
44 * Ensure editor is initialized with the proper flags and the default value.
45 * @throws NS_ERROR_NOT_INITIALIZED if mEditor has not been created
46 * @throws various and sundry other things
47 */
48 virtual nsresult EnsureEditorInitialized() = 0;
50 virtual nsresult ScrollSelectionIntoView() = 0;
51 };
53 #endif