tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SVGElementFactory.h (1739B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef DOM_SVG_SVGELEMENTFACTORY_H_
      8 #define DOM_SVG_SVGELEMENTFACTORY_H_
      9 
     10 #include "mozilla/AlreadyAddRefed.h"
     11 #include "mozilla/dom/FromParser.h"
     12 #include "mozilla/dom/NodeInfo.h"
     13 #include "nsError.h"
     14 
     15 class nsAtom;
     16 class nsIContent;
     17 
     18 namespace mozilla::dom {
     19 
     20 class SVGElementFactory {
     21 public:
     22  static void Init();
     23  static void Shutdown();
     24 };
     25 
     26 using SVGContentCreatorFunction = nsresult (*)(
     27    nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
     28    mozilla::dom::FromParser aFromParser);
     29 
     30 }  // namespace mozilla::dom
     31 
     32 #define SVG_TAG(_tag, _classname)                           \
     33  nsresult NS_NewSVG##_classname##Element(                  \
     34      nsIContent** aResult,                                 \
     35      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo, \
     36      mozilla::dom::FromParser aFromParser);
     37 
     38 #define SVG_FROM_PARSER_TAG(_tag, _classname)               \
     39  nsresult NS_NewSVG##_classname##Element(                  \
     40      nsIContent** aResult,                                 \
     41      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo, \
     42      mozilla::dom::FromParser aFromParser);
     43 #include "mozilla/SVGTagList.h"
     44 #undef SVG_TAG
     45 #undef SVG_FROM_PARSER_TAG
     46 
     47 nsresult NS_NewSVGUnknownElement(
     48    nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
     49    mozilla::dom::FromParser aFromParser);
     50 
     51 #endif  // DOM_SVG_SVGELEMENTFACTORY_H_