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: */
|
2012-05-21 15:12:37 +04: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/. */
|
2005-09-07 02:30:40 +04:00
|
|
|
|
|
|
|
#ifndef __NS_SVGFILTERFRAME_H__
|
|
|
|
#define __NS_SVGFILTERFRAME_H__
|
|
|
|
|
2013-05-29 23:37:49 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2012-03-20 16:15:55 +04:00
|
|
|
#include "nsFrame.h"
|
|
|
|
#include "nsQueryFrame.h"
|
2007-03-29 12:54:53 +04:00
|
|
|
#include "nsSVGContainerFrame.h"
|
2012-03-18 14:32:02 +04:00
|
|
|
#include "nsSVGUtils.h"
|
2005-09-07 02:30:40 +04:00
|
|
|
|
2017-10-03 01:05:19 +03:00
|
|
|
class nsAtom;
|
2012-03-20 16:15:55 +04:00
|
|
|
class nsIContent;
|
|
|
|
class nsIFrame;
|
2008-02-18 05:04:26 +03:00
|
|
|
|
2013-09-07 06:15:49 +04:00
|
|
|
struct nsRect;
|
|
|
|
|
2013-02-18 03:28:47 +04:00
|
|
|
namespace mozilla {
|
2019-04-09 23:04:33 +03:00
|
|
|
class SVGAnimatedLength;
|
2019-04-16 10:24:49 +03:00
|
|
|
class PresShell;
|
2013-02-18 03:28:47 +04:00
|
|
|
namespace dom {
|
|
|
|
class SVGFilterElement;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2018-09-06 04:23:14 +03:00
|
|
|
class nsSVGFilterFrame final : public nsSVGContainerFrame {
|
2019-04-16 10:24:49 +03:00
|
|
|
friend nsIFrame* NS_NewSVGFilterFrame(mozilla::PresShell* aPresShell,
|
2018-03-22 21:20:41 +03:00
|
|
|
ComputedStyle* aStyle);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2007-09-07 13:30:51 +04:00
|
|
|
protected:
|
2019-02-05 19:45:54 +03:00
|
|
|
explicit nsSVGFilterFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
|
|
|
|
: nsSVGContainerFrame(aStyle, aPresContext, kClassID),
|
2016-04-18 10:02:37 +03:00
|
|
|
mLoopFlag(false),
|
|
|
|
mNoHRefURI(false) {
|
2013-07-12 11:13:07 +04:00
|
|
|
AddStateBits(NS_FRAME_IS_NONDISPLAY);
|
2012-03-10 23:28:06 +04:00
|
|
|
}
|
2005-09-07 02:30:40 +04:00
|
|
|
|
2008-09-11 04:24:16 +04:00
|
|
|
public:
|
2017-05-26 13:11:11 +03:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsSVGFilterFrame)
|
2009-09-12 20:49:24 +04:00
|
|
|
|
2012-07-20 20:41:29 +04:00
|
|
|
// nsIFrame methods:
|
2013-02-14 15:12:27 +04:00
|
|
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsDisplayListSet& aLists) override {}
|
2012-07-20 20:41:29 +04:00
|
|
|
|
2014-02-18 11:47:48 +04:00
|
|
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t aModType) override;
|
2011-10-09 21:17:29 +04:00
|
|
|
|
2009-01-19 21:31:34 +03:00
|
|
|
#ifdef DEBUG
|
2014-05-25 02:20:40 +04:00
|
|
|
virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsIFrame* aPrevInFlow) override;
|
2009-01-19 21:31:34 +03:00
|
|
|
#endif
|
|
|
|
|
2012-03-28 15:31:47 +04:00
|
|
|
private:
|
2014-02-06 02:04:42 +04:00
|
|
|
friend class nsSVGFilterInstance;
|
2018-08-21 16:54:26 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Parses this frame's href and - if it references another filter - returns
|
|
|
|
* it. It also makes this frame a rendering observer of the specified ID.
|
|
|
|
*/
|
2012-03-28 15:31:47 +04:00
|
|
|
nsSVGFilterFrame* GetReferencedFilter();
|
|
|
|
|
|
|
|
// Accessors to lookup filter attributes
|
2012-08-22 19:56:38 +04:00
|
|
|
uint16_t GetEnumValue(uint32_t aIndex, nsIContent* aDefault);
|
|
|
|
uint16_t GetEnumValue(uint32_t aIndex) {
|
2012-03-28 15:31:47 +04:00
|
|
|
return GetEnumValue(aIndex, mContent);
|
|
|
|
}
|
2019-04-09 23:04:33 +03:00
|
|
|
const mozilla::SVGAnimatedLength* GetLengthValue(uint32_t aIndex,
|
|
|
|
nsIContent* aDefault);
|
|
|
|
const mozilla::SVGAnimatedLength* GetLengthValue(uint32_t aIndex) {
|
2012-03-28 15:31:47 +04:00
|
|
|
return GetLengthValue(aIndex, mContent);
|
|
|
|
}
|
2013-02-18 03:28:47 +04:00
|
|
|
const mozilla::dom::SVGFilterElement* GetFilterContent(nsIContent* aDefault);
|
|
|
|
const mozilla::dom::SVGFilterElement* GetFilterContent() {
|
2012-03-28 15:31:47 +04:00
|
|
|
return GetFilterContent(mContent);
|
|
|
|
}
|
|
|
|
|
|
|
|
// This flag is used to detect loops in xlink:href processing
|
|
|
|
bool mLoopFlag;
|
|
|
|
bool mNoHRefURI;
|
2007-03-29 12:54:53 +04:00
|
|
|
};
|
2005-11-11 17:36:26 +03:00
|
|
|
|
2005-09-07 02:30:40 +04:00
|
|
|
#endif
|