1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 // Keep in (case-insensitive) order:
9 #include "nsSVGEffects.h"
10 #include "nsSVGFilters.h"
12 typedef nsFrame SVGFEUnstyledLeafFrameBase
;
14 class SVGFEUnstyledLeafFrame
: public SVGFEUnstyledLeafFrameBase
17 NS_NewSVGFEUnstyledLeafFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
);
19 SVGFEUnstyledLeafFrame(nsStyleContext
* aContext
)
20 : SVGFEUnstyledLeafFrameBase(aContext
)
22 AddStateBits(NS_FRAME_SVG_LAYOUT
| NS_FRAME_IS_NONDISPLAY
);
26 NS_DECL_FRAMEARENA_HELPERS
28 virtual void BuildDisplayList(nsDisplayListBuilder
* aBuilder
,
29 const nsRect
& aDirtyRect
,
30 const nsDisplayListSet
& aLists
) MOZ_OVERRIDE
{}
32 virtual bool IsFrameOfType(uint32_t aFlags
) const MOZ_OVERRIDE
34 return SVGFEUnstyledLeafFrameBase::IsFrameOfType(aFlags
& ~(nsIFrame::eSVG
));
37 #ifdef DEBUG_FRAME_DUMP
38 virtual nsresult
GetFrameName(nsAString
& aResult
) const MOZ_OVERRIDE
40 return MakeFrameName(NS_LITERAL_STRING("SVGFEUnstyledLeaf"), aResult
);
45 * Get the "type" of the frame
47 * @see nsGkAtoms::svgFEUnstyledLeafFrame
49 virtual nsIAtom
* GetType() const MOZ_OVERRIDE
;
51 virtual nsresult
AttributeChanged(int32_t aNameSpaceID
,
53 int32_t aModType
) MOZ_OVERRIDE
;
55 virtual bool UpdateOverflow() MOZ_OVERRIDE
{
56 // We don't maintain a visual overflow rect
62 NS_NewSVGFEUnstyledLeafFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
)
64 return new (aPresShell
) SVGFEUnstyledLeafFrame(aContext
);
67 NS_IMPL_FRAMEARENA_HELPERS(SVGFEUnstyledLeafFrame
)
70 SVGFEUnstyledLeafFrame::GetType() const
72 return nsGkAtoms::svgFEUnstyledLeafFrame
;
76 SVGFEUnstyledLeafFrame::AttributeChanged(int32_t aNameSpaceID
,
80 SVGFEUnstyledElement
*element
= static_cast<SVGFEUnstyledElement
*>(mContent
);
81 if (element
->AttributeAffectsRendering(aNameSpaceID
, aAttribute
)) {
82 nsSVGEffects::InvalidateRenderingObservers(this);
85 return SVGFEUnstyledLeafFrameBase::AttributeChanged(aNameSpaceID
,
86 aAttribute
, aModType
);