зеркало из https://github.com/mozilla/pjs.git
Bug 614732 - Temporary patch to add an mCoveredRegion to SVG leaf frames to cache their covered regions, since we can't reliably compute their pre-change covered regions for invalidation from the user space bounds now in their mRects (see bug 614732 comment 32 solution #1). r=roc.
This commit is contained in:
Родитель
1d73cae00d
Коммит
7e602bb427
|
@ -348,7 +348,9 @@ nsSVGForeignObjectFrame::GetFrameForPoint(const nsPoint &aPoint)
|
||||||
NS_IMETHODIMP_(nsRect)
|
NS_IMETHODIMP_(nsRect)
|
||||||
nsSVGForeignObjectFrame::GetCoveredRegion()
|
nsSVGForeignObjectFrame::GetCoveredRegion()
|
||||||
{
|
{
|
||||||
return nsSVGUtils::TransformFrameRectToOuterSVG(mRect, GetCanvasTM(), PresContext());
|
// See bug 614732 comment 32:
|
||||||
|
//return nsSVGUtils::TransformFrameRectToOuterSVG(mRect, GetCanvasTM(), PresContext());
|
||||||
|
return mCoveredRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -369,6 +371,7 @@ nsSVGForeignObjectFrame::UpdateCoveredRegion()
|
||||||
mRect = nsLayoutUtils::RoundGfxRectToAppRect(
|
mRect = nsLayoutUtils::RoundGfxRectToAppRect(
|
||||||
gfxRect(0.0, 0.0, w, h),
|
gfxRect(0.0, 0.0, w, h),
|
||||||
PresContext()->AppUnitsPerDevPixel());
|
PresContext()->AppUnitsPerDevPixel());
|
||||||
|
mCoveredRegion = ToCanvasBounds(gfxRect(0.0, 0.0, w, h), GetCanvasTM(), PresContext());
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,6 +166,8 @@ protected:
|
||||||
// Areas dirtied by changes to sub-documents embedded by our decendents
|
// Areas dirtied by changes to sub-documents embedded by our decendents
|
||||||
nsRegion mSubDocDirtyRegion;
|
nsRegion mSubDocDirtyRegion;
|
||||||
|
|
||||||
|
nsRect mCoveredRegion;
|
||||||
|
|
||||||
bool mInReflow;
|
bool mInReflow;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,8 @@ protected:
|
||||||
*/
|
*/
|
||||||
float MaybeOptimizeOpacity(float aFillOrStrokeOpacity);
|
float MaybeOptimizeOpacity(float aFillOrStrokeOpacity);
|
||||||
|
|
||||||
|
nsRect mCoveredRegion;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool GetStrokeDashData(FallibleTArray<gfxFloat>& dashes, gfxFloat *dashOffset);
|
bool GetStrokeDashData(FallibleTArray<gfxFloat>& dashes, gfxFloat *dashOffset);
|
||||||
};
|
};
|
||||||
|
|
|
@ -440,7 +440,9 @@ nsSVGGlyphFrame::GetFrameForPoint(const nsPoint &aPoint)
|
||||||
NS_IMETHODIMP_(nsRect)
|
NS_IMETHODIMP_(nsRect)
|
||||||
nsSVGGlyphFrame::GetCoveredRegion()
|
nsSVGGlyphFrame::GetCoveredRegion()
|
||||||
{
|
{
|
||||||
return nsSVGUtils::TransformFrameRectToOuterSVG(mRect, GetCanvasTM(), PresContext());
|
// See bug 614732 comment 32:
|
||||||
|
//return nsSVGUtils::TransformFrameRectToOuterSVG(mRect, GetCanvasTM(), PresContext());
|
||||||
|
return mCoveredRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -492,6 +494,10 @@ nsSVGGlyphFrame::UpdateCoveredRegion()
|
||||||
PresContext()->AppUnitsPerDevPixel());
|
PresContext()->AppUnitsPerDevPixel());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See bug 614732 comment 32.
|
||||||
|
mCoveredRegion = nsSVGUtils::TransformFrameRectToOuterSVG(
|
||||||
|
mRect, GetCanvasTM(), PresContext());
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -495,6 +495,10 @@ nsSVGImageFrame::UpdateCoveredRegion()
|
||||||
PresContext()->AppUnitsPerDevPixel());
|
PresContext()->AppUnitsPerDevPixel());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See bug 614732 comment 32.
|
||||||
|
mCoveredRegion = nsSVGUtils::TransformFrameRectToOuterSVG(
|
||||||
|
mRect, GetCanvasTM(), PresContext());
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,9 @@ nsSVGPathGeometryFrame::GetFrameForPoint(const nsPoint &aPoint)
|
||||||
NS_IMETHODIMP_(nsRect)
|
NS_IMETHODIMP_(nsRect)
|
||||||
nsSVGPathGeometryFrame::GetCoveredRegion()
|
nsSVGPathGeometryFrame::GetCoveredRegion()
|
||||||
{
|
{
|
||||||
return nsSVGUtils::TransformFrameRectToOuterSVG(mRect, GetCanvasTM(), PresContext());
|
// See bug 614732 comment 32:
|
||||||
|
//return nsSVGUtils::TransformFrameRectToOuterSVG(mRect, GetCanvasTM(), PresContext());
|
||||||
|
return mCoveredRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -216,6 +218,11 @@ nsSVGPathGeometryFrame::UpdateCoveredRegion()
|
||||||
nsSVGUtils::eBBoxIncludeMarkers);
|
nsSVGUtils::eBBoxIncludeMarkers);
|
||||||
mRect = nsLayoutUtils::RoundGfxRectToAppRect(extent,
|
mRect = nsLayoutUtils::RoundGfxRectToAppRect(extent,
|
||||||
PresContext()->AppUnitsPerDevPixel());
|
PresContext()->AppUnitsPerDevPixel());
|
||||||
|
|
||||||
|
// See bug 614732 comment 32.
|
||||||
|
mCoveredRegion = nsSVGUtils::TransformFrameRectToOuterSVG(
|
||||||
|
mRect, GetCanvasTM(), PresContext());
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче