зеркало из https://github.com/mozilla/gecko-dev.git
Bug 382333 - CTM changes not updating filter invalidation regions.r=longsonr, sr=roc
This commit is contained in:
Родитель
f1137d54c4
Коммит
71fb4520eb
|
@ -248,6 +248,9 @@ nsSVGDisplayContainerFrame::NotifyCanvasTMChanged(PRBool suppressInvalidation)
|
|||
SVGFrame->NotifyCanvasTMChanged(suppressInvalidation);
|
||||
}
|
||||
}
|
||||
if (!suppressInvalidation)
|
||||
nsSVGUtils::UpdateFilterRegion(this);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -507,7 +507,9 @@ NS_IMETHODIMP
|
|||
nsSVGPathGeometryFrame::NotifyCanvasTMChanged(PRBool suppressInvalidation)
|
||||
{
|
||||
UpdateGraphic(suppressInvalidation);
|
||||
|
||||
if (!suppressInvalidation)
|
||||
nsSVGUtils::UpdateFilterRegion(this);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -171,6 +171,7 @@ public:
|
|||
|
||||
nsRect GetRect() { return mFilterRect; }
|
||||
nsSVGFilterFrame *GetFilterFrame();
|
||||
void UpdateRect();
|
||||
|
||||
// nsIMutationObserver
|
||||
NS_DECL_NSIMUTATIONOBSERVER_PARENTCHAINCHANGED
|
||||
|
@ -207,17 +208,22 @@ nsSVGFilterProperty::GetFilterFrame()
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGFilterProperty::UpdateRect()
|
||||
{
|
||||
nsSVGFilterFrame *filter = GetFilterFrame();
|
||||
if (filter)
|
||||
mFilterRect = filter->GetInvalidationRegion(mFrame);
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGFilterProperty::DoUpdate()
|
||||
{
|
||||
nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(mFrame);
|
||||
if (outerSVGFrame) {
|
||||
outerSVGFrame->InvalidateRect(mFilterRect);
|
||||
nsSVGFilterFrame *filter = GetFilterFrame();
|
||||
if (filter) {
|
||||
mFilterRect = filter->GetInvalidationRegion(mFrame);
|
||||
outerSVGFrame->InvalidateRect(mFilterRect);
|
||||
}
|
||||
UpdateRect();
|
||||
outerSVGFrame->InvalidateRect(mFilterRect);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -695,6 +701,17 @@ nsSVGUtils::FindFilterInvalidation(nsIFrame *aFrame)
|
|||
return rect;
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGUtils::UpdateFilterRegion(nsIFrame *aFrame)
|
||||
{
|
||||
if (aFrame->GetStateBits() & NS_STATE_SVG_FILTERED) {
|
||||
nsSVGFilterProperty *property;
|
||||
property = NS_STATIC_CAST(nsSVGFilterProperty *,
|
||||
aFrame->GetProperty(nsGkAtoms::filter));
|
||||
property->UpdateRect();
|
||||
}
|
||||
}
|
||||
|
||||
float
|
||||
nsSVGUtils::ObjectSpace(nsIDOMSVGRect *aRect, nsSVGLength2 *aLength)
|
||||
{
|
||||
|
|
|
@ -214,6 +214,11 @@ public:
|
|||
*/
|
||||
static nsRect FindFilterInvalidation(nsIFrame *aFrame);
|
||||
|
||||
/*
|
||||
* Update the filter invalidation region for this frame, if relevant.
|
||||
*/
|
||||
static void UpdateFilterRegion(nsIFrame *aFrame);
|
||||
|
||||
/* enum for specifying coordinate direction for ObjectSpace/UserSpace */
|
||||
enum ctxDirection { X, Y, XY };
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче