editor/libeditor/text/nsTextEditUtils.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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