editor/txtsvc/public/nsIInlineSpellChecker.idl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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 #include "nsISupports.idl"
     7 #include "domstubs.idl"
     9 interface nsISelection;
    10 interface nsIEditor;
    11 interface nsIEditorSpellCheck;
    13 [scriptable, uuid(b7b7a77c-40c4-4196-b0b7-b0338243b3fe)]
    14 interface nsIInlineSpellChecker : nsISupports
    15 {
    16   readonly attribute nsIEditorSpellCheck spellChecker;
    18   void init(in nsIEditor aEditor);
    19   void cleanup(in boolean aDestroyingFrames);
    21   attribute boolean enableRealTimeSpell;
    23   void spellCheckAfterEditorChange(in long aAction,
    24                                    in nsISelection aSelection,
    25                                    in nsIDOMNode aPreviousSelectedNode,
    26                                    in long aPreviousSelectedOffset,
    27                                    in nsIDOMNode aStartNode,
    28                                    in long aStartOffset,
    29                                    in nsIDOMNode aEndNode,
    30                                    in long aEndOffset);
    32   void spellCheckRange(in nsIDOMRange aSelection);
    34   nsIDOMRange getMisspelledWord(in nsIDOMNode aNode, in long aOffset);
    35   void replaceWord(in nsIDOMNode aNode, in long aOffset, in AString aNewword);
    36   void addWordToDictionary(in AString aWord);
    37   void removeWordFromDictionary(in AString aWord);
    39   void ignoreWord(in AString aWord);
    40   void ignoreWords([array, size_is(aCount)] in wstring aWordsToIgnore, in unsigned long aCount);
    41   void updateCurrentDictionary();
    43   readonly attribute boolean spellCheckPending;
    44 };
    46 %{C++
    48 #define MOZ_INLINESPELLCHECKER_CONTRACTID "@mozilla.org/spellchecker-inline;1"
    50 %}

mercurial