Bug 1311270 - Part 4. Handle rendering of mask-clip:no-clip.

MozReview-Commit-ID: 42n7ywfrc3P

--HG--
extra : rebase_source : 74732dd4185f554e226c712738592448df215798
This commit is contained in:
cku 2016-11-23 02:36:04 +08:00
parent 286c728e90
commit 8ac56b97a3

View File

@ -1906,6 +1906,19 @@ nsCSSRendering::GetImageLayerClip(const nsStyleImageLayers::Layer& aLayer,
bool aWillPaintBorder, nscoord aAppUnitsPerPixel,
/* out */ ImageLayerClipState* aClipState)
{
StyleGeometryBox backgroundClip = aLayer.mClip;
if (backgroundClip == StyleGeometryBox::NoClip) {
aClipState->mBGClipArea = aCallerDirtyRect;
aClipState->mHasAdditionalBGClipArea = false;
aClipState->mCustomClip = false;
SetupDirtyRects(aClipState->mBGClipArea, aCallerDirtyRect,
aAppUnitsPerPixel, &aClipState->mDirtyRect,
&aClipState->mDirtyRectGfx);
return;
}
// Compute the outermost boundary of the area that might be painted.
// Same coordinate space as aBorderArea.
Sides skipSides = aForFrame->GetSkipSides();
@ -1914,15 +1927,13 @@ nsCSSRendering::GetImageLayerClip(const nsStyleImageLayers::Layer& aLayer,
bool haveRoundedCorners = GetRadii(aForFrame, aBorder, aBorderArea,
clipBorderArea, aClipState->mRadii);
StyleGeometryBox backgroundClip = aLayer.mClip;
// XXX TODO: bug 1303623 only implements the parser of fill-box|stroke-box|view-box|no-clip.
// So we need to fallback to default value when rendering. We should remove this
// in bug 1311270.
if (backgroundClip == StyleGeometryBox::Fill ||
backgroundClip == StyleGeometryBox::Stroke ||
backgroundClip == StyleGeometryBox::View ||
backgroundClip == StyleGeometryBox::NoClip) {
backgroundClip == StyleGeometryBox::View) {
backgroundClip = StyleGeometryBox::Border;
}