editor/libeditor/text/nsTextEditUtils.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 nsTextEditUtils_h__
     7 #define nsTextEditUtils_h__
     9 #include "nscore.h"
    11 namespace mozilla {
    12 namespace dom {
    13 class Element;
    14 } // namespace dom
    15 } // namespace mozilla
    17 class nsIDOMNode;
    18 class nsPlaintextEditor;
    20 class nsTextEditUtils
    21 {
    22 public:
    23   // from nsTextEditRules:
    24   static bool IsBody(nsIDOMNode* aNode);
    25   static bool IsBreak(nsIDOMNode* aNode);
    26   static bool IsMozBR(nsIDOMNode* aNode);
    27   static bool IsMozBR(nsINode* aNode);
    28   static bool HasMozAttr(nsIDOMNode* aNode);
    29 };
    31 /***************************************************************************
    32  * stack based helper class for detecting end of editor initialization, in
    33  * order to trigger "end of init" initialization of the edit rules.
    34  */
    35 class nsAutoEditInitRulesTrigger
    36 {
    37 private:
    38   nsPlaintextEditor* mEd;
    39   nsresult& mRes;
    40 public:
    41   nsAutoEditInitRulesTrigger(nsPlaintextEditor* aEd, nsresult& aRes);
    42   ~nsAutoEditInitRulesTrigger();
    43 };
    45 #endif /* nsTextEditUtils_h__ */

mercurial