author longsonr <>
Tue, 19 Mar 2019 00:01:03 +0000
changeset 523737 7a76a71448ff98dd6705f38dda0ad06a6da9e032
parent 509411 291f284eed9ef10fce35ffe4c69abb1d6ff581d6
child 526913 1242bd22d38d4b6e2051d2bb2e94842aa1c496ac
permissions -rw-r--r--
Bug 1518666 part 2 - Move existing SVGAnimated classes to DOMSVGAnimated so that we can rename various existing classes to SVGAnimated later r=dholbert

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#ifndef mozilla_dom_SVGClipPathElement_h
#define mozilla_dom_SVGClipPathElement_h

#include "SVGEnum.h"
#include "mozilla/dom/SVGTransformableElement.h"

class nsSVGClipPathFrame;

nsresult NS_NewSVGClipPathElement(
    nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);

namespace mozilla {
namespace dom {

typedef SVGTransformableElement SVGClipPathElementBase;

class SVGClipPathElement final : public SVGClipPathElementBase {
  friend class ::nsSVGClipPathFrame;

  friend nsresult(::NS_NewSVGClipPathElement(
      nsIContent** aResult,
      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
  explicit SVGClipPathElement(
      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
  virtual JSObject* WrapNode(JSContext* cx,
                             JS::Handle<JSObject*> aGivenProto) override;

  virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;

  // WebIDL
  already_AddRefed<DOMSVGAnimatedEnumeration> ClipPathUnits();

  // This is an internal method that does not flush style, and thus
  // the answer may be out of date if there's a pending style flush.
  bool IsUnitsObjectBoundingBox() const;

  SVGEnum mEnumAttributes[1];
  static EnumInfo sEnumInfo[1];

  virtual EnumAttributesInfo GetEnumInfo() override;

}  // namespace dom
}  // namespace mozilla

#endif  // mozilla_dom_SVGClipPathElement_h