tor-browser

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

SVGViewportFrame.h (1732B)


      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 LAYOUT_SVG_SVGVIEWPORTFRAME_H_
      8 #define LAYOUT_SVG_SVGVIEWPORTFRAME_H_
      9 
     10 #include "mozilla/ISVGSVGFrame.h"
     11 #include "mozilla/SVGContainerFrame.h"
     12 
     13 class gfxContext;
     14 
     15 namespace mozilla {
     16 
     17 /**
     18 * Superclass for inner SVG frames and symbol frames.
     19 */
     20 class SVGViewportFrame : public SVGDisplayContainerFrame, public ISVGSVGFrame {
     21 protected:
     22  SVGViewportFrame(ComputedStyle* aStyle, nsPresContext* aPresContext,
     23                   nsIFrame::ClassID aID)
     24      : SVGDisplayContainerFrame(aStyle, aPresContext, aID) {}
     25 
     26 public:
     27  NS_DECL_ABSTRACT_FRAME(SVGViewportFrame)
     28 
     29  nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
     30                            AttrModType aModType) override;
     31 
     32  // ISVGDisplayableFrame interface:
     33  void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
     34                imgDrawingParams& aImgParams) override;
     35  void ReflowSVG() override;
     36  void NotifySVGChanged(ChangeFlags aFlags) override;
     37  SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
     38                              uint32_t aFlags) override;
     39  nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
     40 
     41  // SVGContainerFrame methods:
     42  bool HasChildrenOnlyTransform(Matrix* aTransform) const override;
     43 
     44  // ISVGSVGFrame interface:
     45  void NotifyViewportOrTransformChanged(ChangeFlags aFlags) override;
     46 };
     47 
     48 }  // namespace mozilla
     49 
     50 #endif  // LAYOUT_SVG_SVGVIEWPORTFRAME_H_