2017-10-27 20:33:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2017-06-14 16:05:37 +03:00
|
|
|
/* 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 http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2020-07-15 02:40:05 +03:00
|
|
|
#ifndef LAYOUT_SVG_SVGVIEWPORTFRAME_H_
|
|
|
|
#define LAYOUT_SVG_SVGVIEWPORTFRAME_H_
|
2017-06-14 16:05:37 +03:00
|
|
|
|
|
|
|
#include "mozilla/Attributes.h"
|
2020-07-12 19:38:26 +03:00
|
|
|
#include "mozilla/ISVGSVGFrame.h"
|
2020-07-09 04:33:33 +03:00
|
|
|
#include "mozilla/SVGContainerFrame.h"
|
2017-06-14 16:05:37 +03:00
|
|
|
|
|
|
|
class gfxContext;
|
2020-06-27 08:39:42 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
2017-06-14 16:05:37 +03:00
|
|
|
/**
|
|
|
|
* Superclass for inner SVG frames and symbol frames.
|
|
|
|
*/
|
2020-07-09 21:34:54 +03:00
|
|
|
class SVGViewportFrame : public SVGDisplayContainerFrame, public ISVGSVGFrame {
|
2017-06-14 16:05:37 +03:00
|
|
|
protected:
|
2020-06-27 08:39:42 +03:00
|
|
|
SVGViewportFrame(ComputedStyle* aStyle, nsPresContext* aPresContext,
|
|
|
|
nsIFrame::ClassID aID)
|
2020-07-09 04:33:33 +03:00
|
|
|
: SVGDisplayContainerFrame(aStyle, aPresContext, aID) {}
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2017-06-14 16:05:37 +03:00
|
|
|
public:
|
2020-06-27 08:39:42 +03:00
|
|
|
NS_DECL_ABSTRACT_FRAME(SVGViewportFrame)
|
2017-06-14 16:05:37 +03:00
|
|
|
|
|
|
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
|
|
|
int32_t aModType) override;
|
|
|
|
|
2020-07-09 21:34:54 +03:00
|
|
|
// ISVGDisplayableFrame interface:
|
2017-06-14 16:05:37 +03:00
|
|
|
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
|
|
|
imgDrawingParams& aImgParams,
|
|
|
|
const nsIntRect* aDirtyRect = nullptr) override;
|
|
|
|
virtual void ReflowSVG() override;
|
|
|
|
virtual void NotifySVGChanged(uint32_t aFlags) override;
|
|
|
|
SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
|
|
|
|
uint32_t aFlags) override;
|
|
|
|
virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
|
|
|
|
2020-07-09 04:33:33 +03:00
|
|
|
// SVGContainerFrame methods:
|
2017-06-14 16:05:37 +03:00
|
|
|
virtual bool HasChildrenOnlyTransform(Matrix* aTransform) const override;
|
|
|
|
|
2020-07-09 21:34:54 +03:00
|
|
|
// ISVGSVGFrame interface:
|
2017-06-14 16:05:37 +03:00
|
|
|
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
|
|
|
|
};
|
|
|
|
|
2020-06-27 08:39:42 +03:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2020-07-15 02:40:05 +03:00
|
|
|
#endif // LAYOUT_SVG_SVGVIEWPORTFRAME_H_
|